TTDPC: New configuration program - Version 1.3.1 Released
Moderator: TTDPatch Moderators
- Wile E. Coyote
- Tycoon
- Posts: 8515
- Joined: 08 Jul 2004 22:14
- Skype: wile.e.coyote2
- Location: Belgrade, Serbia
- Contact:
Seems to work good! Only one suggestion: now it must be placed in same folder as TTD. It'd be good to add option to browse for TTD (I usually hold all tools in separate folder). Second thing: to add option to look for ttdpatch.cfg (like TTDXC). Of course, I hope it'll be new graphics installing in some of next versions.
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.
Runner-up in "Best avatar Forums award" for years 2006 and 2010!
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.
Runner-up in "Best avatar Forums award" for years 2006 and 2010!
Not really. You can install it anywhere and make a shortcut where the 'Start in' is set to your TTD folder.Wile E. Coyote wrote:now it must be placed in same folder as TTD.
When I reach 1.0 there will be an installation program, for the moment I'm just trying to get the basic functionality correct, so that the program is completely controlled by 'switches.xml'. Then it will always be up-to-date with ttdpatch, and I can start adding the eye-candy
- LittleHelper
- Engineer
- Posts: 75
- Joined: 01 Apr 2006 01:52
Re: Beta version of new configuration program
Your efforts, Anders, are really appreciated. I will download this proggie as well and test it. If it works the way you want to behave it, it can become a quite handy tool for everybody (esp. for newcomers to help them to overcome some basic problems at the beginning).AndersI wrote:...I have been working on such an app for a while...
And don't become confused by Dave's remarks that <"shew" isn't a word>.
Off course, it's a word (= collection of different letters), ... may be it's only unknown by English native speakers ...
regards
LH
Ohh... He got me started didn't he!? Now you're having it! Full Dave's Definition Corner style! There are over 25 definitions... Die quietly
(Fortunately I'm just displaying the one relevant to us)
Collins Unabridged English Dictionary - 2004 Edition:
word NOUN 1 one of the units of or writing that native speakers of a language usually regard as the smallest isolable meaningful element of the language, although linguists would analyse these further into morphemes.
(Fortunately I'm just displaying the one relevant to us)
Collins Unabridged English Dictionary - 2004 Edition:
word NOUN 1 one of the units of or writing that native speakers of a language usually regard as the smallest isolable meaningful element of the language, although linguists would analyse these further into morphemes.
Official TT-Dave Fan Club
Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr
Why be a song when you can be a symphony? r is a...
Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr
Why be a song when you can be a symphony? r is a...
It can't be what you wanted, considering a synonym is what would be it's present tense version.
According to the CUED2004ed, it's an archaic spelling of show etc.
According to the CUED2004ed, it's an archaic spelling of show etc.
Official TT-Dave Fan Club
Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr
Why be a song when you can be a symphony? r is a...
Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr
Why be a song when you can be a symphony? r is a...
- LittleHelper
- Engineer
- Posts: 75
- Joined: 01 Apr 2006 01:52
Re: Beta version of new configuration program
Your tool works quite well (although I haven't tested it extensively); ...well done, Anders!AndersI wrote:...and tell me about ...it ...
Only two remarks:
- would be good if your tool could be started from a subfolder of TTD (has been already said),
- would be nice to have the possibility to save different configurations and reload them, depending on the game you want to play.
regards
LH
PS: I didn't want to spoil your thread with semantic discussions.
bitsw = OFF
Switch bitsw is turned off.
bitsw = OFF
bitsw.bit = ON
Switch bitsw is turned on (to default value, I suspect; run ttdpatch -!T- -W ttdpatch.cfg to check for sure. A good switch to use for testing here is pathbasedsignalling.) and then bitsw.bit is turned on, if it wasn't already on.
bitsw = ON
bitsw.bit = ON
I believe this to be equivalent to the above.
//bitsw is neither OFF nor ON
bitsw.bit = ON
I believe this to be equivalent to the above.
In general, any setting for "bitsw.bit" turns bitsw on if it is not already on.
Switch bitsw is turned off.
bitsw = OFF
bitsw.bit = ON
Switch bitsw is turned on (to default value, I suspect; run ttdpatch -!T- -W ttdpatch.cfg to check for sure. A good switch to use for testing here is pathbasedsignalling.) and then bitsw.bit is turned on, if it wasn't already on.
bitsw = ON
bitsw.bit = ON
I believe this to be equivalent to the above.
//bitsw is neither OFF nor ON
bitsw.bit = ON
I believe this to be equivalent to the above.
In general, any setting for "bitsw.bit" turns bitsw on if it is not already on.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Sorry AndersI, I didn't notice your edit. Anyway I'll reply here...
I'd say the only reliable and guaranteed-to-work cases are these:
bitsw = OFF
(set switch to off)
bitsw = ON
(set switch to on and to default value)
bitsw = value
(set switch to on and to given sum of bits)
bitsw.bit0 = ON/OFF
bitsw.bit1 = ON/OFF
bitsw.bit2 = ON/OFF
...
(set switch on and set all bits explicitly)
It sets it to the previous value of the switch if it had one before it was switched it, with the initial value being all bits off.DaleStan wrote:bitsw = OFF
bitsw.bit = ON
Switch bitsw is turned on (to default value, I suspect; run ttdpatch -!T- -W ttdpatch.cfg to check for sure. A good switch to use for testing here is pathbasedsignalling.) and then bitsw.bit is turned on, if it wasn't already on.
I'd say the only reliable and guaranteed-to-work cases are these:
bitsw = OFF
(set switch to off)
bitsw = ON
(set switch to on and to default value)
bitsw = value
(set switch to on and to given sum of bits)
bitsw.bit0 = ON/OFF
bitsw.bit1 = ON/OFF
bitsw.bit2 = ON/OFF
...
(set switch on and set all bits explicitly)
- Wile E. Coyote
- Tycoon
- Posts: 8515
- Joined: 08 Jul 2004 22:14
- Skype: wile.e.coyote2
- Location: Belgrade, Serbia
- Contact:
And one more suggestion: add button "Run TTD" which closes TTPC and starts TTD.
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.
Runner-up in "Best avatar Forums award" for years 2006 and 2010!
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.
Runner-up in "Best avatar Forums award" for years 2006 and 2010!
@Patchman, DaleStan (and others too, of course):
What format should be used when saving a cfg file?
- 'Canonical', everything written (even things that weren't explicitely set in the original cfg), all individual bits in bitswitches spelled out (my favourite)
- 'Imitate original', don't write switches that weren't mentioned in the original (or changed in the program), bitswitches as one number if in original etc. (feels like unnecessary work to me)
- Something else?
A general observation:
It seems that some (many, most?) people want such a program to be 'everything plus the kitchen sink' - configurator, graphics configurator, archive of different configurations, TTD starter, etc.
I want to write a .cfg editor that does *not* become obsolete with every new version of the patch, using the information in switches.xml to make something easier than Notepad - this is my primary goal, everything else is secondary.
IMO, it would be better to create (find?) a 'hub' program that can organize different programs in a common view/menu/buttonbar/whatever. Use your configurator of choice (Notepad, TTDXC, TTDPC, ??), your graphics manager of choice, start your preferred TTD, add a button for your paint program, GRFMaker, and so on...
By keeping the development focused on one specific thing, I may be able to finish it
That doesn't mean I'm against adding features when the basic functionality is (really) working.
What format should be used when saving a cfg file?
- 'Canonical', everything written (even things that weren't explicitely set in the original cfg), all individual bits in bitswitches spelled out (my favourite)
- 'Imitate original', don't write switches that weren't mentioned in the original (or changed in the program), bitswitches as one number if in original etc. (feels like unnecessary work to me)
- Something else?
A general observation:
It seems that some (many, most?) people want such a program to be 'everything plus the kitchen sink' - configurator, graphics configurator, archive of different configurations, TTD starter, etc.
I want to write a .cfg editor that does *not* become obsolete with every new version of the patch, using the information in switches.xml to make something easier than Notepad - this is my primary goal, everything else is secondary.
IMO, it would be better to create (find?) a 'hub' program that can organize different programs in a common view/menu/buttonbar/whatever. Use your configurator of choice (Notepad, TTDXC, TTDPC, ??), your graphics manager of choice, start your preferred TTD, add a button for your paint program, GRFMaker, and so on...
By keeping the development focused on one specific thing, I may be able to finish it
That doesn't mean I'm against adding features when the basic functionality is (really) working.
- Redirect Left
- Tycoon
- Posts: 7252
- Joined: 22 Jan 2005 19:31
- Location: Wakefield, West Yorkshire
Version 0.2.3.1 is uploaded to the first post.
- it is still (only) reading the old switches.xml format, no need for latest beta or nightly
- a whole bitswitch can be set on/off (not to numerical values). Setting it clears all bitswitch.bit values, setting a certain bit clears the main switch and sets all clear bits to their default values.
- the search panel has hot keys
- Alt-S to go to the search edit box
- Alt-F to find the first occurence
- Alt-N to find next
- Alt-D to toggle the 'Search description' checkbox
- also, ENTER in the edit box works as First when something has changed, as Next otherwise
- the keys for the treeview are
- '+' expand (double-click a collapsed node)
- '-' collapse (double-click an expanded node)
- arrow keys, home, end, pg up/down self explanatory
The important thing to test right now is that TTDPC can correctly read all existing (correct) config files, and that it can save the same thing without disturbing anything. Please help me by checking on your config. Remember, the file saved by TTDPC is 'ttdpatch.cfg.new', so there's no risk involved.
- it is still (only) reading the old switches.xml format, no need for latest beta or nightly
- a whole bitswitch can be set on/off (not to numerical values). Setting it clears all bitswitch.bit values, setting a certain bit clears the main switch and sets all clear bits to their default values.
- the search panel has hot keys
- Alt-S to go to the search edit box
- Alt-F to find the first occurence
- Alt-N to find next
- Alt-D to toggle the 'Search description' checkbox
- also, ENTER in the edit box works as First when something has changed, as Next otherwise
- the keys for the treeview are
- '+' expand (double-click a collapsed node)
- '-' collapse (double-click an expanded node)
- arrow keys, home, end, pg up/down self explanatory
The important thing to test right now is that TTDPC can correctly read all existing (correct) config files, and that it can save the same thing without disturbing anything. Please help me by checking on your config. Remember, the file saved by TTDPC is 'ttdpatch.cfg.new', so there's no risk involved.
First of all, I'm very glad you're writing this program. I don't like TTDXC for several reasons, and it'll be nice to have an alternative.
Now my comments about the UI:
The UI for setting value switches doesn't seem too intuitive for me. You have two checkboxes labeled "on" and "off", but these are mutually exclusive. I think you should either replace them with a single checkbox, or two radio buttons. There is a second problem about them: after checking either checkbox, the value editbox seemingly gets disabled (first I thought it gets disabled, but you can still edit it), this is really confusing.
There's another thing: when a bit switch is turned off, you still write all its bits to the CFG, in "off" state. If I understand correctly how the CFG file works, modifying the bit values automatically turns the switch on, so you're actually turning on the switch with all bits being off.
I'd vote for the "imitate original" idea because it would allow people to go back and forth between manual CFG editing and using your program. I don't think imitating every minute detail would be needed, though; preserving the commments and the order of switches would be a good trade-off. (It wouldn't take too much to code it I think, and the CFG still wouldn't be mangled after using the program.) Oh, and this would make detecting CFG writing problems easier; right now, diffing my ttdpatch.cfg against ttdpatch.cfg.new doesn't help much, since the switches get reordered and trigger false alarms.AndersI wrote:What format should be used when saving a cfg file?
Now my comments about the UI:
The UI for setting value switches doesn't seem too intuitive for me. You have two checkboxes labeled "on" and "off", but these are mutually exclusive. I think you should either replace them with a single checkbox, or two radio buttons. There is a second problem about them: after checking either checkbox, the value editbox seemingly gets disabled (first I thought it gets disabled, but you can still edit it), this is really confusing.
There's another thing: when a bit switch is turned off, you still write all its bits to the CFG, in "off" state. If I understand correctly how the CFG file works, modifying the bit values automatically turns the switch on, so you're actually turning on the switch with all bits being off.
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
I knew it! Someone would want the most complicated way there isCsaboka wrote:I'd vote for the "imitate original" idea because it would allow people to go back and forth between manual CFG editing and using your program. I don't think imitating every minute detail would be needed, though; preserving the commments and the order of switches would be a good trade-off.
Sorry, I won't even try to do all that. IMO, the file should be ordered in the categories, and alphabetical inside them, just as it is shown on screen. As the program is now, it does not preserve user made comments, there is no way of knowing which switch to connect them to. Also there would be no way to distinguish between user made comments and those copied from switches.xml, so the 'official' comments would be added again and again each time you run the program. This means you lose information if you have commented out switches and added new settings for them. Keeping several configurations inside one config file is not the goal, this should be done by a configuration archiver instead, keeping the real config 'canonical'.
You'll have to discuss this with Patchman Value switches have three distinct values: 'off', 'on' or 'numerical value'. That's exactly what the UI lets you enter. Both checkboxes are optional (even though they are mutually exclusive), they are not a radio group. Maybe the edit should only be cleared when you check on/off, and on/off cleared when you enter something in the edit.The UI for setting value switches doesn't seem too intuitive for me. You have two checkboxes labeled "on" and "off", but these are mutually exclusive. I think you should either replace them with a single checkbox, or two radio buttons. There is a second problem about them: after checking either checkbox, the value editbox seemingly gets disabled (first I thought it gets disabled, but you can still edit it), this is really confusing.
Did you test with the latest version (0.2.3.1)? At least for me it writesThere's another thing: when a bit switch is turned off, you still write all its bits to the CFG, in "off" state.
Code: Select all
disasters off
// disasters.zeppelincrash // Allow zeppelin crash
// disasters.smallufo // Allow small UFO
// disasters.refineryexplosion // Allow refinery explosion
// disasters.factoryexplosion // Allow factory explosion
// disasters.largeufo // Allow large UFO
// disasters.smallsubmarine // Allow small submarine
// disasters.largesubmarine // Allow large submarine
// disasters.coalminesubsidence // Allow coal mine subsidence
tsdrgrf
As you wish. I'm not pushing you or anythingAndersI wrote:I knew it! Someone would want the most complicated way there is
Sorry, I won't even try to do all that.
Oh, so the edit gets white again when I turn both checkboxes off...AndersI wrote:You'll have to discuss this with Patchman Value switches have three distinct values: 'off', 'on' or 'numerical value'. That's exactly what the UI lets you enter. Both checkboxes are optional (even though they are mutually exclusive), they are not a radio group. Maybe the edit should only be cleared when you check on/off, and on/off cleared when you enter something in the edit.
It's definitely not intuitive, though. Imagine a newbie starting your program the first time and seeing this part of the UI. He knows he wants multiheaded trains without speed bonus, so he checks the "on" box for the "multihead" switch. But oh wait, he shouldn't have done that; what he wants is neither "on" nor "off"... what he wants is 0. I suggest replacing this part with three radio buttons: "off", "on (default value)", "on with value: [edit box]".
Yes, I tested it with 0.2.3.1 (the title bar says that, at least). I've started the program and pushed the save button without touching anything. From the original:AndersI wrote:Did you test with the latest version (0.2.3.1)?There's another thing: when a bit switch is turned off, you still write all its bits to the CFG, in "off" state.
Code: Select all
experimentalfeatures off
Code: Select all
experimentalfeatures off
experimentalfeatures.slowcrossing off // A vonatok lelassulnak a kereszteződések előtt
experimentalfeatures.cooperative off // Együttműködő játék, nagyon korlátozott
experimentalfeatures.mandatorygrm off // A GRF erőforráskezelés kötelezővé tétele a GRF fájlok számára
experimentalfeatures.incvehconsist off // build even more then 255 trains per company (very experimental)
- Attachments
-
- stuff.zip
- (34.72 KiB) Downloaded 194 times
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
Re: tsdrgrf
OTOH, I just got an idea... Maybe...Csaboka wrote:As you wish. I'm not pushing you or anything
Definitely a good idea! Noted.I suggest replacing this part with three radio buttons: "off", "on (default value)", "on with value: [edit box]".
He, he. That's a combination I never tried yet, I was concentrated on getting switch changes recorded correctly. I think I know where the problem is.I've started the program and pushed the save button without touching anything.
Thanks!
I've uploaded verion 0.2.3.2 which (hopefully) corrects the saving of bitswitches, and implements Csaboka's suggestions for input.
There are also hotkeys for off (Alt-F), on (Alt-N) and value (Alt-V) and the Update button (Alt-U), so now it should be possible to do most of the work on the keyboard.
Please continue with error reports and suggestions!
There are also hotkeys for off (Alt-F), on (Alt-N) and value (Alt-V) and the Update button (Alt-U), so now it should be possible to do most of the work on the keyboard.
Please continue with error reports and suggestions!
Thank you, the cfg is written correctly now.AndersI wrote:I've uploaded verion 0.2.3.2 which (hopefully) corrects the saving of bitswitches
Which reminds me... Do we really need that button? When people make changes, they usually want them to stay that way, without pressing an extra button every time. Maybe you should do it the other way around: have a Revert button that restores the switch to its original state (the one read from the CFG), but otherwise update things instantly.AndersI wrote:the Update button (Alt-U)
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
Who is online
Users browsing this forum: No registered users and 1 guest