Needed: Tutorial for creating custom comprehensive TRS2012 Driver Sessions

MSGSapper

Trainz route developer
I have searched this forum for a tutorial for TRS2012 on how to create a comprehensive custom driver session for a route but haven't found one that covers all the bases (HTML, Driver rules, achievements, score, etc). Preferably one I can download and study. I have found some tips, and bits and pieces but nothing that seems to cover the entire process.

Being a bit bored at the moment I am considering for the first time building custom driver sessions with all the bells and whistles for my various popular layouts. I have not done this before to any degree so need a really, really good tutorial that covers it all..

Can someone point me in the right direction!

Thanks!

Bob (MSGSapper)
 
The closest thread might be the one for the session creation contest a while back. There were lots of good questions and answers.

William
 
I agree. I too am starting to get interested in creating driver sessions for a route that I am building. The route is nowhere close to being completed, but when I become bored, I would like to venture into other aspects of Trainz. Knowing how to create sessions will also help me in deciding on what objects I want to include in my route. For example, certain trackside objects can be scripted for sessions.

CP
 
Hi MSGSapper,

the closest thing to what you are looking for is this Wiki page:

http://online.ts2009.com/mediaWiki/index.php/HowTo/Create_a_session

Here, you can find a brief description of the various types of rules:

http://online.ts2009.com/mediaWiki/index.php/Session_Rules_Overview

The latter is an excerpt from the "Session and Rules Manual" released for TRS2006, which contained detailed descriptions of all the built-in rules for that version. Unfortunately, it is no more available for download.

I advise opening the built-in sessions (the simpler ones) and looking at the basic sequences that allow you displaying a html on-screen, setting a path through a series of junctions and the other essential basics.

If you plan using html or sound effects you will also need a "HTML-asset" where you should place the html files to be displayed on-screen, together with any image or sound effects.
 
Hi MSGSapper,

the closest thing to what you are looking for is this Wiki page:

http://online.ts2009.com/mediaWiki/index.php/HowTo/Create_a_session

Here, you can find a brief description of the various types of rules:

http://online.ts2009.com/mediaWiki/index.php/Session_Rules_Overview

The latter is an excerpt from the "Session and Rules Manual" released for TRS2006, which contained detailed descriptions of all the built-in rules for that version. Unfortunately, it is no more available for download.

I advise opening the built-in sessions (the simpler ones) and looking at the basic sequences that allow you displaying a html on-screen, setting a path through a series of junctions and the other essential basics.

If you plan using html or sound effects you will also need a "HTML-asset" where you should place the html files to be displayed on-screen, together with any image or sound effects.

I was aware of those links already but thanks anyway. BTW the first link is a very incomplete Wiki document that has a number of key sections shown as “TBD”. Unfortunately, it those sections that are of real interest as they are the parts that carry you beyond the very basic actions of driver session creation. These link documents, while useful, provide mainly high level overviews rather than a detailed “how to”. They also appear to be out of date with TRS2012 with SP1 with all hot fixes.

Over the last few days I have been doing a fair bit of searching on both the Internet and these forums and have been surprised at the relative lack of any kind of comprehensive tutorial on driver session creation for the current version of Train (TRS2012). This is especially difficult to understand given how long Trainz has been around. Now I am beginning to understand why there are so few fully featured driver sessions available for download on the DLS.

What I am looking for here is a tutorial that takes you step-by-step through the entire process of creating a fully featured driver session in TRS2012 to include displaying instructions, setting goals, triggering events, rewarding achieved goals, penalizing mistakes and other similar items that would be normally found in a high quality fully featured driver session.

Yes, I have looked at some existing driver sessions. Most of these are fairly simplistic in construction and would not be considered fully featured. Almost all of them fall in the category of simply setting out a train consist and telling you to deliver it with no visual cues, point rewards, HTML, or other similar items present.

While looking at the built in TRS2012 driver sessions I noticed they appear to be broken or damaged by all the recent latest changes to TRS2012 and have not yet been updated by N3V.

Can someone recommend an existing fully featured driver session that works in TRS2012 with SP1 and all hot fixes applied that I could look at and perhaps reverse engineer that covers what I have mentioned above in the way of features?
 
.Can someone recommend an existing fully featured driver session that works in TRS2012 with SP1 and all hot fixes applied that I could look at and perhaps reverse engineer that covers what I have mentioned above in the way of features?

May I recommend my "Goldsboro Local" session for the Wilsons Mills And Mount Olive route? It's a pretty complex session, with HTML popups, sound files, AI trains, triggers setting events into motion, etc.

About the only thing it doesn't have is a points/reward system. I did a points system for my entry into the session building competition from a couple of years ago. My goal in the Goldsboro Local was to imitate a real world switching job. A points system didn't fit into that scheme.

I don't think a step-by-step guide is possible as each session will have different goals and thus need different rules, etc.

I learned some by dissecting other sessions. Other things I learned by having a need to do something in the session, looking the rules available and seeing if I could figure out how to make the rules work to do what I needed done.

In a complex session, I think the first thing to do is to storyboard the session before you start writing it. Planning everything out first, then writing the session while adding one layer of complexity at a time is the way I do it. Copious notes will keep all the details in order and keep you organized.

Here's how I did that on the Goldsboro Local session.

First, I make a simple track diagram so I can figure out where all the industries are. The WM&MO route is basically a straight piece of mainline with Goldsboro Yard in the middle. I drew a long line on a piece of paper. I moved down the route in Surveyor, drawing the various sidings and spurs and labeling each industry.

I then decide what industries are going to be visited and in what order. I write down how many cars of each type (flatcar, gondola, hopper, etc) will be set out or picked up at each industry. I want to use the correct kind of cars for each industry, of course.

I start writing the session by placing cars at the appropriate industries. I make up the initial consist in the yard and add the locos. Getting the cars in the consist in correct order can take some thinking. I then run the session, making setouts and pickups according to my notes. This is basic part of the session - delivering and picking up cars so I get this correct first.

I add the "-debug" line to trainzoptions - that enables you to speed up time by pressing the SHIFT key. It's a real time saver! This session was 6+ hours at normal speed, about 2 hours with the SHIFT key so reducing the amount of times I had to test run the route was important.

There will be some issues that crop up. Sometimes I'll need to adjust the amount of cars that are setout or picked up because the siding is shorter or longer than I originally figured. Or I need to adjust the order of the cars in the initial consist. I make notes of what needs changing, make the changes and re-run the session until I get it right.
It it very important to get this part of the session right, I call it the "task list". If you try to add or subtract a setout or pickup later on after you've added all the bells and whistles, you'll cost yourself lots of time and frustration making the changes.

Once I've locked in the task list, I write the HTML text. All triggers for the HTML are labeled with a logical labeling system. In my case, HTML01, HTML02, etc. This makes later troubleshooting easier.

Once the HTML text is put into the session, it's more testing, finding issues, fixing those issues, etc. Having the HTML show up at the right time was important. A message needs to show in time for the player to act on the information presented. The introduction HTML was written and added at this time.
Once huge key in writing your HTML instructions is trying to try to put yourself in the position of the player that has never seen the session or route before. It's easy for you to run the session since you are creating it. I struggled numerous times trying to write clear instructions. I feel I did OK with this aspect as I only got a few people that misunderstood the instructions.

Graphics were needed in the HTML so they were created and added.

Sound files came next. Same process - text was written, files made, inserted into session, test and re-test.

Next was AI trains. First figure out where to put them then place triggers to set them into motion. I have them travel to an Un-portal so they disappear from the route. Test and re-test.

Last thing added was the "eye candy". I added extra cars to fill out the yard, numerous buildings, vehicles, people, etc were added to spice up the route and add visual appeal. I selected the time for the session and the weather condition.

And that's all there is to it! Well, it's not quite that easy but I hope you get the idea.

I feel the key is the planning and organization. Have a goal for the session and always keep that goal in mind as you test. Write down problems and issues, check them off as you correct them. And take a break every once and while. It's easy to get too caught up in the process or get frustrated. Coming back in a day or two gives you a fresh start. Start with a relatively short, simple session and add complexity as you gain skills.

Todd
 
Todd;

Thanks for your long and detailed comments in this thread. I don't know if they helped MSGSapper, but they sure did provide me with some good food for thought. And some needed guidance.
 
May I recommend my "Goldsboro Local" session for the Wilsons Mills And Mount Olive route? It's a pretty complex session, with HTML popups, sound files, AI trains, triggers setting events into motion, etc.Todd

Todd:

Thanks for the detailed reply and tips. They are very helpful. BTW I am the author of the route you did the session for. I tried downloading and running your session to explore what you did but ran into a number of issues with it which prevented it from displaying or running in my TRS2012 SP1 with hotfix 1-3 installed. These issues were:

1. Session is for an out of date version of the layout. Here is the info the current version:

Wilsons Mills & Mount Olive,<kuid2:439337:100430:4>

2. Faulty content items:

Realsquash 33x68 inch bogies, black reskin,<kuid:62941:50302>'
SP SD40R,<kuid:45324:100006>
BNSF GP38-2,<kuid:45324:100001>

3. Shown as having faulty dependencies (the bogies):

Woodchip Car Norfolk Southern 196859,<kuid2:56063:101328:1>
Woodchip Car Willamette & Pacific 74047,<kuid2:56063:101337:1>
Woodchip Car BNSF 540969,<kuid2:56063:101338:1>
Woodchip Car Great Northern 174222,<kuid2:56063:101340:1>
Woodchip Car Southern Pacific 870100,<kuid2:56063:101331:1>

4. Session did not run or display and showed a CMTM2 thread error.

Would you consider updating the session to the new layout version so I can see what you did?

Suggestion: Why not make a Adobe PDF tutorial on what you did and how you did it showing screenshots. If you don't have a website I would be happy to host that document and provide you the link to it.....

Thanks!

Bob (MSGSapper)
 
I'm interesting to run this session too, but i have the same problems as MSGSapper said and more:
-route show 3 broken dependencies and 1 unknown
-session show 114 unknown dependencies and 8 broken
Please be so kind and repair this, if it's possible.
I have TS with all hotfixes, build 61388.
 
Last edited:
Todd:

Thanks for the detailed reply and tips. They are very helpful. BTW I am the author of the route you did the session for. I tried downloading and running your session to explore what you did but ran into a number of issues with it which prevented it from displaying or running in my TRS2012 SP1 with hotfix 1-3 installed. These issues were:

1. Session is for an out of date version of the layout. Here is the info the current version:

Wilsons Mills & Mount Olive,<kuid2:439337:100430:4>

2. Faulty content items:

Realsquash 33x68 inch bogies, black reskin,<kuid:62941:50302>'
SP SD40R,<kuid:45324:100006>
BNSF GP38-2,<kuid:45324:100001>

3. Shown as having faulty dependencies (the bogies):

Woodchip Car Norfolk Southern 196859,<kuid2:56063:101328:1>
Woodchip Car Willamette & Pacific 74047,<kuid2:56063:101337:1>
Woodchip Car BNSF 540969,<kuid2:56063:101338:1>
Woodchip Car Great Northern 174222,<kuid2:56063:101340:1>
Woodchip Car Southern Pacific 870100,<kuid2:56063:101331:1>

4. Session did not run or display and showed a CMTM2 thread error.

Would you consider updating the session to the new layout version so I can see what you did?

Suggestion: Why not make a Adobe PDF tutorial on what you did and how you did it showing screenshots. If you don't have a website I would be happy to host that document and provide you the link to it.....

Oh yes, I knew you were the author of the route! And a most excellent route it is.

1. The config.txt file shows version :1, since that was the current version when I originally made the session. The session will always use the latest version of the route that is installed on your system. If you have version :4, that's what it'll use.

3. What build version are you running? I'm still on 58414, haven't done the latest update yet. I suspect all those errors are related to the new error checking routines in build 61388. Until I update, I don't know exactly what needs correcting. You'd have to open each faulty dependency, determine what is wrong with each and correct the faults.

PDF file? No chance. It would be a massive undertaking to produce such a comprehensive document and I just don't have 100 hours of time to dedicate to it. And it'd be out of date once new features are added.

Todd
 
I'm interesting to run this session too, but i have the same problems as MSGSapper said and more:
-route show 3 broken dependencies and 1 unknown
-session show 114 unknown dependencies and 8 broken
Please be so kind and repair this, if it's possible.
I have TS with all hotfixes, build 61388.

The unknown dependencies are the 3rd party content I used. Check the official support thread for the session at: http://forums.auran.com/trainz/show...cal-session-(Wilsons-Mill-amp-Mt-Olive-route) . That thread details all the content you need, most of it at Jointed Rail.

Todd
 
Here is another thing that is very helpful when making a complex session.

If I need to experiment with how to make the rules do a particular thing, I'll make a test session. I don't like to experiment in the main session for fear of screwing up the rules that already work and costing me much time and frustration.

For example, in this session, I was using sound files for the first time. When it came time to add them, I made a test session. A loco, couple of triggers and the rules needed to play sounds. I did all my experimenting in the test session - figuring out what settings are needed in the rules, checking the volume of the files. Once I knew how to make the files play properly, I wrote down the sequence of rules and the settings for each rule so I could duplicate them in the main session.

I then added triggers and rules to play all five sound files to the test session and made sure each one played correctly. Only once I was satisfied did I add all the sound files and associated rules to the main session.

Same with the opening sequence. I thought "wouldn't it be cool if I could start the session with a black screen and have the player hit a key to start?" So I made a test session and worked out how to do that. Once it was perfected, I wrote down the rules and settings and added them to the main session.

Test sessions are a very good idea if you're new to making sessions. Test each component, perfect it, then add it to the main session.

Todd
 
Oh yes, I knew you were the author of the route! And a most excellent route it is.

1. The config.txt file shows version :1, since that was the current version when I originally made the session. The session will always use the latest version of the route that is installed on your system. If you have version :4, that's what it'll use.

3. What build version are you running? I'm still on 58414, haven't done the latest update yet. I suspect all those errors are related to the new error checking routines in build 61388. Until I update, I don't know exactly what needs correcting. You'd have to open each faulty dependency, determine what is wrong with each and correct the faults.

PDF file? No chance. It would be a massive undertaking to produce such a comprehensive document and I just don't have 100 hours of time to dedicate to it. And it'd be out of date once new features are added.

Todd

Current build number for all 12 of my high quality layouts is: 58414

Your statement in #1 isn't that black or white. The reality is a bit more complex. It will indeed work that way if *no* substantiative changes have been made by the layout author since the original version but that is unlikely as there had to be some reason the author updated the layout (ie; content changes, texture changes, fix track problems, etc) which created the new version. In this specific case there have been a number of changes to the WM&MO layout since it was first created. While a session will always use the latest version of the layout as you state that doesn't mean it will work which is the case here.

Since you are running build 58414 have you downloaded my latest layout WM&MO version and tried running your session in it? If so, what results did you get?

I always try to keep my layouts current for users. As there have been changes made by Trainz since the original TRS2012 came out (ie; SP1, hotfixes 1-3, etc) I have had to made adjustments as needed to prevent errors or to correct other issues that surfaced later.

Thanks for the additional tips and pointers!

BTW perhaps you might want to check out my Progressive Rail Jesse James Line,<kuid2:439337:1040:7> layout. This is a very small industrial park switching route and would make an excellent route to build a fully featured session that could be used as a hands on tutorial demonstrator for how to build a fully featured driver session. Just a thought.....
 
In build 58414, the route (version :4) and session (version :2) and all their dependencies were error free. I ran the whole session after you published version :4 of the route with no issues.

So I just did the upgrade to build 61388. My results are completely different than yours.

My woodchip cars show error-free. The Realsquash bogies show yellow warnings about progressive meshes and no thumbnail, but still work. Are you getting red errors of some sort?

The SP SD40R,<kuid:45324:100006> is an obsolete KUID, replaced by a :1 version. If you have the current :1 version on your system, just delete the old KUID and it won't show up as faulty anymore. I learned this the hard way - I had a bunch of assets showing faulty, once I realized they were old version I just deleted them which really cleaned up my faulty asset list.
Same thing with the BNSF GP38-2,<kuid:45324:100001> , it's now up to version :2 so just delete the old KUID.

On build 61388, I get sound file errors on:

session:
524343: 6822 Usa - Truck Western Star 4800 Red
route:
524343:6241 Airport Fuel Truck
524343:6263 Coal Power Plant Unloader Industry
524343:6670 Usa - Ambulance car

These are all likely readily fixable using DaveSnow's procedure he posted on the site a while ago.

Without fixing any of the errors listed, I fired up the session and it ran. I only ran the first few minutes, didn't spend 5 hours running the whole thing. So something on your end must be wonky. No idea what, though.

Todd
 
Just used DaveSnow's tutorial for correcting the new sound file errors showing up in build 61388. I fixed all four assets, the route and thus the session are now error-free.

Todd
 
Here is another thing that is very helpful when making a complex session.

If I need to experiment with how to make the rules do a particular thing, I'll make a test session. I don't like to experiment in the main session for fear of screwing up the rules that already work and costing me much time and frustration.

This technique is also very useful to test some rule sequence you might want to add at the end of a session without playing the whole thing.

Once I knew how to make the files play properly, I wrote down the sequence of rules and the settings for each rule so I could duplicate them in the main session.

From TS12SP1 you can also copy rules and rules sequences from one session to another.

1) Launch TS12, select options and set it for running in windowed mode (set a window size smaller than fullscreen to easily switch from one instance to the other);
2) Open two different instances of TS12 in windowed mode; open the test session in one instance, the main session in the other;
3) In the test session, select the rules you want to copy (all child rules will be copied if you select a parent rule), then right-click and select "copy";
4) Switch to the main session, select the point where you want to past the rules copied in step 3 above, then right-click and select "paste";
5) Save the edited main session.

This procedure works fine even if you copy rules or rule sequences from sessions referring to another route, as long as:
- there is a matching element in the destination session/route for any named element (triggers, trackmarks or junctions) recalled by the copied rule/sequence, e.g. if you set up the test session to play a sound file when any train enters "Trigger 103", you must have a "Trigger 103" in the main session (otherwise, you will have to edit the "Check Trackside" rule so that it is tripped by the proper trigger/trackmark/junction)
- both the test and the main session refer to the same HTML-asset for HTML, WAV or JPG files (otherwise, you will also have to copy those files from the HTML-asset of the test session to the one used by the main session.

Same with the opening sequence. I thought "wouldn't it be cool if I could start the session with a black screen and have the player hit a key to start?" So I made a test session and worked out how to do that. Once it was perfected, I wrote down the rules and settings and added them to the main session.

This sounds very cool! How did you manage to do that?
 
Man, I never knew you could copy and paste. Learn something new every day!

As for the opening, it's basically this:

Ordered List
-Fade In/Out, 0 sec, alpha at 100 percent (gives a black screen)
-Display HTML (this displays the opening HTML giving the introduction to the session)

Wait For Camera View Mode, wait for camera to changed to "cab mode" (the intro instructs the player to press 1 to enter Cab Mode and thus start the session)
-Ordered List
--Fade In/Out, 2 seconds, alpha at 0 percent (fades out the black in 2 seconds)


I wanted a rule called "wait for key press", which would allow me to specify any key I wanted to start the session. There isn't one, so I had to use the "wait for camera view" rule to accomplish basically the same thing.

If you download the route and session you can see it work. The session does need a lot of 3rd party assets, though. The session may start without all of the 3rd party stuff installed, never tried that so I don't know if the session would even open.

Todd
 
In build 58414, the route (version :4) and session (version :2) and all their dependencies were error free. I ran the whole session after you published version :4 of the route with no issues.

So I just did the upgrade to build 61388. My results are completely different than yours.

My woodchip cars show error-free. The Realsquash bogies show yellow warnings about progressive meshes and no thumbnail, but still work. Are you getting red errors of some sort?

The SP SD40R,<kuid:45324:100006> is an obsolete KUID, replaced by a :1 version. If you have the current :1 version on your system, just delete the old KUID and it won't show up as faulty anymore. I learned this the hard way - I had a bunch of assets showing faulty, once I realized they were old version I just deleted them which really cleaned up my faulty asset list.
Same thing with the BNSF GP38-2,<kuid:45324:100001> , it's now up to version :2 so just delete the old KUID.

On build 61388, I get sound file errors on:

session:
524343: 6822 Usa - Truck Western Star 4800 Red
route:
524343:6241 Airport Fuel Truck
524343:6263 Coal Power Plant Unloader Industry
524343:6670 Usa - Ambulance car

These are all likely readily fixable using DaveSnow's procedure he posted on the site a while ago.

Without fixing any of the errors listed, I fired up the session and it ran. I only ran the first few minutes, didn't spend 5 hours running the whole thing. So something on your end must be wonky. No idea what, though.

Todd

Thanks for your reply. My apologies for not replying sooner. Its been a bit busy with real world issues at this end the last few days.

I show the Realsquash bogies as faulty with the following report:

Warning: This asset uses an obsolete trainz-build number. Trainz-build numbers below 2.9 are no longer supported.
Warning: Aliased meshes cannot currently be verified by Trainz.
Error: The Tag '?' is not permitted within a container of type 'bogey'.
Warning: Progressive meshes are no longer supported by Trainz. Though these meshes may work in Trainz, it is recommended that you switch to a LOD mesh.
Warning: Progressive meshes are no longer supported by Trainz. Though these meshes may work in Trainz, it is recommended that you switch to a LOD mesh.
Warning: Required container 'thumbnails' is missing.

The Woodchip cars show as red as having faulty dependencies (the Realsquash bogies).

As for the SP SD40R and BNSF GP38-2 locomotives a KUID search of the DLS does not turn up the later versions of those locomotives you mention. Did you get the later versions from somewhere other than the DLS?

I'll re-load the session once again into my TRS2012 and give it another try. I did notice the blackscreen at the beginning on my earlier test but did not realize that was intentional and assumed it was a problem (incorrectly based on your comments above).

I am curious how a session for an out-of-date route version can still run as I haven't seen this before.....

Bob
 
Back
Top