Question about Sessions and Senarios

theedge2k

New member
Can someone give me an idiots example of the two. I am working on an idea using the Tidewater Route. Example user is given a task running coal from the mine to the power plant. Is there a way that if they complete the task properly, a rule or something could run and says there a different task only a little harder and so forth. Each task completed properly could unlock another task. Sorry if i confused anyone.

George "theedge2k" Flatman
 
Idiot's response

Hi, George - well I'm not a scenario author, so cannot tell you much about it, but as I understand it a scenario requires programming ability at a considerably lower level than TRS2006 session building, in which the programming language is at such a high level that you are basically 'speaking' ordinary English as you give a succession of commands to your engineers.

If you want an example (not an idiot's example by any measure) I suggest you download WeddinNSW and the sessions that go with it by FootplatePhil (56603). He makes extensive use of rules in a multi-part session that may or may not be quite on the order of what you are asking about.

Dick
 
Hi,

TRS2004 can run and create both driver sessions and scenarios. TRS2006 and Trainz Classics/Railways/Railwayz can only handle driver sessions.

A driver session normally appears with a set of driver commands along the bottom of the screen which act as a "program" for the driver to follow. A user can create and modify the "program".

A scenario is a fully scripted activity. The commands are written in a programming language called GameScript (some people call it TrainzScript) and they are hidden from the user. An activity can do just about anything. Some activities guide you every step of the way with instructions, while others merely give you a goal to achieve and leave it to you figure out how to do it. Shunting puzzles usually fall into the second category. Most activities react with comments etc as you proceed through them.

The Razorback Railway creates activities which run as scenarios in TRS2004 and as driver sessions in TRS2006. Larry's Jasper compiler very cleverly makes the driver sessions in TRS2006 behave as closely as possible to true scenarios.

Here's a sample of GameScript coding just to show you what it looks like:
Code:
    int i;
    KUID[] playertrainkuids = new KUID[20];    
    for (i=0; i<=5; i=i+1)
        {
        playertrainkuids[i] = World.FindKUID("QR_QLX");
        }
    playertrainkuids[6] = World.FindKUID("NSW_FreightCorp_82_Class");
    for (i=7; i<=12; i=i+1)
        {
        playertrainkuids[i] = World.FindKUID("QR_QLX");
        }
    KUID[] othertrainkuids = new KUID[20];    
    othertrainkuids[0] = World.FindKUID("RBR_Drewry_Brown");
    othertrainkuids[1] = World.FindKUID("QR_QLX_Bronco");
    othertrainkuids[2] = World.FindKUID("QR_QLX_Bronco");
    Train playertrain = World.CreateTrain(playertrainkuids, "Trackmark1", true);
    Train othertrain = World.CreateTrain(othertrainkuids, "Trackmark2", true);
    World.SetGameTimeRate(World.TIME_RATE_1X);
    World.SetGameTime(0.875);    // 9am
    World.SetWeather(World.WEATHER_TYPE_CLEAR, World.WEATHER_CHANGEABILITY_NONE);
    World.SetCamera(cast<Signal>Router.GetGameObject("Signal1"));
    World.SetCameraAngle(270, -18, 30);
    playertrain.SetAutopilotMode(Train.CONTROL_MANUAL);
Terrifying at first, isn't it? :) But the user is completely shielded from all that complexity.

We have a large number of freeware and payware activities available, why not give some a go to see what you think? Full instructions for installing our essential files can be found in the "Getting Started" section of our FAQ. We also have a free standalone slideshow program available which will give you some idea of what we offer, which can be downloaded from here.

John
 
Can someone give me an idiots example of the two. I am working on an idea using the Tidewater Route. Example user is given a task running coal from the mine to the power plant. Is there a way that if they complete the task properly, a rule or something could run and says there a different task only a little harder and so forth. Each task completed properly could unlock another task. Sorry if i confused anyone.

George "theedge2k" Flatman

Easy with TRS2004. Give your driver commands from the menu at the bottom of the screen like ->Drive To ->Coal Mine X ->Coal Pickup ->Load ->Drive To ->Power Station X -> Coal Dropoff ->Unload -> etc. After this you can send him to any other industry with similar commands. Be aware that the AI may not always find the shortest path to the destination, so you may have insert some "Drive Via (trackmark/junction)" to optimize the route.
 
Hi,
....Snip...TRS2004 can run and create both driver sessions and scenarios. TRS2006 and Trainz Classics/Railways/Railwayz can only handle driver session
John

John,
With the utmost of respect (you are more knowledged than myself regarding sessions), but I disagree with your statement that TRS2006 does not support scenarios. It is my opinion that it does !
It is only that few write 'true' scenarios anymore, everyone seems to write sessions and lable them scenarios !
Thackalane's scenario writing utility is available on the DLS, and I would enjoy very much that members download it, create with it, upload, and we who love 'true' scenarios can again enjoy things like 'Clearwater', 'Robe River', 'Clinchfield' and the likes.
Possibly I have misinterputed your post, if so I apologize !

Caseyj - Your post is not going to do what theedge2k is trying to accomplish.

My thoughts & I hate sessions ---DLR
 
Last edited:
With the utmost of respect (you are more knowledged than myself regarding sessions), but I disagree with your statement that TRS2006 does not support scenarios. It is my opinion that it does !

John is possibly confused because our Activities run as Scenarios in TRS2004 and Sessions in TRS2006.

You can run a scenario in T6 but they do not appear under the map. Also, sessions are able to do more in T6 than a scenario.

The code that runs as a session in T6 (for the Activity author) is exactly the same as the scenario in T4 .. our compiler builds them automatically.
 
When in doubt Larry (Jenolan, my "boss") is right and I am wrong! :) :)

It is confusing. Sorry if I confused people even more.

Thackalane's Scenario Creation System utility (SCS) is an excellent thing indeed as it makes possible the creation of scenarios by non-programmers. There are different versions of SCS for TRS2004 and TRS2006 and it's also available on the Trainz Pro Routes and Razorback web sites.

BTW, both TRS2004 and TRS2006 include a number of built-in driver sessions and scenarios (or should that read "scenarios" for TRS2006?!). AFAIK TC only has built-in driver sessions.

John
 
Is there a way that if they complete the task properly, a rule or something could run and says there a different task only a little harder and so forth. Each task completed properly could unlock another task.
It's probably about time I actually tried to answer the original question!

What you describe can definitely be done in a scenario.

If all the tasks are in the same scenario, it is very easy (if you know how to write scenarios).

If the tasks are in different scenarios, then at the end of each one it could display a password which the user has to enter at the start of the next. Something like this was the basis for Larry's old "The Living Railway" system on the Razorback, but that also involved the server accepting and issuing the passwords (codes).

I see no reason why session rules/behaviours couldn't be devised to achieve the same thing in driver sessions but some thought might be required to devise a mechanism for keeping the passwords secret from people who know how to look inside assets. I haven't conducted a search to see if any such rules already exist.

John
"Meddle not in the affairs of Gooroo's, for they will quickly tell you when you're wrong..."
 
At the risk of making a fool of myself again, can I tentatively suggest these distinctions?

Sessions can be created in Surveyor, scenarios cannot. The creation of scenarios requires writing conventional coding in a programming language, or the use of a program such as SCS. (BTW, it is possible to create sessions by methods other than Surveyor.)

The behaviour of a scenario cannot be changed by the user while it is running. (Of course, a scenario might run in different modes depending on a menu choice by the user, it might allow the user to change junctions, it might react in different ways to the user's behaviour, and it might include random events, but the logic for all of these and any similar features would have to have been implemented by the scenario's creator.)

Sessions can usually be changed as they are run, by changing the items on the driver command bar at the bottom of the screen. (However, it is possible to create a session which hides that bar.)

I hope someone else can provide some better and more succinct definitions.

John
 
Back
Top