Route and Sessions - How do they work together?

MSGSapper

Trainz route developer
For the first time since I began with Trainz many years ago I am getting seriously into session creation, something I haven't done too much of before, and find that I don't really understand the relationship of route to sessions as well as I thought I did.

As an example:

When I was working in a session I found that I had left out a signal from the base route. I added it to the session and when I saved the session in TRS19 it said it overwrote both the existing session and route with the changes. Later I went into the base route I expected to find the signal but it wasn't there, although it is in the session. Obviously it would seem I don't understand the fundamentals of sessions and the relationship it has to the base route.

Questions:

1. What is the relationship of session to route? In actuality is it just essentially a layer of the route?

2. What information is stored only in the session instead of the route?

3. Can I make changes to the base route and expect everything to be reflected in any sessions that depend on it?

4. Are changes made to track, signals, structures, scenery in the session posted to the route?

Thanks for any help on this.

Bob
 
Last edited:
All interesting questions. I look forward to reading the answers. I have also had trainz ask to save the route when only making changes to a session.

Bob
 
1: It is a layer saved to a different asset.

2: Everything you put in the session layer is saved to the session plus session rules and settings of industries.

3: As long as you make them while having a route layer selected.

4: See 3.
 
The way I understand it, one route can have one or more sessions.
If you open a route for editing, which of the many possible session gets opened? Since the route doesn't know, it creates a new session. If you open the layers tab, you'll see the route part above and the session part below. Many objects can be placed in either one. If placed in the route part, all sessions based on that route will see them. If placed in the session part, only that session will see them.

If you open a session for editing, the one route it is associated with also opens. If you add more things to the session, only that session will see them. If you add more things to the route, every session that is based on that route will also see them.

So you could have a base route and sessions for different eras or different seasons or just different experiences. If you edit the session part, only that session will be affected. If you edit the route part, all sessions will be affected.

Remembering which part you're editing and then in which layer can be a challenge. All too often, it appears that people think they are in one layer when they are really in another.

So once you've started to create a session and have placed objects in it, always open the session for editing, even if you intend to edit the route itself. If the route is opened, anything in any of the existing sessions will not be accessible. They will not be lost, just open that session and they will still be there.

YMMV :D
 
I add signals to sessions all the time without the route changing. I have found that sometimes you move something in the route without knowing it. When I go to saving the session, I see if the game is asking to change the route as well. If so, I abort and start over. It helps to make small changes and then save. You can also add trackmarks and triggers, and many other objects in the session only, IMHO, the more in the session instead of the route, the better. For example, if a route creator puts an engine in the route, I have no easy way of getting rid of it for a new session.
 
"4. Are changes made to track, signals, structures, scenery in the session posted to the route?"

You can change track in a session, but it cannot cause any changes to the track in the route. For example, you can add track to an endpoint if you do not move the existing track in the route.
Signals and buildings and scenery can be session only. But painted textures have to change the route. Of course, you cannot change the wireframe shape in any way without changing the route.
 
The session layer is not the same as a session, they only apply in surveyor. If you saved both the route and session, open edit session next time to return to the route and session you were working on. If you only open route for edit you will have created a new session without any content you had placed last time unless it was placed in the route layer.
The relationship is the session (not the layer) will hold the names of assets plus anything in the session layer and most of the settings for industry.
A session only retains the information from when it was saved last, this means that an older session might not work if changes have been made to the base route.
Create your base route first and make sure all the work is in the route layer. When finished the base route you can add a session. Anything you put on the session layer will only load if you edit session or drive the session. You could add track to an industry in the distance and this would only appear if you open that session. It will not appear if you only open the route. This allows for different set ups to be created with just the base route.
 
Thanks for all the replies and tips, which were helpful.

Some further questions:

1. Can a session replace the track with another track type? The replies above seem to indicate this is possible but I need solid confirmation on this as some folks out there would like to use a different track for various reasons. As an example some folks apparently cannot use the Ultra Shader turned on, probably because of a less capable graphics card so would like to use older 2D non-PBR track.

2. Does a session automatically pick up on a new route version? Example: When a route is updated for instance.

I guess what I need to really know here how tight is the linkage between the base route and the session and at what point does a session become disjointed form the base route and broken?

Bob
 
Thanks for all the replies and tips, which were helpful.

Some further questions:

1. Can a session replace the track with another track type? The replies above seem to indicate this is possible but I need solid confirmation on this as some folks out there would like to use a different track for various reasons. As an example some folks apparently cannot use the Ultra Shader turned on, probably because of a less capable graphics card so would like to use older 2D non-PBR track.



Bob

There was a thread on this in the last few days. The answer seems to be no.
 
1:
Short answer: No.
Longer answer: You could decide to put no tracks at all on the route and instead put them all in the session. That effectively means you have to put all the tracks in every new session you create for the route. Lot of trouble, but you can. Also means you have to put all the industries and whatever else is directly attached to the tracks in the session (and no longer in the route).

2: Works the same as with every other asset type; a session will always try to download the latest version of an a dependency. So if you update the route, it will obsolete the previous version of that route and when the new version is downloaded the session will use the new version.
 
1:
Short answer: No.
Longer answer: You could decide to put no tracks at all on the route and instead put them all in the session. That effectively means you have to put all the tracks in every new session you create for the route. Lot of trouble, but you can. Also means you have to put all the industries and whatever else is directly attached to the tracks in the session (and no longer in the route).


I don't think it's quite that bad. You could "clone/save as" each succeeding session from the first session.
 
Let's just say that I am expecting a lot of people posting on the forum "this route is broken; the tracks aren't there", even when clearly mentioned in the route description and in the announcement topic. ;)
Next to that, you are human, so likely to forget an industry or portal that still is in the route.
 
1. Can a session replace the track with another track type? The replies above seem to indicate this is possible but I need solid confirmation on this as some folks out there would like to use a different track for various reasons. As an example some folks apparently cannot use the Ultra Shader turned on, probably because of a less capable graphics card so would like to use older 2D non-PBR track.

2. Does a session automatically pick up on a new route version? Example: When a route is updated for instance.

I guess what I need to really know here how tight is the linkage between the base route and the session and at what point does a session become disjointed form the base route and broken?

Bob

1 You don't need session to change track type. You just use the bulk replace in your surveyor mode.
2 A session is only linked to the route at the point in time that it was saved and remains with the route at that time point. An upgraded route may have altered assets that the session needs to locate, mainly track. If its a building that gets added or removed then the session could still work.
Always best to edit session as any alterations to the route will also be saved with the session so keeping the link.
 
1 You don't need session to change track type. You just use the bulk replace in your surveyor mode.
2 A session is only linked to the route at the point in time that it was saved and remains with the route at that time point. An upgraded route may have altered assets that the session needs to locate, mainly track. If its a building that gets added or removed then the session could still work.
Always best to edit session as any alterations to the route will also be saved with the session so keeping the link.



I believe we are heading into different directions here. If I download one of MSGSapper's routes, and don't like the track, I can change it to whatever I wish. But the route will also change, and the new route will have my kuid designation on it, not his.
If I decide to create a session, it has to be based on his old route, not the new one I made if I wish to upload it.

I suppose in theory I could upload the route I made, ignoring semi-legal issues, but this could result in a proiliferation of like-kind routes on the dls.

Maybe MSGSapper could upload 2 routes, one with and one without PBR track. Session users would then either have to point the sessions to the earlier one, or accept the later one.
 
I think a tool that would edit the map-kuid for a session would be great. It could be written in Python, for instance.
However, I used to write programs with it, and I looked in the book the other day and it seemed like a foreign language to me now:eek:.
 
There are many problems with placing tracks (and track objects) into a session instead of the route. While this would work for a route with a single session only it can create headaches when you add a second session. Yes, as Pitkin suggest, you can simply clone the first session and give the copy a new name and carry on working.

If you later decide to make a change to the tracks, and not just a change to the kuid but to realign them, add new features (industries, signals, bridges, etc), delete a section, and so on then you would have to go into every session and make the same changes to maintain consistency between the sessions. Of course, you could argue that the rail bridge that you added to the day session version does not have to be present in night session version but that is hardly a real world argument. Better to have the tracks in the route so that any such changes automatically appear in all the sessions.

Secondly, as Oknotsen pointed out, all the track dependent assets (signals, switches, and most significantly, active industries) would also have to be present in every session.

Thirdly, if a user downloads the route the first two questions they are going to ask are "where are the tracks and industries" and "who put this rubbish on the DLS"?

The question of routes vs sessions is explained in the Trainz Wiki page at http://online.ts2009.com/mediaWiki/index.php/How_to_Use_Layers#Route_Layers_vs_Session_Layers
 
May I ask a question, give an illustration please, for clarity (for myself) please? Using actual examples....

I find four version of msgsapper's route "Prog Rail Jessie Jame Line - TRS19" - They have the same Asset ID and are numbered (null), 1, 2, and 3.

To simplify, I'm going to call them versions 0 thru 3, The original route (0), and it's update (1) are marked as Obsolete. Asset version 2 and 3 are "available for download."

Versions 0 (original) and 1 have ProTrack.

Versions 2 and 3 have PBR track and requires shader set to Ultra. I can download either of those. If I download 3, version 2 is overwritten not available in game even though CM still shows it installed. ie: In game only shows latest available game even though older versions are still installed.

If I want to run Version 1 (the latest ProTrack version) I have to delete versions 2 and 3 IN GAME (thumbnails). All versions still show in CM as installed even though game shows only the latest one available.

Thus to keep ProTrack version AND latest version IN GAME I need to Edit one of the routes and save under a new route name (new asset). And if I build a Session for either one that "one" should be the original, not the renamed route. Thus, practically speaking, two versions of a Route (for example: "ProTrack" vs. "PBR Track") should exist as two separate "official" routes. If not, things are going to get really crazy with sessions as the session could be ran on a ProTrack version or PBR Track version. Again, this is just an example. I don't think I know of an actual route that has two "official" con-concurrent versions with the same name and asset number.

I was surprised that "in game" thumbnails are actually only showing only the latest version and NOT what is installed. Why not provide the option to run a previous version if it's installed? Or perhaps I'm missing something.

I'm relatively new and I think this is how things work.... comments, corrections?

EDIT-- Additional: Of course, I doubt any of my thoughts here matter as I know the expectation within "Trainz" world is for a Route to only have one "latest" version of the Route which is the one expected to be used, and any and all sessions be expected to work with that latest route (Which is totally dependent upon the session maker to make sure session still works as expected.)??? I do know from my own experience that many Tane route sessions advertised as TRS19 compatible do not work correctly. But that is quite a jump, going from one version (Tane) to another (TRS19).
 
Last edited:
I am currently attempting to duplicate your "hypothetical" example using msgsapper's "Progressive Rail Jessie James Line TRS19" layouts but the download and install is taking so loooooong over my slooooow ADSL link, so I will offer my theory on the matter.

After downloading version 1 (use the "Download this version" option in CM otherwise it will automatically skip to downloading the latest version) I would clone it so that it will be under your own kuid and not that of msgsapper. I would then load the newly cloned route into Surveyor and then create and save a new session for it - this again will be under your kuid. From that point on the route and session are yours and will not be affected by any updates that msgsapper may release.
 
-SNIP-
After downloading version 1 (use the "Download this version" option in CM otherwise it will automatically skip to downloading the latest version) I would clone it so that it will be under your own kuid and not that of msgsapper. I would then load the newly cloned route into Surveyor and then create and save a new session for it - this again will be under your kuid. From that point on the route and session are yours and will not be affected by any updates that msgsapper may release.

Yes... but the problem comes if I want to share a session by uploading to DLS/CM. Any session I want to create and share need be done with original owners route.
 
Back
Top