Open main menu

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

< Games‎ | ETS2/Modding guides
(Steering wheel accessory)
(Truck data)
 
(One intermediate revision by one other user not shown)
Line 16: Line 16:
 
All map dependent data was moved from '''game_data.sii''' to '''map_data.sii'''. Check '''map_data.sii''' for list of obsolete attributes.
 
All map dependent data was moved from '''game_data.sii''' to '''map_data.sii'''. Check '''map_data.sii''' for list of obsolete attributes.
  
== Truck data ==
+
== Vehicles data ==
  
 
=== Steering wheel adjustment animations ===
 
=== Steering wheel adjustment animations ===
Line 35: Line 35:
 
=== Interior camera lookup presets ===
 
=== Interior camera lookup presets ===
  
Truck interior camera now contains array named '''look_presets_defaults'''. Its 6 element array that defines angle of camera on horizontal plane. Default values are:
+
Truck interior camera now contains array named '''look_presets_defaults'''. Its 6 element array that defines camera angle (in degrees) on horizontal plane. Default values are:
  
 
  look_presets_defaults[]: 0      // forward
 
  look_presets_defaults[]: 0      // forward

Latest revision as of 07:41, 27 April 2018

Contents

Recommendations

  • 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.
  • When basing you 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 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.
  • 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

Game data

All map dependent data was moved from game_data.sii to map_data.sii. Check map_data.sii for list of obsolete attributes.

Vehicles data

Steering wheel adjustment animations

Truck interior animations(_uk).sui got two new animations for steering wheel adjustment. One animation defines up/down movement and second defines steering wheel extend. Moreover default attributes tell rest position of the steering wheel.

Example definition in /def/vehicle/truck/<your_truck_name>/interior/animations.sui:

wheel_updown_anim: "/vehicle/truck/<your_truck_name>/interior/<rotation_animation.pma>" 
wheel_frontback_anim: "/vehicle/truck/<your_truck_name>/interior/<extension_animation.pma>"
wheel_updown_anim_default: 0.3
wheel_frontback_anim_default: 0.5

Dashboard backlight behavior

Truck interior now contains attribute named backlight_with_lights. It defines if dashboard is lit with electricity (ignition) on or lights on. Default value is true, so the dashboard is lit when lights are on.

Interior camera lookup presets

Truck interior camera now contains array named look_presets_defaults. Its 6 element array that defines camera angle (in degrees) on horizontal plane. Default values are:

look_presets_defaults[]: 0      // forward
look_presets_defaults[]: -40    // forward-right
look_presets_defaults[]: 20     // forward-left
look_presets_defaults[]: -70    // right
look_presets_defaults[]: 70     // left
look_presets_defaults[]: -20    // windscreen center

Steering wheel accessory

Truck interior got new accessory named steering_w, which defines steering wheel as rigid model separated from interior animations model. Models should be placed in the upgrade folder: vehicle/truck/upgrade/steering_w/<your_truck_name> and accessory definition file has to be in: def/vehicle/truck/<your_truck_name>/accessory/steering_w.

Example steering wheel accessory definition file:

SiiNunit {
accessory_addon_data : exclusive.<your_truck_brand>.<your_truck_name>.steering_w { 
      name: "Exclusive Steering Wheel" 
      price: 360
      unlock: 10
      icon: "<your_truck_name>/steering_w_excl"
      interior_model: "/vehicle/truck/upgrade/steering_w/<your_truck_name>/exclusive.pmd"
}
}

Trailer data

Added trailer paintjobs for each trailer. In /def/vehicle/trailer/<trailer_name>/ create custom_paint_job and add defs for paintjob. Example of paintjob definition file:

SiiNunit
{
accessory_paint_job_data : .paint_job
{
   airbrush: true
   alternate_uvset: true
   paint_job_mask: "<path to your tobj file>"
}
}

Editor

Added vegetation and terrain pickers for easy applying of the same patterns.

Added dialog showing info about currently picked pattern.

Traffic

Spawn frequency

The per-country spawn frequency definition has been improved and simplified. The old file-based (def/country/(country_name)/ai system is now obsolete. Instead of creating a new file for each vehicle definition, put all your customized spawn frequencies into a single file /def/country/(country_name)/traffic.(mod_name).sii.

For example:

country_traffic_info : .country.info.traffic.a3 {
    object: traffic.a3
    spawn_frequency: 0.00
}


object - unit name of the object the given info is for; ALL vehicle and trailer types are supported

spawn frequency - arbitrary non-negative float number (the precision is no longer clamped to 1/10)

To override a traffic info in your mod, just create a new definition in your definition file with the same value for object attribute as the one being overridden. For each object the LAST LOADED traffic info is used.

Speed limits

Speed limit computation for trucks has been adjusted. Until now, it was not possible, to raise the speed limit for trucks above the country limit using traffic signs. For example, trucks inside cities were forced to drive at slow speeds (e.g. 50 km/h) regardless of the traffic signs (if not on a high-speed roads, like freeways/motorways).

To remove this limitation, a new attribute has been created:

max_limit - an array of speed limits defining the maximum allowed speed limit value for the given vehicle type in given country (cannot be raised, e.g. by traffic signs). By default, there is no limit set.

As a compromise between 'making trucks drive too slow' and 'allowing car speed limits for trucks', the country speed limits for trucks in all countries are now set as follows:

For trucks in cities, allow increasing speed limit by traffic signs up to rural speed limit

For example:

country_speed_limit : .speed_limit.truck {

    vehicle_speed_class:    truck

    lane_speed_class[]:    local_road
    limit[]:         70
    urban_limit[]:   50
    max_limit[]:     70

    lane_speed_class[]:     expressway
    limit[]:         80
    urban_limit[]:   50
    max_limit[]:     80

    lane_speed_class[]:     motorway
    limit[]:         80
    urban_limit[]:   80
    max_limit[]:     80
}