Download as pdf or txt
Download as pdf or txt
You are on page 1of 149

Integration of Trucks and Addons

Project: SnowRunner
Version 1.9.15 of June 07, 2023

Nikolay Grigorev
Andrey Kozyrev

About this document:


This guide describes the integration of Trucks and Addons. It contains the following info:

• Chapters 1 to 4 – provide the general info on modding files.


• Chapters 5 to 6 – describe the XML structure of the files, in general.
• Chapters 7 to 8 – cover tags and attributes used for the description of Meshes and Trucks.
• Chapters 9 to 14 – cover tags and attributes used for the description of Suspensions, Engines,
Gearboxes, Wheels, and Addons.
• Chapter 15 – covers tags and attributes used for the creation of custom skins and colorization.
• Chapter 16 – describes the modding of trucks from the DLCs.
• Chapter 17 – provides some info on selected topics of Addon development.
• Chapter 18 – provides some info on creation of Farming Trailers.
• Chapter 19 – proves some info on Water as Cargo.

1
Contents
Revision History .......................................................................................................................8
1. Organization of Files ............................................................................................................9
1.1. Files of a Truck ................................................................................................................................... 9
1.2. Files of Wheels ................................................................................................................................... 9
1.3. Files of Truck Addons .......................................................................................................................10
1.4. Log Files: Why do you need them? ..................................................................................................10

2. Fbx file structure ................................................................................................................. 12


2.1. Coordinate axes ...............................................................................................................................12
2.2. Requirements for objects in the Fbx file ...........................................................................................14
2.3. Special meshes ................................................................................................................................15
2.3.1. _windshield ...............................................................................................................................15
2.3.2. _cockpit .....................................................................................................................................15
2.4. Truck meshes ...................................................................................................................................15
2.4.1. lp_cab, hp_cab ..........................................................................................................................16
2.5. Textures............................................................................................................................................16
2.6. Bones ...............................................................................................................................................16
2.6.1. Physical bones ...........................................................................................................................16
2.6.1.1. Collision meshes .................................................................................................................16
2.6.2. Non-physical bones ...................................................................................................................17
2.6.2.1. Axles ...................................................................................................................................17
2.6.2.2. SteeringRack .......................................................................................................................17
2.6.2.3. AutomaticIK ........................................................................................................................18
2.6.2.4. Shakers ...............................................................................................................................20
2.6.2.5. Rotators ..............................................................................................................................20
3. ХМL Description of a Truck ................................................................................................ 21
3.1. XML of the Mesh (/meshes/trucks) ..................................................................................................21
3.2. XML of the Truck Class (/classes/trucks) .........................................................................................21
3.3. XML of the Suspension Class (/classes/suspensions) ....................................................................21
3.4. XML of the Engine Class (/classes/engines) ....................................................................................22
3.5. XML of the Gearbox Class (/classes/gearboxes) .............................................................................22
3.6. XML of Material Customization (/classes/customization_presets/customization_preset.xml) .........22

4. Description of Wheels ........................................................................................................ 23


4.1. A wheel as a single entity .................................................................................................................23
4.2. A wheel as a set of tires and rims ....................................................................................................23

5. XML Structure ..................................................................................................................... 25


2
5.1. Main Principles .................................................................................................................................25
5.2. Mesh of the Truck: Tags in the XML file ...........................................................................................25
5.2.1. Minimum set .............................................................................................................................25
5.2.2. All tags .......................................................................................................................................25
5.3. Mesh of the Wheel: Tags in the XML file .........................................................................................26
5.3.1. Wheel as a single entity ............................................................................................................26
5.3.2. Tire or Rim .................................................................................................................................26
5.4. Classes of the Truck & Addons: Tags ..............................................................................................26
5.4.1. Truck ..........................................................................................................................................26
5.4.1.1. Minimum set ......................................................................................................................26
5.4.1.2. All tags ................................................................................................................................26
5.4.2. Suspension ................................................................................................................................29
5.4.3. Engine ........................................................................................................................................29
5.4.4. Gearbox .....................................................................................................................................30
5.4.5. Trailer ........................................................................................................................................30
5.4.5.1. Minimum set ......................................................................................................................30
5.4.5.2. All tags ................................................................................................................................30
5.4.6. Addon ........................................................................................................................................32
5.4.6.1. Minimum set ......................................................................................................................32
5.4.6.2. All tags ................................................................................................................................32
5.5. Class of the Wheel: Tags .................................................................................................................34
5.5.1. Wheel as single entity ...............................................................................................................34
5.5.2. Set of tires and rims ..................................................................................................................34
5.6. Templates (_templates)....................................................................................................................35
5.6.1. Sample template and its usage .................................................................................................35
5.6.2. Repeated usage .........................................................................................................................36
5.6.3. Templates for multiple tags ......................................................................................................37
5.6.4. Template for a hierarchy of tags ...............................................................................................37
5.6.5. Overrides for attribute values ...................................................................................................38
5.6.6. Extension of the hierarchy ........................................................................................................39
5.6.7. Removal of attributes and tags inherited from the template...................................................40
5.7. Inheritance (_parent) ........................................................................................................................41

6. Tags and their Parameters ................................................................................................. 43


7. <CombineXMesh> ............................................................................................................... 44
7.1. <SocketPoints> ................................................................................................................................44
7.1.1. <SocketPoint>............................................................................................................................44
7.2. <Material>.........................................................................................................................................44
3
7.3. <MaterialOverrides> .........................................................................................................................47
7.3.1. <MaterialOverride> ...................................................................................................................48
8. <Truck>................................................................................................................................ 49
8.1. <TruckData> .....................................................................................................................................50
8.1.1. <Winch> ....................................................................................................................................52
8.1.2. <Wheels> ...................................................................................................................................53
8.1.2.1. <Wheel> .............................................................................................................................53
8.1.3. <SuspensionSocket> ..................................................................................................................55
8.1.4. <SteeringWheel> .......................................................................................................................55
8.1.5. <SteeringRack> ..........................................................................................................................56
8.1.6. <Steam>.....................................................................................................................................56
8.1.7. <SoundsWheels> .......................................................................................................................57
8.1.8. <SoundsDamage> ......................................................................................................................57
8.1.9. <Sounds> ...................................................................................................................................57
8.1.10. <Shakers> ................................................................................................................................58
8.1.10.1. <Shaker> ...........................................................................................................................58
8.1.11. <Shafts> ...................................................................................................................................59
8.1.11.1. <Shaft> .............................................................................................................................59
8.1.12. <OcclusionMap>......................................................................................................................61
8.1.13. <Messages> .............................................................................................................................61
8.1.14. <LimitedFluid> .........................................................................................................................62
8.1.15. <Intake>...................................................................................................................................63
8.1.16. <GearboxSocket> ....................................................................................................................63
8.1.17. <FuelTank> ..............................................................................................................................64
8.1.18. <Exhaust> ................................................................................................................................64
8.1.19. <EngineSocket> .......................................................................................................................64
8.1.20. <Driver> ...................................................................................................................................64
8.1.21. <Dashboard> ...........................................................................................................................66
8.1.21.1. <Gauge> ...........................................................................................................................66
8.1.22. <Damage> ...............................................................................................................................67
8.1.22.1. <DamageArea> .................................................................................................................67
8.1.23. <CompatibleWheels> ..............................................................................................................69
8.1.24. <Camera> ................................................................................................................................69
8.1.24.1. <Cockpit>..........................................................................................................................69
8.1.24.1.1. <Rear> .......................................................................................................................70
8.1.24.1.2. <Mirror> ....................................................................................................................71

4
8.1.24.1.2.1. <SecondaryView> ...............................................................................................73
8.1.25. <Axles> ....................................................................................................................................73
8.1.25.1. <Axle> ...............................................................................................................................74
8.2. <Snorkel> .........................................................................................................................................74
8.3. <Rotator>..........................................................................................................................................74
8.4. <PhysicsModel> ...............................................................................................................................75
8.4.1. <NetSync> .................................................................................................................................75
8.4.2. <Body>.......................................................................................................................................75
8.4.2.1. <Constraint> .......................................................................................................................77
8.4.2.1.1. <Motor> ......................................................................................................................80
8.4.2.1.2. <PlaneMotor> .............................................................................................................81
8.4.2.1.3. <ConeMotor> ..............................................................................................................82
8.4.2.1.4. <TwistMotor> ..............................................................................................................82
8.4.2.1.5. <PlaneConeMotor> .....................................................................................................82
8.4.2.1.6. <AllMotor> ..................................................................................................................82
8.4.3. <FarmingBoundingBox1>…< FarmingBoundingBoxN> .............................................................82
8.5. <ModelAttachments> .......................................................................................................................83
8.5.1. <StopSignals> ............................................................................................................................83
8.5.1.1. <Model> .............................................................................................................................84
8.5.1.2. <Light> ................................................................................................................................85
8.5.1.3. <Flare> ................................................................................................................................87
8.5.2. <ReverseSignals> .......................................................................................................................88
8.5.3. <Ignition> ..................................................................................................................................89
8.5.4. <HeadLight> (in <ModelAttachments>) ....................................................................................89
8.6. <HeadLight> (in <TruckData>) .........................................................................................................89
8.7. <Landmark> .....................................................................................................................................90
8.8. <GameData> ....................................................................................................................................90
8.8.1. <WinchSocket> ..........................................................................................................................91
8.8.2. <UiDesc>....................................................................................................................................91
8.8.3. <CustomizationCameras>..........................................................................................................93
8.8.3.1. <CameraPos>......................................................................................................................93
8.8.4. <CraneSocket>...........................................................................................................................94
8.8.5. <AddonSockets> ........................................................................................................................94
8.8.5.1. <Socket> .............................................................................................................................95
8.8.5.1.1. <ExtraParent> ..............................................................................................................96
8.8.5.1.2. <AddonsShift > ............................................................................................................98
8.9. <ControlledConstraints> ...................................................................................................................99
5
8.9.1. <Constraint> ............................................................................................................................100
8.10. <AutomaticIK> ..............................................................................................................................100
8.10.1. <IKBone> ...............................................................................................................................100
8.10.1.1. <IKJoint> .........................................................................................................................101
9. <SuspensionSetVariants> ................................................................................................ 102
9.1. <SuspensionSet> ...........................................................................................................................102
9.1.1. <Suspension> ..........................................................................................................................102
9.1.1.1. <GameData>.....................................................................................................................103
9.1.1.1.1. <UiDesc>....................................................................................................................103
10. <EngineVariants>............................................................................................................ 104
10.1. <Engine> ......................................................................................................................................104
10.1.1. <GameData>..........................................................................................................................105
10.1.1.1. <UiDesc>.........................................................................................................................105
11. <GearboxVariants> ......................................................................................................... 106
11.1. <Gearbox>....................................................................................................................................106
11.1.1. <ReverseGear> ......................................................................................................................107
11.1.2. <HighGear>............................................................................................................................107
11.1.3. <Gear> ...................................................................................................................................107
11.1.4. <GameData>..........................................................................................................................107
11.1.4.1. <GearboxParams> ..........................................................................................................108
11.1.4.2. <UiDesc>.........................................................................................................................108
12. <TruckWheel> ................................................................................................................. 110
12.1. <WheelTracks> ............................................................................................................................110
12.2. <WheelSoftness> .........................................................................................................................110
12.3. <WheelFriction> ...........................................................................................................................111

13. <TruckWheels> ............................................................................................................... 112


13.1. <TruckTires> ................................................................................................................................112
13.1.1. <TruckTire>............................................................................................................................112
13.1.1.1. <WheelTracks> ...............................................................................................................113
13.1.1.2. <WheelSoftness>............................................................................................................113
13.1.1.3. <WheelFriction> .............................................................................................................113
13.1.1.4. <GameData>...................................................................................................................113
13.1.1.4.1. <UiDesc>..................................................................................................................114
13.2. <TruckRims> ................................................................................................................................114
13.2.1. <TruckRim>............................................................................................................................114
13.2.1.1. <GameData>...................................................................................................................115

6
13.2.1.1.1. <UiDesc>..................................................................................................................115
14. <TruckAddon> ................................................................................................................ 116
14.1. <WheelRepairsHide> ...................................................................................................................116
14.1.1. <Mesh> ..................................................................................................................................116
14.2. <RepairsHide> .............................................................................................................................116
14.2.1. <Mesh> ..................................................................................................................................116
14.3. <FuelHide> ...................................................................................................................................116
14.3.1. <Mesh> ..................................................................................................................................116
14.4. <TruckData> .................................................................................................................................117
14.4.1. <Shakers> ..............................................................................................................................117
14.4.2. <Intake>.................................................................................................................................117
14.4.3. <LimitedFluid> .......................................................................................................................117
14.4.4. <Damage> .............................................................................................................................117
14.4.4.1. <Multiplier> ....................................................................................................................117
14.5. <Snorkel> .....................................................................................................................................118
14.6. <Rotator>......................................................................................................................................118

15. Color Customization ....................................................................................................... 119


15.1. <CombineXMesh> ........................................................................................................................120
15.1.1. <MaterialOverrides> .............................................................................................................120
15.1.1.1. <MaterialOverride> ........................................................................................................121
15.2. <TruckSet> ...................................................................................................................................124
15.2.1. <Truck> ..................................................................................................................................125
15.2.1.1. <CustomizationPreset> ..................................................................................................125
16. Modding of DLC Trucks.................................................................................................. 128
16.1. Policy on Using Parts of DLC Trucks ...........................................................................................128

17. Addons: Selected Info .................................................................................................... 130


17.1. FastMode. Controls for Controlled Constraints of an Addon .......................................................130
17.1.1. FastMode...............................................................................................................................130
17.1.2. Controls for Controlled Constraints of an Addon..................................................................131
17.1.3. Actions. Buttons for Controlled Constraints .........................................................................137
17.1.4. Different Scenarios of Usage for the <ActionCategory> Fields .............................................139
18. Farming Trailers .............................................................................................................. 141
18.1. Auto-Activation of Constraints of a Farming Trailer .....................................................................142
18.2. Powered Constraints used for Farming Trailers...........................................................................143

19. Water as Cargo................................................................................................................ 147

7
Revision History
Version Changes

1.9.8 • The 16. Modding of DLC Trucks section was added.

• The OriginalTruck attribute was added for the <Truck> tag in 8. <Truck>.

1.9.9 • The 17. Addons: Selected Info section was added with the
17.1. FastMode. Controls for Controlled Constraints of an Addon in it.

• The new attribute for trailers and semitrailers – AttachType – was added to
the <Truck> tag. This new attribute may be especially important for mods of
semitrailers, see 8. <Truck> below for details.

1.9.10 • Added NOTE #2 оn collision meshes of a saddle, see 8. <Truck>.

1.9.11 • 16.1. Policy on Using Parts of DLC Trucks was added.


• 17.1.3. Actions. Buttons for Controlled Constraints was modified.
• 8.8.5. <AddonSockets> was modified.

1.9.12 • 16.1. Policy on Using Parts of DLC Trucks was modified.

1.9.13 • 18. Farming Trailers was added.


• 18.1. Auto-Activation of Constraints of a Farming Trailer was added.
• 18.2. Powered Constraints used for Farming Trailers was added.
• 8. <Truck> was modified (the FarmingTrailerType attribute was added).
• 8.4.3. <FarmingBoundingBox1>…< FarmingBoundingBoxN> was added.
• 1.4. Log Files: Why do you need them? was added.

1.9.14 • 19. Water as Cargo was added.


• 14.4. <TruckData> was modified.
• 8.1.14. <LimitedFluid> was modified.
• 5.4.5.2. All tags was modified.
• 5.4.6.2. All tags was modified.

1.9.15 • 8.8. <GameData> was modified (added info about "CAS" as a possible value of
the Country attribute).

8
1. Organization of Files
All file names must contain only small letters, digits, and “_”.

1.1. Files of a Truck


1. .../meshes/trucks/truck_example.fbx - contains:
o Truck meshes
o Truck skeleton
o Collision meshes
2. .../meshes/trucks/truck_example.xml - contains:
o Paths to truck textures and descriptions of their properties (Blending, AlphaKill,
TwoSided, snow cover parameters, etc.)
o description of shaft mounting points
o MaterialOverrides - info about color customization
3. .../classes/trucks/truck_example.xml - contains all information on truck behaviour:
description of the physical model dynamics, types and sizes of wheels used by the truck,
descriptions of available suspensions and engines, info on lighting (location of lights,
their brightness, color, shape, etc.), driver position, position and direction of the exhaust
pipe, descriptions of available addons and trailers, price of the truck, and so on.
4. .../classes/suspensions/s_truck_example.xml - description of the suspension
5. .../classes/gearboxes/ - description of gearboxes (files of gearboxes are typically not tied
to a particular truck, but are common for the particular class of trucks).
6. .../classes/engines/ - description of engines (files of engines are typically not tied to a
particular truck, but are common for the particular class of trucks).

1.2. Files of Wheels


Wheels of a truck include tires and rims and must contain both of these entities.
Wheels of trailers and semi-trailers may be created using the old scheme where a wheel is a
single entity (similarly to the first Mudrunner).

The old scheme is the following:

1. fbx of the wheel, .../meshes/wheels/wheel_example.fbx


2. xml of a mesh, .../meshes/wheels/wheel_example.xml, which contains information on
textures and radius of the non-deformable part of the wheel RubberRadius (wheel rim
radius).
3. xml of a class, .../classes/wheels/wheel_example.xml, which contains a description of the
physical properties of the wheel (radius, width, friction, rigidity, etc.)

The new scheme describes not a wheel, but the particular type of the wheel. Wheels of this type
may have different tires and rims. I.e., after selection of any rim from a wheel type, any tire from
the same wheel type will fit with it well (and there will be no gaps or intersections of geometry):

1. Set of fbx files for tires and rims .../meshes/wheels/


example_rim1.fbx, example_rim2.fbx, ...
example_tire1.fbx, example_tire2.fbx, ...

9
2. Set of xml files for meshes of tires and rims that contain information on textures:
.../meshes/wheels/
example_rim1.xml, example_rim2.xml,...
example_tire1.xml, example_tire2.xml,...
3. xml file of a class, .../classes/wheels/wheel_example.xml,
which contains the description of the physical properties of this type of wheels. This file
describes all tires and rims of this type and their properties.

1.3. Files of Truck Addons


In a wide-sense, an addon to a truck is anything that can be installed to it: visual upgrades
(modification of exhaust pipes, sun visors, lamps, and so on), functional upgrades (snorkels,
bumpers, bodies, cranes, and so on), and trailers.

In the strict sense, trailers and semi-trailers can exist on the scene separately from the truck and
are not addons. Roughly speaking, a trailer or semitrailer is a truncated truck, which contains no
engine, no driver, etc.

The organization of files of addons is absolutely similar to the organization of truck files. In
principle, files of addons may be located in the folder of truck files (as in Mudrunner 1).
However, for ease of use, addon files are stored in separate subfolders.

Thus, addons that are common for all trucks or several trucks (e.g. fifth wheels, bodies, cranes,
and so on) are stored in the addons subfolder: .../classes/trucks/addons

Trailers and semi-trailers are stored in the trailers subfolder: .../classes/trucks/trailers

Individual addons of a truck are stored in the <name_of_truck>_tuning folder:


.../classes/trucks/truck_example_tuning

1.4. Log Files: Why do you need them?


We recommend you to review the logs of your mod when testing it, even if everything visually
looks good.

In some cases, when you are creating a mod, it can have errors that are almost invisible visually,
but can be easily tracked in the log.

For example, during the creation of a mod, you can add some custom component to the truck (for
example, an improved winch) and accidentally specify different names for it in different XML
files. The game will handle this by substituting the target custom component with its default
version, so there won't be any obvious errors. But, nevertheless, in the game, such mods can
cause errors, and, obviously, in general, they will not work as intended. However, if you check
the log while testing this mod, errors of this type can be easily found and fixed.

The game has a specific folder that stores various log information: errors, warnings, and so on.
This folder is located within the folder of the game in the Documents folder, at
…\Documents\My Games\SnowRunner\base\logs\

10
Typically, the full path to this folder is similar to something like
"C:\Users\<username>\Documents\My Games\SnowRunner\base\logs\"

This folder contains multiple log files that can be written by different components of the game
(the game itself, the editor, etc.) and in different situations (errors while loading custom map,
errors while packing mod, etc.), and you can use all of them, if necessary. However, errors and
warnings occurring during the validation or packing a truck mod can be seen in LegacyLog.txt in
this folder.

11
2. Fbx file structure
SnowRunner uses the Fbx format to store information about the geometry, skeleton, and
collision meshes of a truck, trailer, addon, or wheel.

Geometry:

Skeleton:

Collision meshes:

2.1. Coordinate axes


In the game, the truck is oriented along the OX axis. The OY axis is pointing up. The OZ axis is
pointing to the left.

12
This orientation corresponds to the (x, y, -z) axes in Maya:

And, in 3DS Max, to the (x, z, y) axes:

13
In Blender, the axes are the same as in 3DS Max. So, the orientation of the game corresponds to
the (x, z, y) axes orientation in Blender:

Thus, to correctly export your truck to the Fbx file from your 3D editor, the forward axis of your
truck should be looking in the direction of the OX axis during the export.

And, to correctly perform exporting, Export Settings in your 3D editor should be exactly the
same as shown on the screenshots in the "Exporting to Fbx: 3ds Max, Maya, and Blender"
guide, in the section corresponding to this 3D editor.

Moreover, after exporting, when you will be specifying truck properties in XML, you should
take into account the difference in the orientation of the axes, which was described above.

For example:
If the coordinates of the center of the wheel of your truck in 3Ds Max or Blender are (1; 2; 3),
then in the XML description of this wheel you need to specify "(1; 3; 2)" as the value of the Pos
attribute:
Pos="(1; 3; 2)"

2.2. Requirements for objects in the Fbx file


All objects and meshes must have identity scale. For example:

• in Maya - it corresponds to the (1, 1, 1) scale,


• in 3DS Max - to the (100, 100, 100) scale.
• in Blender - to the (1, 1, 1) scale.

Ensure that the root bone and all truck meshes have identity rotation (0, 0, 0).

14
A truck, addon, and semi-trailer can have only one root bone. All other bones must be lower in
the hierarchy.

A truck or semi-trailer must have at least one physical bone. The physical bone must have a
collision mesh. All bones and meshes of trucks and semi-trailers must have skin modifiers.

Addons may have no bones at all (e.g., small addons such as lamps, posters, and other addons
that do not need a collision). If an addon has bones, then these bones must have skin modifiers
and there must be at least one physical bone.

Wheels have no bones or collision objects. Wheel collision is defined in XML.

2.3. Special meshes


Each truck with a cab has the _windshield and _cockpit meshes.

2.3.1. _windshield

Glasses that are visible from the first-person camera. This glass is a duplicate of the glasses that
are visible from the outside, with the inverted normals. In addition, this mesh is made a bit more
high-poly, since water and dirt stick to the glass on a per-vertex basis.

2.3.2. _cockpit

Water cut-off area. The image below shows a poorly configured _cockpit. The arrows show the
parts of the wipers that are inside the _cockpit mesh. Visually, they seem to be inside the cab.

2.4. Truck meshes


The number of truck meshes is not limited. But each separate mesh causes a separate draw call,
which reduces performance. On the other hand, the engine does not support too many triangles in
the same mesh. (The number of triangles is calculated during export from Fbx and is different for
each mesh, maximum is near 65,000 triangles.) So, we have to look for a balance.

15
2.4.1. lp_cab, hp_cab

We recommend making the cab more detailed for a first-person camera, than for an external
camera. If a mesh has the lp_ prefix (lp = low poly), then it is visible only from an external
camera. Meshes with the hp_ prefix (high poly) are visible only from a first-person camera.

2.5. Textures
In the Fbx file, any textures can be assigned to the truck mesh. Textures must have correct
names: their names can contain Latin characters and digits and must have no special characters
(except “_”) and no spaces. The system takes only the name of a texture from the Fbx file. All
properties of a texture are described in the XML file of the mesh.
The fewer textures are assigned to the truck, the better the performance is.

WARNING: All textures of materials of the mod must adhere to the specific naming scheme,
see "7.2. <Material>" below for details. This naming scheme is necessary to enable streaming for
textures of the mod, which may be essential. Particularly, mods with wrong naming of textures
result in memory leaks on consoles and will not receive approval for them.

You may use the same texture maps on different shapes. But, for example, if one shape is inside
the cab and the other is outside the cab, then you should take this into account at the stage of
creating the Fbx file. Particularly, in this case, you should create two materials with different
names in the Fbx file, since their parameters will be different in XML (e.g. the parameters
responsible for snow cover). You can use one texture for all truck meshes, but the Fbx file
should have as many materials as the number of different sets of parameters in the XML
description.
For example, you can have one .tga file of texture. And, if you assign one material to the truck in
Maya, everything will be looking OK there (not in the game). However, in the XML file, there
may be a necessity to define different parameters for different parts of the truck (e.g. enable or
disable snow cover). And you will not be able to do this if you have assigned one material for all
parts of the truck. So, you will need to duplicate the material in Maya, rename the second copy
of the material there, and assign this second material to the necessary parts of the truck. In this
case, you will be able to define different values of parameters in the XML for it.

2.6. Bones
2.6.1. Physical bones

Bones that are included in the Havok simulation. I.e., the bones that must respond to gravity,
collide, have friction, and so on. All bones in the physical model must have collision meshes. For
convenience, we use the NameOfBone_сdt naming, which means that this bone has a collision
mesh.

2.6.1.1. Collision meshes

The name of the collision mesh must begin with “cdt”. In general, a collision mesh can have any
shape. It can be a closed figure or a two-dimensional surface.

A single physical bone can have multiple collision meshes.


16
From the performance point of view, the best form of collision mesh is a cube.

It is desirable that the collision mesh is a convex figure. We recommend that due to the fact that
convex-concave shapes can cause crashes (if a small collision environment object gets inside, it
can “fall through” inside the collision mesh).

2.6.2. Non-physical bones

The behavior of these bones is not directly related to Havok physics. However, it depends on the
position of the physical or non-physical bones that they are attached to or on the position of the
wheels. These bones do not have collision meshes and cannot affect the behavior of the bones of
the physical model.

2.6.2.1. Axles

Truck axle. For a dependent suspension, the position of the axles along the OY axis is calculated
as an average between the two nearest wheels, the rotation angle is calculated from the vector
connecting these wheels.

If the Y coordinate of the axel bone does not coincide with the coordinate of the nearest wheel
described in the XML of the truck, then you can get the unexpected result in the game: the bone
will be located between the wheels and the skinned mesh will be deformed.

2.6.2.2. SteeringRack

The steering rack always consists of three bones: the bone of the rack, the bone of the left hub,
and the bone of the right hub.
17
The behavior of each bone (of hubs and the rack) is controlled by the rotation of the wheel that is
closest to it.

The bone of the rack moves along the arc calculated from the position of the nearest wheel and
the length of the rack itself. (Half of the length of the rack is specified in the XML of the truck
by the value of the RackHalfSizeZ parameter).

Hub bones rotate with the nearest wheels. However, the rotation pivot of the hub does not match
the rotation pivot of the wheel. Therefore, the wheel should not just rotate, but also move along
the circle circumscribed around the attachment point of the hub. The parameter
SteeringJointOffset in the Wheel tag in the XML of the track is responsible for this offset.

If the truck has an independent suspension (there is no common rack), then the bone of the rack
still needs to be created - to ensure the correct display of the behavior of the hubs. And, since all
bones must have skin modifiers, you also need to add this bone to the skin modifier of any mesh
of the truck.

2.6.2.3. AutomaticIK

Example:
As an example, consider a setup of the hydraulics of the crane.

18
Here, only two bones are involved in physics (BoneRotationBase_cdt, BoneArm1_cdt).

To implement the operation of a hydraulic piston, we need two chains of bones with inverse
kinematics. BoneRod1, BoneRod2 and BonePistonBase, BonePiston.

19
The BoneRod1 bone is attached to the BoneRotationBase_cdt by the Hinge constant. The
BoneRod2 bone is attached to the BoneRod1 by the Hinge constant. And, the locator (in Maya
terms) of inverse kinematics is attached to the BoneArm1_cdt bone. Thus, their behavior is
completely determined by the position of the physical bones.

The hydraulic piston is similarly organized, but the inverse kinematics locator is attached not to
the physical bone, but the bone from the first chain - BoneRod2.

2.6.2.4. Shakers

Some bones are described in the XML of the truck as "Shakers". They are needed, for example,
to rattle the exhaust pipe or to provide a vibration of a running engine.

2.6.2.5. Rotators

The bones, which are described in the XML of the truck as Rotators, will help to rotate the fan or
the emergency light bulb.

20
3. ХМL Description of a Truck

3.1. XML of the Mesh (/meshes/trucks)


This XML file contains info on textures of a truck or addon. Along with it, it may contain some
specific information, such as the following: description of shaft mounting points, snow cover
parameters, and other information that is related to the mesh.

3.2. XML of the Truck Class (/classes/trucks)


This file contains all information on the behavior of the truck in the game engine. Here is a
partial list of what is described there:

• Description of the type of the object - a truck, an addon, or a trailer.


• Description of the Havok physical model (characteristics of the interaction of physical
bones with each other and with the environment)
• Description of the behavior of bones that are not related to the physical engine: shakers
(vibrations, the intensity of which depends on current “engine power”), bones of inverse
cinematics (the behavior of which depends on positions of other bones, but not from the
physical simulation), and so on.
• Assignment of control buttons
• Positions and description of characteristics of light sources
• Available engines, suspensions, gearboxes
• Whether or not the truck has the differential
• Types, sizes, and positions of wheels
• Types of the wheel drive
• Descriptions of cast shadows
• The behavior of the steering wheel and wheels that are connected to it
• Sounds
• Position and direction of airflow and the exhaust
• Position of the driver
• Position of external camera and position of the first-person camera
• Damage characteristics for the engine and fuel tanks
• Positions of the addons and their interactions with the truck and with each other
• Length of the winch
• Attachment points for the winch
• Attachment points for the crane rope
• Price of truck
• For trucks: Positions of cameras in the garage; for addons: the camera that is active when
the addon is selected
• Description of the truck model on the map

3.3. XML of the Suspension Class (/classes/suspensions)


This file contains a description of the suspensions that are available for the particular truck.
Typically, there are two of them: default and raised (e.g. ank_mk38_suspension_default,
ank_mk38_suspension_high).

21
Here you can specify:

• height and stiffness of the suspension


• maximum detachment of wheels from the truck in case of a broken suspension
• value of DamageCapacity
• value of CriticalDamageThreshold
• value of BrokenWheelDamageMultiplier
• price of the suspension
• parameters for unlocking this suspension in the game

3.4. XML of the Engine Class (/classes/engines)


DamageCapacity and other engine damage parameters, fuel consumption coefficient, torque
strength, and so on.

3.5. XML of the Gearbox Class (/classes/gearboxes)


Information on the gearbox damage, fuel consumption coefficient, info on gears.

3.6. XML of Material Customization


(/classes/customization_presets/customization_preset.xml)
This file contains color customization presets for the truck.

22
4. Description of Wheels
There are two ways to create a wheel:

1. You can create the wheel as a whole. I.e., in this case, the tire and the rim are the single
entity.
2. You can create a particular sort of a wheel (i.e. a set of wheels), which will contain
several interchangeable tires and rims.

Fbx и XML files of meshes for wheels, tires, and rims are located in the following folder:
/meshes/wheels

XML files of the classes of the wheel or the set of the wheels are located in the following folder:
/classes/wheels

4.1. A wheel as a single entity


The Fbx file of the wheel contains the whole geometry of the left wheel. Which part of the wheel
is a tire (that can be deformed) and which part is the rim - is determined by the parameter in the
XML file of the mesh of the wheel. The XML of the class contains all characteristics of the
wheel, such as the following: friction, tire stiffness, wheel mark, the mass of the wheel, radius
and width of the wheel in Havok.

If the wheels of the truck are described in this way, then they cannot be changed. Moreover, in
this case, there are no tire and wheel selection options in the menu of the garage.

4.2. A wheel as a set of tires and rims


A single Fbx file contains either one or two tires, or one or two rims. When geometry is created
for the wheels that are single for all axes of the truck (as on most scouts), then the Fbx file will
contain only one tire (named “tire”) or only one rim (named “rim”). In the case of twin wheels
(typically, rear wheels of a truck), the Fbx file will contain two tires or two rims.

23
Sometimes, the vehicle has mixed types of wheels. E.g., the truck can have twin rear wheels and
single front wheels.

In this case, the Fbx contains both geometry of the single wheel tire (rim) named as “tire_front”
(“rim_front”) and the twin wheel geometry named as “tire_back” (“rim_back”).
In this case, these names (“tire_front”/“rim_front” and “tire_back”/“rim_back”) for these
elements are strictly necessary, since this allows us to correctly determine the type of the wheel
and use the same tread pattern or disk geometry during customization.

XML of the mesh contains only the information on the materials.


XML of the class contains a description of characteristics of all tires and rims that are available
within this type of wheel.

24
5. XML Structure

5.1. Main Principles


• The names of tags, attributes, and values are case-sensitive.
• All values of attributes, including numeric values, must be in quotation marks.
• XML has a hierarchy of tags. Any tag has its own place in the general hierarchy and must
not violate it.
• Each opened tag must be closed.
o If a tag is located on the lowest level of hierarchy, it is written in the form similar
to:

<TagName Attr1="a" Attr2="b" />

o If a tag has children tags, it is written in the form similar to:

<TagName Attr1="a" Attr2="b">


children Tags
</TagName>

• The order of tags that are located on the same level in hierarchy is typically not
important. However, there are exceptions from this rule that will be discussed separately.
• Each tag has its own particular set of attributes. Any attribute of a tag can be either
mandatory or optional.
• Tags with the same name, but with different parent tags - have different purposes.
• You can use common and local templates (_templates) in the XML file.
• An XML file can be inherited from another XML file (_parent) that is located in the
same folder.

5.2. Mesh of the Truck: Tags in the XML file


5.2.1. Minimum set
<CombineXMesh>
<Material />
</CombineXMesh>

5.2.2. All tags


<_templates />
<_parent />
<CombineXMesh>
<SocketPoints>
<SocketPoint />
</SocketPoints>
<MaterialOverrides>
<MaterialOverride />
</MaterialOverrides>
<Material />
</CombineXMesh>

25
5.3. Mesh of the Wheel: Tags in the XML file
5.3.1. Wheel as a single entity
<CombineXMesh Type="Wheel">
<WheelMesh/>
<Material />
</CombineXMesh>

5.3.2. Tire or Rim


<CombineXMesh Type="Wheel">
<Material />
</CombineXMesh>

5.4. Classes of the Truck & Addons: Tags


5.4.1. Truck

5.4.1.1. Minimum set

<Truck>
<TruckData>
<Wheels>
<Wheel/>
</Wheels>
<SuspensionSocket />
<GearboxSocket />
<EngineSocket />
<CompatibleWheels />
</TruckData>
<PhysicsModel>
<Body />
</PhysicsModel>
</Truck>

5.4.1.2. All tags

<_templates />
<_parent />
<Truck>
<TruckData>
<Winch/>
<Wheels>
<Wheel/>
</Wheels>
<SuspensionSocket />
<SteeringWheel />
<SteeringRack />

26
<Steam />
<SoundsWheels>
<WheelWater />
<WheelSteer />
<WheelSpinning />
<WheelMud />
<WheelExtrude />
<WheelDamaged />
<WheelChains />
<WaterHit />
</SoundsWheels>
<SoundsDamage>
<Wheels />
<Suspension />
<Gearbox />
<FuelTank />
<Engine />
<Critical />
<Common />
</SoundsDamage>
<Sounds>
<Honk />
<Handbrake />
<HandbrakeOff />
<BrakePull />
<BrakeRelease />
<BrakesSqueal />
<Reverse />
<Gear />
<EngineTrans />
<EngineAccel />
<EngineRev />
<EngineStart />
<EngineStop />
<EngineIdle />
<EngineIdle_2d />
<EngineLow />
<EngineLow_2d />
<EngineHigh />
<EngineHigh_2d />
<EngineHeavy />
<EngineHeavy_2d />
<EngineTurbo />
<DiffLock />
<ChassisStress />
<AWD />
<AbruptStop />
</Sounds>
<Shakers>
<Shaker />
</Shakers>
<Shafts>
<Shaft />
</Shafts>
<OcclusionMap />
<Messages />
<LimitedFluid />
<Intake />
<GearboxSocket />
<FuelTank />

27
<Exhaust />
<EngineSocket />
<Driver />
<Dashboard>
<Gauge />
</Dashboard>
<Damage>
<DamageArea />
</Damage>
<CompatibleWheels />
<Camera>
<Cockpit>
<Rear />
<Mirror />
<SecondaryView />
</Mirror>
</Cockpit>
</Camera>
<Axles>
<Axle />
</Axles>
</TruckData>
<Snorkel />
<Rotator />
<PhysicsModel>
<NetSync />
<Body>
<Body>
<Constraint>
<Motor />
<PlaneMotor />
<ConeMotor />
<TwistMotor />
<AllMotor />
</Constraint>
</Body>
</Body>
</PhysicsModel>
<ModelAttachments>
<StopSignals>
<Model />
<Light />
<Flare />
</StopSignals>
<ReverseSignals>
<Model />
<Light />
<Flare />
</ReverseSignals>
<Ignition>
<Model />
<Light />
<Flare />
</Ignition>
<HeadLight>
<Model />
<Light />
<Flare />
</HeadLight>
</ModelAttachments>

28
<Landmark />
<HeadLight />
<GameData>
<WinchSocket />
<UiDesc />
<CustomizationCameras>
<CameraPos />
<CustomizationCameras />
<CraneSocket />
<AddonSockets>
<Socket>
<ExtraParent />
<AddonsShift />
</Socket>
<AddonSockets />
<AddonSlots />
</GameData>
<ControlledConstraints>
<Constraint />
</ControlledConstraints>
<AutomaticIK>
<IKBone>
<IKJoint />
<IKBone>
<IKJoint />
</IKBone>
</IKBone>
</AutomaticIK>
</Truck>

5.4.2. Suspension
<_templates />
<_parent />
<SuspensionSetVariants>
<SuspensionSet>
<Suspension WheelType="front"/>
<Suspension WheelType="rear"/>
<GameData>
<UiDesc/>
</GameData>
</SuspensionSet>
</SuspensionSetVariants>

5.4.3. Engine
<_templates />
<_parent />
<EngineVariants>
<Engine>
<GameData>
<UiDesc />
</GameData>
</Engine>
</EngineVariants>

29
5.4.4. Gearbox
<GearboxVariants>
<Gearbox>
<ReverseGear />
<HighGear />
<Gear />
<GameData>
<GearboxParams />
<UiDesc />
</GameData>
</Gearbox>
</GearboxVariants>

5.4.5. Trailer

5.4.5.1. Minimum set

<Truck Type="Trailer">
<TruckData>
<Wheels>
<Wheel />
</Wheels>
<Constraint />
<TruckData>
<PhysicsModel>
<Body />
</PhysicsModel>
</Truck>

5.4.5.2. All tags

<_templates />
<_parent />
<Truck Type="Trailer">
<TruckData>
<Wheels>
<Wheel />
</Wheels>
<OcclusionMap />
<LimitedFluid />
<Constraint>
<Motor />
<PlaneMotor />
<ConeMotor />
<TwistMotor />
<AllMotor />
</Constraint>
<CompatibleWheels />
<Camera />
<Axles>
<Axle />
</Axles>
<TruckData>
<PoweredConstraints>
<Group />

30
</PoweredConstraints>
<PhysicsModel>
<NetSync />
<Body>
<Body>
<Constraint>
<Motor />
<PlaneMotor />
<ConeMotor />
<TwistMotor />
<AllMotor />
</Constraint>
</Body>
</Body>
</PhysicsModel>
<ModelAttachments>
<StopSignals>
<Model />
<Light />
<Flare />
</StopSignals>
<ReverseSignals>
<Model />
<Light />
<Flare />
</ReverseSignals>
<Ignition>
<Model />
<Light />
<Flare />
</Ignition>
</ModelAttachments>
<Landmark />
<GameData>
<WinchSocket />
<UiDesc />
<RequiredAddon />
<InstallSocket />
<CraneSocket />
<AddonSlots />
</GameData>
<FuelMass>
<Body />
</FuelMass>
<WaterMass>
<Body />
</WaterMass>
<AutomaticIK>
<IKBone>
<IKJoint />
<IKBone>
<IKJoint />
</IKBone>
</IKBone>
</AutomaticIK>
</Truck>

31
5.4.6. Addon

5.4.6.1. Minimum set

<TruckAddon>
<PhysicsModel />
<GameData>
<InstallSocket />
</GameData>
</TruckAddon>

5.4.6.2. All tags

<_templates />
<_parent />
<TruckAddon>
<WheelRepairsHide>
<Mesh />
</WheelRepairsHide>
<RepairsHide>
<Mesh />
</RepairsHide>
<FuelHide>
<Mesh />
</FuelHide>
<Vibrator />
<TruckData>
<Shakers>
<Shaker />
</Shakers>
<Intake />
<LimitedFluid />
<Damage>
<Multiplier />
</Damage>
</TruckData>
<Snorkel />
<Rotator />
<PoweredConstraints>
<Group>
<Constraint/>
</Group>
<Chain>
<Group>
<Constraint />
</Group>
</Chain>
</PoweredConstraints>
<PhysicsModel>
<NetSync />
<Body>
<Constraint>
<Motor />
<PlaneMotor />
<ConeMotor />
<TwistMotor />
<AllMotor />
</Constraint>
</Body>
32
</PhysicsModel>
<ModelAttachments>
<Lightbar>
<Model />
<Light />
<Flare />
</Lightbar>
<StopSignals>
<Model />
<Light />
<Flare />
</StopSignals>
<ReverseSignals>
<Model />
<Light />
<Flare />
</ReverseSignals>
<Ignition>
<Model />
<Light />
<Flare />
</Ignition>
<MainHeadLight>
<Model />
<Light />
<Flare />
</MainHeadLight>
</ModelAttachments>
<MainHeadLight />
<GameData>
<UiDesc />
<RequiredAddonType />
<RequiredAddon />
<InstallSocket />
<InstallSlot />
<Sounds />
<SoundPoweredGroupStop />
<SoundPoweredGroupStart />
<SoundPoweredGroupLoop />
<SoundIKStop />
<SoundIKStart />
<SoundIKLoop />
<SoundOpenStart />
<SoundOpenLoop />
<SoundOpenStop />
<SoundClose />
<CraneSourceSocket />
<Chain>
<Group>
<Constraint />
</Group>
<Chain>
<AddonType />
<AddonSlots />
</GameData>
<FuelMass>
<Body />
</FuelMass>
<WaterMass>
<Body />

33
</WaterMass>
<ExplicitParents>
<ExplicitParent />
</ExplicitParents>
<Exhaust />
<ControlledIK>
<Chain>
<ConstraintStartPosition />
</Chain>
</ControlledIK>
<AutomaticIK>
<IKBone>
<IKJoint />
<IKBone>
<IKJoint />
</IKBone>
</IKBone>
</AutomaticIK>
<AddonCamera />
<ActionGroups>
<Group>
<Vibrator />
<Rotator/>
<Attachment/>
</Group>
</ActionGroups>
</TruckAddon>

5.5. Class of the Wheel: Tags


5.5.1. Wheel as single entity
<_templates />
<_parent />
<TruckWheel>
<WheelTracks />
<WheelSoftness />
<WheelFriction />
</TruckWheel>

5.5.2. Set of tires and rims


<_templates />
<_parent />
<TruckWheels>
<TruckTires>
<TruckTire>
<WheelTracks />
<WheelTracks Rear="true"/>
<WheelSoftness />
<WheelFriction />
<GameData>
<UiDesc/>
</GameData>
</TruckTire>
<TruckTires>
<TruckRims>

34
<TruckRim>
<GameData>
<UiDesc />
</GameData>
</TruckRim>
</TruckRims>
</TruckWheels>

5.6. Templates (_templates)


A template is a piece of XML code that can be reused. Both a single tag with predefined
parameters and the whole hierarchy of tags can be used as a template.

The _templates tag has only one attribute - Include.

This attribute enables the current XML file to use templates from the following folder:
.../_templates
The value of this attribute is the name of the particular template from this folder that you want to
use.

For example: <_templates Include="trucks">

The .../_templates/trucks.xml file contains common templates for trucks, addons, and trailers.

Templates can be either included from the external files using Include or described as children
of the _templates tag directly inside the XML with which we work.
Any existing tags can be used as children of the _templates tag.

<_templates Include="trucks">
<WheelRepairsHide>
<TemplateName1 />
</WheelRepairsHide>
<RepairsHide>
<TemplateName2 />
</RepairsHide>
<FuelHide>
<TemplateName3 />
<TemplateName4 />
</FuelHide>
...
</_templates>

5.6.1. Sample template and its usage

Below we describe the template of the Wheel tag, named as MyTemplate1:

<_templates>
<Wheel>
<MyTemplate1 HardpointY="0.5" HardpointZ="0.5" />
</Wheel>
</_templates>

35
After that, we can use this template in the description of the truck via the _template attribute of
the Wheel tag:

<Truck>
<TruckData>
<Wheels>
<Wheel _template="MyTemplate1" HardpointX="1"/>
</Wheels>
...
</TruckData>
...
</Truck>

The same piece of XML without the template will look like the following:

<Truck>
<TruckData>
<Wheels>
<Wheel HardpointX="1" HardpointY="0.5" HardpointZ="0.5"/>
</Wheels>
...
</TruckData>
...
</Truck>

5.6.2. Repeated usage

The same template can be used multiple times:

<Truck>
<TruckData>
<Wheels>
<Wheel _template="MyTemplate1" HardpointX="1" />
<Wheel _template="MyTemplate1" HardpointX="1" RightSide="true"/>
<Wheel _template="MyTemplate1" HardpointX="-1" />
<Wheel _template="MyTemplate1" HardpointX="-1" RightSide="true"/>
</Wheels>
...
</TruckData>
...
</Truck>

The same piece of XML without the template will look like the following:

<Truck>
<TruckData>
<Wheels>
<Wheel HardpointX="1" HardpointY="0.5" HardpointZ="0.5"/>
<Wheel
HardpointX="1"
RightSide="true"
HardpointY="0.5"
HardpointZ="0.5"
/>
36
<Wheel HardpointX="-1" HardpointX="1" HardpointY="0.5"/>
<Wheel
HardpointX="-1"
RightSide="true"
HardpointY="0.5"
HardpointZ="0.5"
/>
</Wheels>
...
</TruckData>
...
</Truck>

5.6.3. Templates for multiple tags

Declaration of templates for multiple tags of different types looks like the following:

<_templates>
<Wheel>
<MyTemplate1 HardpointY="0.5" HardpointZ="0.5" />
</Wheel>
<Body>
<MyTemplate2 Mass="1"/>
<MyTemplate3 Mass="5"/>
</Body>
</_templates>

Where MyTemplate1 - is the template of Wheel tag, and MyTemplate2, MyTemplate3 - are two
different templates for the Body tag.

5.6.4. Template for a hierarchy of tags

A template may contain a whole hierarchy of tags.


For example:

Declaration of the template:

<_templates>
<Body>
<MyTemplate3 Mass="5">
<Constraint Type="Hinge" MinLimit="-1" MaxLimit="1">
<Motor Damping="0.3" Spring="25" Type="Spring" />
</Constraint>
</MyTemplate3>
</Body>
</_templates>

Its usage:

<Truck>
<PhysicsModel Mesh="trucks/example_truck">
<Body _template="MyTemplate3">
</Body>
</PhysicsModel>
...
<Truck>
37
The same piece of XML without the template will look like the following:

<Truck>
<PhysicsModel Mesh="trucks/example_truck">
<Body Mass="5">
<Constraint Type="Hinge" MinLimit="-1" MaxLimit="1">
<Motor Damping="0.3" Spring="25" Type="Spring" />
</Constraint>
</Body>
</PhysicsModel>
...
<Truck>

5.6.5. Overrides for attribute values

If both a template and a tag that links to it use the same attribute and the tag contains the value of
this attribute, then the value specified in the tag will override the value from the template.

For example, in the following XML piece, the value of the HardpointY attribute from the
template is overwritten by the value of the same attribute from the tag:

<_templates>
<Wheel>
<MyTemplate1 HardpointY="0.5" HardpointZ="0.5" />
</Wheel>
</_templates>
<Truck>
<TruckData>
<Wheels>
<Wheel _template="MyTemplate1" HardpointX="1" HardpointY="1" />
</Wheels>
...
</TruckData>
...
</Truck>

So, this piece of XML without the template will look like the following:

<Truck>
<TruckData>
<Wheels>
<Wheel HardpointX="1" HardpointY="1" HardpointZ="0.5" />

</Wheels>
...
</TruckData>
...
</Truck>

38
5.6.6. Extension of the hierarchy

You can add or change attributes or tags in the piece of XML provided by the template.
However, when a template describes some hierarchy of tags and you need to add or change an
attribute or tag, you will need to recreate all hierarchy of its parent tags.

For example:

<_templates>
<Body>
<MyTemplate4 Mass="5">
<Constraint Type="Fixed" />
<Body Mass="1">
<Constraint Type="Hinge" />
<Body Mass="2">
<Constraint Type="Ragdoll" />
</Body>
</Body>
</MyTemplate4>
</Body>
</_templates>
<Truck>
<PhysicsModel Mesh="trucks/example_truck">
<Body Mass="10">
<Body _template="MyTemplate4">
<Body>
<Body>
<Constraint AxisLocal="(1; 0; 0)" />
</Body>
</Body>
</Body>
<Body _template="MyTemplate4">
<Body>
<Body>
<Body Mass="0.1">
<Constraint Type="Fixed" />
</Body>
</Body>
</Body>
</Body>
</Body>
</PhysicsModel>
...
</Truck>

The same piece of XML without the template will look like the following:

<Truck>
<PhysicsModel Mesh="trucks/example_truck">
<Body Mass="10">
<Body Mass="5">
<Constraint Type="Fixed" />
<Body Mass="1">
<Constraint Type="Hinge" />
<Body Mass="2">
<Constraint AxisLocal="(1; 0; 0)" Type="Ragdoll" />
</Body>

39
</Body>
</Body>
<Body Mass="5">
<Constraint Type="Fixed" />
<Body Mass="1">
<Constraint Type="Hinge" />
<Body Mass="2">
<Constraint Type="Ragdoll" />
<Body Mass="0.1">
<Constraint Type="Fixed" />
</Body>
</Body>
</Body>
</Body>
</Body>
</PhysicsModel>
...
</Truck>

5.6.7. Removal of attributes and tags inherited from the template

Each tag has the _noinherit and _inheritRemove attributes:

• _noinherit="true" - removes attributes and child tags (inherited from the template)
from the tag where it is used.
• _inheritRemove="true" - removes the tag itself.

For example:

<_templates>
<Body>
<MyTemplate4 Mass="5">
<Constraint Type="Fixed" />
<Body Mass="1">
<Constraint Type="Hinge" />
<Body Mass="2">
<Constraint Type="Ragdoll" />
</Body>
</Body>
</MyTemplate4>
</Body>
</_templates>
<Truck>
<PhysicsModel Mesh="trucks/example_truck">
<Body Mass="10">
<Body _template="MyTemplate4">
<Body _noinherit="true" ImpactType="Truck">
<Constraint Type="Prismatic" />
</Body>
</Body>
<Body _template="MyTemplate4">
<Body _inheritRemove="true" />
</Body>
</Body>
</PhysicsModel>
...
</Truck>

40
The same piece of XML without the template will look like the following:

<Truck>
<PhysicsModel Mesh="trucks/example_truck">
<Body Mass="10">
<Body Mass="1">
<Constraint Type="Fixed" />
<Body ImpactType="Truck">
<Constraint Type="Prismatic" />
</Body>
</Body>
<Body Mass="1">
<Constraint Type="Fixed" />
</Body>
</Body>
</PhysicsModel>
...
</Truck>

5.7. Inheritance (_parent)


An XML file can be inherited from another XML file.

Working with inheritance is similar to working with templates. I.e., you can change, add, or
remove any tags, attributes, and values of the parent XML file. To access a specific tag, you
must recreate the hierarchy of its parent tags.

For example:
We havе the following sample files: .../classes/trucks/example_parentfile.xml and
.../classes/trucks/example_truck.xml

example_parentfile.xml:

<Truck>
<PhysicsModel Mesh="trucks/example_parentfile">
<Body Mass="10">
<Body Mass="1">
<Constraint Type="Fixed" />

</Body>
<Body Mass="2">
<Constraint Type="Prismatic" />
</Body>
</Body>
</PhysicsModel>
...
</Truck>

example_truck.xml:

<_parent File="example_parentfile" />

41
<Truck>
<PhysicsModel Mesh="trucks/example_truck"/>
</Truck>

In this example, the contents of the example_truck.xml are equivalent to the following:

<Truck>
<PhysicsModel Mesh="trucks/example_truck">
<Body Mass="10">
<Body Mass="1">
<Constraint Type="Fixed" />
</Body>
<Body Mass="2">
<Constraint Type="Prismatic" />
</Body>
</Body>
</PhysicsModel>
...
</Truck>

42
6. Tags and their Parameters
All tags have the inheritRemove="true" and _noinherit="true" parameters (see 5.6.7.
above), so these parameters will no longer be mentioned below.

All tags are described in the sections that follow, starting with Section “7. <CombineXMesh>”.
The hierarchy of subsections in these sections (starting with Section 7) corresponds to the
hierarchy of tags.

NOTE: When describing attributes, we will mark mandatory attributes with *.

43
7. <CombineXMesh>
The root tag of the XML file of the Mesh.

In general, this tag is a root tag in all XML files of meshes (i.e., of model, plant, truck, etc.).
However, this document describes only tags related to trucks.

7.1. <SocketPoints>
Section that describes attachment points of shafts.

For a detailed description of the shaft, see: "8.1.11.1. <Shaft>".

7.1.1. <SocketPoint>

The attachment point of the shaft.

Attributes:

• Name="Shaft1a"
Name, used for the description of the shaft in the class of the truck.

• Pos="(1.595; 1.172; -0.004)"


Position.

7.2. <Material>
Material.

How the materials in SnowRunner are different from MudRunner ones

• Unlike MudRunner, this tag describes exactly the material assigned in the Fbx file and
not the material assigned to a specific MeshPart. Therefore, the material that was
specified in the tag will be applied to all the meshes to which it was assigned in the Fbx
file.
• The shading has changed. Previously, the “diffuse-specular” shading of models was used.
Now, PBR materials are used.
• The snow cover effects of the surfaces were added.

Material Maps

All files of the maps must be in the tga format. The naming of map files is strictly defined,
postfixes in their file names indicate the type of data inside them.
The name of the file is formed according to the following pattern: name__postfix.tga
where:

• name - any name that does not include two underscores in a row (no “__” inside it).
• postfix - defines the type of the data.
44
__postfix Type of Texture Parameter in XML
__d Albedo Map AlbedoMap
__d_a Albedo Map + Alpha AlbedoMap
__n_d Normal Map NormalMap
__sh_d Shading Map ShadingMap
__em_d Emissive Map EmissiveMap

WARNING: The naming scheme for textures described above is mandatory. This naming
scheme is necessary to enable streaming for textures of the mod, which may be essential.
Particularly, mods with wrong naming of textures result in memory leaks on consoles and will
not receive approval for them.

NOTE: In most cases, the Alpha channel of the Albedo Map is used for transparency or "hard
transparency" (using AlphaKill="true", see description of the attributes below). However, for
wheels of the truck, the Alpha channel of the Albedo Map is related to the behavior of the mud
or snow chunks that can stick to wheels. In this case, low values (e.g. black color) in the Alpha
channel result in the behavior when the snow or dirt chunks stick to the wheel surface.

Note on the parameters of snow cover effect in SnowRunner:

In SnowRunner, the snow cover effect actually consists of two independent effects:

• snow layer - this effect corresponds to the white layer of snow on top of the surface (i.e.
accumulated falling snow). Parameters of this effect have the SnowUp... prefix (see in
the list of attributes below).
• snow powder - this effect corresponds to snowflakes that cling to the surface on many
sides: e.g., on the sides, under the bottom, etc. Parameters of this effect have the
Snowify... prefix (see the list of attributes below).

Attributes:

• Name="mod_scout_mat"
Name corresponding to the name of the material in the Fbx file.

• AlbedoMap="trucks/mod_scout__d.tga"
Texture with basic surface color (RGB). Optional alpha (A) can be used either as a hard
opacity mask for the alpha test (see AlphaKill below) or as a transparency mask (see
Blending below).

• AlphaKill="true"
Hard transparency mode that uses the black and white mask from the alpha channel of the
AlbedoMap texture. Default value: false. For example, this parameter is needed to make
a protective grid of the radiator.

• Blending="alpha"
The mode of blending for surface materials when they are rendered. Possible values:
“none”, “alpha”, and “additive”. The “alpha” value enables the regular transparency of
the material. The "additive" value is not used for trucks. By default, the “none” value is
used.

45
• NormalMap="trucks/mod_scout__n_d.tga"
The normal map in the tangent space (RGB). The green color corresponds to the bottoms
of the embossments.

• NormalScale="1"
Coefficient of influence for the NormalMap texture. Default value: 1.0

• ShadingMap="trucks/mod_scout__sh_d.tga"
Specifies map for the PBR shading data:
o R - metalness: metalness of the surface (0 = dielectric, 1 = metal).
o G - roughness: the roughness of the surface (0 = perfectly smooth surface, 1 =
extremely rough surface).
o B - ambient occlusion mask: shading mask for the ambient light (0 = completely
occluded, 1 = not occluded at all).

• MetalnessScale="1"
А multiplier for the metalness value from the ShadingMap texture.
I.e., metalness = metalness * MetalnessScale
Value range: [0.0 - 1.0]
Default value : 1.0

• MetalnessВias="0"
Shift for the metalness value from the ShadingMap texture.
I.e., metalness = metalness + MetalnessBias
Value range: [0.0 - 1.0]
Default value : 0.0

• RoughnessScale="1"
Multiplier for the roughness value from the ShadingMap texture.
I.e., roughness = roughness * RoughnessScale
Value range: [0.0 - 1.0]
Default value : 1.0

• RoughnessВias="0"
Shift for the roughness value from the ShadingMap texture.
I.e., roughness = roughness + RoughnessBias
Value range: [0.0 - 1.0]
Default value : 0.0

• AmbientOcclusionIntensity="1"
Coefficient of influence for the ambient light shading mask from the ShadingMap
texture. Default value: 1.0

• ReflectivityMultiplier="1"
Multiplier that increases the intensity of reflections on the material.
Default value: 1.0

• EmissiveMap="trucks/mod_scout__em_d.tga"
Emissive color of the surface (RGB). If the texture is absent, the surface will not be
emissive. This effect is not supported for transparent PBR materials (glass, etc.).
The emissive effect is enabled when the ignition is turned on.

46
• SnowUpIntensity="10"
Intensity of the snow cover on the surface.
Default value: 10.0

• SnowUpNormalsSpace="object"
The snow overlay mode. For moving, dynamic objects, use the "object" mode. Possible
values: “world”, “object”, “foliage”. Default value: “world”.

• SnowUpNoiseIntensity="0"
Intensity of the noise pattern used during the creation of the snow layer.
Default value: 0.0

• SnowUpNoiseScale="0.5"
Noise frequency of the snow layer.
Default value: 0.5

• SnowUpAngleRange="45"
The maximum angle of deviation of the surface normal from the upwards vector, at
which a snow layer will be applied.
Default value: 45.

• SnowUpFlatten="0"
The leveling coefficient for the original normal map (in the area of the surface where the
snow layer was applied).
Value range: [0.0 - 1.0]
Default value: 0.0

• SnowifyNoiseIntensity="40"
The intensity of the effect of snow powder on the surface.
Default value: 0.0

• SnowifyNoiseIntensityShift="40"
The coefficient that increases the influence of the shading mask for the ambient light on
the intensity of snow powder.
Default value: 0.0

• SnowifyNoiseTilingMult="1"
The tiling effect multiplier for snow powder.
Default value: 1.0

• ForceSnowUnderwater="true"
If enabled, this parameter forces snow overlay even after the surface is submerged in
water. By default, the snow overlay is cleaned in these cases.

• DOFOrder="DistanceBased"
Currently not used in the game.

7.3. <MaterialOverrides>
Section responsible for material customization.

47
For information on color customization for the truck - see 15. Color Customization below.
For info on the <MaterialOverrides> tag - see 15.1.1. <MaterialOverrides> below.

7.3.1. <MaterialOverride>

The override of the material. See 15.1.1.1. <MaterialOverride> below.

48
8. <Truck>
The root tag in the files of classes of the truck and trailer.

Attributes:

• Type="Trailer"
This attribute specifies whether the truck or the trailer is described.

• AttachType="Saddle"
This attribute is used for trailers and semitrailers only. It defines the attachment type
used when the trailer or semitrailer is attached to the truck. It is important to specify the
value of this attribute correctly since it affects the mechanics of respawning of the trailer
or the semitrailer after passing through the Gateway. Particularly, to respawn the trailer
or the semitrailer and correctly attach them to a truck after that, the game needs to
specifically position them relative to the truck. To do so, the game needs to know how
the trailer/semitrailer is attached to the truck: via the drawbar, or via the saddle.
Incorrectly specified AttachType can lead to wrong behavior and issues after passing
Gateways.
Possible values of this attribute are the following:

o "Drawbar" – means that the attachment is performed via the drawbar. This is the
default value of the attribute, and this value is also used if the attribute is omitted.
Typically, most of the trailers (not semitrailers) use this type of attachment.

o "Saddle" – means that the attachment is performed via the saddle. Typically,
most of the semitrailers (not regular trailers) use this type of attachment.

NOTE #1: Most of the trailers for scouts are attached via the drawbar (to a trailer
hitch), so this attribute can be typically omitted for them. However, if you create a
custom trailer for a scout that will be attached via the saddle, you will need to set
the corresponding value of the AttachType attribute for it.

NOTE #2: When modelling collision meshes for bones of a saddle do not make
them too thin (as illustrated below). Too thin saddles can cause collision issues.
This is a general rule that applies to most of other collision meshes too.

WARNING: This attribute was added in DLC 5 (“Season 5: Build & Dispatch”) and,
starting with this update, the game will take the value of this attribute into account. So, if
49
it is absent for a trailer/semitrailer, the game will consider that it has the "Drawbar"
attachment type. If it is not correct for your trailer/semitrailer mods, you will need to
explicitly specify the correct AttachType value in their configuration. This is especially
actual for authors of semitrailer mods since most of the semitrailers must have the
AttachType="Saddle" value (otherwise they may have issues while being spawned after
Gateways). However, created mods of trailers with the drawbar attachment require no
additional actions and can be left unchanged.

• OriginalTruck="chevy_apache"
This attribute allows you to link your truck mod to the original truck available in-game or
within a particular DLC by specifying its identifier as the value of the attribute.
If you link your truck mod to a truck available in a DLC, your mod will be available only
for players who have purchased this DLC. See 16. Modding of DLC Trucks for details.

• FarmingTrailerType="Cultivator"
This attribute marks that this trailer can be used for farming and specifies its particular
(farming) sub-type. This attribute with one of 3 possible values is mandatory for all
farming trailers. Not used for trucks and non-farming types of trailer.
Possible values:
o "Cultivator" – this farming trailer type is typically used for cultivating the
farming area, to make the ground plowed.
o "Planter" – this farming trailer type is typically used for planting the vegetation
on the farming field.
o "Harvester" – this farming trailer type is typically used for harvesting the
farming field.

NOTE: Along with FarmingTrailerType, you will also need to add a certain
amount of FarmingBoundingBox.. tags for all parts of the trailer that interact
with the farmimg field. For more details, see 18. Farming Trailers below.

8.1. <TruckData>
Description of most properties of the truck itself (not including properties related to bone
behavior).

Attributes:

• BackSteerSpeed="0.015"
* After turning, wheels return to their original position. This parameter is the speed with
which they return to this position. Value: [0.0:1.0].

• DiffLockType="Installed"
Differential lock. Values: Always. Any other values are not read by the system (they are
used purely for easier understanding whether or not the truck has a diff lock addon
(Installed, Uninstalled, None).

• EngineIconMesh="env/engine_default"
Path to the file of the semitransparent engine .../meshes/env/engine_default.fbx

50
• EngineIconScale="1.3"
Scale of semitransparent engine.
Value: (0.0: 8.0].

• EngineStartDelay="0.8"
Delay for the start of the engine (after the player clicks the button that starts it).
Value: [0.0: 8.0].

• ExhaustStartTime="0.9"
Start time for the visualization of the exhaust. No explicit limit for the value here.

• FuelCapacity="280"
The capacity of the fuel tanks. Integer values only.
o For a truck: No explicit limit for the value.
o For an addon: [0:64000].

• Responsiveness="0.3"
* Responsiveness of the steering wheel. Value: [0.0: 1.0].

• SteerSpeed="0.025"
* Steering speed of the steering wheel. Value: [0.0: 1.0].

• TruckImage="cat_ct680_image"
The icon of the truck for the garage.
NOTE: Usage of this attribute for modding is currently under development.

• TruckType="HEAVY_DUTY"
Values: HEAVY, HEAVY_DUTY, HIGHWAY, OFFROAD, SCOUT, SPECIAL

Along with the attributes listed above, there is also a set of attributes for status markers displayed
for various parts of the truck:

51
These attributes specify the offsets for these markers:

• EngineMarkerOffset="(0.0;0.0;0.0)"
Offset for the status marker of the engine.

• FueltankMarkerOffset="(-3.0;0.0;0.0)"
Offset for the status marker of the fuel tank.

• SuspensionMarkerOffset="(-1.0;0.0;-0.5)"
Offset for the status marker of the suspension.

• GearboxMarkerOffset="(-1.5;0.0;0.0)"
Offset for the status marker of the gearbox.

If values of these attributes are not specified, then:

• Status markers of wheels will be attached to wheel sockets.


• The status marker of the suspension will be attached to the geometric center between the
wheels.
• The status marker of the gearbox will be attached to 0 (it will be displayed in the area of
the rear axle).
• The status marker of the engine will be attached to the center of its DamageArea.
• The status marker of the fuel tank will be attached to the center of its DamageArea.

8.1.1. <Winch>

Parameters of the winch.


52
• Length="14"
Maximum length of the winch rope. Value: [0.0: 100.0], by default: 14.

• StrengthMult="1.3"
Winch power. Value: [0.0: 10.0], by default: 1.

8.1.2. <Wheels>

Section that describes wheels.

Attributes of this tag may contain information about the default tire and rim. All wheels of the
truck are described in the form of child tags of this tag.

Attributes:

In case of wheels as “sets of tires and rims”:

• DefaultRim="rim_1"
The name of the default rim specified in the file referenced by DefaultWheelType

• DefaultTire="highway_1"
The name of the default tire specified in the file referenced by DefaultWheelType

• DefaultWheelType="wheels_example"
The name of the default class of the wheels .../classes/wheels/wheels_example.xml

In case of wheels as “single entities”:

• N/A

8.1.2.1. <Wheel>

Description of a particular wheel.

Attributes:

• Pos="(-3; 1.2; 1.5)"


* Position of the left wheel (The Z coordinate must be positive).

• RightSide="true"
This parameter makes the right wheel from the left one. (The rim of the wheel is rotated
and the tread pattern remains turned in the correct direction). The Z-axis position will be
negative.

• ParentFrame="BoneCabin_cdt"
The bone (from the hierarchy of the physical model), which the wheel is attached to. If
the parameter is not specified, the wheel will be attached to the root bone of the physical
model.

• ConnectedToHandbrake="true"
The wheel participates in braking when the player presses SPACE.
53
• Location="front"
Values: front and rear. This parameter is used for wheels of the mixed type (see 4.2.) to
identify whether this is a front wheel or a rear one. By default, the value of this parameter
is front.

• Torque="default"
Torque strength.
Values:
o default - this wheel is always a driving one.
o full - this wheel is a driving one only then the all-wheel drive is enabled.
o none - this wheel is not a driving one.
o connectable - whether the wheel is a driving one is defined by the
AllWheelDriveInstalled parameter of the addon installed to the transfer case.

• SteeringAngle="40"
Maximum steering angle when steering.
Value: [-90.0: 90.0], by default: 0.

• SteeringCastor="8"
The angle of inclination of the wheel in the direction of rotation, along the OX axis. OX -
is the axis going in the direction of the truck movement. (The wheel will be inclined
when turning, as shown in the picture below.)
Value: [0: 45.0], by default: 0.

• SteeringJointOffset="0.23"
The distance along the Z axis from the center of the wheel to the turning point of the
wheel.
Value: [-1000.0: 1000.0], by default: fWidth*0.4, where fWidth is the width of the
wheel set in the class of the wheel by the Width attribute of the TruckWheel tag.

• SuspensionMin="-0.25"
Minimum value of the suspension drawdown. Value: [-1000.0: 1000.0], by default 0.
* This parameter is used and is obligatory only when describing the wheel “as a single
entity” (for wheels “as a set of tires and rims”, this value is taken from the XML class of
the suspension: <Suspension SuspensionMin="-0.25"> ).
54
• SuspensionHeight="0.25"
Height of the suspension.
This parameter is used only when describing the wheel “as a single entity” (for wheels
“as a set of tires and rims”, this value is taken from the XML class of the suspension:
<Suspension Height="0.15">).
• SuspensionStrength="0.2"
The stiffness of the suspension. Value: [0.0: 1000.0], by default: 0.
* This parameter is used and is obligatory only when describing the wheel “as a single
entity” (for wheels “as a set of tires and rims”, this value is taken from the XML class of
the suspension: <Suspension Strength="0.15"> ).
• Type="trailer_sideboard_2"
* The name of the file of the wheel. This parameter is used and is obligatory only when
describing the wheel “as a single entity” (for wheels “as a set of tires and rims”, this
value must be specified in the <CompatibleWheels Type="wheels_medium_double">
and in the <Wheels DefaultWheelType="wheels_medium_double">, if the wheel is the
default).

8.1.3. <SuspensionSocket>

Description of available suspensions.

Tag attributes contain a link to the xml class of the suspension, the name of the default
suspension (described in the suspension class), and a parameter to limit the diameter of the wheel
for a low suspension. The suspension is used only with wheels “as a set of tires and rims”.

• Type="trailer_sideboard_2"
* The name of the XML class of the suspension. In general, there can be multiple types
here, separated by commas: "trailer_sideboard_2, example_1, example_2".
However, the suspension is very individual and this is not used.
• Default="truck_example_suspension_default"
* Name of the default suspension from the XML class of the suspension
(<SuspensionSet Name="truck_example_suspension_default">).
• MaxWheelRadiusWithoutSuspension="0.3"
* Maximum radius of the wheel without the suspension. It is logical to calculate this
value as the difference between the radius of the largest wheel for the lowest suspension
and the height of the lowest suspension. (E.g., if we have Height = 0.1 for the suspension,
then the radius of the wheel that can be set will be 0.3+0.1 = 0.4 ).

8.1.4. <SteeringWheel>

Steering wheel.

The only attribute here is the bone that the steering wheel is bound to during skinning. This bone
is not part of the physical model and its behavior is different from the behavior of the other
bones. The mesh of the steering wheel is always skinned to the single bone; however, cab may
be skinned to multiple bones. The influence of the other bones on the steering wheel bone is
determined by the weights of the nearest vertex of the mesh that is skinned onto other bones.

Attribute:

55
• Frame="BoneSteering"
* The name of the bone on which the steering wheel is skinned.

8.1.5. <SteeringRack>

Steering rack.

There may be multiple tags of this type. For example, when the vehicle has two pairs of wheels
that can turn. The parameters for this tag are the following: bone of the steering rack, half of the
length of the steering rack, and the bones of the left and right hubs. These bones do not affect the
physical behavior of the vehicle, they are needed to assure that the mesh will visually follow the
turning of the wheels.

Attributes:

• Frame="BoneRack"
* The name of the bone of the steering rack.
• FrameSteerLeft="BoneRackL"
* The name of the bone of the left hub.
• FrameSteerRight="BoneRackR"
* The name of the bone of the right hub.
• RackHalfSizeZ="0.7"
* Half of the length of the steering rack. This parameter specifies half of the length since
the vehicle is typically symmetrical (and it is simply the Z coordinate).

8.1.6. <Steam>

Steam.

Visual trembling of the air when the engine is running. There may be multiple tags of this type.

Attributes:

• Origin="(3.886; 1.856; 0)"


* Position
• Scale="0.9"
Size. Value: [.1: 1], by default: 1.
56
• ParentFrame="BoneCabin_cdt"
The name of the bone from the physical model, which this effect is attached to. By
default, it is the root bone.

8.1.7. <SoundsWheels>

Section that describes the sounds of wheels.

<WheelWater Sound=""/>
<WheelSteer Sound=""/>
<WheelSpinning Sound=""/>
<WheelMud Sound=""/>
<WheelExtrude Sound=""/>
<WheelDamaged Sound=""/>
<WheelChains Sound=""/>
<WaterHit Sound=""/>

8.1.8. <SoundsDamage>

Section that describes sounds of damage.

<Wheels Sound=""/>
<Suspension Sound=""/>
<Gearbox Sound=""/>
<FuelTank Sound=""/>
<Engine Sound=""/>
<Critical Sound=""/>
<Common Sound=""/>

8.1.9. <Sounds>

Section that describes the sounds of the truck.

• Origin="(2.8; 1.612; 0)"


The place where the semi-transparent engine is drawn. An emitter for a sound will be
created in this position. An emitter is the position from where the sound will be played as
a 3D sound.

• MinDist="10"
The volume of sounds of the truck decreases after the MinDist distance (linearly from
the distance). At distances closer than MinDist, the volume of sounds does not decrease.

• MaxDist="200"
After the distance exceeds MinDist, the volume is linearly decreased. At the MaxDist
distance, the volume is decreased to zero.
NOTE: In addition to these parameters, the volume of the truck sounds decreases
(depending on the distance) when rendering through the sound library. For example,
when X3DAudio library for PC and Xbox One is used. Thus, the MinDist and MaxDist
parameters provide an additional effect of decreasing the volume with the increase of the
distance.

• DisableReversePitch="false"
This flag determines the behavior of the Reverse sound. If this flag is set to true, then the

57
sound will be reproduced without any changes. If it is false, then the FrequencyRatio of
the sound will be changed depending on the speed of movement.

<Honk Sound=""/>
<Handbrake Sound=""/>
<HandbrakeOff Sound=""/>
<BrakePull Sound=""/>
<BrakeRelease Sound=""/>
<BrakesSqueal Sound=""/>
<Reverse Sound=""/>
<Gear Sound=""/>
<EngineTrans Sound=""/>
<EngineAccel Sound=""/>
<EngineRev Sound=""/>
<EngineStart Sound=""/>
<EngineStop Sound=""/>
<EngineIdle Sound=""/>
<EngineIdle_2d Sound="" IsSound2D="true"/>

• IsSound2D="true"
A flag indicating that it is not necessary to create an emitter for this sound.
Sounds without emitters will be played directly to the speakers or headphones in stereo.
For such sounds, there is no dependence of the volume from the distance to the truck (it
is logical, because only the sounds of engine belong to this category). These sounds will
be played in 2D mode when the player is using the 1st person view or is playing from the
cockpit, if the corresponding sounds are specified in XML. If the corresponding sounds
are not specified in XML, the default sounds are used. E.g., EngineIdle is used instead of
the EngineIdle_2d.

<EngineLow Sound=""/>
<EngineLow_2d Sound="" IsSound2D="true"/>
<EngineHigh Sound=""/>
<EngineHigh_2d Sound="" IsSound2D="true"/>
<EngineHeavy Sound=""/>
<EngineHeavy_2d Sound="" IsSound2D="true"/>
<EngineTurbo Sound=""/>
<DiffLock Sound=""/>
<ChassisStress Sound=""/>
<AWD Sound=""/>
<AbruptStop Sound=""/>

8.1.10. <Shakers>

Section that contains shakers.

There may be multiple <Shaker> child tags in it.

8.1.10.1. <Shaker>

Shaker.

A tag that describes non-physical (independent of Havok physics) bone rattling, depending on
the currently used engine power. The bone rattles according to the noise that has an amplitude
and a frequency.

Attributes:
58
• Frame="BoneExhaust"
* The name of the shaker bone.

• MinAngle="(0; 0.5; 1)"


The maximum angles of rotation of the bone when the engine is running, but the vehicle
is standing (not moving).

• MaxAngle="(0; 2; 4)"
The maximum angles of rotation of the bone when the engine is running in the
overstretched mode.

• MaxOffset="(0.1; 0.1; 0.01)"


Maximum linear bone shifts when the engine is running in the overstretched mode.

• MaxFrequency="0.2"
Maximum frequency of rattling. Values: [0; 1000], by default: 1.

• LimitDirectionX="Positive"
Used to stop negative or positive rotation in the direction of the X axis. Values:
Positive, Negative. Particularly, it was used to ensure the correct behavior of the
exhaust pipe cap (it should be closed, when the engine is off; when the engine is running,
the cap should move only in one direction; the cap should not intersect with the exhaust
pipe itself).

• LimitDirectionY="Positive"
Similarly to LimitDirectionX.

• LimitDirectionZ="Positive"
Similarly to LimitDirectionX.

8.1.11. <Shafts>

Section that includes shafts.

There may be multiple <Shaft> child tags in it.

8.1.11.1. <Shaft>

Shaft.

59
Shafts of the trucks do not belong to a particular truck. I.e., one mesh and one setup of the shaft
are common for all vehicles. To be more precise, currently we have two setups: env/shaft for
trucks and env/minishaft for scouts.
Only points from where the shaft begins and where it ends are set within the truck itself.
The bones of the shaft are automatically attached to the bones of the physical model, basing on
the weights of the nearest vertex on the truck mesh.

Attributes:

• SocketPointA="ShaftA1"
* The name of the <SocketPoint Name="ShaftA1"> socket, which is specified in the
XML of the mesh of the truck or the transfer case addon.

• SocketPointB="ShaftB1"
* The name of the <SocketPoint Name="ShaftB1"> socket, which is specified in the
XML of the mesh of the truck or the transfer case addon.

• Mesh="env/example_shaft"
Path to the .../meshes/env/example_shaft.fbx file. Default value:"env/shaft"

• PointAConnectedToAddon="true"
true, if the socket is described in the XML of the mesh of the transfer case addon. By
default: false.

• PointBConnectedToAddon="true"
true, if the socket is described in the XML of the mesh of the transfer case addon. By
default: false.

60
8.1.12. <OcclusionMap>

Fake shadow below the truck.

Attributes:

• HalfSizeZ="1.8"
* Half of the width of the occlusion map

• MinX="-4.211"
* Minimum coordinate of the map by X

• MaxX="4.51"
* Maximum coordinate of the map by X

• ParentFrame="BoneCabin_cdt"
Name of the bone from the physical model, which the map is attached to. By default, root
bone.

• Texture="trucks/occlusion/example__s_d_a.tga"
Path to the texture file. The default value is:
"trucks/occlusion/chassis__s_d_a.tga"

8.1.13. <Messages>

Manual positioning of messages about damage.

61
Attributes:

• Pos="(4.405; 2.804; 0)"


* Position.

• ParentFrame="BoneCabin_cdt"
Name of the bone from the physical model, which the message is attached to. By default,
the root bone.

8.1.14. <LimitedFluid>

Semitransparent visualization of the liquid.

Fluids can be displayed within two types of reservoirs only: either in the cylinder with a base
perpendicular to the OX axis or in the cube. The cylinder is elliptic (i.e. its base is an ellipse).

Attributes:

• Color="(86; 186; 255; 255)"


* The color of the liquid in reservoir. RGBA color, with Alpha corresponding for
visibility of the liquid (0 – not visible, 255 – maximum visibility).

• Center="(1.029; 0.7; 0.855)"


* The center of the reservoir.

• LengthX="1.34"
* Length of the cylinder. Used only when Type="Cylinder"

• RadiusY="0.33"
* The half of the height of the base of the cylinder (the first semi-axis of a cylinder).
Used only when Type="Cylinder"

• RadiusZ="0.33"
* The half of the width of the base of the cylinder (the second semi-axis of a cylinder).

62
Used only when Type="Cylinder"

• SizeX="1"
* The length of the box. Used only when Type="Box"

• SizeY="1"
* The height of the box. Used only when Type="Box"

• SizeZ="1"
* The width of the box. Used only when Type="Box"

• Type="Cylinder"
* Type of the reservoir. May be "Box" or "Cylinder".

• ParentFrame="BoneCabin_cdt"
The name of the bone from the physical model, which the reservoir is attached to. By
default, it is the root bone.

8.1.15. <Intake>

Visualization of the air intake.

Typically, this visualization is set up for large vehicles and is located in the middle of the
radiator grille. Along with the visualization, some elements of this setup are also used for
gameplay features.

Particularly, the Origin attribute of this tag specifies the point of dangerous immersion in water.
If the water level is above this point and the truck (or an addon installed to it) has no <Snorkel>
located above it, the truck will start to receive damage.

• Origin="(2.8; 1.612; 0)"


* Position
• Dir="(1; 0; 0)"
* Direction vector. Has as opposite direction to the air stream.
• Size="1.2"
* Size.

8.1.16. <GearboxSocket>

Description of available gearboxes.

Values:
63
• Type="gearboxes_trucks"
* Name of the XML file from the .../classes/gearboxes folder. You can specify multiple
types, separating them by commas: "gearboxes_trucks, gearboxes_special".
• Default="g_truck_default"
* Name of the default gearbox, which is specified in the XML file of the gearbox in the
<Gearbox Name="g_truck_default"> tag.

8.1.17. <FuelTank>

Properties of the fuel tank.

Attributes:

• DamageCapacity="50"
Amount of allowed damage. By default: 0

8.1.18. <Exhaust>

Visualization of the exhaust.

Attributes:

• Dir="(-0.902; 0.431; 0)"


* Direction vector. Points in the direction of the exhaust.

• Origin="(0.631; 3.501; -1.114)"


* Coordinates of the beginning of the exhaust..

• Speed="3.82"
* Speed.

• IsLight="true"
If this attribute is true, the smoke from the exhaust has more light color.

8.1.19. <EngineSocket>

Description of available engines.

Attributes:

• Type="e_us_truck_modern"
* Name of the XML file from the .../classes/engines folder. You can specify multiple
types, separating them by commas: "e_us_truck_modern, e_us_truck_old".

• Default="us_truck_modern_engine_0"
* Name of the default engine, which is specified in the XML file of the engine in the
<Engine Name="us_truck_modern_engine_0"> tag.

8.1.20. <Driver>

Position of the driver and his animations.


64
Currently, the game contains three sets of animations for the driver:

• For scout (1 on the picture below)


• For regular truck (2 on the picture below)
• For heavy trucks (3 on the picture below)

These animations differ by the way the driver holds the steering wheel (the larger is the vehicle,
the more horizontally is the steering wheel located) and the way he sits.

The driver is affected not only by animations but by physics also. So, to keep the hands of the
driver on the steering wheel when the vehicle is moving through bumps, the inverse kinematic is
added to his legs and arms. This inverse kinematics holds his hands on the steering wheel and his
feet on the floor.

Therefore, despite the fact that the driver’s settings allow you to set the position of hands and the
driver himself independently, we recommend that you set these positions strictly in accordance
with the animation. And, in case of poor modeling, tune the driver's seat according to the
position of the driver, not vice versa (do not tune the driver according to the position of his seat).
Otherwise, the animations can be displayed incorrectly.

The inclination and size of the steering wheel must also correspond to animations.

Attributes:

• Pos="(1.173; 1.825; 0.488)"


* Position of the root of the driver.

65
• SteeringWheelPos="(1.555; 2.153; 0.486)"
* Position of the center of the steering wheel.

• AnimationSet="HeavyTruck"
Values: Scout, Truck, HeavyTruck. By default: Truck.

• ParentFrame="BoneCabin_cdt"
The bone from the physical model hierarchy, which the driver is attached to. If the
parameter is not specified, the root bone of the physical model.

• LegsOffset="(-0.1; 0; 0)"
You can move the legs of the driver, e.g. if they visually intersect with the model of the
truck.

8.1.21. <Dashboard>

Section that contains arrows of the dashboard.

8.1.21.1. <Gauge>

Description of the behavior of an arrow on the dashboard.

A single unique arrow of the dashboard corresponds to a single Fbx file. In this file, the arrow is
located in the zero coordinates, lies in the OXZ plane, and is directed along the X axis. There is
no parent frame (bone) among the parameters of the arrow. It is attached to the nearest vertex of
the truck.

Attributes:

• Mesh="trucks/arrows/chevrolet_ck1500_arrow_01"
* Path to the Fbx file of an arrow .../meshes/trucks/

• Org="(0.631; 3.501; -1.114)"


* Position of the arrow.

66
• Dir="(-0.944; 0.33; 0)"
* Direction vector, which is normal to the plane of the gauge dial and is directed inside
the cab (in the coordinates of the fbx arrow it is "(0; 1; 0)" ).

• OutputAngles="(-110; 30)"
* The range in which the arrow can rotate along the local OY axis.

• Scale=".9"
The size of the arrow can be changed simultaneously by all axes (e.g. Scale=".9" equals
to "(0.9; 0.9; 0.9)") or by particular axes only (e.g. "(1; 0.5; 1)").

• Damping="0.9993"
* Arrow response to the change of input value.

• InputRange="(0;1)"
The range of input values. Depends on InputType. Most frequently, it is on/off (i.e.
(0;1)), since after the start of the engine most arrows proceed to the particular value and
remain there still. However, values similar to speed can be set up depending on what is
written on the speedometer scale. Default value: "(0; 1)"

• InputType="engineEnabled"
* Name of the input. Values: "speed", "rpm", "fuel", "none", "handbrake",
"engineEnabled", "headlight", "difflock", "difflockStress".

8.1.22. <Damage>

Section where damage areas are specified.

8.1.22.1. <DamageArea>

Damage area.

67
The damage area allows us to set the volume, where collision objects of the truck's physical
model will deal damage to the truck when they collide with other objects.

On the picture above, damage areas are displayed in the form of two pink cubes: FuelTank and
Engine. Their forms and positions can be customized for the gameplay tasks.

For damage area of the Engine type, collisions nearby the marked damage area will also deal
damage to the truck: inside the damage zone, the maximum damage (100% of it) is dealt, outside
the zone - the dealt damage smoothly decreases to 0. Thus, the damage to the Engine can be
automatically decreased by installing more massive bumpers. Therefore, in the front part of the
truck, the damage area should be configured quite carefully (and should not include bumper add-
ons).

Attributes:

• Type="Engine"
* Type. Values: Engine, FuelTank.

• Min="(-1; 0.35; -1.2)"


* Lower right back vertex of the cube

• Max="(2; 1.1; 1.2)"


* Upper left front vertex of the cube

• ParentFrame="BoneCabin_cdt"
The bone from the physical model hierarchy, which the damage area is attached to. If the
parameter is not specified, then it will be the root bone of the physical model.

68
8.1.23. <CompatibleWheels>

Available wheels.

This tag is used only for wheels that are “sets of tires and rims”. It may be used multiple times,
to install different types of wheels or the single type with different scaling.

If the Wheels tag sets the default type of the wheel, then the CompatibleWheels tag should exist
for the same type of the wheel.

Attributes:

• Type="wheels_medium_double"
* Type. Name of the XML class of the wheels, file from the .../classes/wheels/ folder.

• Scale="0.55"
* The even scale of the wheel. We make wheels with the radius equal to 1 meter, so this
scale is equal to the actual size of the wheel on the truck.
• OffsetZ="0.1"
Shift of the wheel along the Z axis relative to the position indicated in the <Wheel Pos =
"(- 3; 1.2; 1.5)">. This parameter allows us to install wheels of different widths on the
truck without intersections with it. If only the OffsetZ parameter is specified, all wheels
will be shifted by the specified value, regardless of the Location of the wheel (<Wheel
Location="">).
• RearOffsetZ="0.1"
Shift of the rear wheel along the Z axis. If it is specified, wheels with <Wheel
Location="rear"> will be shifted by the specified value.

8.1.24. <Camera>

External camera.

• Center="(-1.7; 0; 0)"
* Point that the external camera is directed to.

• RadiusMultiplier="0.8"
Scale of the distance to the Center. By default: 1. For large trucks, it is typically equal to
1.1, For scouts - to 0.8

• ParentFrame="BoneCabin_cdt"
The bone from the physical model hierarchy, which the camera is attached to. If the
parameter is not specified, then it will be the root bone of the physical model.

8.1.24.1. <Cockpit>

Internal camera and windshield.

Attributes:

69
• WindshieldDetailDensity="0.6"
Tiling of the detailed texture (one common texture for all trucks, chips on the
windshield). By default: 0.4

• WindshieldDiffuseTexture="trucks/cat_ct680_glass__d_a.tga"
Diffuse map of the windshield texture (same as on the outside window of the truck).
Located in the .../textures/ folder.

• WindshieldShadingTexture="trucks/cat_ct680_glass__d_a.tga"
Shading map of the windshield texture (same as on the outside window of the truck).
Located in the .../textures/ folder.

• WindshieldDiffuseCleanAlpha="0.5"
Transparency of the alpha channel. By default: 0

• WindshieldDiffuseAlphaContrast="0.5"
Contrast of the alpha channel. By default: 1

• ViewPos="(1.148; 2.6; 0.488)"


* Default position of the internal camera.

• ViewDir="(1; -0.05; 0)"


* Default direction vector of the internal camera.

• LimitsHor="(-2.8; 2.4)"
* Limits for the horizontal rotation of the camera. Value in radians.

• LimitsVer="(-0.32; 0.2)"
* Limits for the vertical rotation of the camera. Value in radians.

• ZoomViewDirOffset="(0; -0.05; 0)"


* Shift of the direction vector in case of the camera zoom

• ZoomViewPosOffset="(0.2; 0; 0)"
* Shift of the camera in case of the zoom.

8.1.24.1.1. <Rear>

Settings for “leaning out of the window” when looking back.

Attributes:

• HorTransitionStart="-1.2"
The angle in radians at which the camera shift begins

• HorTransitionEnd="-1.5"
The angle in radians at which the camera shift ends

• LimitsVer="(-1.2; 0.2)"
* Maximum limits for the vertical rotation of the camera after its shift. Value in radians.

70
• RollAngle="-15"
* Maximum rotation angle by Ox (twist rotation, inclination of the head to left or right).
The value of this angle is 0 when the camera is turned by HorTransitionStart, and
RollAngle when the camera is turned by HorTransitionEnd. The value of this parameter
is in degrees.

• ViewDir="(1; -0.05; 0)"


* Direction vector of the camera when looking back

• ViewPosOffset="(0.25; -0.1; 0.7)"


* Shift of the camera when looking back

8.1.24.1.2. <Mirror>

Mirror.

NOTE: Аs you can see in the picture above, the plane of the mirror (i.e. the plane on its
geometrical mesh itself) can be different from the actual reflection plane of the mirror. In this
case, the normals to these planes (ClipDir and ReflectionDir, see below) will be different also.
Frustum of the camera of the mirror is defined by:

• ViewPos - the position of the internal camera, defined in the <Cockpit>


• ReflectionDir - normal to the actual reflection plane of the mirror, from the driver’s side
of this plane. See ReflectionDir parameter below.
• Size parameter multiplied by the FOVScale parameter (Size * FOVScale, see below).

Attributes:

• MeshFrame="mirror_left"
* Name of the mesh, defined in the Fbx file.

• Pos="(1; -0.05; 0)"


* Position of the center of the mirror. For convex mirrors, we recommend to specify the
position of the center using the coordinates that lie within the plane of the base of the
71
mirror. Usage of the coordinates that lie within the plane touching the "top" of the mirror
is not recommended (see the illustration below).

• ClipDir="(-0.94; 0; -0.342)"
* Normal vector of the plane of the mirror (i.e. the normal to the plane on the mesh
itself), from the driver’s side of this plane.

• ClipOffset="0.025"
Shift of the clipping plane in the direction of ClipDir. This shift is necessary to ensure
that the geometry of the mirror itself does not enter the view of the camera.
Default value: 0.025.

• ReflectionDir="(-0.963; -0.123; 0.242)"


Normal vector of the actual reflection plane of the mirror, from the driver’s side of this
plane. By default is identical to ClipDir.

• Size="(0.179; 0.351)"
* The width and height of the surface of the mirror. We recommend you set this width
and height 0.01-0.02 more than the real size of the mirror. This is necessary to avoid
stretching of the image near the edges of the mirror.

• FOVScale="1.3"
Scale of the field of view. Actually, this is the scale of the Size parameter, which is used
during the calculation of the frustum of the camera of the mirror.
Default value: 1

• LookAtOffset="(0; -0.05; 0)"


Shift of the Pos position during the creation of the Frustum. This shift is specified in the
coordinates of the truck. This parameter is necessary when unwanted geometry elements
(e.g. mounts of the mirror) are visible in the mirror reflection.

• CurveAngle="10"
Curvature of the texture, in degrees. This parameter allows you to visualize that objects
in mirrors look farther than they are. Please, do not set a very high value of this parameter
(about 60 degrees is a recommended value). Otherwise, the artifacts near the edges will
be visible. Default value: 60.

• UnskinnedCoordinates="false"
The coordinate system in which the mirror parameters are specified. The “false” value
means that the coordinates are calculated taking into account the initial transformations
of the bones of the skeleton of the truck. The “true” value means that the coordinates are
calculated from the positions of the vertices of the mirror. These values correspond to
72
two independent algorithms for calculation of coordinates that are most often
indistinguishable.
The default value is “false”.

8.1.24.1.2.1. <SecondaryView>

Dependent Mirror.

The image on this mirror is taken from the camera described in the <Mirror> parent tag.
I.e. it does not create the new camera but takes the image from the existing main mirror.

• MeshFrame="mirror_left"
* Name of the mesh, defined in the Fbx file.

• Pos="(1; -0.05; 0)"


* Position of the center of the mirror. For convex mirrors, we recommend to specify the
position of the center using the coordinates that lie within the plane of the base of the
mirror. Usage of the coordinates that lie within the plane touching the "top" of the mirror
is not recommended (see the illustration above).

• ClipDir="(-0.94; 0; -0.342)"
* Normal vector of the plane of the mirror, from the driver’s side of this plane.

• FOVScale="1"
Scale of the field of view. The value of the FOVScale (secondary) / FOVScale (primary)
ratio defines the part of the texture of the main mirror that will be visible in the dependent
mirror. If FOVScale (secondary) = FOVScale (primary) then the image will be
duplicated. If FOVScale (secondary) < FOVScale (primary) then only part of the image
from the main mirror will be displayed in the dependent mirror. FOVScale of the
dependent mirror could not be more than the FOVScale of the main mirror.

• CurveAngle="10"
Curvature of the texture, in degrees. This parameter allows you to visualize that objects
in mirrors look farther than they are. Please, do not set a very high value of this parameter
(about 60 degrees is a recommended value). Otherwise, the artifacts near the edges will
be visible. Default value: 60.

• UnskinnedCoordinates="false"
The coordinate system in which the mirror parameters are specified. The “false” value
means that the coordinates are calculated taking into account the initial transformations
of the bones of the skeleton of the truck. The “true” value means that the coordinates are
calculated from the positions of the vertices of the mirror. These values correspond to
two independent algorithms for calculation of coordinates that are most often
indistinguishable.
The default value is “false”.

8.1.25. <Axles>

Section that contains descriptions of axles.

73
8.1.25.1. <Axle>

Axle.

This tag contains a link to the bone that is not from the physical model. The operation logic here
is the following:

1. The system automatically locates two nearest opposite wheels (or just one wheel, if there
is the IsIndependent=”true” attribute).
2. The bone orientates on them and takes the middle position between them (or is attached
to the nearest one).

The position of this bone must necessarily coincide by the x and y axes with the position of the
bones that it must interact with. Otherwise, the bone will simply occupy the middle, possibly
unexpected, position when the simulation starts.

Attributes:

• Frame="BoneAxle"
* The bone that the axle is bound to during skinning.

• IsIndependent="true"
Whether the suspension is independent or not.

8.2. <Snorkel>
Snorkel.

Attributes:

• Origin="(2.365; 0.953; 0)"


The position of the point that is used for the mechanism of receiving damage from
drowning. The truck will start to receive such damage if the water is above this point.

8.3. <Rotator>
The bone which rotates depending on the operation of the engine.

Attributes:

• Frame="BoneRotator"
Non-physical bone, which is rotated.

• EngineTorqueFactor="0"
* The effect of the engine speed on the rotation speed. If the value equals 0, then the bone
will be rotating with the RotationSpeed speed, when the engine is started, and will not
accelerate with the increase of the engine speed. If the engine is turned off, the rotator
will not rotate.

74
• RotationSpeed="3"
* Speed of rotation. By default: 0.

• RotationAxis="(0; 1; 0)"
* Rotation axis. By default: (0; 1; 0)

• Name="Lightbar"
The name of the rotator.

8.4. <PhysicsModel>
Physics model.

Inside this section, we should describe the properties of bones that are included in Havok
simulation and their interactions with themselves and the environment. I.e., we need to describe
here the bones that must react to gravity, collide with each other, have friction, and so on.
All bones of the physical model must have collision objects. For convenience, we use naming
with the “NameOfBone_cdt” pattern, which means that this bone has a collision mesh.

Attributes:

• Mesh="trucks/cat_ct680"
* Path to the Fbx file of the truck from the .../meshes/ folder.

8.4.1. <NetSync>

Synchronization of the multiplayer.

By default, positions and speeds of all bones of the physical model are transferred from the
remote vehicle. However, such synchronization can be disabled in this tag. After that, only the
bones (Body) with the "pv" value of the NetSync attribute (NetSync="pv") will be synchronized.

Attributes:

• Legacy="false"
Synchronization of all bones of the physical model. By default: true.

8.4.2. <Body>

Physical body (or physical bone).

A physical body is the combination of the attachment point and the collision mesh that
participates in Havok physics. The physical body can collide with other physical bodies. The
physical body can be attached to its parent by various means: move linearly relative to its parent
within some limits, or swing along one or several axes, or be fixed tightly, etc. The physical
body has some physical characteristics: mass, friction, and so on.

The hierarchy of bones in the Fbx file must be the same as the hierarchy of the bodies in the
description of the physics model. This hierarchy must have only one root physical body.

75
Attributes:

• NetSync="pv"
Network synchronization of the position and speed (velocity) of the physical body.
Values: "p", "v", "pv".

• ModelFrame="BoneCabin_cdt"
* Name of the bone from the Fbx file.

• Mass="1700"
* Mass of the physical body. By default: 0. Limits: [0;1000000].

• CenterOfMassOffset="(0.2; -0.2; 0)"


The shift of the center of mass of the body relative to the center of mass calculated by
Havok. Havok calculates this value based on the shape of the collision mesh.

• GravityFactor="0.7"
Coefficient of the gravity influence. Default value: 1, Limits: [0;1000].

• AngularDamping="0.7"
Viscosity of the environment for angular movements. Default value: 0.05. Limits:
[0;1000000].

• LinearDamping="0.7"
Viscosity of the environment for linear movements. Default value: 0. Limits:
[0;1000000].

• Friction="0.7"
Friction when interacting with other physical bodies. Default value: 0.5, Limits: [0;1000].

• ImpactType="Truck"
This parameter is responsible for special effects. The "Truck" value means that a
collision will result in the appearance of sparks and the playing of the appropriate
collision sounds.

• Collisions="None"
Type of the collision. Values:
o Default - default value. Bones of the truck and its add-ons collide with all
collision objects, but not with each other.
o None - the bone does not collide with anything.
o All - the bone collides both with external objects and with bones of the truck and
addons.
o Internal - the bone collides with bones of the parent truck and with bones of its
addons.
o OnlyWithAll - the bone collides only with bones that have the "All" type of
collision specified.

• ForceBodyParams="true"
Only "large" bodies of the truck interact with dirt and water. But small ones do not.
Which are large and which are small is determined automatically. However, you can
force this interaction by enabling this parameter.

76
• NoFoliageCollisions="true"
Disables collision with grass and foliage.

8.4.2.1. <Constraint>

A way to bind a physical body to its parent body.

If the physical body is considered a bone, then Constraint is the joint between this bone and its
parent. It can be motionless or have single or multiple angular or linear degrees of freedom.
The root bone of the truck does not have a Constraint tag since it is not attached to anything.
The root bone of the addon has a Constraint since the addon is an attachable part of the truck.

The root bone of the trailer has no constraint since the trailer can exist independently on the map.
However, in order to determine how the truck interacts with the trailer, the trailer constraint is
separated and specified in the <TruckData>. This constraint describes the interaction of:

• the parent bone, which is the truck bone described in the XML of the truck in the Socket
tag:<Socket ParentFrame = "BoneBack_cdt" />
and
• the addon bone, which is described in the XML of the trailer (<InstallSocket ParentFrame
= "BoneHandle_cdt" />).

Any two bones of the trailer and the truck can participate in this interaction, regardless of
hierarchies.

Attributes:

• PivotOffset="(1; 0.1; 0)"


Offset of the Pivot. Pivot is the coordinate of the bone in the Fbx file. Rotations of
constraints of the Hinge and Ragdoll types are performed relative to it.

• Type="Hinge"
* Connection type (Constraint type).
Values:
o Fixed - fixed connection (constraint). If the LinearLimitsX, Y, Z attributes (see
descriptions of these attributes below) are not used with this constraint, it
describes motionless, fixed connection. Otherwise, if the LinearLimitsX, Y, Z
attributes are used, the connection receives degrees of freedom along the specified
axes within the specified limits. For example, if all these three linear limits are not
null, this connection can be used to describe the motion of an unfixed brick in a
box (without rotation).
o Ragdoll - Rotation by all axes within specified limits. The connection is suitable
for describing the shoulder joint or bell tongue.
o Hinge - Rotation by one axis within specified limits. This type of constraint is
suitable for describing a door hinge.
o UnlimitedHinge - unlimited rotation along a given axis.
o Prismatic - linear movement along one axis within specified limits. This type of
constraint is suitable for the description of a pump, hydraulics, and so on.
o Rigid - a rigid connection of the root bone of the addon with the bone of the
truck. In this connection, the collision object of the root bone becomes part of the
bone of the truck. For example, this connection is necessary for describing
77
bumpers, since Havok constraints (everything above) do not strictly cut off linear
deformations along the axes that are expected to be fixed. And, for example,
when a bumper with a fixed constraint collides with a wall, this bumper springs
and, in case of strong vibrations, the vehicle can break into pieces due to the
resonance. This constant only works on the root bone of the addon.

• LinearLimitsX="(-0.01; 0.01)"
Limits of linear movement along the X axis for the Fixed constraint type.

• LinearLimitsY="(-0.01; 0.01)"
Limits of linear movement along the Y axis for the Fixed constraint type.

• LinearLimitsZ="(-0.01; 0.01)"
Limits of linear movement along the Z axis for the Fixed constraint type.

• MinLimit="-14"
The lower bound for movement used for the Hinge and Prismatic types of constraints.
Default value:
o Hinge: -360, limits [-360, 360].
o Prismatic: 0

• MaxLimit="10.1"
The upper bound for movement used for the Hinge and Prismatic types of constraints.
Default value:
o Hinge: 360, limits [-360, 360].
o Prismatic: 0.

• AxisLocal="(0; 0; 1)"
The direction vector of the rotation axis for constraints of Hinge and UnlimitedHinge
types. Default value: (0; 1; 0).

• TwistAxisLocal="(0; 1; 0)"
The direction of the Twist axis (see picture below) for the Ragdoll type of constraint.
Default value: (0; 1; 0). If we describe the joint of the shoulder, then this is the axis of
rotation of the forearm.

• PlaneAxisLocal="(1; 0; 0)"
The direction of the Plane axis (see picture below), which is perpendicular to the Twist
axis, for the Ragdoll type of constraint. Default value: (1; 0; 0).
For unambiguous determination of this type of constraint, it is necessary to specify two
perpendicular direction vectors. The third vector (Cone, see picture below) is
unambiguously determined by the vector multiplication of TwistAxisLocal x

78
PlainAxisLocal.

• TwistMin="-50"
Minimum angle of rotation along the Twist axis for the Ragdoll type of constraint, in
degrees. By default: 0, limits: [-180, 180].

• TwistMax="70"
Maximum angle of rotation along the Twist axis for the Ragdoll type of constraint, in
degrees. By default: 0, limits: [-180, 180].

• PlaneMin="-50"
Minimum angle of rotation along the Plane axis for the Ragdoll type of constraint, in
degrees. By default: -180, limits: [-180, 180].

• PlaneMax="70"
Maximum angle of rotation along the Plane axis for the Ragdoll type of constraint, in
degrees. By default: 180, limits: [-180, 180].

• Cone="7"
A cone inside which a bone can rotate whose height is the Twist axis. If we use the bell
as the example, the bell tongue will be the bone, the “walls” of the bell will be the Cone.

79
The PlaneMin and PlaneMax will crop this bell.

• ConeMin="-70"
Minimum angle of rotation along the Cone axis for the Ragdoll type of constraint, in
degrees. By default: -180, limits: [-180, 180]. This attribute is used only if the Cone
attribute is not set.

• ConeMax="70"
Maximum angle of rotation along the Cone axis for the Ragdoll type of constraint, in
degrees. By default: 180, limits: [-180, 180]. This attribute is used only if the Cone
attribute is not set.

• Name="ConstraintExampleName"
The name of the constraint of the specific bone. It is used to control bone behavior from
the keyboard (PoweredConstraints and ControlledConstraints). For details on
ControlledConstraints, see 8.9.

• ExplicitParentFrame="0"
This attribute is used only in addons (not in trucks and not in trailers). It indicates that the
bone is attached not to its parent, but to the bone of the physical model of the truck (on
which this addon is installed). Value: the number corresponding to the order of the
ExtraParent entry in the description of the socket of the addon in the truck file, starting
from zero. For more details, see the "8.8.5.1.1. <ExtraParent>" section below.

8.4.2.1.1. <Motor>

Motor (“movement muscle”).

If the Body is a bone, the Constraint is the joint between the bones, then the Motor will be the
muscle. If Motor is not described, then the bone will hang loose under the influence of gravity
and inertia according to the limitations of the Constraint.
Motor is not used with the constraints of the following types: Ragdoll, UnlimitedHinge, and
Rigid.
80
Attributes:

• Type="Spring"
Type of the motor.
Values:
o Spring - a spring.
o Position - a position that can be controlled from the keyboard
(PoweredConstraints and ControlledConstraints). For details on
ControlledConstraints, see 8.9.

• Spring="0.5"
This attribute is used for the Spring type of the motor. Its value is the stiffness of the
spring. Default value: 0, limits: [0, 1000000000].

• Damping="0.02"
Damping.
Value:
o Spring: by default: 0, limits: [0, 1000000000].
o Position: by default: 1, limits: [0, 1].

• Tau="0.9"
This attribute is used for the Position type. A coefficient that determines the effect of
the Havok physics on the constraint, which is trying to reach a given position. If Tau = 0,
then the physical object will move according to the physics, without the influence of
keyboard controlling at all. If Tau = 1, then the physics does not affect the keyboard
controlling. Default value: 0.8, Limits: [0, 1].

• Force="0.9"
This attribute is used for the Position type. The force applied to the body that allows it
to reach a given position. Default value: 0, Limits: [0, 1000000000].

8.4.2.1.2. <PlaneMotor>

Motor for describing rotation along the Plane axis.

This tag is used for the Ragdoll type of the constraint. The combination of motors on different
axes allows you to set different behaviors:

All attributes are the same as in Motor.

81
8.4.2.1.3. <ConeMotor>

Motor for describing rotation along the Cone axis.

This tag is used for the Ragdoll type of the constraint. All attributes are the same as in Motor.

8.4.2.1.4. <TwistMotor>

Motor for describing rotation along the Twist axis.

This tag is used for the Ragdoll type of the constraint. All attributes are the same as in Motor.

8.4.2.1.5. <PlaneConeMotor>

Motor for describing the same behavior along the Plane and Сone axes.

This tag is used for the Ragdoll type of the constraint. All attributes are the same as in Motor.

8.4.2.1.6. <AllMotor>

Motor for describing the same behavior along all axes.

This tag is used for the Ragdoll type of the constraint. All attributes are the same as in Motor.

8.4.3. <FarmingBoundingBox1>…< FarmingBoundingBoxN>

These tags are used only for farming trailers. There can be multiple <FarmingBoundingBox..>
tags within the parent <PhysicsModel> tag: <FarmingBoundingBox1>,
<FarmingBoundingBox2> , and so on.

WARNING: You cannot omit numbers in the names of these tags. E.g., only
<FarmingBoundingBox3> should go after <FarmingBoundingBox2>, not
<FarmingBoundingBox4> or <FarmingBoundingBox5>. Otherwise, the
<FarmingBoundingBox..> tags that go after this omission will be ignored by the system.

Every such tag allows you to set up the part of the trailer that will be interacting with the farming
field. This part of the trailer is set up as a bounding box of the particular size that is attached to
one of the bones the trailer’s model. While passing over the farming field, this bounding box will
transform one farming distribution of this field to another farming distribution.

NOTE: For details of these distributions and the general setup of the farming field,
see “5.23. Farming” in the “SnowRunner™ Editor Guide” available as
SnowRunner_Editor_Guide.pdf in the same documentation package.

82
Attributes:

• BaseBone="BoneTrailer_cdt"
The name of the bone of the trailer’s model that the bounding box is attached to.

• Min="(-5.23; -0.6; -2.81)"


The vector that specifies the coordinates of the “minimum” (lower, by X, Y, Z) corner of
the bounding box. The size of the bounding box is determined by the Min and Max
vectors.

• Max="(-1.97; 0.6; -0.14)"


The vector that specifies the coordinates of the “maximum” (upper, by X, Y, Z) corner of
the bounding box. The size of the bounding box is determined by the Min and Max
vectors.

NOTE: Along with a set of the <FarmingBoundingBox..> tags, you will also need to specify
the FarmingTrailerType of the <Truck> tag for your farming trailer. For details , see 18.
Farming Trailers below.

8.5. <ModelAttachments>
Section that contains a description of the light.

Any type of light is described by three entities:

• Flare – a point source of light that creates a glow around the particular point. Visually
similar to the bright light of a bulb or the distant light from the headlights in the face.
• Light – a light source that illuminates objects and surfaces in a cone of a light beam.
• Model – an imitation of light rays. This imitation uses the semi-transparent model, which
is highlighted by the Light source. This creates a visual effect of light rays.

8.5.1. <StopSignals>

Section that describes stop signals.

The light that is turned on:

• if you are driving forward when you press S

83
• if you are driving backward when you press W

The light remains turned on until the vehicle stops.

8.5.1.1. <Model>

Light rays simulation. This simulation uses the semi-transparent model, which is highlighted by
the Light source. This creates a visual effect of light rays.

Typically, it is the Fbx model of a cross made from two intersecting planes. On these planes,
there is a white texture with transparency in the form of a beam.

84
In the game, the effect from the Model looks like this:

Attributes:

• Org="(3.759; 1.169; 0.944)"


The position of the origin of coordinates of the model.

• Dir="(3.759; 1.169; 0.944)"


Direction vector.

• Mesh="env/light_ray"
The path to the Fbx of the model from the .../meshes folder.

8.5.1.2. <Light>

A source of the light that illuminates objects and surfaces in a cone of a light beam.

85
In the game, the work of this light source looks like this:

Attributes:

• Pos="(3.759; 1.169; 0.944)"


Light source position

• Dir="(1; -0.3; 0)"


Direction vector

86
• AttenStart="1"
The start of attenuation, in meters

• AttenEnd="5"
Ray length, in meters. By default: 0.

• InnerCone="20"
Inner cone (light does not scatter). By default: 360.

• OuterCone="100"
Outer cone. By default: 0.

• Color="g(255; 186; 112) x 2"


Light color and brightness multiplier.
Default value: "(0; 0; 0)".
g - gamma correction, x 2 - brightness.

• ParentFrame="BoneCabin_cdt"
A bone from the hierarchy of the physical model, which the Light is attached to. If the
parameter is not specified, then this is a root bone.

8.5.1.3. <Flare>

Flare. A point source of light that creates a glow around the particular point. Visually similar to
the bright light of a bulb or the distant light from the headlights in the face.

In the game, it looks like this:

87
Attributes:

• Pos="(3.759; 1.169; 0.944)"


Light source position.

• Dir="(1; -0.3; 0)"


Direction vector.

• DirAngle="90"
The angle of visibility of the flare, in degrees.

• AttenStart="10"
The start of attenuation of the brightness of the flare, in meters.
By default: 60.

• AttenEnd="50"
Maximum length on which the flare is visible. By default: 120.

• ParentFrame="BoneCabin_cdt"
A bone from the hierarchy of the physical model, which Flare is attached to. If the
parameter is not specified, then this is a root bone.

• Color="g(255; 186; 112) x 2"


Light color and brightness multiplier.
Default value: "(0; 0; 0)".

• ColorMultAtDay="0.5"
A coefficient of the light brightness during daytime. By default: 1, Values: [0; 1000].

• Size="0.2"
Size of the flare. By default: 1, Values: [0.0001; 1000000].

• AspectRatio="1.4"
Aspect ratio. By default: 1, Values: [-1000000; 1000000].

• Texture="sfx/flare_simple__s_d.tga"
Path to the texture file of the shape of the flare.
Default value: "sfx/flare_simple__s_d.tga".

• Reflections="true"
Reflections.

8.5.2. <ReverseSignals>

Section that describes reverse signals. Light that is turned on when driving backward.

The tags are the same as in the StopSignals section, see "8.5.1.1. <Model>", "8.5.1.2.
<Light>", and "8.5.1.3. <Flare>" sections above.

88
8.5.3. <Ignition>

Section that describes lights activated after ignition. Light that is turned on when the engine is
on.

The tags are the same as in the StopSignals section, see "8.5.1.1. <Model>", "8.5.1.2.
<Light>", and "8.5.1.3. <Flare>" sections above.

8.5.4. <HeadLight> (in <ModelAttachments>)

Section that describes light rays simulation and a flare of the headlights.

Headlights turn on when the player presses the L button.

The light of headlights is described in the XML model in the two different places:

• <HeadLight> tag in the <ModelAttachments> section - here the light rays simulation of
the headlights (see "8.5.1.1. <Model>") and a flare of the headlights (see "8.5.1.3.
<Flare>") are described, the same way they are described in the StopSignals
• <HeadLight> tag in the <TruckData> section - here the main light of the headlights is
described (see section 8.6. below).

The light specified in the <ModelAttachments> section is clipped based on terrain blocks:

8.6. <HeadLight> (in <TruckData>)


Light of the headlights. This section describes the main light of the headlights.

The headlights are described in the XML model in the two different places: within <HeadLight>
tag in the <ModelAttachments> section (see 8.5.4. above) and within <HeadLight> tag in the
<TruckData> section.

89
Within the <HeadLight> tag of the <TruckData> section we describe the main light of the
headlights. Unlike the light sources described in the <ModelAttachments> section, this light
source can illuminate much further. It is needed to light up the earth and objects on it.

There can be only one such light source for the truck.

This light is not clipped based on terrain blocks, unlike the light specified in
<ModelAttachments>.

All its attributes are the same as for ordinary <Light>. See "8.5.1.2. <Light>" above for details.

8.7. <Landmark>
The model on the map.

Attributes:

• Mesh="landmarks/cat_ct680_lmk"
Path to the Fbx file of the model from the .../meshes folder.

• MinScale="1.8"
The minimum scale of the model when the camera zooms in.

• MaxScale="3.8"
The maximum scale of the model when the camera zooms out.

8.8. <GameData>
Info on the interaction of the truck with the environment.

Attributes:

• Country="US"
Region. Values: "US", "RU", "CAS" (corresponds to "Central Asia"). You can specify
multiple values here, using comma as a delimiter, e.g. "RU,CAS".

90
• Price="35000"
Price of the truck.

• UnlockByExploration="false"
Whether it is unlocked by exploration. I.e., if this option is “true”, the truck will be
locked in the Store, until you find it on the map. Values: true, false

• UnlockByRank="12"
Unlocking by the rank.

• ExcludeAddons="semitrailer_stepdeck_5, semitrailer_gooseneck_4"
Multiple addons can have the same type. And the truck interacts with types of addons, not
with individual add-ons themselves. So, the ExcludeAddons parameter allows you to
exclude particular addons from the type (the type of addons the truck interacts with).
Values: list of names of xml files of addons.

8.8.1. <WinchSocket>

Winch mounting location.

NOTE: When configuring this tag in an addon, you need to take into account that the winch can
exist for it only if this addon contains at least one physical bone. Usage of this tag for the addon
when it contains no physical bones can result in a crash.

Attributes:

• Pos="(3.881; 0.834; -0.322)"


Position of the winch.

• ParentFrame="BoneCabin_cdt"
A bone from the hierarchy of the physical model, which the winch is attached to. If the
parameter is not specified, then this is a root bone.

8.8.2. <UiDesc>

UI block.

Attributes:

• UiDesc="UI_VEHICLE_MOD_SCOUT_DESC"
Description of the truck. A small description of what kind of a vehicle it is, in general.
NOTE: You can just put your text in this XML attribute, in double quotes (e.g. you can
specify "Some text goes here" as a value). Or, you can use a string identifier (e.g.
"UI_STRING_IDENTIFIER") here and localize the value of this field to different
languages. For details, see the "UiName & UiDesc: Names, Descriptions, and Their
Localization" guide.

• UiIcon30x30="scoutVehicleImg30"
Icon of the type of the truck (small version). It is used in many places. For example, it is
used on the left panel of the map, in tooltips, on the Truck Storage screen, in the Truck

91
Store. The icon has a white color. The set of these icons is fixed. I.e., you can set one of
the following icons for your truck here:
o scoutVehicleImg30 - icon for scouts:

o offroadVehicleImg30 - icon for offroad vehicles:

o highwayVehicleImg30 - icon for highway vehicles:

o heavyVehicleImg30 - icon for heavy vehicles:

o heavyDutyVehicleImg30 - icon for heavy duty vehicles:

• UiIcon40x40="scoutVehicleImg"
Icon of the type of the truck (the large version with outline). It is used on the map (and,
possibly, somewhere else). The icon has a white color and a black outline. The set of
these icons is fixed. I.e., you can set one of the following icons for your truck here:
o scoutVehicleImg - icon for scouts
o offroadVehicleImg - icon for offroad vehicles
o highwayVehicleImg - icon for highway vehicles
o heavyVehicleImg - icon for heavy vehicles
o heavyDutyVehicleImg - icon for heavy duty vehicles

• UiIcon328x458="shopImgModScout"
Realistic photo-screenshot from a game with a vehicle at a favorable angle. It is used
only in a Store, for cards of vehicles (see screenshot below).
The file of the image should be in the .png format and should be located in the folder of
the mod, in the /ui/textures/ subfolder.

92
This image must have the dimensions of 328x458.

• UiIconLogo="modScoutLogo80"
Manufacturer logo. It is used only in a Store, for cards of vehicles. This icon must be in a
white color. It must have dimensions of 80x80 and transparent background.

• UiName="UI_VEHICLE_MOD_SCOUT_NAME"
Name of the truck.
NOTE: You can just put your text in this XML attribute, in double quotes (e.g. you can
specify "Some text goes here" as a value). Or, you can use a string identifier (e.g.
"UI_STRING_IDENTIFIER") here and localize the value of this field to different
languages. For details, see the "UiName & UiDesc: Names, Descriptions, and Their
Localization" guide.

8.8.3. <CustomizationCameras>

Section that describes cameras of the Garage.

8.8.3.1. <CameraPos>

Description of the camera.

Attributes:

93
• Name="addon_1"
Name of the camera in the garage. Values: addon_1, addon_2, side_r, side_l, roof,
hoods, wheels, default, rear.

• FOV="32.0"
FOV, default value: 50.

• Position="(0.668; 1.692; 0)"


Position of the camera.

• InterestPosition="(0.668; 1.692; 0)"


Position of the point of interest.

• MaxXRotation="360"
Horizontal rotation range: [-MaxXRotation; MaxXRotation]. Default value: 360.

• MaxYRotation="360"
Vertical rotation range: [-MaxYRotation; MaxYRotation]. Default value: 0.

• MaxZoom="2"
Maximum zoom.

8.8.4. <CraneSocket>

The place that the crane can cling to.

Attributes:

• Pos="(3.881; 0.834; -0.322)"


Position of the socket of the crane.

• ParentFrame="BoneCabin_cdt"
A bone from the hierarchy of the physical model, which the crane socket is attached to. If
the parameter is not specified, then this is a root bone.

8.8.5. <AddonSockets>

This section determines the relative positions of addons of a truck.

Addons described inside different <AddonSockets> sections are in no way related to each other.
Addons described in one section are mutually exclusive. I.e., if one addon from a section is
installed, you cannot install another addon from the same section.
In addition, the Socket tag has the NamesBlock attribute, which allows you to make tags from
different sections mutually exclusive.

Example:

<AddonSockets>
<Socket Names="Addon1"/>
<Socket Names="Addon2, Addon3"/>
</AddonSockets>
<AddonSockets>
<Socket Names="Addon4"/>
94
<Socket Names="Addon5"/>
<Socket Names="Addon6", NamesBlock="Addon1"/>
</AddonSockets>

Addons #4 and #5 do not depend on whether addons #1, #2, or #3 are installed.
If addon #1 is installed, then addons #2, #3, and #6 cannot be installed.

Attributes:

• DefaultAddon="cat_ct680_bumper_default"
The name of the XML file of the default addon. It is used, if the addon should be
installed when the player purchases a truck.

NOTE: You can specify one of the existing in-game addons in this field:
<AddonSockets DefaultAddon="tayga_6436_bumper_default">
<Socket Names="Tayga6436Bumper" Offset="(0; 0; 0)" />
</AddonSockets>

However, in this case, there is a known issue – the game will generate errors while
packing the mod and will not pack it. To avoid this issue, you can add the original file of
the XML class of this addon (e.g. tayga_6436_bumper_default.xml) to the folder with
addons of the mod (as if you were adding a custom addon). After that, there will be no
errors and the mod will be packed correctly. This issue will be fixed in future versions of
the game.

8.8.5.1. <Socket>

Attachment point for the addon on the track.

Attributes:

• Names="Semitrailer, SemitrailerOiltank"
* Names of the addon types that are described.

• Offset="(3.881; 0.834; -0.322)"


The position of the attachment point in the coordinates of the truck (the zero coordinates
of the truck correspond to the origin in the Fbx file of the truck).

• ParentFrame="BoneCabin_cdt"
A bone from the hierarchy of the physical model, which the socket is attached to. If the
parameter is not specified, then this is a root bone.

95
• NamesBlock="FrameAddonKung, FrameAddonTank"
Names of addon types that are blocked after installation of an addon to this socket.
NOTE: NamesBlock can be specified in any addon from the pair of addons that are
blocking each other. I.e., if a socket addon is installed, then any addon from NamesBlock
is unavailable; and vice versa, if an addon from the NamesBlock group is installed, then
the socket addon is unavailable.

8.8.5.1.1. <ExtraParent>

Explicit attachment of the addon bone to the bone of the truck.

This tag is used only in the description of the truck (not within addon descriptions) if it is
insufficient to attach the addon to a single bone of the truck. For example, in the picture below,
the wires are an addon and are attached both to the rear part of the vehicle and to its front part.

Interaction of the ExtraParent with an addon:

In the addon file, the bone constraint that should be attached to the truck is specified with the
ExplicitParentFrame attribute. This attribute sets the number corresponding to the order of
ExtraParent occurrence in the description of the addon socket in the truck file. For example, as
shown in the pictures below:

96
In the pictures above, it is described that the addon is attached to the truck chassis using the three
bones, two of which are shifted by some Offsets. This is done to raise the crane above the
mudguards and install it on the narrow frame of the truck.

Attributes:

• Frame="BoneCabin_cdt"
* A name of the bone from the physical model of the truck, which the addon bone is
attached to.

97
• Offset="(-1; 0; 0)"
An offset of the addon bone when it is installed on a truck.

8.8.5.1.2. <AddonsShift >

Shift of the installation point of the addon (trailer), if another addon is already installed.

Attributes:

• Types="Minicrane"
* The name of the addon type, upon installation of which the described addon will be
shifted.

• Offset="(0; -0.095; -0.05)"


* An offset of the addon bone when it is installed on a truck.

• TrailerNamesBlock="LargeSemitrailerOiltank"
Ban on the trailer installation when a pair of addons with a shift is installed. For example,
it is necessary, when the installation of the crane shifts the body so that it interferes with
the installation of the trailer.

NOTE: Addons are installed inside the garage, and trailers are installed outside the
garage, so all addon shifts and trailer bans occur in the garage before the trailer is
installed. However, in the debug menu, the installation order of addons is not taken into
account. So, if you install the trailer first (using the debug menu), and then install a
couple of add-ons with a shift, then you may get the intersection of collision meshes and

98
a crash.

8.9. <ControlledConstraints>
Section that describes controlled constraints.

The constraint is controlled using the keyboard (by two buttons). When you press and hold the
control button, the constraint starts to approach its minimum or maximum value.

Currently, it is used only for trucks (not for add-ons and not for trailers). Also, it is used only
for controlling that is attached to steering. That is, these constraints can only be controlled
when steering and the speed of their operation is related to the speed of rotation of the wheels.
I.e., the “A” and “D” buttons control these constraints when the game is in the truck control
mode.

99
8.9.1. <Constraint>

Description of the way of controlling a specific constraint of the physical model.

Attributes:

• Id="chassis_steer"
* A required attribute that does nothing (its old logic has been deleted, the new logic has
not been implemented yet).

• IsLinkedSteering="true"
An attribute that synchronizes the behavior of the motor of the constraint with a steering.

• Name="TieRodSteer"
* The name of the constraint of the physical model for which the control is assigned. See
the Name attribute in the "8.4.2.1. <Constraint>" section.

8.10. <AutomaticIK>
Section that describes bones with inverse kinematics.

This section describes the bone chains of inverse kinematics (IK). This IK is controlled by the
bones of the physical model or any other non-physical bones.

This picture shows a chain of two bones.

8.10.1. <IKBone>

Inverse kinematics bone

Attributes:

• ModelFrame="BoneTieRodHinge2"
* Name of the bone.

• ParentFrame="BoneTieRod_cdt"
* The name of the bone of the physical model, to which the root of the IK-chain is
attached. It is used only for root and required for it.

100
• AttachToFrame="BoneTieRod_cdt"
* The name of the bone of the physical model, to which the last bone of the IK-chain is
attached. It is used only for the last bone of the IK-chain and required for it.

• AttachOffset="(0; 0; 0)"
The shift of the “joint”. By default: (0; 0; 0).

8.10.1.1. <IKJoint>

The joint of the IK bone.

An analogue of the <Constraint> tag in the physical model.

Attributes:

• AxisLocal="(1; 0; 0)"
* Direction vector

• Type="Hinge"
* Type of the joint.
Values:
o Hinge - rotation around the AxisLocal axis.
o Slider- linear movement along the AxisLocal axis.
o Hinge2 - rotation around axes perpendicular to the AxisLocal axis.

101
9. <SuspensionSetVariants>
The root tag of the suspensions class file.

9.1. <SuspensionSet>
Section that contains suspensions. This section contains a set of suspensions for all axes of the
truck.

Attributes:

• Name="ank_mk38_suspension_default"
* The name of a set of suspensions.

• UiName="ank_mk38_suspension_default"
UI name of the suspension. By default: "".

• DamageCapacity="200"
Amount of the allowed damage. By default: 0. Value range: [0; 64000].

• CriticalDamageThreshold="0.4"
Critical damage threshold. By default: 0.7. Value range: [0; 0.999].

• BrokenWheelDamageMultiplier="2"
This coefficient is responsible for increasing the damage to the suspension when a wheel
is broken (has a flat tire). By default: 1. Value range: [0; 100].
When a blow goes to a particular wheel and it becomes Broken, the damage to the
suspension is multiplied by this coefficient.

9.1.1. <Suspension>

Suspension. Determines the interaction of the wheel with the truck.

Attributes:

• WheelType="rear"
* Type of the wheel. Allowed values: front аnd rear. In the XML file of the truck, it is
described by the Location attribute of the Wheel tag.
See the "8.1.2.1. <Wheel>" section.

• Height="0.15"
* Suspension height. Wheel shift along the -OY axis relative to the position defined by
the Pos attribute of the Wheel tag (in the truck description). See the "8.1.2.1. <Wheel>"
section.
Value range: [-1000;1000].

• Strength="0.15"
* Suspension stiffness. Value range: [0; 1000].

102
• Damping="0.3"
Damping.

• SuspensionMin="0.3"
* Minimum suspension travel. (The position that the wheel can take in case of the full
lowering of a suspension.). Value range: [-1000; 1000].

• SuspensionMax="0.3"
Maximum suspension travel. (The position that the wheel can take if the suspension is in
the operating condition and its stiffness is a zero when the wheel hangs in the air).
Default value: 1. Value range: [-1000; 1000].

• BrokenSuspensionMax="0.25"
* Maximum suspension travel for a broken suspension. Value range: [-1000; 1000].

9.1.1.1. <GameData>

Info on the interaction of the suspension with the environment.

Attributes:

• Price="4200"
Price.

• UnlockByExploration="false"
Whether it is unlocked by exploration. I.e., if this option is “true”, the suspension will be
locked in the Store, until you find it on the map. Values: true, false

• UnlockByRank="1"
Unlocking by the rank.

9.1.1.1.1. <UiDesc>

Attributes:

• UiDesc="UI_SUSPENSION_DEFAULT_DESC"
Description of the suspension.
NOTE: You can just put your text in this XML attribute, in double quotes (e.g. you can
specify "Some text goes here" as a value). Or, you can use a string identifier (e.g.
"UI_STRING_IDENTIFIER") here and localize the value of this field to different
languages. For details, see the "UiName & UiDesc: Names, Descriptions, and Their
Localization" guide.

• UiName="UI_SUSPENSION_DEFAULT_NAME"
Name of the suspension.
NOTE: You can just put your text in this XML attribute, in double quotes (e.g. you can
specify "Some text goes here" as a value). Or, you can use a string identifier (e.g.
"UI_STRING_IDENTIFIER") here and localize the value of this field to different
languages. For details, see the "UiName & UiDesc: Names, Descriptions, and Their
Localization" guide.

103
10. <EngineVariants>
The root tag of the engines class file.

10.1. <Engine>
Engine.

Attributes:

• Name="ru_scout_old_engine_2"
* Name of the engine.

• FuelConsumption="0.6"
Fuel consumption. By default: 0.5. Value range: [0; 100].

• DamageCapacity="120"
Amount of allowed damage. By default: 0. Value range: [0; 64000].

• CriticalDamageThreshold="0.9"
Critical damage threshold. By default: 0.7. Value range: [0; 0.999]. After this threshold,
fuel consumption and engine power are changed.

• DamagedConsumptionModifier="1.3"
The maximum value of the change in fuel consumption after engine failure.
By default: 1. Value range: [0.1; 32].
If engine damage exceeded DamageCapacity*CriticalDamageThreshold, then the fuel
consumption starts to increase linearly, from FuelConsumption to
FuelConsumption*DamagedConsumptionModifier (the latter value corresponds to the
situation when the engine is completely broken).

• EngineResponsiveness="0.04"
Engine responsiveness (speed of increase of the engine speed). By default: 0.04. Value
range: [0.01; 1].

• Torque="40000"
* Torque. By default: 0. Value range: [0; 1000000].

• DamagedMinTorqueMultiplier="1.0"
The multiplier for torque when the damage to the engine has reached the
CriticalDamageThresold threshold. By default: 0. Value range: [0; 1].

• DamagedMaxTorqueMultiplier="0.7"
Multiplier for torque when the engine is close to complete breakdown. By default: 0.
Value range: [0; 1]. After passing the threshold, the multiplier value changes linearly
from DamagedMinTorqueMultiplier to DamagedMaxTorqueMultiplier.

• BrakesDelay="0.5"
Braking Delay. By default: 0. Value range: [0; 1].

104
• MaxDeltaAngVel="0.01"
* Limiter for the maximum angular acceleration of the wheels. The smaller it is, the
slower the car accelerates. By default: 0. Value range: [0; 1000000].

10.1.1. <GameData>

Info on the interaction of the engine with the environment.

Attributes:

• Price="4200"
Price.

• UnlockByExploration="false"
Whether it is unlocked by exploration. I.e., if this option is “true”, the engine will be
locked in the Store, until you find it on the map. Values: true, false

• UnlockByRank="1"
Unlocking by the rank.

10.1.1.1. <UiDesc>

Attributes:

• UiDesc="UI_SUSPENSION_DEFAULT_DESC"
Description of the engine.
NOTE: You can just put your text in this XML attribute, in double quotes (e.g. you can
specify "Some text goes here" as a value). Or, you can use a string identifier (e.g.
"UI_STRING_IDENTIFIER") here and localize the value of this field to different
languages. For details, see the "UiName & UiDesc: Names, Descriptions, and Their
Localization" guide.

• UiName="UI_SUSPENSION_DEFAULT_NAME"
Name of the engine.
NOTE: You can just put your text in this XML attribute, in double quotes (e.g. you can
specify "Some text goes here" as a value). Or, you can use a string identifier (e.g.
"UI_STRING_IDENTIFIER") here and localize the value of this field to different
languages. For details, see the "UiName & UiDesc: Names, Descriptions, and Their
Localization" guide.

105
11. <GearboxVariants>
The root tag of the gearbox class file.

11.1. <Gearbox>
Gearbox.

Attributes:

• AWDConsumptionModifier="1.1"
The coefficient of change in fuel consumption during all-wheel drive usage. Default
value: 1. Range of values: [0; 32].

• CriticalDamageThreshold="0.5"
Percentage of damage, after which the box begins to show signs of failure: the vehicle
starts to switch from particular gears to neutral gear from time to time (see MinBreakFreq
and MaxBreakFreq below) and the fuel consumption increases.
Default value: 0.7. Range of values: [0; 0.999].

• DamageCapacity="120"
Amount of allowable damage.
Default value: 0. Range of values: [0; 64000].

• DamagedConsumptionModifier="1.4"
The maximum fuel consumption modifier. This multiplier is used for fuel consumption
when the gearbox is completely broken.
Default value: 1. Range of values: [0; 32].

• FuelConsumption="1.8"
Basic fuel consumption of the gearbox.
Default value: 0.1. Range of values: [0; 10].

• IdleFuelModifier="0.2"
Fuel consumption multiplier when the vehicle stands still with the running engine.
Default value: 0.3. Range of values: [0; 10].

• Name="g_scout_default"
The name of the gearbox.

• MinBreakFreq="0.0"
The minimum frequency of switching to neutral gear, at the moment when the durability
has reached the CriticalDamageThreshold. See CriticalDamageThreshold above.
Default value: 0. Range of values: [0; 60].

• MaxBreakFreq="15.0"
The maximum frequency of switching to neutral gear, at the moment when the durability
approaches zero. See CriticalDamageThreshold above.
Default value: 0. Range of values: [0; 60].

106
11.1.1. <ReverseGear>

Reverse Gear.

Attributes:

• AngVel ="2.0"
The maximum angular speed of the wheel when this gear is active. Default value: 0.
Range of values: [0.1; 32].

• FuelModifier ="0.9"
The fuel consumption multiplier when this gear is active. Default value: 1. Range of
values: [0; 10].

11.1.2. <HighGear>

High Gear. The “H” gear.

Attributes:

• AngVel ="2.0"
The maximum angular speed of the wheel when this gear is active. Default value: 0.
Range of values: [0.1; 32].

• FuelModifier ="0.9"
The fuel consumption multiplier when this gear is active. Default value: 1. Range of
values: [0; 10].

11.1.3. <Gear>

Gear. There are as many of these tags as many gears the gearbox has.

Attributes:

• AngVel ="2.0"
The maximum angular speed of the wheel when this gear is active. Default value: 0.
Range of values: [0.1; 32].

• FuelModifier ="0.9"
The fuel consumption multiplier when this gear is active. Default value: 1. Range of
values: [0; 10].

11.1.4. <GameData>

Info on the interaction of the gearbox with the environment.

Attributes:

• Price="4200"
Price.

107
• UnlockByExploration="false"
Whether it is unlocked by exploration. I.e., if this option is “true”, the gearbox will be
locked in the Store, until you find it on the map. Values: true, false

• UnlockByRank="1"
Unlocking by the rank.

11.1.4.1. <GearboxParams>

The presence of gears in the gearbox.

Attributes:

• IsHighGearExists="true"
“H”. If false, the button is inactive (the <HighGear> tag does not make sense in this
case). Default value: true.

• IsLowerPlusGearExists="true"
“L+”. First gear (the first <Gear> tag by order of occurrence in the XML).

If false, the button is inactive. Default value: true.

• IsLowerGearExists="true"
“L”. Maximum angular velocity 0.45*AngVel from the first gear (see the
IsLowerPlusGearExists attribute above). If false, the button is inactive.
Default value: true.

• IsLowerMinusGearExists="true"
“L-”. Maximum angular velocity 0.2*AngVel from the first gear (see the
IsLowerPlusGearExists attribute above). If false, the button is inactive.
Default value: true.

11.1.4.2. <UiDesc>

UI block.

Attributes:
108
• UiDesc="UI_GEARBOX_SCOUT_DEFAULT_DESC"
Description of the gearbox.
NOTE: You can just put your text in this XML attribute, in double quotes (e.g. you can
specify "Some text goes here" as a value). Or, you can use a string identifier (e.g.
"UI_STRING_IDENTIFIER") here and localize the value of this field to different
languages. For details, see the "UiName & UiDesc: Names, Descriptions, and Their
Localization" guide.

• UiName="UI_GEARBOX_SCOUT_DEFAULT_NAME"
Name of the gearbox.
NOTE: You can just put your text in this XML attribute, in double quotes (e.g. you can
specify "Some text goes here" as a value). Or, you can use a string identifier (e.g.
"UI_STRING_IDENTIFIER") here and localize the value of this field to different
languages. For details, see the "UiName & UiDesc: Names, Descriptions, and Their
Localization" guide.

109
12. <TruckWheel>
The root tag of the wheel class file, when a wheel is a single entity.
This tag is used for wheels, where a tire and a rim are a single entity.

Attributes:

• Mesh="wheels/trailer_sideboard_2"
Path to the Fbx file of a wheel.

• Mass="100"
Mass of the wheel.

• Radius="0.594"
The radius of the wheel, which is used to create the collision cylinder in Havok. The
wheel described in such a way cannot be scaled. Therefore, this radius must match the
outer radius of the tire in the Fbx file.

• Width="0.44"
Width. This parameter is used to create a collision cylinder in Havok, to determine the
area where the dirt is sticking to the tread of the tire and to identify the width of the track.
The specified width should match the width of the tread in the Fbx file.

• DamageCapacity="50"
Amount of the allowed damage. Value range: [0; 64000].

12.1. <WheelTracks>
Tracks of tires.

• TextureAlpha="tracks/default_alpha__s_d.tga"
Path to the map of the wheel track, relative to the .../textures/ folder.

• TextureHeight="tracks/default_height__s_d.tga"
Path to the map of normals of the depression depth, relative to the .../textures/ folder.

12.2. <WheelSoftness>
Softness of Tires.

• RadiusOffset="0.02"
* The radius of the collision object of the wheel equals to the difference between the
radius of the wheel (the Radius parameter specified in the <TruckWheel> tag) and this
offset (RadiusOffset). Default value: 0. Value range: [0; 0.25].

• SoftForceScale="0.32"
* The multiplier of the body momentum in case of collisions with other collision objects.
Default value: 1. Value range: [0.1; 1].

110
12.3. <WheelFriction>
Friction of the wheel.

• BodyFriction="3"
* Friction with soil, with bare terrain without dirt, and with other collision objects.
Default value: 1, Value range: [0.1;10].

• BodyFrictionAsphalt="1.5"
Friction with the road. Default value: BodyFriction, Value range: [0.1;10].

• SubstanceFriction="1.2"
* Friction with dirt. Default value: 1. Value range: [0;10].

• IsIgnoreIce="true"
Whether or not the ice surfaces should be ignored. For example, this parameter is used
for tires with chains.

111
13. <TruckWheels>
The root tag of the wheel type class file, when a wheel is a set of tires and rims.
A type of a wheel that contains several interchangeable tires and rims.

Attributes:

• DamageCapacity="50"
* Amount of allowed damage. Value range: [0; 64000].

• Radius="1"
* Wheel radius. It should match the outer radius of the tire in the Fbx file. This is the
radius of the collision object of the wheel in Havok. We recommend making wheels with
a radius of 1 meter. In this case, when the wheel is installed on the truck, the value of the
Scale parameter from the <CompatibleWheels> tag will correspond to the desired wheel
radius for a particular truck. See the "8.1.23. <CompatibleWheels>" section.

• Width="0.58"
* Wheel width. The specified width should match the width of the tread in the Fbx file.
This is the height of the collision cylinder of the wheel in Havok. It is used to determine
the area where the dirt is sticking to the tread of the tire and to identify the width of the
track.

• RadiusRear="1.2"
The radius of the rear wheel. It must match the radius of the mesh of the rear wheel that
has the "tire_back" name. By default is the same as Radius.

• WidthRear="1.2"
The width of the rear wheel. It must match the width of the mesh of the rear wheel that
has the "tire_back" name. By default is the same as Width.

13.1. <TruckTires>
Section that describes tires.

13.1.1. <TruckTire>

Tire. Single tire or a pair of front and rear tires.

Attributes:

• Mesh="wheels/tire_medium_highway_double_1"
* Path to the Fbx file of the tire.

• Name="highway_2"
* Name of the tire. This name will be displayed in the debug menu. It is also used to
determine the default tires of the truck.

• Mass="100"
* Mass of the wheel.
112
• RearMassScale="2"
Scale of the mass of the rear wheel. Using this parameter, you can make twin rear wheels
heavier than single front wheels.

13.1.1.1. <WheelTracks>

Tracks of the wheels.


Tracks of the front and rear tires may be different. So, this tag can be used twice for a single
<TruckTire> tag.

Attributes:

• TextureAlpha="tracks/default_alpha__s_d.tga"
Path to the map of the wheel track, relative to the .../textures/ folder.

• TextureHeight="tracks/default_height__s_d.tga"
Path to the map of normals of the depression depth, relative to the .../textures/ folder.

• Rear="true"
Flag that indicates that the tracks belong to the rear wheels.

13.1.1.2. <WheelSoftness>

All attributes are similar to the attributes of the WheelSoftness tag of the wheel as a single
entity. See the "12.2. <WheelSoftness>" section.

13.1.1.3. <WheelFriction>

Attributes:

• BodyFriction, BodyFrictionAsphalt, SubstanceFriction, IsIgnoreIce are the


same as the corresponding attributes of the WheelFriction tag of the wheel as a single
entity. See the "12.3. <WheelFriction>" section.

• UiName="UI_TIRE_TYPE_OFFROAD_NAME"
Name of the type of tires in the UI. This field links this tire to one of the tire categories in
the UI (in the Garage). The value of this field cannot be custom. It must be one of the
following predefined values:
o UI_TIRE_TYPE_HIGHWAY_NAME – highway tires
o UI_TIRE_TYPE_ALLTERRAIN_NAME – all-terrain tires
o UI_TIRE_TYPE_OFFROAD_NAME – off-road tires
o UI_TIRE_TYPE_CHAINS_NAME – chained tires
o UI_TIRE_TYPE_MUDTIRES_NAME – mud tires

13.1.1.4. <GameData>

Info on the interaction of the tire with the environment.

Attributes:
113
• Price="4200"
Price.

• UnlockByExploration="false"
Whether it is unlocked by exploration. I.e., if this option is “true”, this tire will be locked
in the Store, until you find it on the map. Values: true, false

• UnlockByRank="1"
Unlocking by the rank.

13.1.1.4.1. <UiDesc>

UI block.

Attributes:

• UiDesc="UI_TIRE_HIGHWAY_DESC"
Description of the tire.
NOTE: You can just put your text in this XML attribute, in double quotes (e.g. you can
specify "Some text goes here" as a value). Or, you can use a string identifier (e.g.
"UI_STRING_IDENTIFIER") here and localize the value of this field to different
languages. For details, see the "UiName & UiDesc: Names, Descriptions, and Their
Localization" guide.

• UiName="UI_TIRE_HIGHWAY_DOUBLE_1_NAME"
Name of the tire.
NOTE: You can just put your text in this XML attribute, in double quotes (e.g. you can
specify "Some text goes here" as a value). Or, you can use a string identifier (e.g.
"UI_STRING_IDENTIFIER") here and localize the value of this field to different
languages. For details, see the "UiName & UiDesc: Names, Descriptions, and Their
Localization" guide.

13.2. <TruckRims>
Section that describes rims.

13.2.1. <TruckRim>

A single rim or a pair of rims.

Attributes:

• Mesh="wheels/rim_medium_highway_allterrain_double_1"
* Path to the Fbx file of the rim.

• Name="rim_1"
* Name of the rim. This name will be displayed in the debug menu. It is also used to
determine the default rims of the truck.

114
13.2.1.1. <GameData>

Info on the interaction of the rim with the environment.

Attributes:

• Price="4200"
Price.

• UnlockByExploration="false"
Whether it is unlocked by exploration. I.e., if this option is “true”, this rim will be locked
in the Store, until you find it on the map. Values: true, false

• UnlockByRank="1"
Unlocking by the rank.

13.2.1.1.1. <UiDesc>

UI block.

Attributes:

• UiDesc="UI_RIM_MEDIUM_DOUBLE_1_DESC"
Description of the rim.
NOTE: You can just put your text in this XML attribute, in double quotes (e.g. you can
specify "Some text goes here" as a value). Or, you can use a string identifier (e.g.
"UI_STRING_IDENTIFIER") here and localize the value of this field to different
languages. For details, see the "UiName & UiDesc: Names, Descriptions, and Their
Localization" guide.

• UiName="UI_RIM_MEDIUM_DOUBLE_1_NAME"
Name of the rim.
NOTE: You can just put your text in this XML attribute, in double quotes (e.g. you can
specify "Some text goes here" as a value). Or, you can use a string identifier (e.g.
"UI_STRING_IDENTIFIER") here and localize the value of this field to different
languages. For details, see the "UiName & UiDesc: Names, Descriptions, and Their
Localization" guide.

115
14. <TruckAddon>
The root tag of the addon class file.

14.1. <WheelRepairsHide>
Spare wheels visibility section.

14.1.1. <Mesh>

There may be several of these tags.

Attributes:

• Frame="wheel1"
The mesh name that is defined in the Fbx file.

• HideThreshold="0.4"
Threshold for hiding. In percent.
Usage: Consider that the number of spare wheels in the TruckData tag is two
(WheelRepairsCapacity = "2"). In this case, to hide two wheels as they are spent, you
will need:
-- for one Mesh tag, specify any HideThreshold value in the half-interval of [0.5; 1).
-- for the second Mesh tag, specify the value in the half-interval of [0; 0.5).
If you specify a value of 0.4 in this example, then the wheel1 mesh will be hidden when
both spare wheels are used up.

14.2. <RepairsHide>
Repair kit visibility section.

14.2.1. <Mesh>

Similar to WheelRepairsHide. See 14.1.1. above.

14.3. <FuelHide>
Section for visibility of removable fuel tanks.

14.3.1. <Mesh>

Similar to WheelRepairsHide. See 14.1.1. above.

116
14.4. <TruckData>
Properties of the addon itself (not related to the behavior of bones).

Attributes:

• FuelCapacity="100"
Fuel capacity.

• WaterCapacity="1800"
Water capacity. See 19. Water as Cargo for details.

• RepairsCapacity="150"
Repair kit quantity.

• WheelRepairsCapacity="3"
Number of spare wheels.

14.4.1. <Shakers>

See the "8.1.10. <Shakers>" section above.

14.4.2. <Intake>

See the "8.1.15. <Intake>" section above.

14.4.3. <LimitedFluid>

See the "8.1.14. <LimitedFluid>" section above.

14.4.4. <Damage>

Changes in the parameters of the damage of the truck upon installation of the addon.

14.4.4.1. <Multiplier>

Damage multiplier.

Attributes:

• Multiplier="0.8"
Multiplier. Default value: 1. Value range: [0; 10].

• Type="Engine"
Type. Values: Engine, FuelTank.

117
14.5. <Snorkel>
See the "8.2. <Snorkel>" section above.

14.6. <Rotator>
See the "8.3. <Rotator>" section above.

118
15. Color Customization
This chapter describes tags that allow you to create custom skins and colorize your trucks and
addons.
After you create and configure them, variants of such customization for a particular truck can be
selected in the Garage:

Main terms used in this chapter:

• the override of the material (the <MaterialOverride> tag) - the override that sets new
values to a necessary number of parameters of a truck material. And, also, specifies the
zones of this material where the custom colors will be applied (up to 3 colors).
• the customization preset (the <CustomizationPreset> tag) - this preset allows you to
assign a specific button in the Garage menu to replace the parameters of one or more
materials of the track and its addons. And, along with that, it sets particular color tints for
three layers of paint customization.

The main process of creating a new type of color customization is the following:

1. Visually define the areas where you want to perform repainting.


2. Find all the materials of the truck and its addons that should be repainted upon a selection
of a single button in the Garage menu.
3. For every material found on the step #2 above, create its own MaterialOverride block
with the necessary parameters.
4. Specify the same value of the Name attribute to all the overrides of the materials from the
step #3 above.
119
5. For every set of colors you want to use for painting, create its own customization preset
(CustomizationPreset).
6. Specify the name from the step #4 above as the value of the MaterialOverrideName
attribute for all created customization presets (MaterialOverrideName == Name). These
presets will change the paint color for this set of overridden materials.

You can create several customizations, where each customization will override a certain number
of materials. For example, you can both repaint the truck and draw an airbrushed image on it.
And, you can implement it as two different customizations. After that, you can create several
color presets for each of these customizations, to get the desired number of coloring options for
each customization as a result. That is, you will get several different color options for repainting
the truck and several color options for its airbrush image. And all of these options will be
available in the Garage.

For example, we can configure two customizations (named skin_00 and skin_01) as shown in
the screenshot below:

As you can see, we override the materials of the truck in the skin_00 customization and the
materials of both the truck and the truck cabin in the skin_01 customization. For skin_00, we
create 4 different color presets. For skin_00, we create 3 different color presets.
As a result, we will have 7 color customization buttons in the Garage. The first 4 buttons will
correspond to 4 different color options of skin_00. The last 3 buttons will correspond to 3
different color options of skin_01.

15.1. <CombineXMesh>
The root tag of the XML file of the Mesh.

For information about this tag and its child tags - see 7. <CombineXMesh>.

15.1.1. <MaterialOverrides>

Section responsible for material customization.

This section may contain several child tags of the <MaterialOverride> type, where the
materials specified for the truck are overridden.

120
15.1.1.1. <MaterialOverride>

The override of the material.

Any truck material defined by the <Material> tag can be overridden in the
<MaterialOverride> tag. For description of the <Material> tag - see 7.2. <Material>.

Using the <MaterialOverride> tag, you can replace the material maps with other ones and change
the color tint. For the created MaterialOverride block, you can specify the zones that will be
affected by this change of color. Each particular overridden material can have up to three color
tints.

With <MaterialOverride>, you can override all the attributes of the <Material> tag. The
attributes that you do not override will keep their initial values specified in the <Material> tag.
Below, we will list all the attributes of the <MaterialOverride> tag. However, we will omit
descriptions of the attributes that are identical to the attributes of the <Material> tag.

Attributes:

• Name="skin_00"
The name of the customization (see 15. Color Customization above). This name links the
override of the material with color presets. All color presets of the truck (defined by the
<CustomizationPreset> tags) with the value of the MaterialOverrideName attribute
matching the specified Name value, will set the color tint parameters for this material.
See 15.2.1.1. <CustomizationPreset> below.

• TargetMaterialName="mod_scout_mat"
The name of the material that will be overridden, as it is specified in the <Material> tag.
See 7.2. <Material>.

• TintMap="trucks/mod_scout_cc__d.tga"
The map that defines the paint zones.

121
These zones are set via RGB channels. Thus, you can set up to three tint colors:

NOTE: The TintMap defines only the zones themselves, but not the tint values that will be used
for the colorization of these zones. The tint values are defined in the customiztion_preset.xml
(see 15.2. <TruckSet> below), inside the <CustomizationPreset> tags.

The channels of this map allow you to set the following:

o R - the main color. Low values on the R mask correspond to the decrease in the
colorization for ALL layers. Along with that, this color defines the overall paint
zone. I.e., for all areas that are not painted in the red channel, the color tint will
not change, regardless of the values specified for these areas in the green and blue
channels. Since this color defines the overall paint area, scratches and chips can
be painted only in the red layer.

122
o G - the second layer for painting.

o B - the third layer for painting.

• TintMaskScale="1.01"
The multiplier for the value of Tint from the TintMap texture (see above). This multiplier
allows you to make a sharper border of the mask. If the TintMap is made correctly, this
multiplier is not necessary.

• AlbedoMap="trucks/mod_scout_wt__d.tga"
The map with the base color of the surface. This can be either a map with a completely
new coloring for the vehicle or a map prepared for the change of the tint.
For correct tinting, all areas where you want to apply the tint should be white. The
brightness of the white color should be, on average: RGB 220: 220: 220.
For example, in the pictures below, you can see the original texture (the 1st picture), the
texture, which is prepared for painting (the 2nd picture), and the zones of painting (the

123
3rd picture).

Other attributes are the same as the attributes of the <Material> tag and simply override its
corresponding values:

• AlphaKill
• Blending
• NormalMap
• NormalScale
• ShadingMap
• MetalnessScale
• MetalnessВias
• RoughnessScale
• RoughnessВias
• AmbientOcclusionIntensity
• ReflectivityMultiplier
• EmissiveMap
• SnowUpIntensity
• SnowUpNormalsSpace
• SnowUpNoiseIntensity
• SnowUpNoiseScale
• SnowUpAngleRange
• SnowUpFlatten
• SnowifyNoiseIntensity
• SnowifyNoiseIntensityShift
• SnowifyNoiseTilingMult
• ForceSnowUnderwater

For a description of these attributes, see 7.2. <Material>.

15.2. <TruckSet>
The root tag of the class file of material customization
(сlasses/customization_presets/customization_preset.xml).

The class of material customization for the track needs to be created in a separate file at the
following path: /classes/customization_presets/customization_preset.xml. The <TruckSet> tag
needs to be the root tag of this file.

124
15.2.1. <Truck>

The customization block for the particular truck.

Attributes:

• Name="mod_scout"
Name of the XML class of the truck. Please note that you need to specify here the name
of the XML class of the truck, not the XML class of the mesh (they can be different).

15.2.1.1. <CustomizationPreset>

The customization preset.

This tag creates the customization preset, i.e. specifies particular colors for the zones that you
marked for painting in the TintMap attribute in the <MaterialOverride> tag. To link the color
preset to the overrides of the necessary materials, you need to set in the MaterialOverrideName
attribute of the <CustomizationPreset> tag the same value that you have specified in the Name
attribute of the <MaterialOverride> tag.

Along with colors, in each preset, you need to specify the identifier of the color button in the
Garage, which will enable your customization of the vehicle with these colors applied.

NOTE on Addons: The color can be changed both for the truck and for its addons. You do not
need to create customization presets for addons, color settings for them are taken from the color
settings of the truck.
For example, in the pictures below, the bumper from Pacific P16 is installed on TUZ 166.
MaterialOverrides are configured on Pacific P16 and, along with that, there is also an override
with the "skin_00" name, which is also configured for TUZ 166. Therefore, after the
installation of this bumper to TUZ 166, this bumper is colorized with the color of the truck.

125
Attributes:

• MaterialOverrideName="skin_00"
Name of the override of the material, which is defined in the XML of the mesh of the
truck, in the <MaterialOverride> tag (in its Name attribute).

• Id="0"
Identifier of the color button in the Garage. The sequence of these identifiers starts with
zero. You should not use the same identifier twice (it must be unique) and you should not
skip numbers in the sequence of identifiers. In the case of a duplicated identifier, the
value of the preset will be ignored by the game. If you skip some values in the sequence
of identifiers, the game will create superfluous non-functional buttons for the skipped
values.

• TintColor1="g(117; 18; 38)"


The color of the first layer. It is applied to the texture using the R-channel mask of the
TintMap, which is defined in the <MaterialOverride> tag (see 15.1.1.1.
<MaterialOverride> above).

126
• TintColor2="g(117; 18; 38)"
The color of the second layer. It is applied to the texture using the G-channel mask of the
TintMap, which is defined in the <MaterialOverride> tag (see 15.1.1.1.
<MaterialOverride> above).

• TintColor3="g(117; 18; 38)"


The color of the third layer. It is applied to the texture using the B-channel mask of the
TintMap, which is defined in the <MaterialOverride> tag (see 15.1.1.1.
<MaterialOverride> above).

• IsSpecialSkin="true"
This option marks this color preset as a special one, which may be necessary to attract the
player's attention to it. Buttons of special presets are displayed with the “palette and
brush” icon on them (see below).
Default value: false.

127
16. Modding of DLC Trucks
If you want to create a mod of the truck which is available in one of the DLCs, you need to set an
appropriate value in the OriginalTruck attribute of the <Truck> tag (see 8. <Truck>).

For example:

<Truck OriginalTruck="chevy_apache">
...
</Truck>

As the value of this attribute, you need to specify the identifier of the target DLC truck. You can
view this identifier in the Editor (when adding this truck) or using the Proving Grounds map
from the MOD BROWSER (the id of the truck can be viewed in the TOOLS > Create >
SPAWN TRUCK window).

WARNING: To view the identifier of the target truck in the Editor or on Proving
Grounds, you need to have the corresponding DLC. If you do not have the DLC, you will
not see the target truck there.

After setting this attribute, your truck mod will be available only for players who have purchased
the DLC with the target truck. However, the mod will still be available for subscription for all
players and the player will be able to enable it even if he/she has not purchased the DLC. But, if
the DLC has not been purchased, the player will not be able to use the mod of the truck – it will
not appear in the truck store in the Garage, even when the corresponding mod is enabled in the
MOD BROWSER.

So, if you link your truck to one of the DLC trucks, please warn the players about the fact that
your mod will be available only for those who have DLC. You can do it in the description of
your mod.

16.1. Policy on Using Parts of DLC Trucks


We decided to clarify our vision of the “DLC content usage” policy, taking into account the
feedback we received from the SnowRunner community. Our vision of this policy is as follows,
we also prepared samples for prohibited/allowed cases, see below.

1. What we do not want / What is prohibited without linking:

In general, we do not want cases when someone takes the DLC truck and makes a very similar
mod from it, without linking it to the source DLC truck using the OriginalTruck attribute. Or,
when some large parts of DLC content are shared as a mod, without such linking.

The reason for this is obvious: the player should not receive a significant part of the content from
the DLC that is not owned by this player.

Examples of what is prohibited:

128
• The whole cabin of a DLC truck is installed on a new truck, without linking to the
original DLC truck.
• The whole interior of a DLC truck is cut off and is used in the different mod, without
linking to the original DLC truck.
• The branded part of the DLC truck that contains copyright-protected logos or trademarks
is used in the different mod, without linking to the original DLC truck.

In all of these or similar cases, you need to link your mod to the original DLC truck using the
OriginalTruck attribute (see 16. above). If this linking does exist, these cases become allowed.

NOTE: If you are redistributing the DLC Truck or its large parts similar to the specified
above in your mod without such linking, your mod may be blocked for the violation of
the DLC policy.

2. What we do accept / What is allowed without linking:

We do accept that some small parts of DLC trucks are re-used, even without linking to the
original DLC truck. And, our previous history of approvals of such mods speaks for itself (e.g.
numerous mods with DLC wheels were approved, and so on).

Examples of components that are allowed for re-usage:

• Wheels (tires and rims)


• Sounds
• Bumpers
• Platforms
• Tanks
• Cranes
• Lights
• Snorkels
• and other small components

All of these or similar components can be re-used without linking to the original DLC truck if
they do not contain copyright-protected logos or trademarks.

129
17. Addons: Selected Info
This chapter provides brief notes on some nuances of the creation of Addons.
Please note that it does not contain a full guide on Addons (this topic is almost as wide as the
creation of Trucks).

17.1. FastMode. Controls for Controlled Constraints of an Addon


17.1.1. FastMode

FastMode is a UI/Controls feature that allows the player to switch between the controls of the
addon and the movement of the truck more efficiently, without entering the Functions menu
every time when this switching is necessary.

For example, FastMode is used for the “Articulated Towing Platform” addon. If this addon is
installed and you have activated its controls (by entering the Functions menu and selecting
“CONTROL EVACUATOR” there), you will be able to switch between controls of the towing
platform and controls of the truck itself by holding one button:

130
In the XML configuration of the addon, the FastMode is enabled for a set of controls using the
AvailableForFastMode="true" attribute of the <ActionCategory> tag, see the step 2 below in
17.1.2 section. Typically, this configuration is a part of the setup of the controlled constraints.

17.1.2. Controls for Controlled Constraints of an Addon

Controlled constraints (<ControlledConstraints>) of an addon work similarly to the controlled


constraints of a truck (see 8.9. <ControlledConstraints>).

Particularly, the controlled constraint is a constraint (see 8.4.2.1. <Constraint>) that can be controlled
by the player, using the keyboard or controller. It is controlled by two buttons. When you press and
hold one of the control buttons, the constraint starts to approach its minimum value, when you press
and hold another button of the pair, the constraint starts to approach its maximum value.

For example, by default, on a PC, you will press W to extend the towing platform from the
screenshot above; and you will press S to shorten it.

Let’s configure the controlled constraints of the addon and enable the FastMode for them on the
example of the “Articulated Towing Platform” addon:

NOTE: The pieces of the XML code below are taken from the XML class of this addon – which
is available in the [media]\_dlc\dlc_5\classes\trucks\addons\frame_addon_tow.xml file within
the initial.pak archive.

1. In the XML class of the Addon, in the <PhysicsModel> of the addon, set up the
constraint in a regular way. Do not forget to specify the Name attribute of the
constraint (e.g. Name="ramp_extend"), you will need it at the later steps.
For details on constraint configuration, see 8.4.2.1. <Constraint>.

<Body
...
Mass="300"
ModelFrame="BoneRampPrismatic_cdt"
...
>
<Constraint
AxisLocal="(1; 0; 0)"
Name="ramp_extend"
Type="Prismatic"
MinLimit="0"
MaxLimit="4"
>
<Motor Force="300000" Type="Position" />
</Constraint>
...
</Body>

2. As a child of the <TruckAddon> tag, create an <ActionCategories> tag.

131
Within this tag, add a single or multiple <ActionCategory> tags. (Most addons
have a limited set of operations, so in most cases, one <ActionCategory> tag is
enough).

NOTE: If you want to enable FastMode for your controls, then at least one
<ActionCategory> tag is required (this mode is enabled in the
AvailableForFastMode attribute of this tag). If you do not need FastMode and
do not want to group Actions displayed for your controlled constraints, then you
can skip this step and do not create <ActionCategories> and
<ActionCategory> tags at all. In this case, after selecting the main command
corresponding to the addon usage ("CONTROL {name of the addon}") from the
Functions menu, the player will proceed directly to a panel with buttons
corresponding to all controlled constraints.

In general, an action category is used for grouping actions assigned to your


controlled constraints into multiple categories. For example, you can create two
<ActionCategory> tags that will correspond to two groups of actions that the
player may use with your addon, which will result in the fact that the player will
select each group of these actions separately in the UI. And, along with that, this
will allow you to use the same buttons for different controlled constraints if they
are assigned to different action categories.

NOTE: ActionCategories define the grouping of controls in general, they can be


used not only for the controlled constraints.

The <ActionCategory> tag and its attributes define the properties of the action
category itself and the common properties of the constraints that are assigned to
this category. Particularly, they define what will be the name of the UI button
shown for this category, by what Action (button) it will be activated, whether the
FastMode will be enabled or disabled for the constraints assigned to this category,
and so on.

IMPORTANT: The particular behavior of the action category and its attributes
depend on the number of action categories used for this addon and whether or not
are they working in FastMode. Please refer to 17.1.4 below for details.

However, the code sample below will correspond to a single most typical scenario
– one action category that works in FastMode. This is also a piece from
frame_addon_tow.xml:

<ActionCategories>
<ActionCategory
Action="1"
Id="tow_control"
LocaleUid="UI_TOW_CONTROL"
AvailableForFastMode="true"
RemoveChildActionsFromCustomPanelShowCounter = "true"
/>
</ActionCategories>

The attributes of the <ActionCategory> tag are the following:

132
• Action="1"
Required attribute. Defines the action (button) that will select this category
in the UI. You need to use Actions that correspond to a single button here
(see Actions 1-8 in 17.1.3 below). However, the particular behavior of this
attribute depends on the scenario applied to this <ActionCategory>, see
17.1.4 below for details. Particularly:
o If there is at least one non-FastMode category, this Action will
define the button used for the selection of this category.
o If there are only FastMode categories, this attribute will not affect
anything and the specified button will not be used. However, even
in this case this attribute and its value are required due to internal
reasons.

• Id="tow_control"
The identifier of the action category. You will need to specify the same
identifier in the BelongToCategorie attribute of the <Constraint> tag
for each controlled constraint that belongs to this group.

• LocaleUid="UI_TOW_CONTROL"
The name of this category in the UI. However, the particular behavior of
this attribute depends on the scenario applied to this <ActionCategory>,
see 17.1.4 below for details. Particularly:
o If all categories are non-FastMode ones, this value will define the
name of the UI button displayed for this category at the bottom of
the screen after the player selects the command corresponding to
the addon (“Control <name_of_addon>”) in the OPERATE
subsection of the Functions menu.
o If all categories are FastMode ones, this value will define the name
of the command corresponding to this category in the OPERATE
subsection of the Functions menu.
o If there are FastMode and non-FastMode categories, this value will
define both:
▪ The name of the UI button displayed for this category after
the player selects the “Control <name_of_addon>”
command in the OPERATE subsection of the Functions
menu.
▪ The name of the additional command corresponding to this
category in the OPERATE subsection of the Functions
menu (if this value is specified for the FastMode category)

NOTE: You can just put your text in this XML attribute, in double quotes
(e.g. you can specify "Some text goes here" as a value). Or, you can
use a string identifier (e.g. "UI_STRING_IDENTIFIER") here and localize
the value of this field to different languages. For details, see the "UiName
& UiDesc: Names, Descriptions, and Their Localization" guide.

• AvailableForFastMode="true"
Defines whether the FastMode is enabled ("true") or disabled ("false")
for this <ActionCategory>. I.e., if "true", then the controls of the
controlled constraints from this category are available in FastMode. If
133
"false", then these controls will be available only separately (e.g. the
Crane mode for operations with crane).

• RemoveChildActionsFromCustomPanelShowCounter = "true"
This parameter with the "true" value is required for all categories with
FastMode controls. However, it is required for internal reasons and,
possibly, will be removed later on. For categories without FastMode
controls, it can be omitted or set to "false".

3. As a child of the <TruckAddon> tag, create an <ControlledConstraints> tag.


Within this tag, add the necessary number of <Constraint> tags.

Every <Constraint> tag from this set will define the properties of the particular
controlled constraint. Particularly, the pair of buttons this constraint is assigned
to, the name of the corresponding action in the UI, and so on.

<ControlledConstraints>
...
<Constraint
Action="10"
Id="ramp_extend"
LocaleUid="UI_RAMP_EXTEND"
Name="ramp_extend"
SpeedMult="1.5"
BelongToCategorie="tow_control"
/>
...
</ControlledConstraints>

The attributes of the <Constraint> tag here are the following:

• Action="10"
This number defines the button or a pair of buttons that are used by the
player for controlling the constraint. Every number in Action corresponds
to the particular button/predefined pair of buttons, see 17.1.3 below for
details. For controlled constraints (that require a pair of buttons) possible
values here are from "9" to "14".

• Id="ramp_extend"
The identifier of the controlled constraint. This attribute is required.
However, for addons, it does not affect anything. (For trucks, the value
Id="chassis_steer" is necessary to link the control over constraint to
steering).

NOTE: Assignment of the controlled constraint to <Constraint>


described in the <PhysicsModel> of the addon is performed by the value
of the Name attribute, see below. Sounds are also assigned using the value
of the Name attribute.

134
• LocaleUid="UI_RAMP_EXTEND"
The name of the command (action) corresponding to this controlled
constraint in the UI, e.g. "Extend" in the FastMode panel.

NOTE: You can just put your text in this XML attribute, in double quotes
(e.g. you can specify "Some text goes here" as a value). Or, you can
use a string identifier (e.g. "UI_STRING_IDENTIFIER") here and localize
the value of this field to different languages. For details, see the "UiName
& UiDesc: Names, Descriptions, and Their Localization" guide.

• Name="ramp_extend"
This attribute is required. It sets the name of the constraint from the
<PhysicsModel> of the addon (see Step 1 above), which is controlled by
this controlled constraint. I.e., the value of the Name attribute of
<PhysicsModel> → <Constraint> must be equal to the Name of some
<ControlledConstraints> → <Constraint>.
The Name attribute is also used for linking sounds. I.e., if you want to add
sound effects to your constraint, then the ConstraintName attribute of the
<ConstraintSounds> → <SoundIK…> tags must be equal to this Name for
each sound that corresponds to this constraint.

• SpeedMult="1.5"
The multiplier for the player’s control over (the movement of) the
constraint.

• BelongToCategorie="tow_control"
The identifier of the action category this constraint belongs to.
I.e., the value of the Id attribute of the target <ActionCategory> tag.

4. If you want to add sounds that will be activated when the player uses your
controlled constraint, add the <ConstraintSounds> tag as a child of <GameData>
and create a set of <SoundIK..> tags within it, see below.

<ConstraintSounds>
...
<SoundIKStop
Name="addons/addon_tow/addon_tow_ramp_extend_stop"
Range="20" Volume="1" ConstraintName="ramp_extend"
/>

<SoundIKStart
Name="addons/addon_tow/addon_tow_ramp_extend_start"
Range="20" Volume="1" ConstraintName="ramp_extend"
/>

<SoundIKLoop
Name="addons/addon_tow/addon_tow_ramp_extend_loop"
Range="20" Volume="1" ConstraintName="ramp_extend"
/>
...
</ConstraintSounds>
135
The <SoundIK..> tags to be used there are the following:

• <SoundIKStart> – this sound will be played when the player starts to


control the constraint.
• <SoundIKStop> – this sound will be played when the player stops to
control the constraint.
• <SoundIKLoop> – this sound will be played when the player is in the
process of controlling the constraint.

The Format of these sounds needs to be the following:

• 44 kHz (or less), Mono, 16 bit, stored as .wav files.

NOTE: These sounds need to be in Mono since they will be played as 3D


sounds and will have the position in the scene (the position of the addon).
Otherwise, the sounds will work as “flat” sounds (with the same volume in
both channels) and the player will not be able to identify the direction of
the sound.

All <SoundIK..> tags have the same attributes:

• Name="addons/addon_tow/addon_tow_ramp_extend_stop"
The path to the corresponding sound file, relative to the sounds folder in
the folder of the mod and without the file extension.
E.g., "addons/my_addon_1/my_sound" for the
…\Media\Mods\<mod_name>\sounds\addons\my_addon_1\my_sound.wav
For the format of the sound file, see the NOTE above.

• Range="20"
The distance (in meters), within which the sound is played at its
maximum volume. If we are moving away from the position of the sound
and the distance has exceeded the Range value, the sound volume will
start to fade.

• Volume="1"
The multiplier of the sound volume. "1" corresponds to the original
volume of the sound file.

• ConstraintName="ramp_extend"
The name of the controlled constraint this sound is assigned to (i.e. the
value of the Name attribute of this constraint).

NOTE: For a list of possible buttons (“Actions”) that can be assigned to controlled constraints,
see 17.1.3 below.

NOTE: For different scenarios of usage of the ActionCategory attributes, please refer to 17.1.4.

136
17.1.3. Actions. Buttons for Controlled Constraints

When creating Controlled Constraints or Powered Constraints you can assign particular Actions
to them (using the Action attribute of the <Constraint> tag, see 17.1.2 above) or to the
ActionCategories used for grouping them.

NOTE: ActionCategories define the grouping of controls in general, they can be used not only
for the controlled constraints. Powered Constraints are currently not described within this guide.

Every Action is identified by its number (from 1 to 14) and corresponds to the button or a pair of
buttons that are used by the player for controlling the constraint:

• Actions from 1 to 8 – correspond to a single button. They can be used for Powered
Constraints or for selecting ActionCategories (see 17.1.2 above) in the UI.

• Actions from 9 to 14 – correspond to a pair of buttons. They can be used for Controlled
Constraints.

For Actions from 1 to 8, the particular button that is assigned to the Action can be changed in the
SETTINGS of the game, in SETTINGS > CONTROLS > CUSTOM ADDON ACTIONS:

Actions from 9 to 14 correspond to the button pairs. Particularly, for every Action of such type,
there are two buttons: so-called forward and backward.

NOTE: However, these names (forward and backward) are conventional, they do not
necessarily correspond to these types of movement, their particular meaning is defined by
137
the Controlled Constraint this Action is used for. E.g., for some constraint that uses
Action 10, the button assigned to Action 10 (forward) can correspond to “Extend” and
the button assigned to Action 10 (backward) can correspond to its opposite action –
“Shorten”. Please note that in the in-game UI, a single name (e.g. ”Extend”, see
LocaleUid above) will be displayed for both of these buttons.

Previously, buttons assigned to these Actions (from 9 to 14) were predefined and had fixed
values. However, starting with DLC 6 (Season 6: "Haul & Hustle"), these buttons can be also
reconfigured by the player in SETTINGS > CONTROLS > CUSTOM ADDON ACTIONS,
similarly to Actions from 1 to 8:

However, the default buttons assigned to these Actions remain the same. You can see these
default buttons in the table below.

Table 1. Default Buttons for Actions 9-14

Action # Subactions PC Xbox PlayStation Nintendo


Switch

Action 9 forward Q Left Trigger L2 button ZL button

backward E Right Trigger R2 button ZR button

138
Action 10 forward W Left Stick Left Left Stick Left Left Stick Left

backward S Left Stick Right Left Stick Right Left Stick Right

Action 11 forward A X button button X button

backward D Y button button Y button

Action 12 forward R D-pad Up Left Stick Up D-pad Up

backward T D-pad Down Left Stick Down D-pad Down

Action 13 forward F D-pad Left Left Stick Left D-pad Left

backward G D-pad Right Left Stick Right D-pad Right

Action 14 forward Z Left Bumper L1 button L button

backward X Right Bumper R1 button R button

17.1.4. Different Scenarios of Usage for the <ActionCategory> Fields

As we stated above (see 17.1.2), the particular behavior of attributes of the <ActionCategory>
tag may vary. I.e., the game will use the values of these attributes differently depending on the
number of action categories used for the addon and whether or not are they working in
FastMode.

Below is the list of different scenarios for that. They describe only the varying parts of the flow,
for the description of all attributes of the <ActionCategory> tag please refer to see 17.1.2.

Scenario 1: All action categories are non-FastMode ones

• In the Functions menu, in the OPERATE subsection, the main command corresponding
to the addon usage is displayed (only when the engine is started). The name of this
command is formed by the fixed prefix (defined by the UI_CONTROL_ADDON string) +
the name of the addon taken from the XML class of the addon (the UiName attribute of
the <UiDesc> tag there). E.g. "CONTROL {name of the addon}".

• When the player selects this main command in the Functions menu, the game displays a
set of UI buttons for all action categories at the bottom of the screen.

139
The names of these UI buttons are defined by the LocaleUid values of these categories.
The player can select one of these categories by pressing a button assigned to this
category in its Action attribute.

Scenario 2: All action categories are FastMode ones

• In the Functions menu, in the OPERATE subsection, the list of commands


corresponding to every action category is displayed (only when the engine is started).
The name of every command is defined by the LocaleUid values of the corresponding
category. E.g. "CONTROL EVACUATOR".
The Action attributes of the corresponding categories need to be specified but are not
used (they do not affect anything).

• After selection of one of these commands, the game displays the controls of the
corresponding action category in FastMode (see 17.1.1 above),

Scenario 3: There are both FastMode and non-FastMode action categories

• If there is at least one non-Fast mode category, then in the Functions menu, in the
OPERATE subsection, the main command corresponding to the addon usage is
displayed (only when the engine is started). The name of this command is formed by the
fixed prefix (defined by the UI_CONTROL_ADDON string) + the name of the addon taken
from the XML class of the addon (the UiName attribute of the <UiDesc> tag there).
E.g. "CONTROL {name of the addon}".

• When the player selects this main command in the Functions menu, the game displays a
set of UI buttons for all action categories (both FastMode ones and non-FastMode ones)
at the bottom of the screen. The names of these UI buttons are defined by the LocaleUid
values of these categories. The player can select one of these categories by pressing a
button assigned to this category in its Action attribute.

• Along with that, in the Functions menu, in the OPERATE subsection, the game displays
the list of additional commands corresponding to every FastMode action category.
The name of every such command is defined by the same LocaleUid values of the
corresponding FastMode category.

140
18. Farming Trailers
Starting with the DLC 8 (“Season 8: Grand Harvest”) you are able to create farming fields on
your custom maps. For more details, see “5.23. Farming” in the “SnowRunner™ Editor
Guide” available as SnowRunner_Editor_Guide.pdf in the same documentation package.

To interact with these farming fields, you can use regular farming trailers that are provided with
Editor, such as: trailer_cultivator, trailer_harvester, and trailer_planter.

TIP: The XML files of classes of these trailers are available in the initial.pak, in the following
folder of this archive: [media]\_dlc\dlc_8\classes\trucks\trailers.

However, you can also create your own custom farming trailers. The process of their creation is
very much similar to the process of creating a regular trailer, there are only a few differences,
listed below as “Steps” of adding a farming feature to a regular trailer.

Step 1: Specifying type of the farming trailer (FarmingTrailerType)

First of all, you need to specify the farming type of your trailer. This farming type of a
trailer will define the farming assignments where the player will be able to use it.
Particularly, you can choose one from 3 predefined types here: "Cultivator", "Planter",
"Harvester".

You need to specify this farming subtype in the FarmingTrailerType attribute of the
<Truck> tag of XML of class of a trailer. See 8. <Truck> for details.

For example:

<Truck Type="Trailer" FarmingTrailerType="Cultivator">


...
</Truck>

Step 2: Setting up "interacting" parts of the trailer (FarmingBoundingBox1, 2, …)

After that, you need to identify parts of your trailer model that will be interacting with the
ground of the farming field and specify the location of these parts in the set of “farming”
bounding boxes.

NOTE: When the game processes a farming assignment being done by the player, it
tracks not the area passed by the farming trailer as a whole, but the area passed by these
bounding boxes.

These bounding boxes needs to be described as the <FarmingBoundingBox..> tags


within the <PhysicsModel> tag. You can create <FarmingBoundingBox1>,
<FarmingBoundingBox2> , and so on, as many of these tags as needed. Every such tag
defines a bounding box of the particular size that is attached to one of the bones the
trailer’s model. See 8.4.3. <FarmingBoundingBox1>…< FarmingBoundingBoxN> for
details.

For example:

141
<PhysicsModel Mesh="trucks/trailers/trailer_cultivator">
...
<FarmingBoundingBox1 BaseBone="BoneTrailer_cdt" Min="(-5.23; -0.6; -
2.81)" Max="(-1.97; 0.6; -0.14)" />
<FarmingBoundingBox2 BaseBone="BoneTrailer_cdt" Min="(-5.23; -0.6;
0.14)" Max="(-1.97; 0.6; 2.81)" />
<FarmingBoundingBox3 BaseBone="BoneTrailer_cdt" Min="(-9.15; -0.6;
0.14)" Max="(-5.66; 0.6; 2.81)" />
<FarmingBoundingBox4 BaseBone="BoneTrailer_cdt" Min="(-9.15; -0.6; -
2.81)" Max="(-5.66; 0.6; -0.14)" />
...
</PhysicsModel>

NOTE: That's it for simple farming trailers. However, there are a lit bit more complex cases,
when a farming trailer uses some constraints (see 8.4.2.1. <Constraint>) and some of them need
to be automatically “activated” to obtain a final form of the trailer that is suitable for farming.
For example, original farming trailers (trailer_cultivator, trailer_harvester, and
trailer_planter) do expand when they reach a target farming field during the appropriate
farming stage. If this is your case, please refer to 18.1. Auto-Activation of Constraints of a
Farming Trailer for some additional nuances related to these constraints.

After adding these properties, you can repack your trailer and test it on one of the custom
farming maps. For details on creating your own farming map, see “5.23. Farming” in the
“SnowRunner™ Editor Guide” available as SnowRunner_Editor_Guide.pdf in the same
documentation package.

18.1. Auto-Activation of Constraints of a Farming Trailer


If your farming trailer uses constraints (see 8.4.2.1. <Constraint>) to obtain a final form of a
farming trailer (like the original trailer_cultivator, trailer_harvester, and trailer_planter),
you need to take into account some nuances about the setup of constraints for farming trailers.

Particularly, all farming trailers must:

1. Interact with the farming field only in their “expanded” form.

2. Be able to expand on the farming field that is in the appropriate state.

NOTE: The appropriate state is identifined according to the corresponding farming Stage
of the objective, see “5.23. Farming” in the “SnowRunner™ Editor Guide” available
as SnowRunner_Editor_Guide.pdf in the same documentation package.

3. Automatically “expand” or “collapse” upon entering or leaving the farming field that is in
the appropriate state.

Moreover, the game will help you to automatically expand or collapse your trailer in the
appropriate conditions if it set up correctly.

Particularly, to automatically expand and collsapse your farming trailer, you can use such
identifiers of Groups of Powered Constraints as "trailer_lift" and "side_lift". These
identifiers will be automatically found by the system in the XML class of the trailer and the

142
corresponding powered constraints will be activated automatically when entering or leaving the
farming field (when it is in the appropriate state).

For example, these "trailer_lift" and "side_lift" Groups of powered constraints do exist in
the original trailer_cultivator.xml:

<PoweredConstraints>
<Group Id="_trailer_foot">
<Constraint
InitialFix="true"
Name="Leg"
Tau="0.04"
TerminalFix="true"
Position="0.4"
/>
</Group>
<Group Id="trailer_lift" LocaleUid="UI_TRAILER_LIFT">
<Constraint
InitialFix="true"
Name="LiftCoupler"
SpeedMult=".1"
TerminalFix="true"
Position="7.8"
/>
</Group>
<Group Id="side_lift" LocaleUid="UI_SIDE_LIFT">
<Constraint
InitialFix="true"
Name="LiftSuspension"
SpeedMult=".35"
TerminalFix="true"
Position="30"
/>
<Constraint
InitialFix="true"
Name="SideRotate"
SpeedMult=".35"
TerminalFix="true"
Position="90"

/>
</Group>
</PoweredConstraints>

Apart from predefined names of these Groups, the setup of these powered constraint is regular.
However, since we have not described it before, let’s provide some details on it, describing only
Powered Constraints that are used in farming (see 18.2 below).

18.2. Powered Constraints used for Farming Trailers


Powered Constraints that are related to farming are a little bit simplier than regular Powered
Constraints, since they require no Actions (that are similar to the ones specified by the Action
attribute of the <Constraint> tag, see 17.1.2 above) and, instead of being controlled by the

143
player, are automatically controlled by the game when the player enters or leaves the farming
field (which should be in the appropriate state).

NOTE: The full description of regular Powered Constraints that are controlled by Actions is out
of the scope of this guide at this moment.

Steps of creation of this type of Powered Constraint are rather simple:

Step 1: Define a Contraint itself and don’t forget about Type="Position" for its Motor.

First of all, you need to define a <Constraint> itself (see 8.4.2.1. <Constraint>) and specify, in
its <Motor> child tag (see 8.4.2.1.1. <Motor>), that this will be a Controlled/Powered constraint,
by setting "Position" as the value of its Type attribute.

For example:

<Truck Type="Trailer" FarmingTrailerType="Cultivator">


...
<PhysicsModel Mesh="trucks/trailers/trailer_cultivator">
<Body ...>
<Body ...>
...
<Body
CenterOfMassOffset="(-0.5; 0; 0)"
Mass="1000"
ModelFrame="BoneSuspension_cdt"
>
<Constraint
AxisLocal="(0; 0; 1)"
Name="LiftSuspension"
Type="Hinge"
MinLimit="0"
MaxLimit="29.38"
>
<Motor
Force="350000"
Tau="0.8"
Type="Position"
/>
</Constraint>
</Body>
</Body>
</Body>
</PhysicsModel>
...
</Truck>

Step 2: Add it to the auto-controlled Group of Powered Constraints.

Then, you need to add the entry about this constraint (with the same Name value) to the <Group>
of Powered Constraints within the <PoweredConstraints> tag. And, the value of the Id of this
<Group> should be either "trailer_lift" or "side_lift", to allow the game to control this
constraint automatically. The added <Group> that will be controlled by the game may have
144
multiple child <Constraint> tags within it, i.e. you are able to provide control over multiple
constraints (sumultaneosly) to the game.

NOTE: The attributes of the <Constraint> tag within the <Group> of <PoweredConstraints>
are different from the description of the <Constraint> itself, given in Step 1. See the
description of these attributes below.

For example:

<Truck Type="Trailer" FarmingTrailerType="Cultivator">


...
<PoweredConstraints>
...
<Group Id="side_lift" LocaleUid="UI_SIDE_LIFT">
<Constraint
InitialFix="true"
Name="LiftSuspension"
SpeedMult=".35"
TerminalFix="true"
Position="30"
/>
...
</Group>
</PoweredConstraints>
...
</Truck>

Attributes of the <Constraint> tag within the <Group> of <PoweredConstraints> are the
following:

• InitialFix="true"
If enabled, then, prior to being activated (for regular Powered Constraints – by the player
pressing a button, for “farming” Powered Constraints – automatically, by the game), a
constraint behaves like a fixed constraint. That is, if the force of the constraint is small,
then, for example, the constraint will spring when the player is driving on bumps. See
also the TerminalFix below.

• Name="LiftSuspension"
This attribute is required. It sets the name of the constraint from the <PhysicsModel> of
the farming trailer (see Step 1 above), which is controlled by this Powered constraint. I.e.,
the value of the Name attribute of <PhysicsModel> → <Constraint> must be equal to
the Name of some <PoweredConstraints> → <Constraint>.

NOTE: The Name attribute is also used for linking sounds. I.e., if you want to add sound
effects to your constraint, then the ConstraintName attribute of the
<ConstraintSounds> → <SoundIK…> tags must be equal to this Name for each sound
that corresponds to this constraint.

• SpeedMult=".35"
The multiplier for the control over (the movement of) the constraint.

145
• TerminalFix="true"
Enables the following behavior: if the constraint hits an obstacle before reaching the end
point of its movement (initiated by the player pressing a button – for regular Powered
Constraints, or initiated automatically, by the game – for “farming” Powered Constraints)
and cannot push it through, then it will stop pushing and will become fixed constraint.
See also the IntialFix above.

• Position="30"
This is the end point, to which the bone moves due to this constraint (its motor). It will
move from zero to Position.

NOTE: In the description of the constraint, you can set the minimum and maximum
values for it. And, the Powered Constraint can only move from zero to the specified
Position. For regular Powered Constraints: the constraint goes to the specified
Position when the player presses the particular button; when they press it again, the
constraint goes back to 0. For Powered Constraints of the “farming” type – the same
process is done automatically. Therefore, typically we set up 0 as the minimum value of
constraint and Position as its maximum value.

Powered Constraints related to farming that are set up according to the Steps above will be
automatically activated by the game and will “expand” or “collapse” your farming trailer upon
entering or leaving the farming field (when it is in the appropriate state).

146
19. Water as Cargo
Starting with the DLC 9 (“Season 9: Renew & Rebuild”), you can create your own, custom
addons, trailers, and semitrailers that will allow the player to work with Water as cargo.
Their ceation is similar to the creation of these entities for Fuel as cargo, you just need to add
some properties to the XML files.

TIP: The XML files of classes of default addon, trailer and semitrailer that can work with water
as cargo are available in the initial.pak archive, at the following paths:

• initial.pak\[media]\_dlc\dlc_9\classes\trucks\addons\frame_addon_watertank.xml
• initial.pak\[media]\_dlc\dlc_9\classes\trucks\trailers\semitrailer_watertank.xml
• initial.pak\[media]\_dlc\dlc_9\classes\trucks\trailers\trailer_watertank.xml

Let’s cover the water-related sections of these XMLs using the frame_addon_watertank.xml:
1. WaterCapacity attribute
First of all, you need to specify the water capacity (in liters) of the water tank in your
addon/trailer/semitrailer. It can be specified in the WaterCapacity attribute of the <TruckData>
tag:
<TruckAddon IsChassisFullOcclusion="true">
<TruckData WaterCapacity="1800">
...
</TruckData>
...
</TruckAddon>

2. <LimitedFluid> tag
Then, you need to specify the dimensions of your water tank in the <LimitedFluid> tag:
<TruckAddon IsChassisFullOcclusion="true">
<TruckData WaterCapacity="1800">
<LimitedFluid
Color="(86; 186; 255; 255)"
Center="(0.636; 1.174; 0)"
LengthX="4.693"
RadiusY="0.934"
RadiusZ="1.167"
Type="Cylinder"
/>
</TruckData>
...
</TruckAddon>

NOTE: This tag now contains Color as an attribute. It specifies the color of the water within the
tank that will be displayed when the player will be filling it. Its an RGBA value, with Alpha
corresponding for visibility of the water (0 – not visible, 255 – maximum visibility).

147
3. Mass of the Water Tank itself in the <PhysicsModel>
Then, in the <PhysicsModel> section, you need to specify the mass of the water tank itself
(without water in it):
<PhysicsModel Mesh="trucks/addons/frame_addon_watertank">
<Body CenterOfMassOffset="(1; 0; 0)" Mass="1500">
<Constraint Type="Rigid" />
<Body _template="Wire" ModelFrame="BoneWireLeft_cdt" />
<Body _template="Wire" ModelFrame="BoneWireRight_cdt" />
<Body _template="Wire" ModelFrame="BoneWireRear_cdt">
<Constraint AxisLocal="(0; 1; 0)" />
</Body>
<Body Collisions="None" Mass="5" ModelFrame="BoneFrameR_cdt">
<Constraint ExplicitParentFrame="0" Type="Fixed" />
</Body>
<Body Collisions="None" Mass="5" ModelFrame="BoneFrameL_cdt">
<Constraint ExplicitParentFrame="1" Type="Fixed" />
</Body>
</Body>
</PhysicsModel>

4. Mass of the Water Tank filled with Water in the <WaterMass>


Similarly to Fuel, you need to specify the mass of the full water tank in the <WaterMass> tag (in
the <Body> tag within it). This will affect the physics of the addon (truck)/trailer/semitrailer. The
mass of the partially full water tank will be calculated based on mass of the full water tank and
WaterCapacity (see 1 above).

<TruckAddon>
...
<WaterMass>
<Body Mass="1800" />
</WaterMass>
...
</TruckAddon>

148
To be continued :)

149

You might also like