Rules and Paths...Hmm.

Smileyman

Socialist Serenade
Having been away for a while, and now getting back into Trainz, I'm about to start looking into automating, and was wondering what other people use, and what's new since T:ANE regarding pathing and rules.

Basically I'm wondering how much I'm going to have to 'simplify' parts of my route (for instance, Cardiff Central Station) to allow multiple trains to use the lines, or whether Trainz is now more competent at being able to work this.

So, which Rules and Driver Commands do people use to get complex running going, and can you suggest any good websites/video that explain recent developments in this area or the use of said rules/commands.
(I'm looking through N3V's videos right now. Some of them are helpful, some not so much :) ).

We're talking Trainz 2019 by the way.

Cheers.
 
Hi Smileyman, nice to see you again!

Trainz AI is still Trainz AI...

There are still the usual Drive to/Navigate to and Drive via/Navigate via commands that still work as intended. Track markers are still there as are direction markers that work well.

What has changed are some new tools. Starting in T:ANE, and subsequently improved, are Interlocking Towers which you set up using a tower manager to allow control over junctions and interlockings.

Starting with Trainz Plus, which is more or less a test bed as much as N3V doesn't want to call it that, is Trainz Living Railway. This allows the AI to drive an automatic schedule set up to deliver goods, and eventually passengers which is still in beta, to customers. This is still buggy but it does work. Recently, there has been some improvements and fixes to portals and the code now include TLR functions for the drivers.

The old driver list now has controls in there to take control of AI-driven and controlled consists, and there's a "dispatcher center" that is more of a list of all the consists running or stopped. This is still unfinished and something we wish had an actual track diagram available. Having that plus interaction with interlocking towers would be very helpful as you can imagine.
 
Hi John!
Good to see you!

Glad to see you're still enjoying Trainz.

"Trainz AI is still Trainz AI..."
Yeah, you're not kidding. :)

I've just spent some time trying to get the AI to behave on a little test route, with a double track, double junction leading off the mainline to the right, causing a diamond crossing across one of the tracks.
I used an interlocking tower to control the signals around that double junction, and it worked perfectly...for a while, then when running the session again and again, it didn't work as well. I think that might be down to the portals I was using to provide the trains being too close to the junction.
Although, the train down the line really far away (at least a signal or two) seemed to get given the way, even when the loco that wanted to cut across the track was right there waiting to go. I think the priority is broken in the interlocking towers too, as they made no difference to that situation.
Shame, because those interlocking towers look really powerful, and such a simple way to set up paths through diamonds.

I then tried the same double junction with a loop of track instead of portals supplying the trains, but of course, I then remembered that Trainz AI gets confused with loops, and it certainly did. So many trains trying to reverse down a line that I explicitly defined as one-way, and used trackmarks to get them half way around the loop first. That's when I remembered another thing I'd forgotten about Trainz.

And that is, "Don't use navigate to..." unless you want your train drivers to ignore all the direction trackmarks and everything else (I wonder if that's why I had problems with the interlocking towers?).
Using "Drive to" and "Drive via" solved a few problems, but if my memory serves me correctly, I think they can reverse too if they wait too long at a signal.
I remember back in the days of beta testing TRS2004 saying that we should have Train AI (or commands) that will just do what a train driver does. That is, obeys all speed and signals, and that's it!
Do we have a command yet where the AI will actually just behave like a train driver. Can you imagine the chaos if real train drivers got out of their cab and changed points because they wanted to take a different route, or reversing down a line because they wanted to get home for their dinner!

I'm enjoying Trainz 2019, but AI drivers and automatic operations are probably the most important thing for me, so it's generally what makes me lose interest in Trainz after a while because it's so lacking in that area.
Hence my posting this thread.
I'm still hoping that this train-sim can simulate train drivers a bit better. :)
I will persevere!

Take care mate.
 
Last edited:
Enjoying Trainz is a love-hate relationship! :LOL: There are days when I want to rip it all off my hard disk but then another day and everything works as it should. There are days when the program makes me wonder what the programmers were thinking because they never asked us users for any feedback, or they've come out with new features without fixing the basic things. This actually irks me more and I won't start on that route right now!

I've tamed loops by using track marks and direction markers. The direction markers at the beginning of the loops prevent the AI from leaving the loops once entered and track marks placed at the beginning, middle, and end of the loops in addition to some placed at the outside beyond the loop on the exit side keep the AI moving forward. I use them to turn trams on my smallish, 7.5 mile Gloucester Terminal Electric route with a trams and diesel freight trains. The AI drive the trams and I operate the switching operation.

Using the same route as an example, the schedules are nothing more than navigate to and drive to commands. The navigate to commands are used for the open stretches, such as the roadside operating areas with a long distance and drive to commands where the track gets complex. This keeps the AI from getting bored and turning around, or deciding that they'll take their own route because they've waited long enough.

With crossovers, I either use direction markers placed fat end to fat end to prevent AI from either direction from getting any ideas of taking another route other than the intended one. The AI does this because crossing over is actually mathmatically shorter than the straight line. The alternative to using direction markers is an AI direction marker. This is a yellow track mark asset found in the track objects panel that will operate the signals even though the AI still can't driver there. I use these so that the signals light up and for when I drive.

There are places when I don't want to block AI from crossing over. In these locations I will place what I call before and after track marks. A track mark placed before gets the AI in place and a track mark placed after keeps the AI on track, no pun intended, by putting them beyond the point where they can cross over. I use these extensively to keep the AI on the bypass mainline so that they don't take the slowest route through a yard at 15 mph instead of the 75 mph mainline.

My extensive 190 mile route operates similarly with around 25 drivers handling passenger trains between stations and portals. Portals introduce another four or five drivers handling similar schedules.

Once I worked out the bugs, I meaning self-inflicted ones, where we blame the AI for not moving or taking the wrong track only to find out later it was our fault. I'll operate this route for many hours as I switch the yards and make up through freights and sometimes passenger trains. What usually gets me to quit is me dosing off in my seat, or finding something to fix with the latter happening more often than not still.
 
I have a few loops on my route which I never have problems with, using EITs AI trains will only go onto a path that you have set up before hand, and mission codes set what path to take before they get to the loop. You then use track circuit blocks on the single line section until the next loop, which won't set the path out of the loop until the single section ahead is clear.
 
Thanks John.
A lot of good info in there.
Fooling the AI into doing what we want them to do seems to be the key.

I had some small success with that in the past, but after a while it usually frustrated me too much that the AI didn't just work out of the box, at least reasonably.
I should take it as a challenge and get it working one way or another, even if it seems a bit hacky.
Sounds like you've got it down.
And that route sounds great, and I imagine many years of building.

@Mark, I remember reading something about Enhanced Interlocking Towers, but never looked into them
Just looking now, and they look interesting.
Definitely going to give them a go.

One question though.
I intend to use them on diamond crossings and the like, were junctions and lines need protecting when trains pass over another line, but does anyone use them for general pathing of AI trains? (if that makes sense!)
 
Back
Top