Help With Session Rules

jeff1959

Member
I would like some assistance on getting the session to present itself like I want.

I want to have the human driver drop off or pick up cars a various locations. The engineer will be presented with a list of pickups and drop offs. However the order in which they are completed will be left to the engineer. The session will be completed with the cars are in their correct locations or left on the siding for pickup. For example

Industry A, B, C, & D
Train on siding (locomotive, box, bulkhead)

These can be done in any order
Drop 50' Box ABOX #12345 at A
Pick up Reefer BN 45678 from B
Drop Bulkhead flat UP 90123 at C
Pick up 50' Box IC #2345 from D

Leave the 2 pick up cars and locomotive on siding.

Hopefully this makes sense. I know what I want to happen, just not how to present it.
 
How I would do this - other methods are available, some of which may be better!
1. Place a track marker at each drop-off location and the siding.
2. Name each car with a unique name.
3. Add "Session Variables" to your session. See here https://online.ts2009.com/mediaWiki/index.php/How_to_Use_Variables_in_Sessions_(Examples)
4. Add 3 copies of "Check Trackside" rule to session, one for each location, all at "top" level of rules.
Set each with options of "Target trackside object" to the track mark for each location; "Run mode" to "Stop" and "Filter to trains containing" to the name of the traincar you want at each location.
5. As a child rule of each "Check Trackside" rule, use "Variable Modify" rule to increase your session variable by +1.
6. Add, also at top level, the "Variable Check" rule, with options of "Test that variable" **name** "is equal to" "3".
7. Add, as child rule of "Variable Check" the "End Session" rule.

When the correct car is in it's desired location, the session variable will increase by 1. As the "Check Trackside" rule is top level, and all top level rules act simultaneously, it will happen regardless of the order the cars are placed.
When all 3 locations (2 cars on drop-off sidings at Industries A &C and pickup cars and loco on siding) are occupied by the correct car, the session variable will have a value of 3, and the session will end.

Is this what you want?

Edit. You could also proof it even more by incrementing the variable by +1 whenever a pickup car leaves it's industry location, and increment it by -1 whenever a drop-off car temporarily leaves it's intended dropoff location. In this case you would need the Variable Check rule to be 5.
 
Last edited:
dividbird

This looks like it might do exactly what I wanted to do. I will set up a sample and see how that works. Thank you.
 
I think I would try with Driver Commands

The OP said

...I want to have the human driver drop off or pick up cars a various locations....

so Driver Commands would not be appropriate.

dividbird

This looks like it might do exactly what I wanted to do. I will set up a sample and see how that works. Thank you.

Please let us know how you get on. Any problems, post back here.
 
Last edited:
I've written a batch of sessions for my Fond du Lac Branch that do that sort of thing, complete with on-screen switch lists. You might download and examine them -- the local switching sessions will probably provide the most examples. (I'm told the T:ANE route and sessions work fine in 19.) There are a variety of ways of approaching the issue. One I didn't use in FDL is creating navigation point sets; those are quite versatile and I've played with them on my update of HP Trainz' Marias Pass Approach.

:B~)
 
HI Jeff. Send me a PM with your e-mail address and I will send you an example of what you want. It is too hard to explain.
 
I sent it yesterday. Did you get it?

Yes I got it, just been away from the computer for a while. I looked at your example and learned a bunch. I have things "almost" working the way I want but can't seem to get the variables correct, so the session won't end. I stuck it on a test route to try and figure out where I have gone wrong. Would you be willing to take a look? Everything on the test is built in assets. Just some track, 3 rail cars, some triggers, and a locomotive. I'd appreciate it if someone out there could help.
 
You have my e-mail, send it to me and I will look at it.
Same thing for me : look at at your Personal Messages !

(top of the forum screen - just right from "Welcome Jeff1959" you can see Notifications v Clic on it !)

Have a good day
 
I have another issue with the session I am building. At the beginning of the session, I want to provide the player a switchlist that would remain on the screen for the entire session. It seems the message box closes after another message is closed. There's a close message rule, but is there a keep message open one?
 
I have another issue with the session I am building. At the beginning of the session, I want to provide the player a switchlist that would remain on the screen for the entire session. It seems the message box closes after another message is closed. There's a close message rule, but is there a keep message open one?

Maybe that would help you ?

https://online.ts2009.com/mediaWiki/index.php/How_to_Use_Message_Popup_Rule_(Applications)

By the way I think that, for your incomiing message, you have to build an independent arm, and let the message be closed for example when the condition wait on navigation point rule is passed, and put THAT navigation point at the end of the track. Or a variable check rule, or... so many ways to go !
Good afternoon - I go to bed, in France...
 
Last edited:
Back
Top