SnowRunner

SnowRunner

Discover a wealth of new maps, vehicles, modes, and more, all created by the community! Discover something new every day and expand your SnowRunner experience.

Find the game on Epic Games, Xbox, Playstation, Facebook, Twitter, Instagram, Reddit, Forums, Discord.

Integration of Trucks and Addons. Part #3.

This guide describes the integration of Trucks and Addons. Part #3 of this guide covers particular tags and attributes used for description of Meshes and Trucks (Chapters 7-8).

4 comments

Posted by on (updated ago)


Please refer to:

  • Part #1 of this guide - for the general info on modding files (Chapters 1-4).
  • Part #2 for general aspects of the XML structure (Chapters 5-6).

This part describes particular tags and attributes used for Meshes and Trucks. The hierarchy of sections below corresponds to the hierarchy of tags.

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

If you want an offline copy, you can download this full guide in PDF format from here.

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>" below.

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.
__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

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.
  • 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:
    • R - metalness: metalness of the surface (0 = dielectric, 1 = metal).
    • G - roughness: the roughness of the surface (0 = perfectly smooth surface, 1 = extremely rough surface).
    • 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.
  • 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, snow overlay is cleaned in these cases.
  • DOFOrder="DistanceBased"
    Currently not used in the game.

7.3. <MaterialOverrides>

Section responsible for material customization.

For information on color customization for the truck - see the “15. Color Customization” chapter (in Part #5 of this guide).
For info on the <MaterialOverrides> tag - see the "15.1.1. <MaterialOverrides>" section there.

7.3.1. <MaterialOverride>

The override of the material.

See the “15.1.1.1. <MaterialOverride>” section below in Part #5 of this guide.

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.

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
  • 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.
    • For a truck: No explicit limit for the value.
    • 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:

status markers

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.

  • 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.
  • 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:
    • default - this wheel is always a driving one.
    • full - this wheel is a driving one only then the all-wheel drive is enabled.
    • none - this wheel is not a driving one.
    • 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.
    image 18 1
  • 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.
    image 19 1
  • 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"> ).

  • 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:

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

8.1.5. <SteeringRack>

Steering rack.

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.
  • 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 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:

  • 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.

image 21 1

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.

8.1.12. <OcclusionMap>

Fake shadow below the truck.

fake shadow

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.

message

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:

  • 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). Used only when Type="Cylinder"
    image 24 1
  • 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:

  • 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.

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.

position of the driver

Attributes:

  • Pos="(1.173; 1.825; 0.488)"
    * Position of the root of the driver.
  • SteeringWheelPos="(1.555; 2.153; 0.486)"
    * Position of the center of the steering wheel.
    position 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.
  • 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.

Damage areas

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.

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:

  • 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.
  • 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.

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 mirror. Usage of the coordinates that lie within the plane touching the "top" of the mirror is not recommended (see the illustration below).
    position
  • 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 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.

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.
  • 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.

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:
    • Default - default value. Bones of the truck and its add-ons collide with all collision objects, but not with each other.
    • None - the bone does not collide with anything.
    • All - the bone collides both with external objects and with bones of the truck and addons.
    • Internal - the bone collides with bones of the parent truck and with bones of its addons.
    • 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.
  • 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:
    • 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).
    • Ragdoll - Rotation by all axes within specified limits. The connection is suitable for describing the shoulder joint or bell tongue.
    • Hinge - Rotation by one axis within specified limits. This type of constraint is suitable for describing a door hinge.
    • UnlimitedHinge - unlimited rotation along a given axis.
    • 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.
    • 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 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:
    • Hinge: -360, limits [-360, 360].
    • Prismatic: 0
  • MaxLimit="10.1"
    The upper bound for movement used for the Hinge and Prismatic types of constraints.
    Default value:
    • Hinge: 360, limits [-360, 360].
    • 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 PlainAxisLocal.
    Twist Cone and Plane axes
  • 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. The PlaneMin and PlaneMax will crop this bell.
    plane cones intersecting the movement cone
  • 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.

Attributes:

  • Type="Spring"
    Type of the motor.
    Values:
    • Spring - a spring.
    • 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:
    • Spring: by default: 0, limits: [0, 1000000000].
    • 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:

image 32

All attributes are the same as in Motor.

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.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
  • 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.

image 33

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

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.

image 35

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

Attributes:

  • Pos="(3.759; 1.169; 0.944)"
    Light source position
  • Dir="(1; -0.3; 0)"
    Direction vector
  • 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:
Flare in the game

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.

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:

this light 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.

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.

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
  • 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 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:
    • scoutVehicleImg30 - icon for scouts:
      scout icon
    • offroadVehicleImg30 - icon for offroad vehicles:
      offroad icon
    • highwayVehicleImg30 - icon for highway vehicles:
      highway icon
    • heavyVehicleImg30 - icon for heavy vehicles:
      heavy icon
    • heavyDutyVehicleImg30 - icon for heavy duty vehicles:
      heavy duty icon


      icon
  • 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:
    • scoutVehicleImg - icon for scouts
    • offroadVehicleImg - icon for offroad vehicles
    • highwayVehicleImg - icon for highway vehicles
    • heavyVehicleImg - icon for heavy vehicles
    • 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.
    This image must have the dimensions of 328x458.
    uiicon328x458
  • 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.
    manufacturer logo manufacturer logo 2
  • 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:

  • 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>

Section that 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:

<~INNERCODE~ class="lang-xml"><AddonSockets>
    <Socket Names="Addon1"/>
    <Socket Names="Addon2, Addon3"/>
</AddonSockets>
<AddonSockets>
    <Socket Names="Addon4"/>
    <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.

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.
    image 39
  • 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.
  • 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.

image 40

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:

image 41

image 42

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.

image 43

Attributes:

  • Frame="BoneCabin_cdt"
    * A name of the bone from the physical model of the truck, which the addon bone is attached to.
  • 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.
    image 44

    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 a crash.
    image 45

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.

image 46

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.

image 47

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.
  • 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:
    • Hinge - rotation around the AxisLocal axis.
    • Slider- linear movement along the AxisLocal axis.
    • Hinge2 - rotation around axes perpendicular to the AxisLocal axis.


For description of tags and attributes used for:

  • Suspensions, Engines, Gearboxes, Wheels, and Addons - please refer to Part #4 of this guide.
  • Creation of custom skins and colorization - please refer to Part #5 of this guide.


4 comments

Join the community or sign in with your gaming account to join the conversation:

TV
Techno_Viking @techno-viking1

Hello, when I add a new gearbox xml for a mod truck I don't seem to be able to specify a default gearbox xml and the mod xml together like this:
<GearboxSocket Default="g_truck_mod" Type="gearboxes_mod, gearboxes_trucks" />

Check mod will throw an error with both specified and the log shows the following error: "Not found gearbox g_truck_mod for gearbox type gearboxes_mod, gearboxes_trucks"

If I only specify the mod gearbox xml the mod gearbox works as expected. What am I missing to be able to make the default and mod transmissions available to a mod truck?

M
Maypeur @maypeur

Hi, i think Type support only one xml file.
So just type the xml filename which contains your gearbor mod without extension.
In Default attribut setup the name you typed in attribut "Name" of <Gearbox> element from gearbox xml file.

TV
Techno_Viking @techno-viking1

Multiple should be supported; read above from 8.1.16:
"* Name of the XML file from the .../classes/gearboxes folder. You can specify multiple types, separating them by commas: "gearboxes_trucks, gearboxes_special"."

О
ОверКлокер @na1587225998

These ******* mirrors without an editor can’t be fine tuned, WHERE is the editor Pavel?