

Moderator: TTDPatch Moderators
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.
Your efforts, Anders, are really appreciated.AndersI wrote:...I have been working on such an app for a while...
Your tool works quite well (although I haven't tested it extensively); ...well done, Anders!AndersI wrote:...and tell me about ...it ...
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 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?
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.
You'll have to discuss this with PatchmanThe 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
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 PatchmanValue 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.
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)
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]".
I've started the program and pushed the save button without touching anything.
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)
Users browsing this forum: No registered users and 14 guests