Newbie Intro and Question

Jaggz

New member
Hi

About 2 months ago I arrived in the world of Trainz (T22 Platinum Edition). And wow what a ride, getting my head in to how it all works and at times just keeping my head above water with all the new knowledge, technicalities and creative possibilities.

Firstly, I have really enjoyed discovering and downloading all the wonderfully created Routes, mainly UK themed ones. I especially enjoy Routes that have associated Sessions, so I can just watch trains go by which is a very absorbing pastime. I have a leaning towards BR Blue and late steam, but modern also grabs my attention.

So far I have got my head round Sessions and how to create them, consists, driver commands, industries and creating load and unload trips. I am starting to experiment with more complex commands and also Portals, including Quick Portal Manager.

Whilst I have many questions, some, I just cannot seem to find the answer on the forums, N3V Trainz wiki or tutorials. So I though I would start off with just one question, where searching has not got me an answer.

I would like the ability to create a consist to enter via a portal where the coaches or wagons are a pre-defined saved consist but the loco is randomly selected for a list of applicable locos I set up to operate that train. For example a consist of a rake of MK 1 coaches with a random loco selected from a list of say Class 31, 37 and 47 locos in different liveries or running numbers. So far I can only see that the portals can spawn random saved consists where the loco is saved as part of the consist.

Thanks in advance for help.

Paul
 
Hi Paul, and welcome to the world of Trainz!

I may be wrong (and no doubt someone will correct me if I am), but I don't believe there's currently a way to do that. However, you can create a coach-only consist and reuse it as many times as you like, just adding a new loco to each train you want the portal to produce. At least that way, you won't have to rebuild the entire train, car by car, every time.

Have fun,

Max (maxwerks)
 
Welcome, Paul to the addicting world of Trainz.

Unfortunately, as Max says there isn't a way to do what you would like to do. What you can do is put a bunch of consists into the portals and check the option to select a consist at random from the list. I can't remember the exact wording and I'm not at my Trainzing computer to check right now. This will be as random as it gets and there will be more randomness the more consists you have in the portals.
 
Thanks guys for the help. It explains why I could not find a function/command to do the job. Rather surprised that there is not a command to do this.

Anyway, the lack of the command and your suggestions got me thinking how I could use Portals to generate the locos and rolling stock consists to form trains. So I had a deeper look at all the different portal commands and came across Un-portal on Content Manager. It turns out this one allows a Trackmark to act as the spawn location for a Consist rather than needing a section of running in Portal track.

After a long session of trial and error (and lots of testing), I think I got it to do what I wanted.

I used Un-Portal 2 in the end as I found that Un-Portal 1 created the consist and it immediately sent it off running down the track, whereas Un-Portal 2 creates a stationary consist/loco at the trackmark. Perfect for coupling up to. I then found all the "Couple at" commands.

Just for testing control I used 3 separate Un-Portals, one for Locos, one for Rolling stock and one to consume the test trains.
.
I then set up a three road fan siding leading on to a single mainline out track. The mainline line had a trigger on it just beyond the shunting stop point.

Siding 1 - had a trackmark for Locos
Siding 2 - had a trackmark for Wagon consists
Siding 3 - had a trackmark for Coaches consists

Loco Un-Portal had a list of locos to generate at random, some were for a freight trains and others were for passenger trains. These appeared in Siding 1.
Freight Un-Portal had a list of wagon consists, to generate at random in Siding 2
Passenger Un-Portal had a list of wagon consists, to generate at random in Siding 3

Set generation at 1min intervals for all portals.

As suggested by Stagecoach, I learnt how to use Scheduel Library for the repeatable commands, which were
"Couple at Trackmark" <kuid:2:57145:81100:1> either the Freight or Passenger Trackmark Portal and then the "Drive to TrackmMark" which was the Consume Portal.

Each loco had the commands: "Wait for Trigger" and "Copy Command From" (which was either the Freight or Passenger one)

The Rollingstock Un-Portal generated an error at Save if the list of consists were not allocated a driver, a bit odd.

Operation

Loco and Rolling spawn at the three trackmarks
Loco sets off to either Siding 1 or Siding 2 to couple up.
A new Loco spawns and waits
Once the loco couples up, it sets off down the mainline (and into the real world) and passes over the trigger, this causes the waiting loco to copy its commands and sets off to either Siding 1 or Siding 2 and then set off down main line over trigger etc etc.
This will the just continue for ever generating trains.
The first loco needs a bump start so I created a session train to pass over the trigger.

A few weird aspects. Point direction appears to effect when the Portals will spawn a consist. I guess that is to do with one train on a section at a time?
Un-portal does not emit instantly, even though set to do so. So take upto a miniute.

Next will be to see if I can use a timetabled portal (QPM ?) to set up a timed scheduel of departing random trains by having it generate the Locos only and replace Loco Un-portal. I can also expand the number of sidings with more rollingstock Un-portals.

I think I have found a solution that works, which is a small set of rolling stock consists and a large random loco pool to haul them, all formed on a fiddle board leading out in to a scenic world. I am using the nice Stanton route by gamerouche (which was modifed from Eso's Aranach Branch route). It is a main line with single line branch and some simple industry yards. It looked a good route to play with and learn how to set up sessions.

Aside from some of the the sporadic buggy unpredictability of Trainz Commands and operations, I really enjoy the problem solving nature Trainz presents.

Next will be Loads!! I want lots of random container trains :-)
 
Next will be Loads!! I want lots of random container trains
Try Instant Load Random. This will pick containers randomly from those that are allowed by the configuration file in the allowed-products container.

Regarding the Schedule Library and related Copy Commands from...

- Never use the Append to Schedule and only use Insert Schedule. Append to Schedule has always had issues even way back when the rule and command were developed. What happens is the appended schedule is appended in the wrong order and your drivers will create a bigger mess than they are capable of doing.

- If you use the Repeat schedule command, don't put that in your Schedule library. Doing so will cause weird things to happen with the schedules.

Before inserting the Copy Commands from... Driver command, put in a Wait... command. I usually set my wait time to 20 seconds. This is definitely required if you are going to add more than one Copy Commands from... in your driver's schedule.
 
Thanks John, that a new Command I have not come across, I will have to try out. Just building a test route. I want to add a two Load options, one on the fiddle yard for generated trains and the other at the Industry, as the Stanton base Route does not have a working load/unload capability, it just looks to be cosmetic.

Your comment noted on Insert rather than Append for Schedule Library. I had already discovered the Wait issue and have added a wait time after the Trigger and also one at the start for when the loco first spawns. But now I know why I had issues.

I have to say, frustratingly, I have spent so much time over the last 2 month of using Trainz just trying out commands and test sessions only for them not to work or work then just stop for no reason. In some cases trains just stop at a signal or junction and never progress even though the command/s appears on the surface to make sense. It is rather frustrating as stuff just works weird and does not work as I expect. Having been a software tester, I tend to get very absorbed in testing and trying to solve problems, failures or just trying to understand the weird workings, which does rather detract from the actual creative process. I also tend to get carried away with detail as my post above sort of showed, apologies there ;-)

I guess Session creation really appeals to me, as it is a form of automated model railways and with a nice route it is rather fun to watch it all play out, especially if the route is well signalled and train interact properly.

However, I have really enjoyed some Routes which have created Sessions, so I can sit back and relax riding or watching trains go by. My favourite so far has to be Dearnby & District and Dearnbyshire, just awesome! Total respect to the scenic creator/s and the session script writers out there.
 
Thanks John, that a new Command I have not come across, I will have to try out. Just building a test route. I want to add a two Load options, one on the fiddle yard for generated trains and the other at the Industry, as the Stanton base Route does not have a working load/unload capability, it just looks to be cosmetic.

Your comment noted on Insert rather than Append for Schedule Library. I had already discovered the Wait issue and have added a wait time after the Trigger and also one at the start for when the loco first spawns. But now I know why I had issues.

I have to say, frustratingly, I have spent so much time over the last 2 month of using Trainz just trying out commands and test sessions only for them not to work or work then just stop for no reason. In some cases trains just stop at a signal or junction and never progress even though the command/s appears on the surface to make sense. It is rather frustrating as stuff just works weird and does not work as I expect. Having been a software tester, I tend to get very absorbed in testing and trying to solve problems, failures or just trying to understand the weird workings, which does rather detract from the actual creative process. I also tend to get carried away with detail as my post above sort of showed, apologies there ;-)

I guess Session creation really appeals to me, as it is a form of automated model railways and with a nice route it is rather fun to watch it all play out, especially if the route is well signalled and train interact properly.

However, I have really enjoyed some Routes which have created Sessions, so I can sit back and relax riding or watching trains go by. My favourite so far has to be Dearnby & District and Dearnbyshire, just awesome! Total respect to the scenic creator/s and the session script writers out there.
The Dearnby and District is a really nice route and the sessions are amazing how well they work, at least on the original since the new version doesn't have any sessions already set up. Session creation in general is a whole art in itself and you have to have patience. As you noted, there are times when things work well and there are others when the AI drivers act as though they've been out for a few brews at lunch! This behaviour is unbelievably confusing because it is unpredictable. From what I was told by the developers is there's a lot of work needed to rework the AI portion of the program. There have been some changes already but that part needs to be rebuilt from the ground up. This portion of the program is really quite complex with lots of threads operating and tracking all kinds of actions such as the AI drivers, interactive industries, signals, and many other things at the same time. Speaking of signals, there have been some code changes that may be affecting the signals that are used on the route. We recommend checking for content updates on the DLS because many content creators have updated signals and other "hardware" to reflect the se changes.

As a retired hardware technician and systems guy, I appreciate your details as will others here. Many of your fellow Trainzers worked in the tech field in some aspect including programming and testing. This helps us troubleshoot things as you know and get answers back to you quickly. There are some people here who state "It's broke" and expect us to unpeel the layers with one liner statements spread over a week before we get the full picture of what's going on!

Once you've gotten to know the program well, you may be interested in submitting bug reports. The developers welcome them and the QA Team will get back to you quickly with more questions.

https://n3vgames.typeform.com/to/xRdryu?typeform-source=forums.auran.com

The wait... command is your friend. I found out 20 years ago that putting in the wait... command gives the program a chance to load up the drivers and commands when first starting up and helps a lot with the driving session. I put these into the driver schedule before the Copy Commands from... so that when a train is spat out of a portal, it'll sit there and gather its wits about it before continuing.

Speaking of portals.... trains that come out of a portal are blind. They may have a driver but do not see signals or junctions until they have been fully extricated from a portal. This is why you need the longest line possible connected to portals without any kind of switches. Signals don't matter because they aren't seen by the driver, and therefore it's a waste of time placing them down.

Don't be afraid to alter a route to suit your own operations. Whenever you edit someone else's route or session, your own copy is saved under your UID. If you want to preserve an existing session, open the session for editing and then use Save-As instead of save. This will give you the option to save a route along with the session and you will have the existing session created by the other user now in your UID as well as a copy of the route. The advantage of this is it will preserve any setup the original author did including consist placement and special configurations for such as interlocking towers. With the route in your ID, you can now change the industries to interactive ones to suit how you wish. If you want, you can even expand the route however you want or go as far as merge this route into another. The only time you can't merge routes is when they are built in or DLC from N3V's Content Store.
 
Cheers John, useful info and an insight in to some of the history.

Had a try with the Instant Load with the three sub options, Load All, Load Random and Load Intermodal. That is a nice Command, and gives the variability I was looking for. One aspect that I was hoping for is the persisting of wagon Product Queue mods when being saved as a consists, but when the Consist is loaded into the sessions either directly or by a Portal the wagons just revert back to the original list. I assume the only way to do this is to mod the Config file for the wagon itself?

A question on placing track in Surveyor 2.0 and specifically when placing loaders or portals in to an existing route, is there a way to instantly snap the object to the existing track alignment. I want to cut a section of track out and then drop in the Loader, but the initial rotation of the loader track object does not align to the existing. So far all I can workout is to place it and manually rotate it to get it to fit. Snapping to existing would be much easier.
 
Cheers John, useful info and an insight in to some of the history.

Had a try with the Instant Load with the three sub options, Load All, Load Random and Load Intermodal. That is a nice Command, and gives the variability I was looking for. One aspect that I was hoping for is the persisting of wagon Product Queue mods when being saved as a consists, but when the Consist is loaded into the sessions either directly or by a Portal the wagons just revert back to the original list. I assume the only way to do this is to mod the Config file for the wagon itself?

A question on placing track in Surveyor 2.0 and specifically when placing loaders or portals in to an existing route, is there a way to instantly snap the object to the existing track alignment. I want to cut a section of track out and then drop in the Loader, but the initial rotation of the loader track object does not align to the existing. So far all I can workout is to place it and manually rotate it to get it to fit. Snapping to existing would be much easier.
You are correct, the only way is to edit the config.txt file to use the same load all the time. There is another load command which I can't remember the exact name that gives the option to load a specific asset commodity. Instant Load with Specific Commodity, I think it's called. There's a pulldown list to put the load in.

The behaviour you see with the fixed-track objects, meaning stations, some bridges, interactive industries, and even some level crossings, is as you are experiencing. The objects will align themselves with whatever direction they were created in unless you have randomly rotate scenery objects unchecked. Yes, fixed-track objects are classed as scenery objects.
 
My next question centres around routes I have dowloaded. A lot of the time I am seeing the effect where ther are square textures bisecting the track or roads. Using tools like "settle on ground" or "smooth ground under" do not solve the issue. I have aslo tried to lower the ground and whilst I have some success, I have found that the track ends up all uneven, or more square textures appear. Any sugestions how to solve?
 
Hi Bill. I have had a look and there are no Effect on, such as Turf FX. The texture squares are I think 5m wide. They also appear if I bulk replace track with procedural versions. I like the look of A06 versions of track and ballast so have been changing to this. To see the issue in the raw, it is evident in the route Stanton. The road surface particularly are bad.
 
Can you post a screenshot? You can upload to the Trainz Gallery, and post the link using the icon that looks like a picture.
 
If you set your Shaders to Basic in the Performance tab found in Trainz Settings on the launcher, this will remove that effect. I found this also lowers the heat and can increase the performance overall of the program which is a 2 for win for my computer.
 
Hi

About 2 months ago I arrived in the world of Trainz (T22 Platinum Edition). And wow what a ride, getting my head in to how it all works and at times just keeping my head above water with all the new knowledge, technicalities and creative possibilities.

Firstly, I have really enjoyed discovering and downloading all the wonderfully created Routes, mainly UK themed ones. I especially enjoy Routes that have associated Sessions, so I can just watch trains go by which is a very absorbing pastime. I have a leaning towards BR Blue and late steam, but modern also grabs my attention.

So far I have got my head round Sessions and how to create them, consists, driver commands, industries and creating load and unload trips. I am starting to experiment with more complex commands and also Portals, including Quick Portal Manager.

Whilst I have many questions, some, I just cannot seem to find the answer on the forums, N3V Trainz wiki or tutorials. So I though I would start off with just one question, where searching has not got me an answer.

I would like the ability to create a consist to enter via a portal where the coaches or wagons are a pre-defined saved consist but the loco is randomly selected for a list of applicable locos I set up to operate that train. For example a consist of a rake of MK 1 coaches with a random loco selected from a list of say Class 31, 37 and 47 locos in different liveries or running numbers. So far I can only see that the portals can spawn random saved consists where the loco is saved as part of the consist.

Thanks in advance for help.

Vehicle history reports from providers like Carfax or AutoCheck can be really helpful when buying a used car. They provide details on previous ownership, title status, and vehicle history services often include accident reports, mileage records, and sometimes even service history. While they’re not always 100% complete, they can reveal red flags like salvage titles or odometer rollbacks. It’s smart to use them alongside a pre-purchase inspection. Some dealerships offer these reports for free, so be sure to ask. Always double-check the VIN to make sure you’re getting info on the correct vehicle.
In Trainz, the portal system doesn't support randomly selecting a loco from a list while keeping the rest of the consist fixed. The portal can only spawn fully saved consists, including the loco. A workaround is to create multiple saved consists with your desired wagons and different locos, then have the portal randomly choose from those. Alternatively, you can explore scripting or session rules like the "Random Consist Selector" from the DLS for more flexibility.
 
In Trainz, the portal system doesn't support randomly selecting a loco from a list while keeping the rest of the consist fixed. The portal can only spawn fully saved consists, including the loco. A workaround is to create multiple saved consists with your desired wagons and different locos, then have the portal randomly choose from those. Alternatively, you can explore scripting or session rules like the "Random Consist Selector" from the DLS for more flexibility.
I've created a ton of saved consists for this purpose. Using these plus the Schedule Library and companion driver command Copy Commands From... makes setting up portal trains, or any AI-driven consist so much faster.

I also have a number of engineless consists that I use to populate various yards located around my routes. Having a string of boxcars ready to plop down quickly in a yard makes that process very easy. I do this with other freight cars and even passenger cars. I'll sometimes remove and add other freight cars and even an engine on to create another drivable consist ready for use any time.
 
Thanks John and StageCoach. Both these answers have helped. The Shader perforfmance setting when droped to basic removed the issue. But obviously I loose the nice 3D terxture of ballst and ground textures. So not ideal. However, it is a quck fix for any DLS route that has the error. Secondly after playing arround with PBR and non-PBR textures, I can get the problem to "go away". It is clear that the routes I have downloaded have a mix of PBR and non-PBR textures and this is very evident next to roads and track. It is also shown up when track is changed to higher spec versions. Example of the issue in the links below:

Texture issue road spline

Texture issue with procedural track

PBR texture appears to solve issue.

I guess that maybe the authors have the Shader setting to Basic, so the issue has not been noticed when uploaded to DLS?

Sorry for the links above, I was not able to insert the actaul images from Trainz Gallery. Not sure how you able to do this as it failed when I used "Insert Image" tool.
 
To follow on from the Texture issue, is there away to adjust the height of a texture without affecting the height of an asset that the texture surrounds, such as track or platforms? I have bulk changed some track but now the new track appears to be too low to show any of the ballast. I lowered the ground texture and the ballast shoudler appear, which was greated, but some of the track splines and platfomrs also dropped in height so ended up all all uneven. What I want to do is to lock the assests heights so that only the ground is lowwred.

Is this possible?
 
Back
Top