Train-Sim.Com
MSTS Activity Design

Open-ended activities w/ ai trains

Notice to all visitors and members of the Train-Sim.Com message forums:
If you plan on using a signature banner in your posts, we would like to remind you that there is a maximum size for banners. That maximum is 450 pixels wide by 120 pixels high, and not to exceed 25k. Your compliance is appreciated. FORUM RULES Problems? There are two common reasons for problems with logging in and posting messages. The first is that you are running a firewall that prevents your messages from being sent to the server. The other is that you have cookies disabled; the DCForum software requires cookies to work properly.

Previous Topic | Next Topic

Printer-friendly copy Email this topic to a friend

Reading Topic #2240

Member since Aug-21-02 · 466 posts

Hello all-
As you may or may not know Illinois Northern v3.0 is coming soon. As a change, Id like to have some open ended activities in it with AI traffic like on Port Ogden $ Northern.
Heres my question-
For the AI trains, I assume I make a path for them for the entire length of their run, yes?
And for the player train, I only make a start point with an end point maybe 100m later, right?
So if this is correct, then when my two trains are approaching into single track, one will have to wait for the other, but once the other is clear, will the train that was passed get the clear or do i have to mess with passing paths and stuff?Thanks guys!
Kevin V.
-President/CEO of Illinois Northern Ry Inc, subsidiary of The Midwest Regional Railways Corp.Illinois Railway Museum Conductor Trainee

Ohio Southern is on the way...coming when I get sick of the IN!

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 6603 posts

RE: Open-ended activities w/ ai trains

No. Maybe.Hee-hee, I love Otto dearly, but there's a major flaw in his tutorial. He, like most people, just don't get it - the short player path is not the secret to PO&N freestyle activities, the short player path is a neccessary step to keep the player path from interfering with the AI paths. The real "secret" is in how the signals are set up:http://www.train-sim.com/cgi/dcforum/dcboard.cgi?az=show_thread&om=3909&forum=DCForumID6&archive=yesSo whether or not you can combine freestyle activities on ANY route with AI traffic depends on what type of signals are on that route.There are two basic types of signals in MSTS, it doesn't matter whether you use semaphores, Pennsy style, searchlights, BNSF, or even upside-down Australian signals, they all have two subtypes;TYPE 1 - if (!enabled || This is what I call a "Nevergreen Tree", the absolute signals are "asleep" by default, and always show red in their "at rest" state. These are unfortunately necessary to control AI traffic, and will never show anything other than red except when there's an active path to "tickle" them "awake".TYPE 2 - Always enabled. This type is like the BNSF intervals that either don't have the "if (!enabled ||" line in the sigscr.dat file, or have that line commented out. Type 2 works no matter what.So for the short player path to work, the player drives beyond the end of the path and spends the rest of the activity "off the path". If the player ever approaches a Type 1 signal while off the path, that signal will never turn green since a path is required to make it display anything other than red.So the process is really not that simple, to get AI trains to behave in a predictable manner they must be rigidly controlled, to allow the player to go wherever he wants you need non restrictive signals and manual switches. Small wonder when I started playing with the idea most people told me it was impossible, technically it IS impossible, I just kludged around it by creating what was in effect, two different routes, one for the player and one for the AI traffic.The original was set up with standard BNSF signals combined with Hank Sundermeyer's Distant Switch Indicator, Hank has since made a custom set of signals for the PO&N, but the basic operation hasn't changed.
Open-ended activities w/ ai trains – image 1Signal on the left is type 2, "awake" by default even with no path thru it, and it's a permissive red. On the right is the AI interlocking, a type 1 "Nevergreen Tree". When the advancing AI path triggers it awake it will show green for the AI provided the block is clear and both switches are thrown for the curve, since this signal is linked to the curved track at the opposite end of the single track section. Meantime if the near switch is curved the player signal goes red since the path to the link is blocked by the thrown switch, red over yellow if the near switch is straight and far switch is curved. The distant signal is a necessary evil since HAL doesn't detect block occupancy based on signals, he detects the player train only when the back coupler of the lead locomotive passes the base of the switch, regardless of where the signals are. So it's possible for the player to pass a green interlocking and two seconds later the far switch throws anyway, so it's necessary to check the distant signal as you pass to insure it's still green.Open-ended activities w/ ai trains – image 2Signals that are awake are affected by the signals beyond, if there are no signals beyond that's treated as a blocked path, so these dwarf signals, which have a MOST restrictive indication of flashing yellow, are placed to isolate the switching districts from the mainline. That way you won't get a red or yellow if you return to a switching district after leaving a switch thrown into a yard or dead end spur. I deliberately left them out of pure passing sidings that have no manual switches so the signal sequencing will show the track state several signals ahead.The cutoff signal makes the mainline signals clear immediately after the back of the AI train is clear, otherwise the red signal would stay red until the AI train passed the next facing signal.Open-ended activities w/ ai trains – image 3These are triggers based on the SignalNumClearAhead value in the sigcfg.dat file, when the back coupler of the lead loco on the AI train passes one signal it throws the first switch, when it passes the next signal it throws the second switch. Type 1 signals are also "awakened" by the advancing path a number of signals ahead defined by the SignalNumClearAhead value. So spacing these out is tricky, too much space and the player will be looking at a red light for a long time, too little space between the 3rd and 4th signal back from the interlocking and the switch throws happen too fast to react to.Open-ended activities w/ ai trains – image 4Here is the only instance where the player has priority, if his lead loco's back coupler has already cleared the base of the trailing point switch so he's already in the block for the single track BEFORE the AI train passes the 4th signal which throws the first switch, HAL stops the advancing AI path until the player is out of the block. Since the player is "off the path" throughout the activity, HAL normally has no idea where the player is unless he's actually blocking an AI path. Consequently the player has to be alert for sudden signal changes, since they will happen without warning.Open-ended activities w/ ai trains – image 5Again "the block" is not between signals like on the prototype, it's between the switch bases.So the question of freestyle activities combined with AI traffic depends on how the signals are set up, and your track configuration, manual VS automatic switches, reverse loops, and crossovers all play a part. For conventional style signals with auto switches the usual way is double reverse points, but on the one route I tried making for those;http://www.train-sim.com/dcforum/DCForumID6/12229.htmlI could get double reverse points and passing paths working okay sometimes, but other times (especially with two way AI traffic) it stopped for no apparent reason.Last option is no signals at all, if you don't have Rich Garber's Canton route I recommend it, it's well worth 11 bucks and is almost as good as the PO&N. Rich got around the whole issue by using no signals at all and nothing but manual switches, the AI trains are timed so the player can't throw a switch at the wrong moment and screw up the AI traffic. You can't get the same kind of heavy traffic and AI/player interaction with that type of activity, but once you study Rich's timing method it's easier to set up.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Aug-21-02 · 466 posts

RE: Open-ended activities w/ ai trains

Hey
Thanks, if I wasnt confused before, I sure am now. I think i need to read this thing about 15 times then it might make some sense If youd be interested in taking a look at the route when v3 is done and letting me know what you think about it and whether or not that could be done, let me know.Thanks again!
Kevin V.
-President/CEO of Illinois Northern Ry Inc, subsidiary of The Midwest Regional Railways Corp.Illinois Railway Museum Conductor Trainee

Ohio Southern is on the way...coming when I get sick of the IN!

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 6603 posts

RE: Open-ended activities w/ ai trains

Yeah, I got 2 gigabytes of email storage, but you'd probably have to send it in 9 meg or smaller chunks anyway since most email servers have limits on the size of the attachment. Don't worry about correct packaging or bat files, I can figure out what goes where;http://www.train-sim.com/cgi/dcforum/dcboard.cgi?az=show_thread&om=4559&forum=DCForumID6&archive=yesAnd use Route Riter to restuff the route with any missing default files.It IS complicated, since the whole thing runs contrary to the way KUJU designed the signals. Let me see if I can break it down a little simpler;Open-ended activities w/ ai trains – image 6Here's the most basic type of "freestyle" route, no signals and no automatic switches. This is what PO&N was up to version 4, the player can go wherever he wants so it's similar to explore route mode, with the difference being prepositioned loose consist freightcars to switch around. No AI traffic at all, altho with Rich Garber's timing method you could run a few AI trains on it.Open-ended activities w/ ai trains – image 7Two-routes-in-one, the player is on the blue tracks and goes wherever he wants, the AI traffic runs on the parallel red track. No conflicts possible, in fact unless you plan to have a lot of AI traffic you don't even need signals. If you study the default KUJU activities that came with MSTS you'll see most are of this type, either the player and AI train never run on the same track, or the AI train has left the player track before the player arrives. Ho-hum. It does create a "show" however, you see AI trains as you're doing your thing, with no possiblity of collision or interference.Open-ended activities w/ ai trains – image 8This is PO&N version 5 on up, the AI runs on the red tracks and shares the purple tracks with the player, the player runs on the blue tracks and goes on the purple tracks when the AI train isn't on it. Effectively it's still two seperate routes, the difference being there's actual interaction between the player and AI at the junctions, since both routes share the purple single track mainlines.For this to work at all the AI route needs type 1 absolute signals to stop them from entering the purple track while the player is on it, and all the signals on the blue player tracks plus the purple tracks have to be type 2 permissive signals. The "official" player path has to start and end before hitting the purple tracks, since otherwise the path conflict will cause the AI train to wait until the player runs that path, and if he never runs that path the AI will wait forever. Look at PO&N 8 (ponver8.zip in the file library) at the Anderson path, I made a m!$takE in the Anderson player path that crosses one of the AI/player junctions. So if you start the Anderson activity and throw the first switch to go west instead of east, the AI trains will pile up at that junction, waiting for you to run that east path even if you never go there.

Alert | IP


[ Home | MSTS Forum | MSTS FAQ | How To... | File Library ] Copyright © 2004 by Nels Anderson. All Rights Reserved.

Restored from the Train-Sim.Com archive, captured October 23, 2004. About this archive.