Using schedule library and copy commands.

Davie_UCF

Here since 2001, Trainz!!
I'm using the schedule library and copy commands to run automated trains on my route.

However I keep coming across an an annoying problem..
I've got a train running up and down a branch. So I have one schedule set up for going from station A - B then another for B - A.

At the end of the A - B schedule I have a copy commands command to amend the B - A scheldule and at the end of the B - A schedule I have a copy commands to amend the A - B schedule... So in theory it should repeat forever in an endless circle so the train will run up and down..

However!
Somehow it adds in another of the first schedule so when it gets to station B it has another set of the A - B schedule in its list..

Yet sometimes it works fine and it goes straight onto the B - A schedule..

Its hard to explain but hopefuly if oyu use the rules/commands you'l know what I mean..
Has anyone encountered this odd issue?

And does anyone know another way to keep it going in an endless cycle without using the method I am using or just putting two journeys in one schedule.


Thanks
David
 
Try the repeat opinion which be under "View Details" if you have a AI drivers setup. But setup the entire schedule for the train to run then hit repeat if you want driver to recycle the schedule!!!
 
I believe there are two different ways that the driver commands can be copied using the Schedule Library. One is that the commands are appended - i.e. copied after everything currently existing in the driver's command queue at the very end, and inserted - which will stick the copied commands into the exact place in the command queue the Copy Commands function was called from. I believe your problem may be stemming from the latter of the two. It seems like when the first set of commands are copied, whatever it is that they will eventually copy is also being copied into wherever your Copy Commands function is located, rather than at the very end of your driver's commands.

I'd agree with CSX6227, though, just have a 'Copy Station A-B Commands', and then 'Copy Station B-A Commands' omitting them copying each other and use the Repeat command (should be close to the very top of the Driver Commands List) that way the AI will put the command it just completed at the very end of the driver queue on it's own indefinately and you won't need to worry about it.

Besides, nesting schedule libraries is bad mojo waiting to happen, could you imagine the headache if Schedule A called Schedule B, which called Schedule C which called Schedule D, which called Schedule B and had to figure out where and in which part of the command queue is bugging up?
 
I use the schedule library and copy commands extensively in all of my sessions.

A simple rule is always use insert and never use append. I once accidentally used append and it took me hours to figure out why one of my AI trains was heading in the wrong direction.:confused: ... :hehe:

I use a similar scheme of an A - B schedule for a round trip.

I also like to take extremely long schedules and break them down into several segments, then just add them together.
 
Yeah william that's the way to go. Sometimes too many commands seems to upset the library. I also never use the append command. I think it does something entirely different than what i'm expecting it to do. Breaking up the list into main sections and then putting them into groups works well. I use the repeat command and have as many as 10 passenger trains working in sections of UMR. I think freight has to be treated separately tho.
baz
 
Im using append so ack... So how are you using insert? just two schedules in a row so it inserts one then when complete inserts another and then just adding repeat at the end?
 
Im using append so ack... So how are you using insert? just two schedules in a row so it inserts one then when complete inserts another and then just adding repeat at the end?

insert_commands.jpg


I start with a Wait for at least 30 seconds to let things settle down before using copy commands.

Next is Enable Repeat.

Then come the schedules I will be inserting.

Just think of "insert" as substituting the schedule in the same place that the insert schedule command is placed.
 
Hmmm it enables repeat on the whole schedule right? Is there an unable(un-enable?) repeat so you can get it doing other things later, if that makes sense..

I'll try what you've done though.. :)
 
Hmmm it enables repeat on the whole schedule right? Is there an unable(un-enable?) repeat so you can get it doing other things later, if that makes sense..

I'll try what you've done though.. :)

Everything to the right of Enable Repeat repeats indefinitely, hence the symbol used.

To get it doing other things you could use ScheduleAtTrackMark, which can be triggered by either a track mark or trigger.
Another way would be the Driver Schedule rule, which would be used a child rule to whatever rule triggers it.
The driver schedule rule has an option to clean the current schedule and apply the new one in addition to just appending it.
 
Session rules comments

I have posted a comment that in Trainz2010, I cannot get the session rules to work as in previous times. I cannot load the Schedule library properly, and create routes etc. (for city transit situations). In running the programs, I can not get the Load Passengers, or Enable Repeat to come on board when calling up the drivers run AI in the car. Now all these item have been ticked off /enabled in the driver commands. Is there something wrong with my computer, registries, or is there a bug in the programs. I have updated all the patches to 43434 any help would be appreciated.
I have corrected the problem, described the correction in the 2010 section, but what I did was copy a good "ORIGINAL" directory from my desktop unit and copied it to my laptop which corrected the problem.:(
 
Last edited:
Paperpusher. That's reaally strange. Some questions. Are you setting up your commands in route layers or in session layer.
Enable repeat should be under driver commands menu. Not to be confused with norman repeat which is in dropdown menu. Youv'e probably done these but it was all I could think of.
baz
 
Driver commands need to be setup in the Session in order for them to "take".

Also run Trainz as an Administrator to ensure that files can be saved properly with Windows Vista and above.

John
 
insert_commands.jpg


I start with a Wait for at least 30 seconds to let things settle down before using copy commands.

Next is Enable Repeat.

Then come the schedules I will be inserting.

Just think of "insert" as substituting the schedule in the same place that the insert schedule command is placed.


Looking at this is strange to me, because I use the append command and I put my Enable Repeat at the end and I have never had an issue.

Travlar
 
Looking at this is strange to me, because I use the append command and I put my Enable Repeat at the end and I have never had an issue.

Travlar

I tried putting enable repeat at the end one time and it didn't work. I believe I was running SP1 at the time, perhaps later service packs will let you do it.

If you are using copy commands to break a long schedule down into segments what happens with append is it puts those commands behind the other copy commands which changes the sequence. So the train gets to the end and then backtracks to the middle.
 
A simple way to get an A to B and B to A schedule is you dont need repeats. The last command of the A to B schedule should be insert schedule B to A and vice versa for the B to A schedule. Ive never used anything else.
 
A simple way to get an A to B and B to A schedule is you dont need repeats. The last command of the A to B schedule should be insert schedule B to A and vice versa for the B to A schedule. Ive never used anything else.

True, there is no real need to use enable repeat.

I just like to keep the AI train action going while I'm doing my own thing.

This allows me to create a longer more open ended type of session and the background traffic never stops. Parked trains are less exciting for me to pass.
 
True, there is no real need to use enable repeat.

I just like to keep the AI train action going while I'm doing my own thing.

This allows me to create a longer more open ended type of session and the background traffic never stops. Parked trains are less exciting for me to pass.

Exactly, i've been working towards this for a few years on my route which is now at the point where i've been putting in AI trains and timetables using the path rule with schedule library.. its a very tedious process to test though. I've even automated shunting so when a steam loco fronted passenger train ends up a terminus the loco goes to a turntable and turns around while a shunter takes the coaching stock to a siding so the platform is free for 45mins until the next departure time where its all put back..
Pretty amazing once you get there.. haven't got far enough to be able to enjoy my work yet though :p
 
Back
Top