routes, sessions and layers

martinvk

since 10 Aug 2002
There seems to be some confusion concerning routes sessions and layers.

When layers were introduced to Trainz, at first there was quite some discussion as to their usefulness. I think once you get used to them, they become indispensable.Being able to place several objects right next to each other without disturbing the others because they are on separate layers makes route building so much easier. The only thing it requires now is to remember what layer is currently active. If that could be displayed via a sign on the menu bar, that would be wonderful.

Sessions enable you to use the same base route and have multiple variations in it. Each route map can have many sessions. If you are working in an existing session, adding things to one of the session layers, then that is were they will be saved. When you open an existing route by clicking on the route itself, a new session is created and anything added to the previous session will not be there. Don't panic. It is all in the other session.

If you have started to modify a session and you want to continue to work with those modifications, open the existing session for editing and everything will still be there.

If you always add everything to a route level layer, then all sessions that share that route will also show those additions.

The route layer(s) are always associated with the route.
The session layer(s) are associated with their session.

routes_and_sessions.jpg
 
Let me get this concept straight. If you always add anything to a route level layer, then all the associated sessions will have the changes. Then, why if you add a spline to a route, it all gets messed real bad in the session? Many people has had this bug. Not everything you do in a route shows in the session. I can make it long, but there is a lot of ink already by now on the subject.
 
Without further testing, I can think of one why that might happen. If part to the track was in a route layer and you added some more in a session layer, then only that session would have both. Any other session will be missing the added track and anything dependent on that missing track that is also in the route layer will be messed up. Big reason to always put permanent things in the route and leave the sessions for variations that will only apply to one session.

Sessions and their associated layers are a powerful tool but if used incorrectly can result in a host of problems. Used properly and they really help the route creating process.
 
Lets analyze the details: One route with only one session. All working perfect because you created the route and made a session with all the goodies on it. One day you decide there should be a tree here or there, and put it in the route. And the tree shows also in the session. So far so good. Using the automatic points controllers (those yellow cubes), you set commands so that one set of points control others in let's say a yard. You do this in the route, but it does not show in the session. Way around this is to install a new cube in the route and set all the commands. It will show in the session, but if you want to add any commands after, and you add these in the route, it will not show in the session (you can add these in the session and will stay there). For the grand finale, you want to add a piece of track and set it in the route. It will show in the session but most likely will run not only where you put it, but to infinitum! So you go deeper into the matter, and set the piece of track alone (not connected to anything (in the route). Go to session, and sometimes, I repeat, sometimes the track is there, sometimes it has gone somewhere else, or is attached to another spline, near or far away. You exit the session and when you go to the route, it is messed there too! The idea of layers is wonderful, but it is not properly implemented. (There is a way around this problem, but that is a subject for another thread).
 
Last edited:
hmm, will have to try some of those point controllers. So far my routes, sessions and their layer behaviors have not been anything like what you describe. I open my map by going to the session and opening it for editing. That way both the route and the session are open, then I unlock the route layers and make all the necessary changes I want there. The only thing I have stored in the session layer are any trains and associated driver commands. I then save and over-write the existing session, thus everything will be there the next time I open the map again. The current map I'm working on has been opened and saved this way many times and nothing has ever been messed, lost or gone to never-neverland.
 
Lets analyze the details:... SNIP, Snip ... Go to session, and sometimes, I repeat, sometimes the track is there, sometimes it has gone somewhere else, or is attached to another spline, near or far away.
If it's displacing it's a definite bug. That implies the symbol tables are corrupted somehow and things are getting cross-connected. TRS2006 did that with some splines if copying regions and pasting them elsewhere with Mocrossings in particular--all the sudden a track or road section would fly across the map to a vertex miles away. Sometimes they'd connect to the wrong spline kind too, which was a pain to clean up. But this smells fishy, indeed.

Do you make regular backups? Change up versions from time to time creating a kuid2 from CM RMBh drop down menu, say before making major changes? (BOTH... Preserving a separate copy in a different file footprint on the HDD... and giving a fall back. In the early days of PCs and PC hard drives we backed up several times an hour! Manually giving yourself a fall back with successive systematic Save As clonings is one way to go safely.) Have you run check disk recently or better yet with some regularity? Corrupted data could be because of a bad sector, and once the binary data's corrupted, it may be carrying forward causing such behaviors. // F

You exit the session and when you go to the route, it is messed there too! The idea of layers is wonderful, but it is not properly implemented. (There is a way around this problem, but that is a subject for another thread).
Since it's on topic, give us the way!

The only time I saw anything like that I'd added the track and portal on the session edit, and didn't select the route and unlock it as Martin's procedure suggests. That caused the elements to be 'disappeared' when next I just edited the route from the main menu, no session. Toggling back and forth between layers is even necessary to use the 'get' tools, much to my surprise. I'm still trying to get all my assets for my major routes into TS12--as compounded by time crunch to work the Wikibook and fixing errors I inherited from getting greedy about downloading too many routes from Trainz early days. (One night, I carelessly, unthinkingly upon a recommendation downloaded every route by gfisher... it was still downloading the next morning! And I've still got a few of those assets to fix! Ooooooops!)

So except for playing around systematically to familiarize myself with their ins and outs (as well as other new features) to follow points and judge suggestions on the private Yz-Tz forum, my experiences running TS12 in surveyor have been limited. I've done far more with them in TS10 since it will at least accept my TS2009 code and JA's--TS12 wouldn't take my TS2009 (with it's TRS2006 base assets!) code.

God and everyone know's I'm not an fan of N3V's tyro programming decisions, forsooth! But they also have fairly good skills, however badly they consider their dictates ridiculous impact on the user communities time and the older assets. Still as a programmer--with a liking of writing complex sessions to boot-- once I got past the layers idiosyncrasies, I found them to be a useful if sometimes confusing implementation, and even pointed out to Jcitron and Steamboateng when they were ranting how they'd messed them up, why they'd generalized and generated this or that method for sound programming reasons and data management the way they've implemented them.

They expected them to work differently too and John particularly was quite negative about them last summer, but is now using their power with some skill. His most recent gripe is lack of exportability of Driver Commands, and reimporting same--which is a real need for using parts of a session to write a new one, etc. Still if things are jumping about... that's a bug. The Disappearing could be operator error... you need the right edit mode starting in the Main Menu(s). THAT I wish they'd left as it was, though this split has some offsetting virtues, it's under-implemented in some ways, so worth less than it ought to be. Cheers! // Frank
 
Back
Top