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

From SCS Modding Wiki
Jump to navigation Jump to search
(Dashboard Display IDs)
m
 
Line 17: Line 17:
  
 
= Changes & New Features =
 
= Changes & New Features =
== Damage sytem ==
+
== Damage system ==
 
New damage system ...
 
New damage system ...
  
 
== Game Data ==
 
== Game Data ==
 
=== Damage Data ===
 
=== Damage Data ===
Aside of regular damage, that can be fixed as before, there was introduced new damage that can't be easily fixed (in game UI named as "wear", generally). You can remove it only by vehicle part replacement.
+
Aside from regular damage, that can be fixed as before, there are newly introduced damage that can't be easily fixed (in game UI named as "wear", generally). You can remove it only by vehicle part replacement.
  
In data, new values was introduced, mainly the "unfixable" ones. Thu currently there is both "damage" and "unfixable_damage" stat for each damageable part (dealt by collision), similarly "wear" and "unfixable_wear" (dealt by distance). Equivalent set is there for trailers. Also there is attribute <code>odometer_wear_unfixable</code>, multiplier that translates distance driven from last total restoration into percent displayed.
+
In data, new values were introduced, mainly the "unfixable" ones. Currently there is both a "damage" and "unfixable_damage" stat for each damageable part (dealt by collision), similarly "wear" and "unfixable_wear" (dealt by distance). Equivalent set is there for trailers. Also there is attribute <code>odometer_wear_unfixable</code>, a multiplier that translates distance driven from last total restoration into percent displayed.
  
 
List of unfixable damage attributes, defining damage ratio from collision:
 
List of unfixable damage attributes, defining damage ratio from collision:
Line 52: Line 52:
 
== Vehicle Data ==
 
== Vehicle Data ==
 
=== Dashboard Display IDs ===
 
=== Dashboard Display IDs ===
Dashboard UI scripts got new support for the '''ui_text_bar''' component which replaces old combination of 2 '''ui::text''' elements which were used to simulate bars. Primary reason for this change is to support multiple bars for same ID.
+
Dashboard UI scripts got new support for the '''ui_text_bar''' component which replaces old combination of 2 '''ui::text''' elements which were used to simulate bars. Primary reason for this change is to support multiple bars for the same ID.
  
 
So now one only define one '''ui_text_bar''' element which has all the bar data as attributes:
 
So now one only define one '''ui_text_bar''' element which has all the bar data as attributes:

Latest revision as of 22:56, 11 February 2024

Introduction

The following page contains modding guidelines for the new update of the game.

To better understand changes in units it is recommended to check Units documentation page.

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 components 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 & New Features

Damage system

New damage system ...

Game Data

Damage Data

Aside from regular damage, that can be fixed as before, there are newly introduced damage that can't be easily fixed (in game UI named as "wear", generally). You can remove it only by vehicle part replacement.

In data, new values were introduced, mainly the "unfixable" ones. Currently there is both a "damage" and "unfixable_damage" stat for each damageable part (dealt by collision), similarly "wear" and "unfixable_wear" (dealt by distance). Equivalent set is there for trailers. Also there is attribute odometer_wear_unfixable, a multiplier that translates distance driven from last total restoration into percent displayed.

List of unfixable damage attributes, defining damage ratio from collision:

  • cabin_unfixable_damage_ratio
  • chassis_unfixable_damage_ratio
  • engine_unfixable_damage_ratio
  • transmission_unfixable_damage_ratio
  • wheel_unfixable_damage_ratio

Continual unfixable wear:

  • cabin_wear_unfixable
  • chassis_wear_unfixable
  • engine_wear_unfixable
  • transmission_wear_unfixable
  • wheel_wear_unfixable

Trailer collision ratios of unfixable damage:

  • trailer_body_unfixable_damage_ratio
  • trailer_chassis_unfixable_damage_ratio
  • trailer_wheel_unfixable_damage_ratio

Trailer continual unfixable wear:

  • trailer_body_wear_unfixable
  • trailer_chassis_wear_unfixable
  • trailer_wheel_wear_unfixable

Vehicle Data

Dashboard Display IDs

Dashboard UI scripts got new support for the ui_text_bar component which replaces old combination of 2 ui::text elements which were used to simulate bars. Primary reason for this change is to support multiple bars for the same ID.

So now one only define one ui_text_bar element which has all the bar data as attributes:

  • vertical | boolean - boolean value deciding if text element size should be modified vertically (from bottom to top) or horizontally (from left to right)
  • min_size | integer - size of the bar when minimum value is hit
  • max_size | integer - size of the bar when maximum value is hit
  • min_value | float - value at which this bar presents minimum size
  • max_value | float - value at which this bar presents maximum size

Example element:

ui_text_bar : _nameless.def_bar {
 vertical: false
 min_size: 0
 max_size: 239
 min_value: 0
 max_value: 1
 text: "<img src=/material/ui/white.mat xscale=stretch height=9px color=FFD2D2C4><ret><align vstyle=bottom><img src=/material/ui/white.mat xscale=stretch height=3px color=FFB6B5AB></align>"
 coords_l: 0
 coords_r: 239
 coords_t: 23
 coords_b: 14
 area_l: 1
 area_r: 0
 area_t: 0
 area_b: 1
 id: 1140
 layer: 2
 tab: -1
 pointer: -1
 my_parent: _nameless._.sharedisplay
}

Used trucks

New folders ...