TTDPC: New configuration program - Version 1.3.1 Released

Get help, info, news and advice about the Transport Tycoon Deluxe patch.

Moderator: TTDPatch Moderators

User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

Seems to work good! :D 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!
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Post by AndersI »

Wile E. Coyote wrote:now it must be placed in same folder as TTD.
Not really. You can install it anywhere and make a shortcut where the 'Start in' is set to your TTD folder.

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 :-)
User avatar
LittleHelper
Engineer
Engineer
Posts: 75
Joined: 01 Apr 2006 01:52

Re: Beta version of new configuration program

Post by LittleHelper »

AndersI wrote:...I have been working on such an app for a while...
Your efforts, Anders, are really appreciated. :bow: 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).

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 ... :wink:

regards
LH 8)
User avatar
Dave
Moderator
Moderator
Posts: 17243
Joined: 26 Dec 2005 20:19
Location: North London

Post by Dave »

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.
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...
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Post by AndersI »

answers.com wrote:Meaning #1: establish the validity of something, as by an example, explanation or experiment
Synonyms: prove, demonstrate, establish, show
Definitely a word, although not the one I was after :-)
User avatar
Dave
Moderator
Moderator
Posts: 17243
Joined: 26 Dec 2005 20:19
Location: North London

Post by Dave »

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.
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...
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

Dave Worley wrote:According to the CUED2004ed, it's an archaic spelling of show etc.
It is indeed, and commonly seen on old railway station signs! ALL TICKETS TO BE SHEWN.
User avatar
LittleHelper
Engineer
Engineer
Posts: 75
Joined: 01 Apr 2006 01:52

Re: Beta version of new configuration program

Post by LittleHelper »

AndersI wrote:...and tell me about ...it ...
Your tool works quite well (although I haven't tested it extensively); ...well done, Anders!:wink:

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 8)

PS: I didn't want to spoil your thread with semantic discussions. :roll:
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

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.
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
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Sorry AndersI, I didn't notice your edit. Anyway I'll reply here...
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.
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.

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)
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

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!
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Post by AndersI »

@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.
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7252
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Post by Redirect Left »

The only feature i want to see, is the GFX adding capability of the TTDX coonfigurator. Everything else i can quite easily live without
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Post by AndersI »

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.
User avatar
Csaboka
Tycoon
Tycoon
Posts: 1202
Joined: 25 Nov 2002 16:30
Location: Tiszavasvári, Hungary
Contact:

Post by Csaboka »

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.
AndersI wrote:What format should be used when saving a cfg file?
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.

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
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Post by AndersI »

Csaboka 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.
I knew it! Someone would want the most complicated way there is :-)

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'.
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.
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.
There's another thing: when a bit switch is turned off, you still write all its bits to the CFG, in "off" state.
Did you test with the latest version (0.2.3.1)? At least for me it writes

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
I.e. the bit switches are written as comments, to make it easier to edit the file in Notpad.
User avatar
Csaboka
Tycoon
Tycoon
Posts: 1202
Joined: 25 Nov 2002 16:30
Location: Tiszavasvári, Hungary
Contact:

tsdrgrf

Post by Csaboka »

AndersI wrote:I knew it! Someone would want the most complicated way there is :-)

Sorry, I won't even try to do all that.
As you wish. I'm not pushing you or anything :)
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.
Oh, so the edit gets white again when I turn both checkboxes off...

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]".
AndersI wrote:
There's another thing: when a bit switch is turned off, you still write all its bits to the CFG, in "off" state.
Did you test with the latest version (0.2.3.1)?
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:

Code: Select all

experimentalfeatures off
it created

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)
I've attached the files you'll probably need.
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
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: tsdrgrf

Post by AndersI »

Csaboka wrote:As you wish. I'm not pushing you or anything :)
OTOH, I just got an idea... Maybe...
I suggest replacing this part with three radio buttons: "off", "on (default value)", "on with value: [edit box]".
Definitely a good idea! Noted.
I've started the program and pushed the save button without touching anything.
:oops: 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.

Thanks!
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Post by AndersI »

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!
User avatar
Csaboka
Tycoon
Tycoon
Posts: 1202
Joined: 25 Nov 2002 16:30
Location: Tiszavasvári, Hungary
Contact:

Post by Csaboka »

AndersI wrote:I've uploaded verion 0.2.3.2 which (hopefully) corrects the saving of bitswitches
Thank you, the cfg is written correctly now.
AndersI wrote:the Update button (Alt-U)
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.
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
Post Reply

Return to “General TTDPatch”

Who is online

Users browsing this forum: No registered users and 1 guest