Changes

Jump to navigation Jump to search

Games/ETS2/Modding guides/1.20

18 bytes removed, 09:05, 17 March 2016
m
50keda moved page Games/ETS2/Modding Guides/1.20 to Games/ETS2/Modding guides/1.20 without leaving a redirect
== Recommendations ==
<ul>
<li> Some new models utilizing the "fr" suffix or prefix are still work in progress and it is likely that they might change significantly in some next patch. For this reason it is recommended that you avoid using them in your mods at this time.
</ul>
== How to convert map ==
<ul>
<li> Ensure that the log contains no errors related to vegetation profiles. Load of the map in old format will bake most of that information into the map file so it is critical that the information is correct before continuing with the conversion.
</ul>
== Changes ===== Traffic-related changes ======= AI vehicle type definition ====
To specify spawned trailer count per vehicle, use the array attribute<strong> spawn_trailer_count</strong>. It defines the array of possible trailer counts for gived vehicle type. Before each AI vehicle is spawned, the game randomly selects one of the value from the array. So far, only values <strong>0</strong> and <strong>1 </strong>are supported. For example:
<pre># Set the trailer spawn probability to 75&#37;:
Currently, the default trailer spawn probability for trucks is <strong>90%</strong>.
==== AI vehicle definition ====
To allow better control over AI trailer spawning, the meaning of attribute <strong>attachable_trailer </strong>has been modified:
Spawned trailer count can be set also per-vehicle by using attribute <strong>trailer_count</strong>. It works the same way as <em>spawn_trailer_count </em>defined per-vehicle-type
==== AI trailer definition ====
It is now possible to specify, to which AI vehicles can each AI trailer be attached - using array attribute <strong>allowed_tractor</strong>. This attribute <strong>supports wildcard '*'</strong> - it can be placed at the beginning of any string, at the end of any string or both (beginning and end) to allow partial name matches. For example:
<pre># Allow this trailer be attached only to a single vehicle
By default, all vehicles are allowed.
=== Vegetation profiles ===
Most of the information previously stored in vegetation profiles, except for the list of models, is now stored per-item inside map to allow for easy local tweaks. Note that when converting from older map format, the editor will extract that information from vegetation profile and store it inside the map. From that moment the corresponding information inside the vegetation profile is ignored and only the list of models is used.
Note that because of changes in the accuracy of the stored values, some objects might slightly move as result.
=== Environment & skyboxes ===
Sun profiles (climate/default/nice.sii, bad.sii) are not bound to time anymore, rather to sun position. Thus <strong>low_elevation</strong> and <strong>high_elevation</strong> define interval when the profile is used. Meaningful range is -90 to 90 degrees, with 5 degree step. It works same as before, during given interval sun profile is present alone, outside of the interval it starts to blend with its neighbour. The only complication is <strong>sun_direction</strong>, that is used for splitting morning and afternoon profiles for same elevation (+1 = rising sun / morning; -1 = falling sun / afternoon; 0 = use profile for both).
Sun position is computed from actual time and truck position. Conversion formula from map coordinates to earth coordinates (namely latitude) is in climate profiles (climate.sii) as <strong>latitude_a</strong> and <strong>latitude_b</strong> values, so its possible to make differently positioned earth zones on single map just by choosing different climate profile. Some additional data are in environment data (env_data.sii) - <strong>day_in_year</strong> (172 = summer solstice), <strong>summer_time</strong> (+1h).

Navigation menu