Games/ETS2/Modding guides/1.50
Contents
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
Map Asset Changes
Warning - with the realease of version 1.50 a selection of new road and prefab item assets has been added to the asset library. These roads and prefab start with a prefix "un" (universal). We urge the modders not to use those assets in your maps at least until release of the version 1.51. They are experimental and there will be some some changes made to them. Placing them in your map might result with the map breaking when next version is released.
SCS pack changes
The content of base.scs pack from 1.49 was separated into base.scs, base_map.scs, base_share.scs and base_vehicle.scs packs to reduce amount of copying in case patch updates only files from a single group. This has no direct effect on behavior of the mods, they are still considered part of "base" set.
The version 1.50 introduces of new version of our hashfs pack archive so you need to download new version of scs_extractor to extract it.
The game now also officially supports hashfs pack in mods. This provides faster load of the mod. While the zip and standalone file formats are still supported, the 1.50 depends on quick availability of some metadata which the hashfs format keeps in memory while they have to be reconstructed from on-disk data for other formats which could lead to stalls when the data are accessed. The format can be created or extracted using the new scs_packer tool.
Texture changes
Unlike the other supported formats, the hashfs v2 archive stores tobjs as a single object together with the texel data under the tobj name. It does not store standalone dds files. When game finds a tobj file inside a hashfs pack, it will load the texel data from that object instead of opening separate dds files like it does for other formats. This means that you can not independently modify just tobj or just dds for textures which are stored in hashfs (e.g. such as coming from base).
Vehicle Data
Axle Models
1.50 introduces a new system for individually modeled axles on trailers, that allows the usage of a new steering mode - axle steering, which rotates the whole axle instead of rotating just the wheels.
There are several components that need to be correctly modeled/configured in order for the system to work.
Trailer chassis model
The trailer chassis model must have axle_i locators, where i is an ID, starting from 0. The number of the locators must match the number of axle models. The trailer chassis may contain any combination of classic wheel locators and axle locators, though some obscure configurations may not work as desired.
Axle model
Model should have its origin point set accordingly as the model will be placed directly on it's corresponding locator. Axle model must contain at least one pair of wheel locators and if the axle model uses its own shadow texture, then it must have its own shadow texture caster locators (defined same as the chassis ones). Additionally, axle models can have several wheel pairs attached to it, but all of them must have the same steerable_axle value. Axle models can also contain locators for hookups (e.g. lights) and accessories (e.g. bumpers).
Chassis data
It is important to correctly setup the atributes in chassis definition (see accessory_chassis_data). Models in axle_model array will be placed from first to last on their corresponding locators (by position) from the front to the back of the trailer. Rest of the axle_model_... attributes are optional.
axle_model_collision contains the path to a collision descriptor, currently we support only one box shape collision per axle model.
If axle_model_extended_shadow_texture is used, then the axle model must have its own shadow texture caster locators (defined same as the chassis ones).
If axle_model_steer_angle is set, it overwrites the maximum angle that the last axle can rotate by. If not set, default value of 50 degrees will be used. Too high values or too low values may produce inconsistent and incorrect steering.
Lastly, the steerable_axle and liftable_axle arrays must contain an entry for each axle on the trailer, i.e., static axle defined on chassis is 1 entry, axle model with 1 axle is also 1 entry, axle model with n axles would be n entries. Additionally, if an axle model is used for axle steering, than all entries in steerable_axle for this axle model must have the same value, otherwise all wheels on this model are set to nonsteerable.
Important to note, that extended_shadow_texture should not have shadows for wheels that are attached to axle models, while ui_shadow should have shadows for all wheels in their default position as the axle model is not moving in the UI.
Dashboard Display IDs
There is now support for new group of IDs for electric trucks. More info will be available at: Documentation/Engine/Truck_Interior_Animations_and_IDs.
Sounds
There are new sound defined for brake sqeeling ... TODO ...