Traffic spawning not only the player is

Fineas10

Member
Hello! Does anyone know if AI traffic can be made to spawn also outside of the range the player is? I would like to see more cars on the road, and for a big city, the roads look empty. Can traffic be set to appear also in other areas or at larger distances?
Thanks!
 
Last edited:
There's a draw distance and LOD so if there is any traffic outside of visible range, then it may not appear that way.

To increase the traffic on roads, you need to edit the carrate tag for the roads you are using. They can't be something built-in or DLC and can be something from the DLS. Clone your road first and then increase the number of cars per second.

You do all this in Content Manager.

Choose your road you want to modify. Press CTRL+D to clone the road.
Change the view to Open for edit. You will see New Asset.

Right-click and choose edit config.txt file.

Add in carrate with some number greater than 3. Follow the same spacing as other tags and do not use the TAB-key.

Also change the Username to something other than the one that's already there so you know it's your road. I usually put my initials at the end like this --- JAC.

Save the config.txt file.

Close it and submit the asset again in Content Manager.
 
I don't believe carrate works any more.

Really? I know it doesn't work in the region, but I use it to kill off traffic by setting the value to zero (carrate 0) on roads where I don't want the cars running about and it works fine there.
 
No longer valid in what kind of asset (road, route, region) and in which versions of Trainz? It would need a table to show all those possible combinations.
 
The carrate tag was never used (or valid) in a Region asset or, as far as I know, in a road asset. Its only use, that I am aware of, was in a route.

I raised a ticket with the helpdesk some time ago (2020/2021?) on this matter. QA got back to me to report that the carrate tag is now obsolete in all containers.

My query came about because of a forum discussion over how many different road vehicles you can have in a route/session running at the same time. There are some region assets where the creators claim that you can have 60 to 100 different vehicles simultaneously running along roads. The region assets they created certainly had that many car tags in the kuid lists but I could never see more than a few different vehicles at any one time. It was difficult to judge because a randomly generated list of items can easily contain many duplicates. However, statistically, duplicates are less likely when you are drawing items (in this case cars) from a larger pool.

The official documentation for the region asset states only 15 different vehicles were allowed (car0 to car14). There was never any documentation I could find on the number of car tags allowed in a route. The response that I got back from QA did not resolve the number of car tags question but it certainly quashed the carrate tag discussion.
 
Last edited:
The tag maybe obsolete for new builds, but it appears to work fine for older ones. I have a bunch of Yarn roads with this tag to prevent the carz and trucks from driving down dead-end streets, back alleys, and mill yards where I used my modified YARN roads with cobble stone textures that I embed my track into.
 
Per this wiki page;
https://online.ts2009.com/mediaWiki/index.php/KIND_Track

carrate
(Only applicable to splines which have 'isroad' set.)

The game waits between 1 and 3 times this value (in seconds) between generating traffic on this road.

The tag still works as expected in my TRS19 SP4 build, at least as John says for turning the traffic off on a road when set to zero

If it were to no longer work, then my roads with no traffic would start spwaning traffic
 
Last edited:
Per this wiki page;
https://online.ts2009.com/mediaWiki/index.php/KIND_Track

carrate
(Only applicable to splines which have 'isroad' set.)

The game waits between 1 and 3 times this value (in seconds) between generating traffic on this road.

The tag still works as expected in my TRS19 SP4 build, at least as John says for turning the traffic off on a road when set to zero

If it were to no longer work, then my roads with no traffic would start spwaning traffic

I have made clones of these two roads by Maddy25 and changed the 'carrate' on each. One high denisty and one low density traffic. The 'carrate' tag works as expected here in TRS19 SP5. I will release on the DLS soon. The top road is high density and the bottom is low.

carrate 01.jpg
 
Back
Top