PDA

View Full Version : Trainzutil Interface



andi06
August 21st, 2015, 04:32 AM
A couple of queries arising out of the pre-release notes.

Disabled the TrainzUtil command-line interface socket by default. It is now enabled only when the "advanced debug tools" option in the settings is enabled, or if the appropriate switch is specified on the TANE command-line.
Is there, or will there be, a mechanism for an external utility to open the Trainzutil interface, keep it open and close it when done. Preferably something which won't queue up multiple instances of the Launcher window.

Ideally I would like to be able to open the socket from AssetX (if it isn't already open) on the first use of a trainzutil call and leave it running until AssetX quits - at which point I can issue either 'TrainzUtil close' or 'TrainzUtil don't-need-you-anymore'. It would be better if this capability didn't require debug-tools to be selected.


Added "open-in-driver" and similar TrainzUtil commands.
Are these calls available in any of the Dev builds?
What is the syntax?
Is 'Trainzutil help' now up to date?

I noticed that you have recently updated some of the wiki entries relating to external tools. Do you intend to re-enable CM/OpenWith or some equivalent?

WindWalkr
August 21st, 2015, 06:43 AM
Is there, or will there be, a mechanism for an external utility to open the Trainzutil interface, keep it open and close it when done. Preferably something which won't queue up multiple instances of the Launcher window.

Not at the current time. If you want to communicate with Trainz, you'll need to have the user enable that. Once enabled, it will stay enabled between runs until they disable it again. For a variety of reasons, we don't want to have an open network port that very few people will actually use.

At some point in the future, we'll have the ability to start a second Trainz instance and have it pass commands to the first instance and then shut down, rather than the current approach of "wait for the first instance to exit and then start up". That will give us a robust way to (among other things) enable the TrainzUtil port automatically from an outside utility.



Is 'Trainzutil help' now up to date?

TrainzUtil help is always up to date. As with everything, that doesn't mean it's bug free. It also doesn't mean that every possible command is documented- there are assorted commands which are deliberately not documented as they're intended for internal or debugging use only and we don't make any guarantees that they will behave the same (or even exist) in another build. The commands which are documented are generally pretty stable. If you think that some of the documentation is incorrect or incomplete, then feel free to comment on it specifically. If we're happy with it how it is, then we'll say so, otherwise I'll open a task to get that area looked at.



I noticed that you have recently updated some of the wiki entries relating to external tools. Do you intend to re-enable CM/OpenWith or some equivalent?

Unrelated. One of the documents didn't match reality, so we corrected the doc.

We will definitely continue to improve CM but I can't speak for specific time frames on that stuff.


chris

andi06
August 21st, 2015, 07:02 AM
If you think that some of the documentation is incorrect or incomplete, then feel free to comment on it specifically. If we're happy with it how it is, then we'll say so, otherwise I'll open a task to get that area looked at.

As of build 77730:

compile is not present in help nor are open-in-driver and similar TrainzUtil commands.

WindWalkr
August 21st, 2015, 07:07 AM
compile is not present in help nor are open-in-driver and similar TrainzUtil commands.

Debatable whether we want to document compile. "open-in-driver" and friends are definitely documented in the current build; if they're not in your build then you haven't got the completed implementation of these commands yet.

chris