Changes

Jump to navigation Jump to search

Games/ETS2/Modding guides

4,537 bytes added, 13:53, 10 February 2016
no edit summary
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).
 
 
= Patch: 1.19 =
 
== 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.
</li> <li> When basing you model on the original ones, add to your mod also <strong>ALL</strong> original /automat/ files used by it. The names of the files are generated as SHA1 hash of theirs content so whenever we change the parameters of the material in any way, a different file will be used to store them and the original file might cease to exist if there is no other model utilizing the original parameters.
</li> <li> When modifying original models, always include <strong>ALL</strong> compoments of the model (pmg+pmd) instead of just those you changed. Otherwise you risk crash if we change the model.
</li> <li> As always when adding new objects to files which support multi-file approach (e.g. road_look.sii) it is <strong>HIGHLY RECOMMENDED</strong> to use suffix or prefix in the name to avoid conflicts with new objects we are adding in patches. Otherwise you might have to use the batch renaming functionality (see Batch renaming) to fix the conflicts when new patch appears.
</li>
</ul>
 
== How to convert map ==
<ul>
<li> If your mod overrides <strong>signs.sii</strong> or <strong>sign.dlc_north.sii</strong>, you need to update those files to account for us moving some signs from DLC Scandinavia to base.
</li> <li> Convert AI model storage definitions to the new format
</li> <li> Convert the road look definitions to the new format.
</li> <li> Convert the speed limit and license plate definitions in country data to the new format.
</li>
</ul>
 
== Changes ==
=== Traffic-related changes ===
==== AI vehicle model storage ====
For each supported vehicle type (currently: <strong><em>car, truck, bus</em></strong>) a separate unit exists in <strong>/def/vehicle/traffic_vehicle_type.sii</strong>. These units contain paths to actual model storage for given vehicle type (e.g.<strong> /def/vehicle/traffic_storage_car.sii</strong>)
 
==== AI trailer model storage ====
For each supported trailer type (currently: <strong><em>semi_trailer</em></strong>) a separate unit exists in <strong>/def/vehicle/traffic_trailer_type.sii</strong>. These units contain paths to actual model storage for given trailer type (e.g.<strong> /def/vehicle/traffic_storage_semi_trailer.sii</strong>)
 
==== AI vehicle definition ====
Property <strong>attachable</strong> is now obsolete. It has been replaced by an array attribute <strong>attachable_trailer</strong>. The array contains unit names (as strings) of all trailer models which can be attached to the given vehicle.
 
To allow <strong>all</strong> trailer models, add an empty string at the beginning of the array:
 
<code>attachable_trailer[]: ""</code>
 
==== AI trailer definition ====
To allow future features and improvements, the type of the unit defining an AI trailer <strong>CHANGED FROM</strong> <code>trailer</code> <strong>TO</strong> <code>traffic_trailer</code>
 
For example:
 
<code>trailer : traffic.trailer.fuel_cistern</code>
 
<strong>changes to</strong>
 
<code>trafic_trailer : traffic.trailer.fuel_cistern</code>
 
==== Road look definition ====
The <strong>lane_count_left</strong>, <strong>lane_count_right</strong> and <strong>ai_speed_type</strong> attributes are now obsolete. They were replaced by <strong>lanes_left</strong> and <strong>lanes_right</strong> arrays. (The array items are ordered from the center of the road to the borders) This allows specifying some traffic lane attributes for each lane separately - see "<em>Traffic lane definition</em>"
 
==== Traffic lane definition ====
Traffic lane definitions can be found in <strong>/def/world/traffic_lane.sii</strong>.
 
==== License plate definition ====
The definitions of per-country license plates were moved into separate <strong>/def/country/&lt;country_name&gt;/license_plates.sii</strong> file. It contains separate unit for each vehicle type (car, truck, bus). If more than one unit exists for some type, the game will use the first unit it encounters.
 
==== Country speed limit definition ====
The definitions of per-country speed limits were moved into separate <strong>/def/country/&lt;country_name&gt;/speed_limits.sii</strong> file. It contains separate unit for each vehicle type (car, truck, bus). If more than one unit exists for some type, the game will use the first unit it encounters.

Navigation menu