Multiple Trailers in Traffic - ATS - v1.49.1

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
Mr Larrington
Posts: 344
Joined: 22 Jul 2015 18:25
Location: That London, that they have now
Contact:

Re: Multiple Trailers in Traffic - ATS - v7.2

#61 Post by Mr Larrington » 23 Jul 2020 22:19

  • Just realised that the original upload of the new version wasn't compatible with cip's traffic density mod, because Stupidz. Corrected version now available - see first post.
  • I've been messing around with spawn_ratio for trailers with the trailer containing:

    Code: Select all

    traffic_trailer: traffic.trailer.scs_dry53f.nancre
    [...]
    	spawn_ratio: 0.0
    
    and a truck containing:

    Code: Select all

    traffic_vehicle: traffic.kw_w900_b.single.acme
    [...]
    	trailer_chains[]: "traffic.trailer.scs_dry53f.nancre"
    
    The truck only appears with the specified trailer, but so do all the SCS default trailers. The "tags" business is supposed to allow one to exclude certain trailers, but I can't get it to work. Plus if I have to edit the SCS default trucks to exclude my painted trailers, and AN Other-Modder does the same to exclude his, one of us is going to lose out.
Mr Larrington
President & CEO: Interllama, Inc.
a bit ov a lyv wyr by slof standirds
User avatar
cip
Posts: 3113
Joined: 26 Aug 2016 08:14
Location: Brussels

Re: Multiple Trailers in Traffic - ATS - v7.2

#62 Post by cip » 23 Jul 2020 23:45

I have made some tests too and discovered the following:
- spawn_ratio: 0 for trailers no longer works as before, meaning that a personalized trailer with spawn_ratio: 0 will no longer spawn even if a trailer has the specific trailer definition for that trailer. moreover the truck having a personalized truck with spawn_ratio: 0 will not spawn in traffic at all without any error/warning in gamelog.
- tags are not useful for personalized trucks/trailers because will not forbid other trucks to get the trailers unless mentioned specifically somewhere with a ! tag
- best which worked for me was to create a separate type of trailers, for example bdf (in ETS2) with tag road and nothing else. then I have kept the personalized chain to all bdf trailers to their trucks and everything works but this is not the best approach for modders because there is a limited number of types of trailers...
- scs has actually the type of trailers custom which could be useful to store thew personalized trailers however by default this type do not have the tag roads therefore it may not spawn...

edit: @Mr Larrington actually the personalized trailers that you do not want to be selected by other trucks can be simply stored as traffic_storage_trailer_truck plus suffix and this will work! trailers will no longer be taken by other trucks. jazzycat did this in the bdf pack and checked, it works!
Enjoy driving with my Real Traffic Density for ETS2 and ATS
Enjoy listening my Real Ai Traffic FMOD Sounds for ETS2 and ATS
I have quit SCS forum...
User avatar
bryntrollian
Posts: 380
Joined: 05 Jun 2019 03:36

Re: Multiple Trailers in Traffic - ATS - v7.2

#63 Post by bryntrollian » 30 Jul 2020 17:39

@cip
Is it still possible to set an allowed time period for the heavy and oversized load spawns?

I thought there was a traffic_spawn_condition for time, but I don't recall if it worked in this circumstance for specific trailers.
User avatar
cip
Posts: 3113
Joined: 26 Aug 2016 08:14
Location: Brussels

Re: Multiple Trailers in Traffic - ATS - v7.2

#64 Post by cip » 30 Jul 2020 21:42

not sure if this works for trailers but you can do it for sure for the trucks hauling the heavy trailers. to do so just follow the example from the harvester in my sounds for ATS, I've put a time condition in it to get spawn only early mornings an evenings and it works
Enjoy driving with my Real Traffic Density for ETS2 and ATS
Enjoy listening my Real Ai Traffic FMOD Sounds for ETS2 and ATS
I have quit SCS forum...
User avatar
bryntrollian
Posts: 380
Joined: 05 Jun 2019 03:36

Re: Multiple Trailers in Traffic - ATS - v7.2

#65 Post by bryntrollian » 31 Jul 2020 00:19

Excellent, thanks cip!
User avatar
Mr Larrington
Posts: 344
Joined: 22 Jul 2015 18:25
Location: That London, that they have now
Contact:

Re: Multiple Trailers in Traffic - ATS - v7.2

#66 Post by Mr Larrington » 06 Aug 2020 22:33

cip wrote: 23 Jul 2020 23:45 I have made some tests too and discovered the following:
- spawn_ratio: 0 for trailers no longer works as before, meaning that a personalized trailer with spawn_ratio: 0 will no longer spawn even if a trailer has the specific trailer definition for that trailer. moreover the truck having a personalized truck with spawn_ratio: 0 will not spawn in traffic at all without any error/warning in gamelog.
- tags are not useful for personalized trucks/trailers because will not forbid other trucks to get the trailers unless mentioned specifically somewhere with a ! tag
- best which worked for me was to create a separate type of trailers, for example bdf (in ETS2) with tag road and nothing else. then I have kept the personalized chain to all bdf trailers to their trucks and everything works but this is not the best approach for modders because there is a limited number of types of trailers...
- scs has actually the type of trailers custom which could be useful to store thew personalized trailers however by default this type do not have the tag roads therefore it may not spawn...

edit: @Mr Larrington actually the personalized trailers that you do not want to be selected by other trucks can be simply stored as traffic_storage_trailer_truck plus suffix and this will work! trailers will no longer be taken by other trucks. jazzycat did this in the bdf pack and checked, it works!
Returning to the debate after The Man decided I could go and visit Lt. Col. Larrington (retd.) without catching Coronalurgi and subsequently depopulating London E17. I've been trying to get this:

[ external image ]
Painted Trailers - right and wrong by Mr Larrington, on Flickr

to work properly, trying myriad combinations of tags, trailers_chains and putting the trailers in traffic_storage_trailer_custom.<foo>.sii. None of which worked as desired.

Why they couldn't leave
If you have used (now obsolete) attribute allowed_tractor, the similar functionality can be achieved by setting spawn_ratio: 0.0 for trailers which have been using it. This way, they won't be chosen for any vehicle unless explicitly set in trailer_chains
working as per the v1.35 modding guide is a mystery to this Unit. I then discovered* it can be made to work if you use your own trailer type. I then read this thread and embarrassingly discovered that @cip - and Jazzycat - have already come up with the answer. Bizarrely, Jazzy is using this solution for his ETS2 mods but not (yet?) for the ATS ones. Anyway, if you're all good, and it doesn't get too hot, I'll have a go at sorting out the Jazzycat singles and triples tomorrow. And also the Heavy and Forestry addons, as I suspect the "long" trucks from the base mod are picking them up too. Cue more endless faffing around with spawn ratios...

* Read "cribbed off Jazzycat's ATS mods"
Last edited by Mr Larrington on 07 Aug 2020 10:44, edited 1 time in total.
Mr Larrington
President & CEO: Interllama, Inc.
a bit ov a lyv wyr by slof standirds
User avatar
cip
Posts: 3113
Joined: 26 Aug 2016 08:14
Location: Brussels

Re: Multiple Trailers in Traffic - ATS - v7.2

#67 Post by cip » 07 Aug 2020 08:30

@Mr Larrington I did the following:
- general trailers for which I don't care which truck is hauling them can be stored as traffic_storage_trailer_semi respectively traffic_storage_trailer_long for multiple trailers. in this way any truck with trailer_chains: truck_semi will take any semi trailers, respectively any trailer_chains: truck_long can take any multiple trailer without intercalation between them.
- personalized trailers of all kind, semi, long, bdf, whatever else can be stored together as traffic_storage_trailer_truck or in another type which do not have a general chain assigned for trucks (in theory you can even assign these trailers as traffic_storage_trailer_car) and with direct chain link assigned to a truck, that truck will only take the trailer with exact def and nothing else.
- group of trailers that can be hauled only by a certain truck (or trucks) and cannot be taken by other Ai trucks must be stored also in the same traffic_storage_trailer_truck and receive a tag. then the truck will receive trailer_chains: "truck tag name" or trailer_chains: "truck_truck tag name" (not sure which is correct here as I don't use this for some bdf trailers I use the old system as I have these defs stored into sui files and I only had to rename the storage file)
-if the condition is at the truck, but the trailer(s) can be taken by other trucks as well, the trailer can be stored in the general storage file (semi or long) and receive a tag, then that truck will receive the trailer_chains: "truck_semi tag name"
Enjoy driving with my Real Traffic Density for ETS2 and ATS
Enjoy listening my Real Ai Traffic FMOD Sounds for ETS2 and ATS
I have quit SCS forum...
User avatar
Mr Larrington
Posts: 344
Joined: 22 Jul 2015 18:25
Location: That London, that they have now
Contact:

Re: Multiple Trailers in Traffic - ATS - v7.3

#68 Post by Mr Larrington » 08 Aug 2020 17:03

Why is it ALWAYS dark in the game when you're testing traffic mods?

Anyway, after twenty-two separate incidences of turning into a wet rag and one actual melting, together with a sleepless night caused by a fan that sounds like a VC-10 at full take-off power in Nairobi, we haz an updated version which reintroduces the Jazzycat single/triple mod and does some other modern-type stuff to the other traffic mods. Details in first post as per.
Mr Larrington
President & CEO: Interllama, Inc.
a bit ov a lyv wyr by slof standirds
User avatar
Mr Larrington
Posts: 344
Joined: 22 Jul 2015 18:25
Location: That London, that they have now
Contact:

Re: Multiple Trailers in Traffic - ATS - v7.3

#69 Post by Mr Larrington » 17 Oct 2020 21:48

While digging under the bonnet of ATS for the first time in a long time I happened to notice that the chassis names for the Kenworth T680 truck transporters have changed. So I done fixed 'em. This only affects the ATS_multiple_trailers_in_traffic_Base mod - the remaining mods in the package should be unaffected by recent mucking about on the part of SCS. At the same time I took the opportunity to add the new & shiny Western Star transporter.

ATS_multiple_trailers_in_traffic_Base.scs - 7.4 MB
Mr Larrington
President & CEO: Interllama, Inc.
a bit ov a lyv wyr by slof standirds
User avatar
Mr Larrington
Posts: 344
Joined: 22 Jul 2015 18:25
Location: That London, that they have now
Contact:

Re: Multiple Trailers in Traffic - ATS - v8.0

#70 Post by Mr Larrington » 06 Nov 2020 12:45

O noes! v1.39 has thoroughly b0rked the Heavy Cargo add-on. We investigates, o my droogies! Watch this vvvv space for updates...

Edit #1: It's b0rked the Forestry add-on too. And probably the main mod as well. ["Bad swears" - The Invigilator]

Edit #2: It's no longer b0rked. See first post for information and download link.

Edit #3: Version of the Jazzycat Singles & Triple mod with the right distribution of triples ATS_Jazzycat_Painted_Pup_Triples_and_Singles.scs - 148 KB

Bah!
Mr Larrington
President & CEO: Interllama, Inc.
a bit ov a lyv wyr by slof standirds
Post Reply

Return to “Traffic”

Who is online

Users browsing this forum: No registered users and 1 guest