Is a batch file to start Trainz>route>edit>session?

narrowgauge

92 year oldTrainz veteran
When we are creating, we spend a lot of time navigating through the Trainz menus just to get to a particular route or session. I wondered if this could be done with a batch file, and if so has anyone done it successfully?

Trainzutil does not appear to provide for this.

Perhaps it could it be done somehow like this?

trainz.exe /surveyor/e/routename/sessionname

Peter

I seem to have mucked up the title, to0 late to fix it now.
 
Last edited:
(over 2 hrs and no response)

Off hand, I would say the answer is no. I have certainly never heard of anyone creating such a shortcut, or discovering one as a hidden "Easter Egg".
 
You beat me to it, Shane.

Paul, I am another one that needs a modicum of starting help. More, please. I have installed Asset-X again but I can't find any information on the code. Where should I go for this?

Peter
 
Same here, as I haven't yet stumbled on that bit of code yet (and I'm familiar with most coding aspects when it comes to Trainz).

Shane
 
Hi Peter, all,

Not sure if I read you correct, but for years we have had this option to go direct to a session and route of our choice through a shortcut. Not sure if it happen during TS2009 or earlier, but it was asked for and provided if I remember correctly.


  • Make a shortcut in Windows.
  • In the TARGET entry under the Shortcut TAB I have for instance the following to a test map of mine:
    • G:\TS12\Trainz.exe -surveyor=<kuid:77573:100001>
      • The first part is the path to where Trainz is located [G:\TS12\Trainz.exe]
      • Then there is a space, before the line and surveyor part is mention as I want to got to Surveyor [ -surveyor=]
      • and last, I have the KUID for the Base session of my map written [<kuid:77573:100001>]

This I have saved in a map I keep all my Trainz shortcuts in, available by a folder link beside my START button in Win7 so I just move my mouse there and find this shortcut I have named "TS12-Surveyor_MtSablaFlott_Base" to find it again among others I have.

It worked at least for TS2010 and TS12, pretty sure it worked for TS2009 also but I don't have that installed anymore so can't say for sure.

If this was not what asked about, sorry for intruding on your thread. :)

Hugs

Linda
 
That method works in TS12 with SP1 (german build 61383), but I had to quote the argument.

X:\TS12\trainz.exe "-surveyor=<kuid:xxx:yyy>" to open a session in surveyor (all layers were unlocked)
X:\TS12\trainz.exe "-driver=<kuid:xxx:yyy>" to drive a session
X.\TS12\trainz.exe "-railyard=<kuid:xxx:yyy>" to view a locomotive or car in railyard

It even works for TRS2006 using TRS2006.exe.

Peter
 
Last edited:
Linda

That is just what I hoped for.

Peter

I haven't had a chance to try it but thanks for the additional information.

Peter
 
Works fine without the quotes, actually saves 10 seconds which is probably nothing when the process is done occasionally but testing out a session, this gets tedious. Now the keystrokes are reduced to two, one to click the shortcut and one to click on Quickdrive at the top left of the window and that is a saving worth looking for.

Thanks again.

Peter
 
I have been trying to complete the last link in the chain and actually run the session. Nothing obvious seems to work. Any ideas anyone?

I see this thread has been linked for someone wanting to start a museum route running. This last link would be useful for that.

Peter
 
To run a session use
X:\TS12\trainz.exe "-driver=<kuid:xxx:yyy>"
There have to be commands assigned to the drivers. Having the 'Start Options' rule with easy or realistic mode enabled, the drivers will execute their commands. Some usefull rules for setting the camera (including distance and direction settings):
- HoTT Change Camera View,<kuid:9999:61007> Built-in TS12 SP1
- Focus Camera,<kuid2:122381:10014:1> DLS
- Cinematic Camera,<kuid:401543:1166> Built-in TS12 SP1


Peter
 
Last edited:
Thanks Peter - saving (in my case) G:\TS2010\trainz.exe "-driver=<kuid:203465:100380>" as 'session.bat' opens Driver in secods straight from the desktop. Also quits faster at the other end...

:)
 
Thank you, Peter. Set up in the properties of a desk-top icon, I don't have to close out SCS2013, which I'm working with. Life is so much easier.

Peter
 
Back
Top