Changes

Jump to navigation Jump to search

Games/ETS2/Modding guides/1.35

1,480 bytes added, 12:50, 13 May 2019
Traffic changes
=== Traffic trailer chains ===
Supported trailers are now defined at one place: ''per-vehicle in '''traffic_vehicle''' by defining the whole trailer chain'' (previously it was combination of per vehicle/trailer type + per vehicle/trailer)Note that the support for wildcards was removed to avoid (Related attributes in '''traffic_trailer''', '''traffic_vehicle_type''' and '''traffic_trailer_type''' are now unneeded) complexityobsolete.
Partial backward compatibility is provided (more complex trailer configurations may not be created correctly using old attributes)
 
{{Note|Support for wildcards has been removed to avoid the unnecessary complexity.}}
{{Tip|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_chain'''.}}
Each trailer chain element can be specified either by trailer type name (a random trailer model of that type will be spawned)
'''trailer_chain[]: traffic_trailer.first | traffic_trailer.middle 2-4 | traffic_trailer.last''' - trailer chain with specific elements, 'traffic_trailer.middle' can occur 2-4 times.
 
=== Traffic spawn density rules ===
 
Trailer chain support has been added also to ''spawn density'' traffic rules (''traffic_rules_spawn.sui''). All items beyond the first one in the '''str_params''' attribute are now interpreted as allowed trailer chains. This can be useful for specifying areas in map where custom trailers (custom cargo) are spawned.
 
Example:
 
<pre>
traffic_rule_data : traffic_rule.s_train_c2
{
name: "Spawn density - cargo train (plane)"
 
rule: "density"
 
str_params[]: "train_cargo"
str_params[]: "train_car.trplane_car 1 | train_car.trplane_care 1 | train_car.trplane_car 1 | train_car.trplane_care 1 | train_car.trplane_car 1 | train_car.trplane_care 1"
 
num_params[]: 0.0 # 00:00
num_params[]: 0.015 # frequency
num_params[]: 1 # count limit
}
</pre>
 
=== Parked vehicles/trailer ===
 
Parked vehicle/trailer attribute '''allowed_trailer''' is now also interpreted as a trailer chain definition. This made
'''allowed_trailer_count''' attribute obsolete, since the trailer count is determined from trailer chain automatically.
== Dynamic lods ==

Navigation menu