AI Trains

Can someone please tell what the best way to get a slower AI train to get onto a siding and wait if a faster AI train is running behind it? I have tried a number of things such as assigning priority to the siding track, and giving the same priority to the slower train. I can get the slower train to take the siding but not to wait for the faster train to pass. I have tried multi signal trigger, but that didn't work either. Not sure if that is even possible with the AIs. Thanks for any help. Joe
 
Joe, you could possibly try placing track markers in the siding and on the main line and inserting Nav to or Drive to commands into both your trains AI instructions. You place a trigger on the main line and give the slower train a "wait for trigger" command. When the faster one to hits the trigger you have the next command of the slower train as wait for, (suitable time to elapse), and then Nav to or Drive to to it's original destination. Might be a tad complicated but it's hopefully one solution. If anyone else has an easier way please tell. The more options the better. Dan.
 
Thats the best solution and pretty easy to set up.
You could also set it up to wait for more than one train.
:)
 
Hello Dan, I have not tried the "wait for trigger" command. I will have to do some experimenting with that. At this time, I have the slower train taking all sidings to follow Priority markers. If I find a solution that works well I will post it. Thanks Dan.
 
Hi, just make sure you name the trigger so that the "wait for trigger" instruction can be allocated. That way both trains will interact correctly. I'm not sure about priority markers as I don't really use them, but the red track markers are great and will give AI a definite point to aim for. Cheers.
 
The problem with the "wait for trigger" command is that it slows down the opening of any menu. That is why I don't use anymore. Does any body experimented this? Is there a better command?.. or I am doing something wrong..?
 
The problem with the "wait for trigger" command is that it slows down the opening of any menu. That is why I don't use anymore. Does any body experimented this? Is there a better command?.. or I am doing something wrong..?

Hi Ilberez,

Which version of Trainz are you getting the slow down in? I have used the 'wait for trigger' command in all versions up to build 49922 and never noticed a slow down.

Cheers,
Bill69
 
Dang it, I still can't get it to work. I have spent hours trying different combinations of Trigger check and triggers and "wait for" to no avail. I have built a Test Priority route. If anyone wants to take a look at it I will upload it and a session for it. Maybe someone who knows what they are doing... (unlike myself..:) will have better luck with it. I also have to figure out how to upload a route and session first..:)
 
Dang it, I still can't get it to work. I have spent hours trying different combinations of Trigger check and triggers and "wait for" to no avail. I have built a Test Priority route. If anyone wants to take a look at it I will upload it and a session for it. Maybe someone who knows what they are doing... (unlike myself..:) will have better luck with it. I also have to figure out how to upload a route and session first..:)

Have the slower consist drive to a trackmark in the siding, the next command will be "wait for trigger xxx (xxx being the name of the trigger) to be triggered by any train, or you can choose a specific loco.
 
It has happened since I experimented it in 09. Specifically this is what happens: Normally (no wait for trigger command), you can open any menu (click on the icon to display drive to, navigate to, wait for, etc) and the window opens immediately. same for the objects and track menu. Now I set the wait for trigger correctly, specifying what engine will trigger, name of trigger and all. Then when I open one of the above menus, in surveyor or driver, they take more than a second to open, sometimes 4 seconds! When operating and setting up things this is not acceptable: Takes too long to do things. Years ago I was able to get helpdesk to answer on this, and I was told there were too many engines and when you open a command windows, the program has to scan everything, that is why it takes longer. Is this a valid answer? perhaps, but why the program has to scan "everything" when all I need to do is delete or add another command? So at some point I had the wait for trigger active just to play, and had to de-activate it when working in surveyor. Still, even if I need it today, I don't use it for the sake of working faster. besides, if I am driving a train and I need to do something quick.. well, I have to wait and the opportunity get's lost.
Hi Ilberez,
Which version of Trainz are you getting the slow down in? I have used the 'wait for trigger' command in all versions up to build 49922 and never noticed a slow down.

Cheers,
Bill69
 
Hi, I'm not sure if I explained myself clearly enough in my original suggestion to use track markers and triggers for what was needed to be achieved here. For me, this use would be for trains strictly being run in AI and not self drive trains. All the commands are set up in the driver session window in surveyor and they then operate automatically via AI in driver mode. There's no lag or scanning when you're in surveyor and inputing instructions in the driver session window. You just click on the little green icon alongside the nominated driver and the window pops up with the list of all your available commands and you click on whichever you need. That symbol then appears along the line and every subsequent instruction you enter comes up along the same line. If you need to insert an extra command you might have missed you merely put the mouse between the symbols and the green icon reappears. Left clicking on any unwanted icon and dragging it out deletes any command. The trigger and track markers would be placed in the appropriate positions on the track and named prior to setting up the driver session commands. I have a scenario on my layout where three trains interact via triggers and track markers. Each train triggering the next series of instructions for the other two in turn and it works perfectly. I still have my own trains that I self drive but the AI trains can all be left to do their own thing.
 
Hi Ilberez,

True there are sometimes hesitations when opening a menu but I have always found it's on bigger routes with lots of detail. I tend to think it's the size of the route rather than the wait for trigger command. I even get a slight hesitation when I am just starting to program the AI on a large route so I have not connected it with any particular command. Next time I will try your theory and disable the wait for trigger command to see what happens.

Cheers,
Bill69
 
Now I would try a Track mark(slow train) at the siding, then give the slow train a command to drive to it then a command to wait for( as long as it take for the fast train to pass the junction where the slow train is waiting at)then a command to drive where you want it to go next.
Just wait for 30sec. 1minute 2minutes or 5minutes not a trigger!
 
Hi Danny,
As I have stated before, I have built a test track. On this track are two trains. These are both AI trains and all commands are set in the Edit Session, Driver section. Train A, a slower train and train B, a faster train. Both trains have to make the same trip, from North track marker to South track marker. Both using the mainline except that train A (the slower train) is set to take all sidings between North and South markers.

Before entering each siding is a trigger. Each of the triggers is paired with a Trigger Check rule, and a Set Junction rule as well as a Trigger Multiple Signal rule. The Trigger Multi Signal rule is set so when the faster train is within the trigger radius, the signal at the exit point of each siding is set to danger. That way (or as my logic goes) when the faster train is within the radius of the trigger and the slower train is on the siding, the slower train will wait there until the faster train is outside of the trigger radius.
The Trigger Check rule is set to trigger when the faster train, an SFCN TGV SE also set under the Vehicle Type option, is within the trigger radius. The Set Junction is a child rule of the Trigger Check rule and is set so the switch at the exit point of the siding is set towards the main line that way the faster train will have the right of way and allowed through. Or so is my reasoning.

For some reason that isn't happening. All works as expected or as designed to work until the slower train reaches the exit signal at the exit point of the siding. Then it get a green light, the switch switches towards the exit siding and the slower train gets on the mainline even if the faster train is waiting next to it on the mainline.

Also, when I check the Trigger Check rule after the test and I go into the surveyor again, Under Vehicle Type there is nothing set even when I had previously set it for the SNCF TGV SE. For whatever reason that selection does not remain there.

The only way I can explain this better is to upload a video, but unfortunately I don't know how to go about doing so. If you or anyone else reading this has any question or suggestions, please feel free to post. By rights and according to the rules, it should be working but it is not. I am not sure what I am doing wrong. Thanks you to all others for your suggestion. They are all appreciated. I am still learning as I go along.
Joe.
 
Hi skypilot0023,

My thoughts are, you are getting way too complicated, keep your driver commands as simple as possible. Place a track mark on the siding where you want the slow train to stop and order the driver to drive TO this track mark and stop. Next place a trigger on the main line past the exit from the siding and name it. Also place a track mark on the main line well past the trigger. Now your driver orders should be as follows. Slow train:- drive to trackmark (on siding) stop train, wait for trigger (name) as on main line, drive VIA next track mark, etc. etc. Fast Train:- drive VIA trackmark (past trigger) drive via (next trackmark) etc. etc.

Now the slow train will enter the siding and stop at the trackmark, wait for trigger(main line trigger), and he will move off when the signal changes to orange which will happen when the fast train passes the next signal on the main line. One other thing make sure the junctions default to the main line. In most circumstances all junctions should default to the main line.

Cheers,
Bill69
 
Hi Bill,
In the driver setup for the slow train only has one command, "Navigate to End Track mark", That's all. The fast train has two commands, "Wait for 20 sec, navigate to End Track mark". Oh Yeah, just for test purposes the slow train also has a "Set Max speed to 20mph". The reason for this is, again for test purposes I want the slow train to start and get to siding first.

In the actual route that I am building AI trains (Fast and slow, Passenger and Freight) will be coming from a portal at random which is why I want freight trains to take sidings and they do and passenger trains to stay on the mainline and they do. The driver commands I try to keep simple to 2 or 3 commands per train. Mainly start at beginning Track mark and navigate to End track mark. Can you think of any reason why the slower train, sitting on a siding, would take precedence over a faster train on a mainline? Despite the fact that triggers have set signals and junctions in favour of the mainline. And yet the slower train keeps resetting the exit junction switch and sets a green signal on the siding and a red signal on the mainline. Is it possible that it is a trainz bug? I am trying to figure out how to upload a video maybe that would help with how it is all set up. If nothing else this I am learning how to use The commands and rules...:)

Thanks,
Joe
 
Hi Joe, we can all think of a very good reason why we all have trouble setting these things up. It's called AI. Remember, it will exploit any shortcut, loophole or opening that you leave for it. Bill described exactly the same solution as I did. It's a matter of keep plugging away at the problem and try out as many ideas as you can. It can take time and be extremely frustrating but AI is not absolute and it can be fooled and worked around. Proving that is my favourite activity in this game! lol
 
Back
Top