Running Trains on a Schedule

BaconEggsnChips

New member
Hi there, i'm pretty new at all this trainz stuff, I bought myself TS2009 world builder and have built myself a pretty huge layout with a few dozen trains to play around with. So far its been fun, but now i am trying to set some of my trains on a timed schedule and ive come to a bit of a stand still. Any help would be very much appreciated.

Do i use a "Schedule Rule" to run my trains on a time based schedule?

if so, how do i get a train to do more than one command after it arrives at a station?

if i'm going about this the wrong way could somebody give me an example of how it should be done.

Thanks in advance.
Sy.
 
Hello,
i also only know the "Schedule Rule" but the problem is it good for one way running of train, you can not give commands to shunt or other things..

other thing i use is the "ScheduleLibrary" from here "www.js-home.org/trainz/schedulelibrary/index.php" it is not time based but it can do other commands as well, in the same website you get "timetable" also but i dont know how to use it, so i think other will help there
 
For time you can also use the wait until command. one waits for the hours and the other minutes, both commands are on the DLS.
 
If you use one or more Portals on your route you can use the "portal Timetable Rule" to set up the portal to emit trains at a given time with the consist you want. You add adriver to each train in the rule and give that driver a series of commands e.g:

Drive To (Or Call At) Station
Unload
Wait Until (HH/MM)
Drive via Trackmark XXXXXX
Drive to Station

Etc. etc.

If you have trains (with drivers) already on the layout then you can give them a series of commands (as above) but do this via driver setup.

You can also set up a schedule library to save having to retype the same commands over and over. Then use the "Copy Commands From" rule to copy rules from the Scedule Library to the driver.

Some rules (like the Portal Timtable and Schedule Library) need to be added to the list of session rules - "Edit Session" and then click the "Add" button. Other rules like the "Copy Command" need to be added to the available driver commands - "Edit session" > "Driver Commands" > Tick the box to make the rule available.

(The above was done from memory, so apologies if I have not got the names of the rules etc. exactly right).

Cheers
 
For time you can also use the wait until command. one waits for the hours and the other minutes, both commands are on the DLS.

The Wait For command lets you wait a given amount of time.

The Wait Until command lets you wait until a given time according to the game clock.

Using the WaitFor command makes sure that a certain amount of time is spent at that location. Using the WaitUntil command assures that departure will occur according to the time.

If your train is running behind schedule and it arrives late at a destination for which you have set a WaitUntil command, and the arrival time is after the wait until time, the train will not stop. It will immediately impliment the command that follows the WaitUntil command.

Another command that is useful when scheduling trains is the WaitForTrigger command. If you don't want train A to leave a station until 2 minutes after train B arrives, command train a as follows: WaitForTrigger (define your trigger), WaitFor (2 minutes), then goto next station.
 
thanks for all the help and suggestions people. its being very helpful. So far the ScheduleLibrary rule has come in very handy. Timetable i cant seem to get on with, and this new one "waitUntil" sounds like the thing i'm looking for.

Sy.

Ps, i never thought playing with trains would be so fun.
 
Ive installed the "WaitUntilTime" Rule, ticked it in driver Commands, and can see it in the dropdown list when setting instructions for my driver. but when i click on it, it does nothing. I have noticed that command is listed as "WaitUntilTime>". this usually indicates that it opens another drop down list. this doesnt happen either......... what am i doing wrong?

thanks again and again, Sy.
 
....I have noticed that command is listed as "WaitUntilTime>". this usually indicates that it opens another drop down list. this doesnt happen either.........

Yes, if the command is installed and working properly you should get one list to select the hour, then another to select the tens of minutes past the hour and finally one to select the minutes (if I remember correctly).

Are you getting a red "Light" towards the bottom right hand side of the screen? This would indicate a script error.

There may be more than one version/variation of this rule. I suggest you check the DLS for other versions.

Edit: An afterthuought - are you doing this in Surveyor or in Driver?

Timetable i cant seem to get on with

The "Portal Timetable Rule" is a bit cumbersome to use but can be very handy. If you're having problems setting it up post your question(s) and we'll try and help.

Cheers
 
Last edited:
I'm doing all my building in "suyveyor" atm. i'm now downloading a couple other versions of the WaitUntil rule. hopefully i'll find one which works. If it does, i should be able to program all my trains to run on the schedule i want them too. i do have a couple of script errors which i'll post in a few minutes. if i remember correctly they are to do with brushes. ??
 
Brush4 : Thread Exception: ER_Exception, line 223, file brush4.gs (3)

Brush4 : MeshObject.SetFXAttachment> Asset is not MeshObject type (file MeshObject.gs) (3)
 
Hi there, i'm pretty new at all this trainz stuff, I bought myself TS2009 world builder and have built myself a pretty huge layout with a few dozen trains to play around with. So far its been fun, but now i am trying to set some of my trains on a timed schedule and ive come to a bit of a stand still. Any help would be very much appreciated.

Do i use a "Schedule Rule" to run my trains on a time based schedule?

Despite everyone elses response, I actually find this rule the easiest to use and its built in. It does have a few problems, but we'll gloss over that for the time being.

For a repetition of commands, giving the AI a series of commands (it doesn't have to apply to all the AI driven vehicles - find the "Copy Commands From" command) and setting that to repeat would be ideal. The trouble is, if you have a situation where you use terminus at each end of a short/long line, the AI clogs up badly.

I had this for 2 lines I incorporated in a layout I have developed for a long time, the AI would wait and lock the junctions, so the whole lot stops. You could work around it by telling the train to release the nearest junction and wait, but your trains could then run early, the platform stays empty for x amount of minutes, when you should have something in there.

Using this method, positioning is important as well, having every train start from the depot sidings is a bad idea, you get the same effect as above.



The schedule rule does have some interesting advantages and drawbacks. It does keep the train to time (-/+ 30 seconds), it will tell you if a train is running late and it will hold a train at the location until the time to depart. It is however, an absolute nightmare to work with when it comes to multiple trains. There is no "Repeat until" command, which would be useful for off peak passenger services (Repeat from 10:00 to 14:00 for example, 4 hours you don't have to deal with.). You also have to split the trains up into diagrams.
Another really, really, REALLY annoying thing is that it will randomly clog, I.e. a train will go to a station or point and sit there, and sit there, past its departure time, it will sit there...... and well, 20 minutes later it is still sitting there.
I also noticed, the more commands issued in a diagram, the slower the PC runs.

If you want a copy of the layout, do send me a line. :-) You'll have to replace the stock though.
 
I forgot to mention that the WaitUntil rule along with a bunch of others, has a bug that keeps it from being displayed as an available rule in the PortalTimeTable Rule. The problem has been identified and the fix in in process.
 
Back
Top