Games/ETS2/Modding guides/1.28

From SCS Modding Wiki
Jump to: navigation, search

Recommendations

  • When basing your model on the original ones, add to your mod also ALL original /automat/ files used by it. The names of the files are generated as CityHash64 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.
  • When modifying original models, always include ALL compoments of the model (pmg+pmd) instead of just those you changed. Otherwise you risk crash if we change the model.
  • As always when adding new objects to files which support multi-file approach (e.g. road_look.sii) it is HIGHLY RECOMMENDED 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.

How to convert map

  • Load map
  • Do rebuild (F8)
  • Save map

Changes

Economy Data

Multi pivot trailers got separated experience bonuses attributes: exp_park_double_bonus, exp_park_double_bonus_medium and exp_park_double_bonus_hard. Hard parking is by default disabled and can be enabled in game by using command "g_simple_parking_doubles 0".

Physics Data

Physics data definition ("/def/vehicle/physics.sii") got newly specified roll and pitch for trailer and spreader joints: trailer_joint_pitch, trailer_joint_roll, spreader_joint_pitch and spreader_joint_roll.

Prefab Data

Prefab model unit prefab_model (found in "/def/world/prefab.<infix>.sii") got new attribute allowed_trailer_length defining maximum length of trailer or trailer chain that can be spawned or delivered to the company prefab (value has to be integer in range [0, 255] and presents length in meters). When not specified or set to 0 then no restriction is applied.

Note: After changing these values map has to be re-saved to propagate values to company instances correctly.

Flares Data

Flare unit (usually found as hookup defined models inside /unit/hookup directory) got new float attribute default_scale for initial scale of the flare model.

Additionally behaviour of flare with direction type (dir_type: narrow) was modified:

  1. Attribute flare_inner_angle is now utilized for angle to which flare will be fully visible and how step will be disappearing curve once past that angle,
  2. The size, attenuation and disappearing curve of the flare is now also modulated by sunlight. So during the day this type of flare will be less visible then during the night.

Truck Data

Transmission Data

Transmission accessory data unit (found in "/def/vehicle/truck/<brand.model>/transmission/<transmission_name>.sii"') got new array attribute: auxiliary_brakes for usage of auxiliary brakes by one switch. Each array item holds three float values: (retarder ratio, engine brake ratio, engine brake downshift).

Exterior Camera Data

Vehicle exterior camera vehicle_behind_rotation_camera got new attribute height_limit restricting camera to not raise above specified value in meters.

Trailer Data

Cargo Trailer Data

Trailer cargo definition files ("/def/cargo/<cargo_name>/<trailer.cargo>.sii") got new attributes:

  • cargo_mass_ratio - array of floats defining cargo mass distribution through the trailer chain,
  • cog_offset - array of float3 values each representing centre of gravity offset for each trailer in the chain,
  • country - array of country tokens representing where cargo with this trailer can be spawned (if empty there is no restrictions),
  • volume_factor - price factor for cargo volume of given trailer or trailer chain,
  • length - integer in range [0, 255] specifying length of trailer or trailer chain. It's used in combination with allowed_trailer_length from prefab model definition to prevent this trailer to be spawned and delivered to prefabs where it would be to long. If length is set to zero then no restrictions will be applied.

Chassis Data

Accessory chassis data unit (for trailers found in "/def/vehicle/trailer/<trailer_name>/<chassis_trailer>.sii") got new attributes:

  • weight_distribution - enumeration defining connection type and weight distribution for the chassis of the trailer. Possible values are: semitrailer (default), trailer, spreader.