Difference between revisions of "Games/ETS2/Modding guides/1.28"

From SCS Modding Wiki
Jump to navigation Jump to search
(Chassis Data)
(Changes)
 
(7 intermediate revisions by 3 users not shown)
Line 11: Line 11:
 
= Changes =
 
= Changes =
  
== Economy Data ==
+
== 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_double 0'''''".
+
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 ==
 
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'''.
 
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 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. After changing these values map has to be re-saved to propagate values to company instances correctly.
+
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.
  
== Flares Data ==
+
{{Note|After changing these values map has to be re-saved to propagate values to company instances correctly.}}
Flare unit (usually found as hookup defined models inside '''/unit/hookup''' directory) got new float attribute '''scale_factor''' for initial scale of the flare model.
+
 
 +
== 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:
 
Additionally behaviour of flare with direction type ('''dir_type: narrow''') was modified:
Line 27: Line 29:
 
# 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.
 
# 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 ==
+
== Vehicles data ==
 +
 
 +
=== Truck data ===
  
=== Transmission 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).
 
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 ===
+
==== 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.
 
Vehicle exterior camera '''vehicle_behind_rotation_camera''' got new attribute '''height_limit''' restricting camera to not raise above specified value in meters.
  
== Trailer Data ==
+
=== Trailer data ===
  
=== Cargo Trailer Data ===
+
==== Cargo trailer data ====
 
Trailer cargo definition files ('''"/def/cargo/<cargo_name>/<trailer.cargo>.sii"''') got new attributes:
 
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,
 
* '''cargo_mass_ratio''' - array of floats defining cargo mass distribution through the trailer chain,
Line 45: Line 49:
 
* '''length''' - integer in range [0, 255] specifying length of trailer or trailer chain. It's used in combination with [[#Prefab Data|'''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.
 
* '''length''' - integer in range [0, 255] specifying length of trailer or trailer chain. It's used in combination with [[#Prefab Data|'''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 ===
+
==== Chassis data ====
 
Accessory chassis data unit (for trailers found in '''"/def/vehicle/trailer/<trailer_name>/<chassis_trailer>.sii"''') got new attributes:
 
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''', '''trailer''', '''spreader'''. Default value is '''semitrailer'''.
+
* '''weight_distribution''' - enumeration defining connection type and weight distribution for the chassis of the trailer. Possible values are: '''semitrailer''' (default), '''trailer''', '''spreader'''.

Latest revision as of 07:48, 27 April 2018

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.

Vehicles data

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.