Difference between revisions of "Games/ATS/Modding guides/1.6.2"

From SCS Modding Wiki
Jump to navigation Jump to search
(Cargo Mass Ration & COG Offset)
(Changes)
 
(6 intermediate revisions by 3 users not shown)
Line 11: Line 11:
 
= Changes =
 
= Changes =
  
== Gearbox Layouts ==
+
== Gearbox layouts ==
  
Game now reads all "**gearbox_layout_*.sii**" files in profile folder which you can list in options. Old files: "gearbox_range.sii", "gearbox_splitter.sii" and "gearbox_range_splitter.sii" will be ignored and can not be used anymore.
+
Game now reads all "'''gearbox_layout_*.sii'''" files in profile folder which you can list in options. Old files: "'''gearbox_range.sii'''", "'''gearbox_splitter.sii'''" and "'''gearbox_range_splitter.sii'''" will be ignored and can not be used anymore.
  
 
== Behind Camera ==
 
== Behind Camera ==
  
Behind rotation camera definitions(eg: "**/def/camera/units/behind_rotation_basic.sii**") got new float attribute: **height_limit** which sets maximum height of behind camera.
+
Behind rotation camera definitions(eg: "/def/camera/units/behind_rotation_basic.sii") got new float attribute: '''height_limit''' which sets maximum height of behind camera.
  
== Economy Data ==
+
== Economy data ==
  
 
Economy data got three new attributes for parking bonus for trailers with multi-pivot points:
 
Economy data got three new attributes for parking bonus for trailers with multi-pivot points:
* **exp_park_double_bonus: 20** - int
+
* '''exp_park_double_bonus: 20'''
* **exp_park_double_bonus_medium: 150** - int
+
* '''exp_park_double_bonus_medium: 150'''
* **exp_park_double_bonus_hard: 250** - int
+
* '''exp_park_double_bonus_hard: 270'''
  
== Truck Data ==
+
== Vehicles data ==
  
=== Transmission Data ===
+
=== Truck data ===
  
Transmission configurations got new attribute '''crawls'''. It represents count of crawl gears aka first N gears from '''ratios_forward''' array.
+
==== Transmission data ====
{{Note| Crawls attribute is used only for visual representation of crawl gears, si it doesn't not effect actual gear ratios in any way.}}
 
  
== Trailer Data ==
+
Transmission configurations got a new attribute, '''crawls'''. It represents the number of crawler gears, which are the first ''N'' gears from the '''ratios_forward''' array.
 +
{{Note| The crawls attribute is used only for visual representation of crawler gears, so it does not affect the actual gear ratios in any way.}}
  
=== Cargo Mass Ratios & COG Offset ===
+
=== Trailer data ===
  
Trailer cargo definition files ("/def/cargo/<cargo_name>/<trailer.cargo>.sii") got two new array attributes **cargo_mass_ratio** and **cog_offset**. Cargo mass ratio array defines how cargo weight and forces are distributed among master and slave trailers (each array item is of type float). Additionally center of gravity array then defines offset of center of gravity in all directions (each array item is of type float3).
+
==== Cargo mass ratio & COG offset ====
  
=== Steerable Axles ===
+
Trailer cargo definition files ("/def/cargo/<cargo_name>/<trailer.cargo>.sii") got two new array attributes: '''cargo_mass_ratio''' and '''cog_offset'''. The cargo mass ratio array defines how cargo weight and forces are distributed among master and slave trailers (each array item is of type float). Additionally, the center of gravity array then defines offset of center of gravity in all directions (each array item is of the type float3).
 +
 
 +
==== Steerable axles ====
  
 
For trailer to be using steerable axles several things has to be done:
 
For trailer to be using steerable axles several things has to be done:

Latest revision as of 07:55, 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

Gearbox layouts

Game now reads all "gearbox_layout_*.sii" files in profile folder which you can list in options. Old files: "gearbox_range.sii", "gearbox_splitter.sii" and "gearbox_range_splitter.sii" will be ignored and can not be used anymore.

Behind Camera

Behind rotation camera definitions(eg: "/def/camera/units/behind_rotation_basic.sii") got new float attribute: height_limit which sets maximum height of behind camera.

Economy data

Economy data got three new attributes for parking bonus for trailers with multi-pivot points:

  • exp_park_double_bonus: 20
  • exp_park_double_bonus_medium: 150
  • exp_park_double_bonus_hard: 270

Vehicles data

Truck data

Transmission data

Transmission configurations got a new attribute, crawls. It represents the number of crawler gears, which are the first N gears from the ratios_forward array.

Note: The crawls attribute is used only for visual representation of crawler gears, so it does not affect the actual gear ratios in any way.

Trailer data

Cargo mass ratio & COG offset

Trailer cargo definition files ("/def/cargo/<cargo_name>/<trailer.cargo>.sii") got two new array attributes: cargo_mass_ratio and cog_offset. The cargo mass ratio array defines how cargo weight and forces are distributed among master and slave trailers (each array item is of type float). Additionally, the center of gravity array then defines offset of center of gravity in all directions (each array item is of the type float3).

Steerable axles

For trailer to be using steerable axles several things has to be done:

1. Wheel locators inside trailer model that you want to use as steerable has to be named wheel_f_X (where X is number of the steerable wheel and starts with 0 on the front most left steerable wheel)

2. You have to define front wheel for the trailer. For example define file def/vehicle/t_wheel/steerable.sii with this content:

SiiNunit
{
accessory_wheel_data : steerable.fwheel
{
	model: "/vehicle/wheel/overweight/245_70_r17_5.pmd"
}
}

3. As last your trailer unit configuration files (inside folder def/vehicle/trailer/) has to use front wheel accessory. Example trailer configuration file:

trailer : trailer.trailer_name.cargo_name
{
	accessories[]: .trailer_name.cargo_name.tchassis
	accessories[]: .trailer_name.cargo_name.trwheel0
	accessories[]: .trailer_name.cargo_name.trwheel1
	accessories[]: .trailer_name.cargo_name.trwheel2
	accessories[]: .trailer_name.cargo_name.cargo
}
vehicle_accessory:.trailer_name.cargo_name.tchassis
{
    	data_path: "/def/vehicle/trailer/trailer_name/chassis.sii"  # link to chassis definition file
}
vehicle_wheel_accessory: .trailer_name.cargo_name.trwheel0
{
	offset: 0
    	data_path: "/def/vehicle/t_wheel/overweight.sii"            # link to normal trailer wheel definition file
}
vehicle_wheel_accessory: .trailer_name.cargo_name.trwheel1
{
	offset: 2
    	data_path: "/def/vehicle/t_wheel/overweight.sii"
}
vehicle_wheel_accessory: .trailer_name.cargo_name.trwheel2          # definition of steerable axle!
{
	offset: 0                                                   # note that offset again starts from zero.
    	data_path: "/def/vehicle/t_wheel/steerable.sii"             # link to newly created front wheel definition file from step 2.
}
vehicle_accessory: .trailer_name.cargo_name.cargo
{
    	data_path: "/def/vehicle/trailer/trailer_name/cargo.sii"    # link to cargo definition file
}