Is there a simple way to launch a bunch of AI schedules all at once?

JonMyrlennBailey

Active member
I have a Schedule Library with about 30 schedules: 4 horses, 1 helicopter, 13 road trucks and 12 RR trains

When opening up a new session for the first time, it's very tedious to use Copy Command for each and every schedule one at a time and also have to scroll through the long line of commands to hit Repeat.
 
Last edited:
I don't use the schedule library but I had the same complaint about copying rules in the Session Editor until I realised that you can click the first Rule, hold down the shift key and click the last rule then copy works on them all. Have you tried this - just an idea.
 
Pware, I'm afraid I don't follow.

Another thing, some of the vehicles (locos) I have to manually assign drivers to in Drive. Under Edit Session, Drivers, I can only pre-assign so many drivers to duplicates of the same vehicle kind. I have 13 Kenworth tractors (train engines) on my route and in Drive, I have to manually put drivers into 4 of them when the session is launched initially. Trainz is not too friendly about having the same driveable traincar duplicated many times on a given Route. Many times, duplicate cars are difficult to identify as for the Couple command. I like Kenworth classic conventional tractors and SD40 locos so there's a ton of them on one of my routes.
 
Last edited:
I may have misunderstood what you are requesting but have you tried using the 'Copy Commands From' driver command <kuid2:192081:1:11>?

Suggest you put a short Wait command as your first command for each driver, followed by the Copy Commands From (specifying which schedule to copy), and then your Repeat command.
 
What exactly do you mean by the term "Schedule Library"?


Creates a library of driver schedules (driver command lists) that can be given to drivers during the creation or running of a session.

http://online.ts2009.com/mediaWiki/index.php/Session_Rule_List_with_Parameters\


Since there are different trains on the route that navigate to different places, they are going to each need a distinct set of commands to execute the desired routes.

The schedule library let's you create and save permanent sets of commands for repeated future use. This rule is solely for AI operation.

Since there are 30 different AI trains on my layout, I have to use the Copy Commands function to assign a distinct schedule (set of commands) from the library (database) to each and every driver of his respective AI train. A few trains will use the same schedule from the library but most use different schedules depending upon the specialty of the train, eg. passenger, freight, etc. There is no reason for a freight train to stop at a passenger station.

I was looking for a way to start the whole collection of schedules at the same time with a few mouse clicks to save time and work. It would be nice if the entire schedule library was launched automatically upon opening Driver.

These drivers in AI mode under assigned schedules all run continuously during the entire session and continue from one session save to the next. The Repeat command is attached to each schedule so the trains will navigate to and from the same places indefinitely. They keep running the same schedule over and over.

This is inconvenient. I might open a new session and spend 15 minutes assigning schedules from the library to all 30 drivers and then find something on the route to correct in Surveyor. Then I have to start the session up from scratch again and assign the same schedules to same the drivers, one by one, all over again. It would be nice to be able to assign both schedules and drivers permanently to trains on the route. Marry a set of commands with a train so to speak. Have an auto-start feature so all AI trains start running by themselves according to specific pre-assigned schedules upon opening Driver initially.
 
Last edited:
Creates a library of driver schedules (driver command lists) that can be given to drivers during the creation or running of a session.

http://online.ts2009.com/mediaWiki/index.php/Session_Rule_List_with_Parameters#Schedule_Library_Rule

An easy way to copy all of that to another session? Possibly, but it will depend exactly on what you expect to happen.

Try this (no guarantees that it will work - but it seems logical).


  1. Load the Session that has this Schedule Library Rule into Surveyor and open the Session Editor.
  2. Right Mouse Click on the Schedule Library Rule in the Session Editor
  3. Select Copy
  4. Close the Session Editor
  5. Close the Session
  6. Open the second Session (where you want this Library to be copied) in Surveyor and open the Session Editor
  7. Right Mouse on a Rule (any Rule) in the Session Editor
  8. Select Paste

Be warned, the Session Editor Copy and Paste operations do not copy all the Rule settings in some Rules (I do not know if the Schedule Library Rule is one of them), so open and check the copy that has been pasted
 
No, I don't want to copy any libraries from one session to the next. I want all my AI drivers to all start automatically driving as soon as the initial session in Driver is launched.
 
Hi

You need a base session with all the schedules entered, checked and working properly. For future sessions open the base session in Surveyor and immediately use Save As to save it as a session with a new name. Close down Surveyor and open the new session in Surveyor where you will have all of the schedules and drivers set up ready for you to modify as you wish.

You have to be careful using repeat with library schedules as they generally work first time round but then become corrupted as individual commands from inside the schedule are also added to the driver schedule along with the original schedule. My workaround for this is to make the last entry in a schedule in the schedule library replace the same schedule again. This will work without any of the corruption that you will get by using the repeat command and will repeat until you take action to stop it.

Regards

Brian
 
Hi

You need a base session with all the schedules entered, checked and working properly. For future sessions open the base session in Surveyor and immediately use Save As to save it as a session with a new name. Close down Surveyor and open the new session in Surveyor where you will have all of the schedules and drivers set up ready for you to modify as you wish.

You have to be careful using repeat with library schedules as they generally work first time round but then become corrupted as individual commands from inside the schedule are also added to the driver schedule along with the original schedule. My workaround for this is to make the last entry in a schedule in the schedule library replace the same schedule again. This will work without any of the corruption that you will get by using the repeat command and will repeat until you take action to stop it.

Regards

Brian


Thanks, but this is over my head. Often I will have to close down a session and edit the Schedule Library
itself because there is a problem with AI during test runs.

A couple of weeks ago I decided to add traincar-based trucks to a route two years in the making. This came with a lot of challenges and needed adjustments.

A lot of opening new sessions and launching all the drivers on schedules only to find something amiss one or two hours later in session play time.

Trial and error was the name of the game.

Trucks colliding with one another at intersections and so on. A lot of fiddling with track marks, session rules, rulers, triggers, signals, switches, spline points and so on.

Trainz is truly a game for tinkerers.

A Trainz route is never ever complete. There is always something to fix, add, change, subtract or babysit with it.

A calculator is sometimes need to crunch numbers.

Having to click on Copy Commands 30 times for 30 drivers in each new trial session is a pain.

I was looking for a shortcut to just start everybody driving at once like magic.

The Trainz game wants many user-friendly conveniences.
 
Last edited:
Have you considered using the Copy Commands From driver command (details at http://online.ts2009.com/mediaWiki/index.php/Driver_Commands_List#Copy_Commands_From). This works with the Schedule Library Rule and uses the driver schedules it stores as its source of driver commands. So you should be able to "instantly" give each driver its commands copied from the Library at the start of each session. The Schedule Library Rule must, of course, be in the session and you can copy that from other sessions using the method I described in my previous post.

Place, in each Driver Command Bar in the Driver Setup Rule, the Copy Commands From driver command and set it to copy the schedule stored in the Schedule Library Rule that you want to use for that particular driver.

It has been a while since I used it (in TANE) but it worked well.
 
Have you considered using the Copy Commands From driver command (details at http://online.ts2009.com/mediaWiki/index.php/Driver_Commands_List#Copy_Commands_From). This works with the Schedule Library Rule and uses the driver schedules it stores as its source of driver commands. So you should be able to "instantly" give each driver its commands copied from the Library at the start of each session. The Schedule Library Rule must, of course, be in the session and you can copy that from other sessions using the method I described in my previous post.

Place, in each Driver Command Bar in the Driver Setup Rule, the Copy Commands From driver command and set it to copy the schedule stored in the Schedule Library Rule that you want to use for that particular driver.

It has been a while since I used it (in TANE) but it worked well.


Thanks, pware. This is the first time I found out that commands can be given in Driver Setup. Up until now, I thought this was only for assigning drivers to vehicles. Is it true Wait For 5 seconds should precede the Copy Commands from Schedule on the Driver command bar? I made sure a Repeat also follows the Copy Commands From schedule (the icon with the woman standing next to a photocopier) placed on the bar.

On my first test in TS12, it's working fine. Everybody starts doing their own thing like magic when I launch Driver as do the robots in the 1973 film Westworld when the sun rises in the morning and the boys in the lab turn the computers on. Remember the stagecoach (pulled by phony mechanical horses) starts rolling from a standstill and the man still as a statue (robot) in Roman World yawns upon waking up?
 
Last edited:
Ahh yes, was Yul Brenner the "Bad Guy" in that movie? I liked the first season of the remake HBO TV series "Westworld" but just could not get into the second season for some reason.

I don't know about the 5 second wait - but try it and see if it makes a difference.
 
Yes, Brenner as the gunslinger in black gone wild with a vengeance. "Get this boy a bib. He needs his momma."

Dick Van Patten (Eight is Enough) as "the new law in town".

I don't think I would like any remake. I have the original on DVD.

In a retest, the 5 second wait don't seem necessary.

I read briefly on Google that it is required in some cases using Copy Commands From not too long ago.

I use INSERT from LIBRARY. I never understood that APPEND mumbo jumbo.
 
Last edited:
I use INSERT from LIBRARY. I never understood that APPEND mumbo jumbo.

APPEND means that the driver commands from the Schedule Library Rule are added to the END of any current driver commands that the driver may already have. INSERT adds those commands at the location where the Copy Commands From command is located so any commands that are already there in the list after that point will be pushed further back.
 
I find that the 5-seconds is not needed all the time, but putting it at the very beginning of the sequence, just as Trainz starts, gives the commands a chance to load once the program settles down and graphics and scripts load. Without that little bit of a delay, I have had drivers get more confused than normal.

I use Insert. It works fine with that and don't bother with Append. I tried Append and things got confused so I stick with Insert.

I only wish that the grouped views we have in the Schedule Library would apply in Driver too. Overall this to me is one of the most useful rule-command combinations we have. A simple edit fixes a multitude of drivers at once. This works super awesome for setting up drivers coming out of portals, and works well too for creating divisions when there are many, many miles and many commands to enter.
 
Back
Top