Multiple traffic spawn conditions for AI traffic vehicles?

Forum rules
SCS as a company do not wish to have paid mods on this forum. While we understand that not all paid mods use the Intellectual Property of other companies/people, it is very hard to moderate what is and isn't acceptable when money is involved. There are also concerns that it could look unfavorable to potential work partners going forward if SCS allow mods that may potentially use unlicensed branding.
Posting in the Mods forum (ATS and ETS2) is restricted to sharing free-to-the-public mods and providing support for mods. For more details, please check the Forum Rules.
Post Reply
User avatar
Posts: 762
Joined: 19 Nov 2016 10:00

Multiple traffic spawn conditions for AI traffic vehicles?

#1 Post by Laqueesha » 06 Aug 2023 00:20

I'm adding custom AI traffic vehicles and would like to know if I can set more than one traffic spawn condition so I can have the vehicle spawn in a specific city as well as at a specific time of day, instead of just one or the other.
Posts: 59
Joined: 07 Feb 2023 13:56

Re: Multiple traffic spawn conditions for AI traffic vehicles?

#2 Post by avenger » 15 Apr 2024 01:49

I believe your answer is in def/vehicle/ai/bus_opalin.sui, where it:

Code: Select all

 spawn_condition[]: .traffic.bus_s.condition.time


traffic_spawn_condition: .traffic.bus_s.condition.time
 # spawn only in following game time intervals
 type: time

 # 06:00 - 9:00
 num_param[]: 360
 num_param[]: 540

 # 16:00 - 18:00
 num_param[]: 960
 num_param[]: 1080

 # spawn only inside cities
 type: city
 str_param[]: "?*"
For the looks of it, the logic aggregation here is and, which means "spawn this type of vehicle in the specified time interval -and- within a city (any city).

I found your (likely) answer while looking for ways to limit traffic spawning to specific roads. Perhaps the map already implement area names to roads, which would help a lot.
Post Reply

Return to “Help requests”

Who is online

Users browsing this forum: No registered users