“Truck” is a text-based file format which defines all physically simulated objects in the game, be it vehicles of any kind, machinery, loads or any other things. The name is historical - Rigs of Rods was originally a heavy truck simulator, other kinds of vehicles came later.
The 3x3” 11 gauge, 1” hardware, Monster Series can be configured as Pullup Rig/Rack Hybrids that are expandable in 4’ and 6’ sections for stand alone Pullup Rigs, Monster Wallmounts or Racks. The Monster Series Pullup Rigs and Rack were designed specifically for use by the top professional, collegiate and high school athletic facilities.
Recognized filename extensions for this format are: .truck
, .car
, .boat
, .airplane
, .train
, .machine
, .trailer
, .load
, .fixed
. Note the extension is only informative, the actual type of object is determined by file contents.
The truckfile is divided into sections, each with defined purpose. Except the title, every section starts with a keyword. Order of sections matters (for example: cinecams requires beams).
Comment lines can be inserted by putting ;
or //
at the beginning of the line.
See Vehicle Concepts to understand the building philosophy. I recommend using the following method for construction:
To see a simple truck file example, see the Step by Step Truck Construction.
Before we start, let’s ask an important question: Is it a truck, plane, train, or boat? Or what makes a truck a truck and a plane a plane and a train a train, or a boat a boat? Simple:
Also, notice that:
.load
Here a few recommendations for those who want to build a light car: RoR is optimized for heavy trucks, so you have to use some extra sections that help you create a realistic car:
150000
and damping 1000
.Every keyword (directive, inline-section or section) which has parameters should have them listed in this manner:
VALUE
; Explanatory text.-1.0
; Parameters are written as shown, followed by a colon. The data type should be easy to understand for a human, not technically accurate.VALUE
;Optional parameters have “(optional)” text after them.-1
;Parameters which must be entered but can contain “empty value” are described (nullable) and have “Empty value” section.a
: What this option does.b
: Another optionc
or C
: Case insensitive option.The game will not run without these sections. Every one of these sections must be present for a vehicle to work in the game!
This is the only section not introduced by a keyword. It is the name of the truck, and it absolutely positively must be the first line of the file.
This section defines some global parameters. Those parameters are:
This section begins the structural definition of the vehicle. Each line defines a node.
NOTE: You can put a comment at the end of a node-line.
This section supports multiple options as argument.
If you want a f
and b
node together you could write something like this:
This setting will set the node mass to 2000 kilograms:
This setting will set the node as non-contactable and set the mass to 2000 kilograms:
You can debug your truck’s node masses by enabling Debug Truck Mass
in RoRConfig:
Look into your RoR.log
after loading and you could see something like this:
You can set any option property, loadweight, friction, volume, and surface-coefficients as default with set_node_defaults.
Nodes2 use the same syntax as nodes, except the first argument can be any string instead of a number. After using a name for a node in the nodes2 section, you can use it for any node parsing throughout the rest of the file. valid characters for the string: a-z,A-Z,0-9, _
For example:
We advise to use the following scheme for naming the nodes:
So for example a rear hook node could look like this:
There is also a fallback in place which will resolve named nodes to normal node numbers. For example if you convert an existing truck to named nodes (nodes2) and don’t want to replace all occurrences, just leave the numbers there, it will take them up as classic node numbers.
Things to keep in mind:
nodes
to nodes2
is easy: just replace nodes
with nodes2
, the numbers will act as the name stringsnodes2
to nodes
is impossible, since nodes rely on the linear numbering of nodesThis section defines all the beams connecting nodes. Each line describes a beam.
TIP: Support beams are very useful for limiting movement of body panels like trunks, hoods, and doors from going inside the car while still allowing rotation without costly and complicated collisions. Default expansion break length is . User set break length factor is optional. Valid factors are > 0.0. .
This section supports multiple options as argument. If you want a ‘i’ and ‘r’ node together you could write something like this:
This section is important. It helps to position the truck in space, by defining a local direction reference. This is used to measure the pitch and the roll of the truck. It is also very important to orient the truck’s cameras.
The three parameters are node numbers. The first is the reference node and may be anywhere. The second must be behind the first (if you look at the front of the truck, it is hidden behind the first). The third must be at the left of the first (if you look to the right of the truck, it is hidden by the first).
Correct relative placement of these nodes is important, or it may break the inside camera view.
This defines the position of the in-truck camera. It is a special node suspended from eight chassis nodes.
Required parameters:
Optional parameters:
Example:
This section will stop the parser. Everything after it will be ignored.
Since version 0.4.5, it’s optional. In previous versions it’s STRICTLY REQUIRED - without it, the vehicle will crash the game.
These sections are not required, but will make it easier to locate your file or work with. Do not use carets in your syntax, they are used to mark sections!
You should use the guid feature to allow RoR to recognize your truck uniquely.
This section is required for skins.
You can generate some GUIDs here.
This tells RoR what version of RoR your truck is built for. Most trucks built today should use fileformatversion 3
Type = Tells what the author referenced in the next section did. Recommended types to put: chassis, texture, support, etc.
AuthorID = ID of the author’s RoR Forum account. To get your ID, view your forum profile and check the number shown in the URL. For example:
5831
would be the ID.
AuthorName = The author’s username.
Email = The author’s e-mail. (optional)
Each author requires a separate line.
Please note: Do not use spaces in the type, authorname, or email. Instead, use an underscore ( _ ). In the game, the underscore will be replaced with a space.
Pretty self-explanatory. Only the first 3 lines will get displayed in the Truck HUD. Do not put keywords in the description; they will mess up the truck file.
General info about the vehicle.
Unique ID(nullable): String; default = -1; Empty value = -1; This field specifies the unique file ID (you get one by uploading it to the repository).
Category ID(optional)(nullable): Decimal number; default = -1; Empty value = -1; This is the category number from the repository. It is recommended that you give your truck a category.
File version(optional): Decimal number; default = 0; Version of the vehicle, read by users and the repository. For backwards compatibility, this field also accepts real number (a warning is reported).
Available category IDs
NOTE: This section is not used as of version 0.39.5+
The help section gives the name of the material used for the help panel on the in-game dashboard. This material must be defined elsewhere in a material file. This is optional. (But it looks cool, so use it!)
NOTE: This setting can be overriden by section “guisettings”
Comments are ignored by RoR. They are useful for telling users what things do in the truck file. Comments can be put anywhere by putting a semicolon ( ;
) as the first character of the line to be commented.
You can also comment out several lines of text using this format:
Excludes the vehicle/load from being shown in the vehicle menu on top of the screen. Place the single keyword somewhere in the vehicle/load file.
The following sections define important vehicle parts, like wheels, shock absorbers, and the like.
The engine section contains the engine parameters. Parameters are:
One good source of practical gear ratios is Eaton Fuller. To see the ratios, click the name of the transmission and find “Product Specifications Guide”. It’s wise to make sure you can get into final gear. If your vehicle decelerates in a gear you may not have enough power, or the gear ratio may be too high.
Engoption sets optional parameters to the engine. It is mainly used for car engines. Parameters are:
PROTIP: Use the “Engine inertia” value to make the engine start faster. With a value of 0.1, the engine will start instantly. With a value of 10, the engine requires about 30 seconds of cranking before it starts. Values between 1 and 3.5 are great for vehicles that you drive frequently, or race vehicles and the like that you want to start fast. However, using a higher value makes it harder to stall the engine. Making something to tow a lot of weight? Raise it up to 9 or 10 and it won’t really stall, ever. (With values over 10, it may not start at all, so be careful.)
Engine’s Turbo settings:
When defining this on your truck file, you do not need to put “t” type of vehicle in the engoptions.
There are 2 version of this section:
Using Version 1 you have more control over the power added to the engine, but this can end up in unrealistic simulation if the values aren’t correctly chosen. Turbo is always giving 20 PSI at max rpm. (Which isn’t realistic.) Using Version 2 you have less control over the power added, but you can end up with a realistic simulation depending on the maxPSI value.
Version 1: (Not recommended)
Version 2:
Parameters:
AntiLockBrakes settings:
Examples of MODE settings:
System is activated at spawn with no dashboard indicator:
mode: ON & NODASH
System is activated at spawn and can NOT be shut off:
mode: ON & NOTOGGLE
System is activated at spawn, no dashboard indicator and can NOT be shut off
mode: ON & NODASH & NOTOGGLE
System deactivated at spawn and no dashboard indicator:
mode: OFF & NODASH
In game, you can toggle the anti-lock brakes on/off with SHIFT+B
Anti-lock Brakes do NOT have any impact on your parking brake behavior.
NOTE: wheelslip and fade_speed have been made obsolete with 0.4.8.0 (see: https://github.com/RigsOfRods/rigs-of-rods/commit/57dfbba4f16431e7b6db878223d86a17f97a92ce)
In game, you can toggle the traction control on/off with SHIFT+V
Parameters:
Valid modes:
NOTE: This section has been made obsolete with 0.4.6.0 (see: https://github.com/RigsOfRods/rigs-of-rods/commit/523c02f854853cc5159d4aacdd41cf1e73dff5dd)
This section fixes the bug, where trucks slowly roll down a slope no matter how much brake-force is applied.
SlopeBrake settings:
This section is important: it defines the wheels! Parameters are:
3
makes the wheel triangular, and 4
makes the wheel square. Recommended values are between 10
and 16
.9999
if there is no rigidity node.0
for unbraked wheels, 1
for braked wheels. For directional braking, as found in airplanes, use 2
for a left wheel, 3
for a right wheel. In 0.37+, 4
is used for a wheel with a footbrake, but no parking brake.0
for undriven wheels, 1
for wheels driven forwards, 2
for wheels driven backwardstracks/wheelface
for the face and tracks/wheelband1
for a single wheel or tracks/wheelband2
for dual mounted wheels.Notes:
This section improves wheels by simulating both wheel tires and rims. The player is able to set tire pressure via key input.
3
makes the wheel triangular, and 4
makes the wheel square. Recommended values are between 10
and 16
.9999
if there is no rigidity node.0
for unbraked wheels, 1
for braked wheels. For directional braking, as found in airplanes, use 2
for a left wheel, 3
for a right wheel. In 0.37+, 4
is used for a wheel with a footbrake, but no parking brake.0
for an undriven wheel, 1
for a wheel driven forwards, 2
for a wheel driven backwards.tracks/wheelface
for the face and tracks/wheelband1
for a single wheel or tracks/wheelband2
for dual mounted wheels.Mesh wheels allows you to do very nice wheels. It takes an Ogre3D mesh of a rim (the rim only, without the tire!). The mesh should be centered, and of the right size for the wheel you want to do: its outer diameter should be the same as the “rim_radius” parameter, and its width should be the same as the distance between node1 and node2. The other parameters are similar to the wheels section, though there are a few differences.
The side value should be l
or r
depending on the side of the wheel, and the final parameters are the mesh name and the material for the tire. The mapping of the texture should look something like this:
Here is an example picture of a rim mesh, as it should be modeled. The tire geometry is added dynamically afterward by the game, and will flex like a real tire.
This section works exactly the same way as meshwheels, except one difference.
The tread of the wheel you generate does use the meshwheels section spring and damping ratios while the rim will use the ones from the set_beam_defaults.
It enables you to make quite soft and flexing wheels, which have a lot lateral grip and are very reliable and predictable in comparison to normal meshwheels.
Very useful for flex body tires, since the nodeflip-bug is mostly gone with this used the right way.
Use set_beam_defaults. that make sense for rims (high spring, low damping) while the tires itself can be soft and have high damping values:
This section works exactly the same way then meshwheels2, except 2 differences:
There is a contactive rim generated and you can place a tire mesh which is converted to a flexbody by RoR.
For now, the rim mesh is a prop. Might be upgraded to flexbody later.
This one has complete new tire physics, so for now, happy testing, please give feedback.
Shocks can be seen as tunable beams, useful for suspensions.
0
means the shock will not be able to contract at all, 1
will let it contract all the way to zero length. If the shock tries to shorten more than this value allows, it will become as rigid as a normal beam.0
means the shock will not be able to extend at all. 1
means the shock will be able to double its length. Higher values allow for longer extension.1.0
.i
: This shock is invisible (default is visible).l
OR L: Stability active suspension for left side.r
OR R: Stability active suspension for right side.n
: Placeholder. Does nothing, parser ignores it silently.Shocks can be seen as tunable beams, useful for suspensions.
Parameters:
0
disables this option. 1…x as multipliers, example: [ maximum springrate springrate + (factor*springrate) ]0
= disabled, 1…x as multipliers, example:[ maximum dampingrate springrate + (factor*dampingrate) ]0
disables this option. 1…x as multipliers, example: [ maximum springrate springrate + (factor*springrate) ]0
= disabled, 1…x as multipliers, example:[ maximum dampingrate springrate + (factor*dampingrate) ]0
means the shock will not be able to contract at all, 1
will let it contract all the way to zero length. If the shock tries to shorten more than this value allows, it will become as rigid as a normal beam.0
means the shock will not be able to extend at all. 1
means the shock will be able to double its length. Higher values allow for longer extension.1.0
.i
: This shock is invisible (default is visible).s
: soft bump boundaries, use when shocks reach limiters too often and “jumprebound” (default is hard bump boundaries)m
: metric values for shortbound/longbound applying to the length of the beamM
: Absolute metric values for shortbound/longbound, settings apply without regarding to the original length of the beam. Use with caution, check RoR.log
for errors.IMPORTANT:
RoR.log
regarding to wrong values in ‘M’ setting or any other shock values.Shockswapping help:
This is an example how to get started with replacing shocks with shocks2. In this example, the shocks2 have exactly the same functionality then the original shocks. After adding the shocks2 delete the old shock and you are fine to tune/tweak your truck.
[ Version 0.4.8.0+ ] Shocks can be seen as tunable beams, useful for suspensions.
Parameters:
0
means the shock will not be able to contract at all, 1
will let it contract all the way to zero length. If the shock tries to shorten more than this value allows, it will become as rigid as a normal beam.0
means the shock will not be able to extend at all. 1
means the shock will be able to double its length. Higher values allow for longer extension.1.0
.i
: This shock is invisible (default is visible).m
: metric values for shortbound/longbound applying to the length of the beamM
: Absolute metric values for shortbound/longbound, settings apply without regarding to the original length of the beam. Use with caution, check RoR.log
for errors.The hydros section is concerned only with the steering actuators! They are beams which change their length depending on the steering of the truck. Hydros can use inertia.
Parameters:
i
: Makes the hydro invisibles
: (Land vehicles) Disables the hydro at high speed (as seen sometimes with rear steering axles on large trucks)a
: [ Version 0.36+ ] (Airplanes) This hydro is commanded by aileron input.r
: [ Version 0.36+ ] (Airplanes) This hydro is commanded by rudder input.e
: [ Version 0.36+ ] (Airplanes) This hydro is commanded by elevator input.u
: [ Version 0.36+ ] (Airplanes) This hydro is commanded by the combination of aileron input and elevator input.v
: [ Version 0.36+ ] (Airplanes) This hydro is commanded by the combination of inverse aileron input and elevator input.x
: [ Version 0.36+ ] (Airplanes) This hydro is commanded by the combination of aileron input and rudder input.y
: [ Version 0.36+ ] (Airplanes) This hydro is commanded by the combination of inverse aileron input and rudder input.g
: [ Version 0.36+ ] (Airplanes) This hydro is commanded by the combination of elevator input and rudder input.h
: [ Version 0.36+ ] (Airplanes) This hydro is commanded by the combination of inverse elevator input and rudder input.The animator section concerns only Animators referring to game data! They are beams which change their length depending on the variables of the simulation.
The parameters are:
Options:
vis
- This creates a visible animator. ( It’s not necessarily needed, but can help users read the truck file.)inv
- This creates an invisible animator.airspeed
- This animator extends or contracts with the actual speed (not speedometer indicated speed) for any vehicle.vvi
- This animator extends or contracts with the vehicle’s vertical velocity.altimeter100k
- This animator extends or contracts with the vehicle’s altitude up to 100,000 feet.altimeter10k
- This animator extends or contracts with the vehicle’s altitude up to 10,000 feet, at which point it will revert back to its original length.altimeter1k
- This animator extends or contracts with the vehicle’s altitude up to 1,000 feet, at which point it will revert back to its original length. These three animators can be used to create altimeters with three needles or similar objects, though for those small applications it is usually recommended that Add_animation be used.aoa
- This animator extends or contracts with the dashboard’s angle of attack.flap
- This animator extends or contracts with the flap setting on the vehicle.airbrake
- This animator extends or contracts with the airbrake setting on the vehicle.roll
- This animator extends or contracts with the vehicle’s roll. It will flip at 180 degrees roll to -180 degrees roll. This option can be used for an automatic trim feature.pitch
- This animator extends or contracts with the vehicle’s pitch. It will flip back at 180 degrees pitch to -180 degrees pitch. This option can be used for an automatic trim feature.throttle1
- This animator extends or contracts with the throttle setting of an aircraft’s first engine. This option can be used for thruster mechanics. Valid sources include throttle1, throttle2, etc. etc. up to throttle8.rpm1
- This animator extends or contracts with the RPM of an aircraft’s first engine. This option can be used for thruster mechanics. Valid sources include rpm1, rpm2, etc. etc. up to rpm8.aerotorq1
- This animator extends or contracts with the torque of an aircraft’s first engine. Note that this only works for propeller engines, because torque is not applicable to jets. Valid sources include aerotorq1, aerotorq2, etc. etc. up to aerotorq8.aeropit1
- This animator extends or contracts with the pitch of an aircraft’s first engine. Note that this only makes sense with propeller engines, pitch is not applicable to jets. Valid sources include aeropit1, aeropit2, etc. etc. up to aerotorq8.aerostatus1
- This animator extends with the On/Off/Fire status of an aircraft’s first engine. Valid sources include aerostatus1, aerostatus2, etc. etc. up to aerostatus8.brakes
- This animator extends or contracts with the vehicle’s brake status.accel
- This animator extends or contracts with the vehicle’s accelerator status.clutch
- This animator extends or contracts with the vehicle’s clutch status.speedo
- This animator extends or contracts with the speedometer indication. It scales with the guisetting speedometer. (It is best to use it even if there is no custom overlay dashboard; it simplifies the adjustment a lot.)tacho
- This animator extends or contracts with the vehicle’s RPM. It scales with guisetting tachometer. (It is best use it even if there is no custom overlay dashboard; simplifies the adjustment a lot.)turbo
- This animator extends or contracts with the vehicle’s turbocharger PSI.parking
- This animator extends or contracts with the vehicle’s parking brake status.shifterman1
- H-shift left right animator ( Reverse | 1-2 | 3-4 | 5-6...11-12
as positions, scales with engine settings (maxGear)shifterman2
- H-shift forth/back animator Reverse-2-6-8-10-12 | 1-3-5-7-9-11
as positionssequential
- sequential shift animator ( i.e for tiptronic or wheel shift pedals), can be used for commands too ( no settable limits then )shifterlin
- for auto transmission animations or gearselect indicatorstorque
- animator to simulate engine torque, useful in addition to wheel nodearmsdifflock
- This animator extends or contracts with the difflock status of the truck (It only works when differentials are present in the truck.)rudderboat
- This animator extends or contracts with the steering hydro on boats.throttleboat
- This animator extends or contracts with the throttle status on boats.shortlimit
- Adds shortbound movement limit to the animator, needs to be followed by a valid number. Limits are calculated in percentage like shocks. [ Version 0.38.24+ ]longlimit
- Adds longbound movement limit to the animator, needs to be followed by a valid number. Limits are calculated in percentage like shocks. [ Version 0.38.24+ ]All options need to be connected by an vertical bar |
, please refer to the example below.
You can stack multiple options (like: airpseed | vvi | inv
), but it is not recommended and may result in weird behaviors.
All animators are scaled to a maximum of -1/+1 as default coefficient, use the ratio setting to get the movement you want.
Speed or force of the animators is NOT settable, though you can alter movement speed just with simple lever mechanics.
The longer the lever arm, the slower the node will move. To tune your torque-animator to the needs of the truck, let it just work against a stiff shocks2. The harder you make the shock, the more engine-rpm torque effect you get.
Animators can use set_inertia_defaults. Inertia helps a lot to smooth instant movement like with shifters or airbrakes.
These sections define behaviors for the vehicle, like command-operated hydraulics and modifications to how beams behave.
The commands section describes the “real” hydros, that is, those you command with the function keys. They are like beams, but their length varies depending with the function keys you press. The parameters are:
i
: Makes the command beam invisible.r
: Makes the command behave like a rope or a winch (no compression strength).c
: Makes the command beam auto-center: It will automatically return it to its starting position when a lengthening/shortening key is released.n
: Placeholder, does nothing (useful as filler when you need to specify description)CTRL+T
ingame. There is no need to put a key in front of the text (like F1:_do_something) this will be done automatically! Writing “hide” will hide the command from the “t-screen”.This is the default keymap:
F1
F2
F3
etc. etc.
F12
CTRL+F1
CTRL+F2
etc. etc.
CTRL+F12
ALT+F1
ALT+F2
etc. etc.
ALT+F12
CTRL+ALT+F1
CTRL+ALT+F2
etc. etc.
CTRL+ALT+F10
Since RoR 0.4.0.5 it is possible to use up to 84 commands. The keymap changed because of that:
F1
F2
F3
etc. etc.
F12
CTRL+F1
CTRL+F2
etc. etc.
CTRL+F12
SHIFT+F1
SHIFT+F2
etc. etc.
SHIFT+F12
ALT+F1
ALT+F2
etc. etc.
ALT+F10
CTRL+SHIFT+F1
CTRL+SHIFT+F2
etc. etc.
CTRL+SHIFT+F11
CTRL+ALT+F1
CTRL+ALT+F2
etc. etc.
CTRL+ALT+F12
CTRL+SHIFT+ALT+F1
CTRL+SHIFT+ALT+F2
etc. etc
CTRL+SHIFT+ALT+F12
Note that some keymapped commands are by default assigned to Windows commands.. i.e. ALT+F4
closes the active window (in this case the RoR render window). It is best to avoid using those buttons if at all possible.
If you hold F4
then hold/press ALT
, the window should stay open and the command will work.
Improved commands.
Commands are beams which contract and extend when player presses the corresponding key combination.
Since [ Version 0.36.2 ] you can specify an inertia function for your command. This reduces the swing of commands since they will operate smoothly with inertia.
The parameters are:
n
: Filler option, does nothing.i
: Makes the command beam invisible.r
: Makes the command beam behave like a rope or a winch.c
: Makes the command beam auto-center: It will automatically return it to its starting position when a lengthening/shortening key is released.f
: Stops the command moving faster when engine revs increase.p
: Activates press-once functionality: A single press of a shortening/lengthening key will lengthen/shorten the command beam as much as possible. A second keypress of the key which started the command moving stops the automatic movement.o
: is like p
, but it will stop in the center position.CTRL+T
ingame. There is no need to put a key in front of the text (like F1:_do_something) this will be done automatically! Writing “hide” will hide the command from the “t-screen”.Note: You may mix commands
/commands2
sections, depending on what you want to use. Example:
This command will set the defaults for all following commands, hydros, animators and rotators.
NOTE: Both commas and spaces are accepted as delimiters between parameters.
Rotators are alternate commands(hydros) that allows you to do turntables, like in the base of a rotating crane. They use 10 reference nodes:
Then, in a similar way to commands, comes the rate of rotation, and the numbers of the left and right function keys.
New in [ Version 0.4+ ]
0.0
0.0
1.0
Rotators can use inertia.
The reference nodes for the baseplate and rotator plate must also match each other in order. (i.e. if you start at the front left for the base plate and work clockwise, do the same for the rotator plate!) See the example rotators code and attached picture. Both plates must be identical!
Same as rotators section, but more options that allow lightweight rotators, rotator force setting and tolerance (anti jitter) setting and correct description parsing. Additional options:
10000000
0.0
. Rise gently to make your rotator spawn and rotate stable if neededForwards the command keys pressed while riding a truck to loads in close proximity. It is used to remote control the commands of a load. The load must have the “importcommands” tag.
In 0.4.0.5 and above it is possible to toggle forwardcommands on/off for the current beam object. The standard button assignment for this is CTRL+SHIFT+F
.
Enables a load to receive command keys from a manned vehicle in close proximity. The controlling vehicle must have the “forwardcommands” tag. The load only receives the keys that are pressed by the player, it must contain a commands section. Commands section for loads is defined in the same manner as in manned trucks.
In 0.4.0.5 and above it is possible to toggle importcommands on/off for the current beam object. The standard button assignment for this is CTRL+SHIFT+I
.
This is not a section, but a self-contained line that can be inserted anywhere in the truck file. It changes all the beams (and the hydros and ropes) declared after this line. You can use this line many times to make different groups of beams that have different characteristics (e.g. stronger chassis, softer cab, etc.).
Parameters:
9000000
; The overall stiffness of a beam. The higher the value the stiffer the beam.12000<
/span>; The resistance to motion of a beam. Higher values make the beam less likely to deform.400000
; The amount of force that must be applied to a beam before it will not return to its original length. The lower the value, the easier it is to deform.1000000
; The amount of force that must be applied to a beam before it will break.0.05
(= 5cm) The visual size of a beam in meters. This setting only has a visual effect. Changing it does not modify how a truck will drive..material
file.0.0
- 1.0
; Default: 0.0
; This defines how elastic the deformation of a beam is. It is explained in greater detail below.To use default values without having to type the numbers, use -1
in each field. Example:
Or if you want to use the default values as a base:
Beware: Excessive spring will result in an unstable chassis. Increasing the damping will help with this, but excessive damping will crash RoR. Higher chassis mass may mitigate that problem if applicable. If you create a light car, you may want to reduce the spring, damping and deformation values to match the real, softer frame of a car, and also increase stability.
Be aware that the current default values are “overspringy”, or “underdamped” for stability reasons (that is why trucks often look too springy when they fall down a slope), but on softer designs you can correct this and have a better damping ratio. Missing beam textures may make RoR unstable. Example for a car:
If you want to keep a rigid chassis base and drivetrain, you can do:
If you want to to make something deform well (like for flexbodies), use these settings for the beam group you want to deform together with the global enable_advanced_deformation option to unleash unlimited beam physics for best results in crash deformation:
The plastic deformation coefficient is 0.0
by default (elastic deformation). By setting it as property you can tune the related beam group to your needs.
For example, if a cube made of nodes and beams is crashed to a wall, then the placement of the nodes are displaced, altering the original shape to an irregular one.
This also affects the length of beams, if nodes are displaced, the beams may conform to a new shorter or longer length, and staying that way until another outside force is applied.
Valid values: 0.0
- 1.0
, do not exceed that range! A plastic deformation coefficient setting of 0.0
is close to the original beam behavior of RoR 0.36.2 (quite elastic). 1.0
is close to the maximum plastic deformation you were able to reach with the former experimental enable_advanced_deformation
patch.
Never use a break setting lower then a deform setting! This will result in a beam breaking instantly when it starts deforming!
This is not a section, but a self-contained line that can be inserted anywhere in the truck file. It changes the scale of all following set_beam_defaults
lines to a certain factor:
The default is all 1 for all arguments.
Example that scales spring to 50%:
Take note:
set_beam_defaults
, you must always give all four arguments. Its not possible to leave some out.set_beam_defaults
line that is scaled will output a line to RoR.log
saying Due to using set_beam_defaults_scale, this set_beam_defaults was interpreted as ...
This is a directive which affects all nodes (including wheel and camera nodes) declared on lines below it. You can use this line many times to make different groups of nodes that have different characteristics (e.g. more grip for wheels, more surface drag for chassis nodes, etc.).
The parameters are:
0.0
; The default loadweight mass applied to a node. Will be overridden by a per node definition (the option l
). Minimass calculation is unaffected.1.0
; The amount to multiply the node’s friction by. A setting of 2
will double the friction; a setting of 0
will create a frictionless node.1.0
; The amount to multiply the node’s buoyancy. A setting of 2
will double the buoyancy; a setting of 0
will create a non-buoyant node. This only applies when the node is in a fluid.1.0
; The amount to multiply the node’s surface by. A setting of 2
will double the surface; a setting of 0
will create a node with no surface. This only applies when the node is in a fluid.l
property if a default loadweight is set.Important: Buoyancy volume and drag surface settings only have effect on fluids defined in ground_models.cfg
(mud definitions), so right now they do not work with the standard RoR Water.
To use default values without having to type the numbers, use “-1” in each field. For example:
Beware: Excessive friction, surface and volume will result in an unstable node/beam structure when driving in mud. If your wheels/truck explodes when driving from solid ground onto mud, lower the friction and/or volume setting. If a wheel cracks while in the mud, lower the volume and/or the surface setting.
Syntax is set_node_defaults loadweight, traction, buoyancy, surface
Mud tire example, unloaded, increased traction, higher buoyancy, higher drag surface and set to extra per node buoyancy:
Chassis, loaded with 5
kg per node, reduced traction, no buoyancy, higher drag surface:
Tracks example, high traction, low buoyancy, low surface, loaded with 50
kg per node:
Steam boat paddlewheel, loaded with 75
kg per node, no traction, no buoyancy, high drag surface:
Ccontactless with default settings:
The new L
node option will help to understand and use set_node_defaults
, p
node option will boost fps even with tracked vehicles on slower computers. See: nodes
This is not a section, but a self-contained line that can be inserted anywhere in the truck file. It changes the general beams deformation physics.
Use this only once per truck file, it’s a general activation and setting of advanced beam physics . Its recommended to place the enable_advanced_deformation before the first beams section in your truck-file.
Truck file syntax:
This will remove any limit and thresholds from the set_beam_defaults processing. Its recommended to use it for the development of properly deforming flexbody nodebeam structures.
NOTE: This directive has no effect as of version 0.39.5+
Enables collision between wheels and the contactable textured surfaces of a truck.
The contacters section lists the nodes that may contact with cab triangles. This concerns only contacts with other trucks or loads. You can easily omit this section at first.
Triggers are special beams which trigger user-specified events when extended/contracted to a given bound. They have no physics attributes and can extend indefinitely.
Parameters:
i
: Makes the trigger beam invisiblec
: Set the boundary calculation to command-style, just for conveniencex
: Set the trigger to disabled on startup ( default = enabled
), will get useless after first activation by a triggerblockerb
: Blocks other commandkeys, shortkey at shortbound, longkey at longbound. If longkey is set to -1
, shortkey will get blocked at short and at longbound. It does not block of manual user inputs, just triggers.B
: Blocks other triggers when triggered, a number in shortkey represent the number of triggers to block at shortbound , a number in longkey the number of triggers to release at longbound.A
: [ Version 0.38.23+ ] Same as the Blocker B
, but inverted activation. Will block while between shotbound and longbound a number of triggers (shortkey) and release if not (longkey).s
: Switches commandnumbers when triggered set in shortkey and longkey. Good to build wipers or similar, see examplesh
: [ Version 0.38.26+ ] You can use triggers to lock or unlock hookgroups ( only hookgroups <= -3
); Unlocks hookgroups shortkey at shortbound and hookgroup longkey at longbound.H
: [ Version 0.38.26+ ] You can use triggers to lock or unlock hookgroups ( only hookgroups <= -3
); Locks hookgroups shortkey at shortbound and hookgroup longkey at longbound.t
: [ Version 0.4.0.7+ ] Continuous trigger, delivers a value of 0
below and at shortbound, a value of 1
over and at longbound. Between these boundaries, this trigger will deliver a value between 0
and 1
(linear), depending on the current position. See “engine trigger” for details on how to use this.E
: [ Version 0.4.0.7+ ] Engine trigger. This trigger gives you control over various vehicle driving functions. It is recommended to use this in combination with a t
-trigger to get precise, continous control. Works as follows: 0
. As RoR only supports one engine per vehicle at the moment, always put 0
here.0
: Clutch1
: Brake2
: Accelerator3
: RPM Control (not available at the moment)4
: Shift Up (use no “t”-trigger here). Will shift up on short and longbound.5
: Shift Down (use no “t”-trigger here). Will shift down on short and longbound.1.0
; Represents the time a boundarycheck is disabled for trigger switches ( option s
) to avoid lockup.This section defines lockgroups for nodes. It has to be AFTER the nodes section
Lockgroup Default = -1
, all nodes can be locked by standard hooks with no special lockgroup set
Important:
9999
skip the node from any locking attemptsPerformance boost option (needs to be BEFORE the nodes section):
This will set all nodes to 9999
(deny locking) of the truck by default.
Any lockgroups defined later in the truck will override this setting for the specified node.
Allows you to define exactly where standard hooks can lock to your truck and boost performance a lot when autolock hooks are used.
Its recommended to use this option as default.
This section defines special options for hooknodes setup in the nodes section. It has to be placed after the nodes section.
h
hookrange:
The range a hook scans for a valid node to lock to, Default: 0.4
speedcoef:
The speed a hook pulls the node to lock into locking position. Default: 1.0
maxforce:
The force limit where a locking attempt is canceled. Default: 100000000.0
hookgroup:
The hookgroup a hook belongs to. Standard hook: -1
(Default), Reserved for autolock: -2
, any special hookgroup for triggerd hooks -3
or less. Only signed integer are valid. Keyword variants: hookgroup
/ hgroup
lockgroup:
The lockgroup a hook belongs to. Lock everything: -1
(Default), all other numbers the hook will lock only to a node with the same lockgroup set. Only signed integer are valid. Keyword variants: lockgroup
/ lgroup
9999
is reseved for nodes that are skipped while locking attempts. Do NOT use lockgroup 9999
with a hook.timer:
Delay timer for autolocking hooks before they attempt to relock. Default: 5.0
. Only positive settings are validself-lock:
This hook can lock to the truck its placed on too. Keyword variants: self-lock
/ selflock
/ self_lock
auto-lock:
This hook will lock automatically to valid nodes in range. Keyword variants: auto-lock
/ autolock
/ auto_lock:
nodisable:
When the force limit defined by maxforce is exceed the locking attempt will NOT disable the linkage beam, but the hook node will stop pulling the node to lock. Works similar to ties then. Variants: nodisable
/ no-disable
/ no_disable
shortlimit
: Minimum range in meters the hook will pull the node to lock to. Default = 0.0
. Keyword variants: shortlimit
/ short_limit
norope
: Linkage between hook and node to be locked will act like a beam and not like a rope. Variants: norope
/ no-rope
/ no_rope
visible
: Linkage between hook and node will be visible while locking process and locked. Variants: visible
/ vis
Standard hooks toggle with L
, autolock and triggerd hooks detach with ALT+L
manually.
Hooks with hookgroups < -2
can only be locked automatically or by a trigger.
These are nodes which can slide freely along a ‘rail’, which is a sequence of connected beams. It’s a simple constraining mechanism that introduces new possibilities into RoR and simplifies many existing mechanical structures.
There are 2 ways to define a rail:
To specify it in slidenodes section as a second parameter.
To specify it in railgroup section and reference it in slidenodes using railgroup_id parameter.
A slidenode without a rail is invalid, naturally.
Parameters:
7, 8, 9, 10
would require beams 7
- 8
, 8
- 9
, 9
- 10
to be defined.s10.98
b10.98
0
; Distance from the rail before rail forces are applied to the node.none
, expects rail_nodes: to be used.; railgroup defining a rail. Write as: g2
r2.3
d0.23
none
To be documented.
Allows specifying a separate rail which can be linked to slidenode(s) later.
Parameters:
7, 8, 9, 10
would require beams 7
- 8
, 8
- 9
, 9
- 10
to be defined. Ranges are supported (for example: 1-10
)To create a looped rail group, simply make the last node of the list the same as the first node of the list. Please note that all segments must have beams defined.
This section defines group of the beams that are deleted if one beam in this group breaks. Very useful for detaching parts of the truck like bumpers, doors, wheels etc. falling of the truck when crashing. All kinds of beams can be set to a detacher_group except wheel generation section, these one will always be “default” to avoid deleting the axle of the wheel which results in a crash.
Valid detacher group numbers: any positive or negative integer
Valid end lines:detacher_group 0
, detacher_group end
Group 0
its the default setting and means no group set and is used to end groups.
Use positive group numbers for master beams and negative ones for minor beams. A master detacher-beam breaking will brake all beams with the sames group number and all minor beams with the same negative group number (abs(detacher_group)). A minor beam will not break any other beams at all, its just set to break with a group of beams if a master detacher-beam in its group breaks.
This will add beams 0,1
+ 6,8
+ 7,9
+ 10,12
to group 1
, beam 16,17
to group 1(minor)
and beam 11,13
to group 2
. Breaking beam 16,17
will not break any other beam. Breaking beam 6,8
i.e, will break and disable beams 0,1
+ 7,9
+ 10,12
+ 16,17
too in the same simulation cycle.
Ropes are special beams that have no compression strength (they can shorten easily) but have standard extension strength, like a cable or a chain. They have also another peculiarity: the second node can “grab” the nearest reachable ropable node with the O
key. Standard use is to use a chassis node as the first node, and a “free” node as the second node (free as in not attached by any other beam). The best example of this are the chains of the Multibennes truck.
Option: i
for invisible [ Version 0.38.18+ ]
Fixes are nodes that are fixed in place. That means that once put in place in the terrain, they will never move, whatever happens.
This is useful for making fixed scenery elements from beams, like bridges.
Just add the node number that you want to fix.
This sets the minimum node mass. Useful for very light vehicles with lots of nodes (e.g. small airplanes).
(Tip: When using a very low minimass, i.e. below 10
, you should use a low damping value in the Beam defaults in your beams section)
Ties are special beams that have no compression strength (they can shorten easily) but have standard extension strength, like a cable or a chain.
Like ropes, ties grab the nearest reachable ropable node with the O
key. But there is a twist: unlike ropes, they disappear when not attached (because they have no extremity node at rest) and they automatically shorten until the extension forces reaches a threshold. They are very useful to solidly strap a load to a chassis.
Parameters:
1.0
means no shortening)1.0
means no extension; recommended you keep it as 1.0
).n
n
: Visible (default)i
: Invisible.none
This section lists the nodes that can be caught by ropes or ties. Good use is to define some ropable nodes at the front and back of the truck to allow towing the truck.
The group and multilock arguments are only available in RoR 0.36.3 and later.
-1
= all groups.0
=disable, 1
=enable: This specifies if this ropable can be locked by many ties/ropes.This enables/disables a particle cannon in the game (with the G
key).
(You can create your own particle. A template can be found in Rigs of Rodsresourcesparticles.zipwater.particle
)
Torque curves affect the behavior of the engine. This section allows you to assign predefined or user-defined torque curve to a truck. It can be used in 2 ways:
default
, diesel
, turbodiesel
, gas
, turbogas
, wheelloader
, compacttractor
, tractor
, hydrostatic
.0.5
= 50%, 1.5
= 150%)It’s suitable to define the torque to the engine RPM set in the engine definition plus 25% ( multiply the value with 1.25) to get the overev area defined.
The following example would be good for a maximum engine RPM set to 2800:
Engine dying in idle and first gear? Just define a single higher peak value where you want the engine to idle… like adding:
to the example above in the right spot will result the engine idle a little bit higher then 800
rpm in first gear.
The example to the left shows a screenshot of a torquecurve made for a small diesel engine:
Idle: ~600
RPM, Max @ 1900
RPM, slight and constant torque increase over the used RPM bandwidth, hard torque drop off in the over-rev area.
This section offers options to the cruise control feature (activated by pressing space bar):
3.6
. Example: 36
kph/3.6
=10
mps)0
=auto brake off, 1
=auto brake onIn the example above, minimum speed for cruise control to be activated is 10
mps (36
kph). The auto brake feature is activated.
Limits the speed of a vehicle. If the speed is above the limit, the vehicle will not accelerate any further.
Insert the limit in meters per second (divide kph by 3.6
. Example: 36
kph/3.6
=10
mps)
In the example above, the maximum speed of the vehicle is 10
mps (36
kph), it will not accelerate any further.
This section defines axles on a vehicle, allowing more accurate distribution of torque among the wheels.
The axle section introduces open differentials, and spooled (aka locked) differentials. They are toggled with the W
key.
By adding axles to your vehicle file you override the propulsed property for the tires. Only wheels connected to an axle are powered, if multiple axles are defined the axles are interconnected in a locked manner. If no axle section is defined the old model of equal power distribution is used.
Because the axle sections looks up already defined wheels, it must be defined AFTER the wheels have been defined.
The axle section is different from other sections in that it is broken into properties. Properties are not order dependent. Currently the available properties are:
w1
and w2
are interchangeable.o
- Openl
- Locked (wheels locked together regardless of torque input)s
- Split evenly (each wheel gets equal torque regardless of wheel speed)v
- Viscous [ Version 0.4.8.0+ ] (applies locking force based on the amount of torque)Sample axle section:
In [ Version 0.4.8.0+ ] and above you can define inter axle differentials on a vehicle, allowing more accurate distribution of torque among the axles. They are toggled with ALT+W
.
Parameters:
1
.1
.axles
sectionSample interaxles section:
In [ Version 0.4.8.0+ ] and above you can add a transfer case on a vehicle.
Parameters:
Notes:
CTRL+W
switches between 2WD/4WD mode.SHIFT+W
switches between Hi/Lo mode.Sample transfercase section:
[ Version 0.4.7.0+ ] this section allows you to disable power to a wheel when a detacher_group breaks.
Parameters:
1
.etacher_group
number.Example usage:
In RoR 0.4.0.5 and above you can define collisionboxes. In earlier versions of RoR, there was only one bounding box for truck activation per object, which was defined by the outermost nodes. With collisionboxes, you get the ability to define the nodes that should be used for the activation bounding box calculation. It is also possible to define multiple bounding boxes, for example to exclude some areas from activation.
Syntax:
Collisionboxes can give you a huge performance increase in situations where many beam objects would have been activated before, for example a container crane with many containers underneath.
This single keyword placed in the truck file will make the truck a rescuer, like the Scania Wrecker. These vehicles can be entered by pressing R
.
Managed materials helps you to use complex material effects (for example reflective materials like chromes, dynamic damage materials) without having to deal with the technical complexity of writing a shader for Ogre3D. Rigs of Rods comes with a set of standard shader effects, and with the Managedmaterial section you can pick the effect you want and adapt it for your vehicle. The shader library will grow with time, so the set of effects available in this section will grow with time.
The generic format of this section is:
Do not use a comma to separate parameters in a managedmaterial section! Also, you must declare your managed material before they are used. That means that the managedmaterial section should come before the flexmesh, props, wheels, or any section that will use this material.
Currently available effects:
-
if no damage texture): Should be similar to the standard texture, but with damage.-
if no specular map texture): a greyscale image that maps the “shininess” of the material, from dark for matte to white for chromed. Technically this isn’t a specular map but a reflectivity map.-
if no damage texture): Should be similar to the standard texture, but with damage.-
if no specular map texture): A greyscale image that maps the “shininess” of the material, from dark for matte to white for chromed. Again, technically this isn’t a specular map but instead a reflectivity map.-
if no specular map texture): A greyscale image that maps the “shininess” of the material, from dark for matte to white for chromed.-
if no specular map texture): A greyscale image that maps the “shininess” of the material, from dark for matte to white for chromed.WARNING: Your texture file names must not start with -
. The parser would treat the -
as “no texture placeholder” and ignore the rest.
Examples:
A note about shaders for power-users:
You can still use your own, non managed, Cg shaders by manually defining your .material
, .program
and .cg
. Consult the Ogre3D documentation for more details.
If you think you have made a good shader that can be helpful to other modders, submit it to GitHub for inclusion to the managedmaterial library of RoR.
This specifies options for all FOLLOWING managed material lines.
Parameters:
0
(single sided) or 1
(double sided); default = 0
(single sided); . Determines if the mesh should be visible from both sides or not.IMPORTANT: This parameter treats 1
as “yes” and anything else as “no”. This is required for backwards compatibility.Flares allow you to add lights to your truck. They work as light sources in OGRE and will illuminate other objects (if enabled in settings).
See also: Flares Tutorial
Parameters:
f
(default mode when not stated): Headlight.b
: Brakelight.l
: Left blinker.r
: Right blinker.R
: Reverse light (on when driving in R gear)u
: User controlled light. (i.e. fog light) (see control numbers)0-500
. If you chose a non-user controlled light(i.e. brake light) you should put -1
here. 1
would be CTRL+1
, 2
would be CTRL+2
, and so on.Some custom control numbers found in 0.38+:
-2
(special); <!––>This defines how long the delay is between the light changes in milliseconds. A value of 500 means that the light is 500ms on and 500ms off. Use a value of 0 to create a non-blinking light.
-1
to use the default value of 500ms.-2
non-blinking light except blinkers, which will have default 500ms.0.1
and 5
(0.1
= 10% of default size). If the size is smaller then 0
, then the flare will be independent of the camera angle. (So the flare does not get smaller when you move the camera)default
. Please note that there is not comma between the material name and the size argument. You can use tracks/aimflare
to position your flare.Flares2 are the same as normal flares, except that they add an offset-z argument in between:
See also: Flares Tutorial
This can bind a material to a flare, so that the material changes with the flare’s on/off status.
The format is as follows:
The material must use an animated texture, as shown below:
Put the off-state of the brakelight into the file truck_brake_material_0.png
and the on-state into truck_brake_material_1.png
. The 2
and 0
at the end should not be changed.
This section should be after the flares section and before the props and flexbodies section in order for the lights to work properly.
COMPATIBILITY NOTE: Parameters #1 and #2 can also be separated by just space, the parser will silently accept it.
This allows you to “stick” any 3D mesh to a triangle of points of a truck. You can use it to stick air intakes, horns, seats, dashboard, bumpers, whatever to the truck. Note that there will be no collision detection with these objects. Like flares, they use a vector coordinate system instead of normal right-angle coordinates. Props are positioned relative to 3 nodes of the chassis: One node is the reference node, and the two others define a base (x,y). Props are positioned relative to the reference node by adding proportions of the vectors ref->X, ref->Y, with the normal being used as well.
Parameters are:
mesh_name_or_special_prop: String (may start with a keyword); The name of the Ogre3D mesh object used for the prop.If the mesh name starts with one of the following keywords, it will have special behavior:
driversseat
.Note: if multiple “seat[2]” props are defined, the first one is the driver’s seat.driversseat
material.Note: if multiple “seat[2]” props are defined, the first one is the driver’s seat.Please note that if you want to stick wheel meshes on a wheel, the third node has to be taken from one of the outer segments.
Note:
0
and 1
, or if the body flexes too much the prop will not stick to the body correctly.90
degrees. If that angle can be made to be 90
degrees, then the weird coordinate system will turn into ‘normal coordinates’. This can be used to make prop placement easier.For 0.38.8 and later:
You can set the cameramode in which the prop should be shown:
You can disable shadows of the last specified flexbody:
[ Version 0.35+ ]
Disables shadow casting of the last prop to improve complex truck FPS.
COMPATIBILITY NOTE: Parameters #9 “Z rotation” and #10 “Mesh name” can be delimited by just space. Parser will emit a warning.
Steering wheel [ Version 0.35+ ]Here you can see the standard reference nodes, and offset for the dashboard. Then, there is the steering wheel mesh, and its offsets.
Parameters:
dashboard
-0.67
-0.61
0.24
160
Examples:
Change the beacon’s color and flare material [ Version 0.35+ ]
If you want to use you own mesh as beacon it should be named beacon-<somename>.mesh, e.g. beacon-blue.mesh
The only difference between this and a standard beacon is the flarematerialname e.g. tracks/redbeaconflare
which sets the color of the light, and the RGB value of the flash (The last three numbers), that sets the color of the light that is reflected from objects when the beacon lights them.
NOTE: All special parameters are required, otherwise none of them will take effect.
Parameters:
beacon
0
- 1
); Intensity (0
= full dark, 1
= full bright) . This color will be mixed with color of the flare texture. If the texture is white, all coloring is specified this way.0 - 1
); Intensity (0
= full dark, 1
= full bright). This color will be mixed with color of the flare texture. If the texture is white, all coloring is specified this way.0
- 1
); Intensity (0
= full dark, 1
= full bright). This color will be mixed with color of the flare texture. If the texture is white, all coloring is specified this way.Examples:
This directive adds an animation to last defined prop. Up to 10 rotations and offsets depending on different sources can be used on one prop.
Parameters:
source:
Source type(s) joined with |; A list of sources to use, it is recommended to use only 1 per add_animation line, though multiple sources are possible too.mode:
Mode type(s) joined with |; A list of modes to use, multiple modes are validevent:
Key event string; An optional input, only needed for source: event. It determines the keypress event to catch for the animationautoanimate
(optional): “autoanimate” keyword; rotation or offset is applied as long as source is not 0. Useful for driveshafts, fans, etc.source:
airspeed
- This prop animates with the actual speed (not speedometer indicated speed) for any vehicle.vvi
- This prop animates with the vehicle’s vertical velocity.altimeter100k
- This prop animates with the vehicle’s altitude up to 100,000 feet.altimeter10k
- This prop animates with the vehicle’s altitude up to 10,000 feet, at which point it will revert back to its original length.altimeter1k
- This prop animates with the vehicle’s altitude up to 1,000 feet, at which point it will revert back to its original length. These three animators can be used to create altimeters with three needles or similar objects/aoa
- This prop animates with the dashboard’s angle of attack.flap
- This prop animates with the flap setting on the vehicle.airbrake
- This prop animates with the airbrake setting on the vehicle.roll
- This prop animates with the vehicle’s roll. It will flip at 180
degrees roll to -180
degrees roll. This option can be used for an automatic trim feature.pitch
- This prop animates with the vehicle’s pitch. It will flip back at 180
degrees pitch to -180
degrees pitch. This option can be used for an automatic trim feature.throttle1
- This prop animates with the throttle setting of an aircraft’s first engine. This option can be used for thruster mechanics. Valid sources include throttle1
, throttle2
, etc. etc. up to throttle8
.rpm1
- This prop animates with the RPM of an aircraft’s first engine. This option can be used for thruster mechanics. Valid sources include rpm1
, rpm2
, etc. etc. up to rpm8
.aerotorq1
- This prop animates with the torque of an aircraft’s first engine. Note that this only works for propeller engines, because torque is not applicable to jets. Valid sources include aerotorq1
, aerotorq2
, etc. etc. up to aerotorq8
.aeropit1
- This prop animates with the pitch of an aircraft’s first engine. Note that this only makes sense with propeller engines, pitch is not applicable to jets. Valid sources include aeropit1
, aeropit2
, etc. etc. up to aerotorq8
.aerostatus1
- This prop animates with the On/Off/Fire status of an aircraft’s first engine. Valid sources include aerostatus1
, aerostatus2
, etc. etc. up to aerostatus8
.brakes
- This prop animates with the vehicle’s brake status.accel
- This prop animates with the vehicle’s accelerator status.clutch
- This prop animates with the vehicle’s clutch status.speedo
- This prop animates with the speedometer indication. It scales with the guisetting speedometer. (It is best to use it even if there is no custom overlay dashboard; it simplifies the adjustment a lot.)tacho
- This prop animates with the vehicle’s RPM. It scales with guisetting tachometer. (It is best use it even if there is no custom overlay dashboard; simplifies the adjustment a lot.)turbo
- This prop animates with the vehicle’s turbocharger PSI.parking
- This prop animates with the vehicle’s parking brake status.shifterman1
- H-shift left/right ( Reverse | 1-2 | 3-4 | 5-6…11-12 as positions, scales with engine settings (maxGear)shifterman2
- H-shift forth/back animator Reverse-2-6-8-10-12 | 1-3-5-7-9-11 as positionssequential
- sequentiell shift ( i.e for tiptronic or wheel shift pedals), can be used for commands too (no settable limits then)shifterlin
- for auto transmission animations or gearselect indicators (special limits rules apply for this one, see below!)torque
- current engine torqueheading
- This prop animates with the current heading of the truck.difflock
- This prop animates with the difflock status of the truck (It only works when differentials are present in the truck.)rudderboat
- This prop animates with the steering hydro on boats.throttleboat
- This prop animates with the throttle status on boats.steeringwheel
- This prop animates with the steering status for trucks.aileron
- This prop animates with the aileron status for airplanes.elevator
- This prop animates with the elevator status for airplanes.rudderair
- This prop animates with the rudder status for airplanes.permanent
- This is a permanent source, which is always active when you are in the truck.event
- A source triggered by a keypress, needs exactly one defined event.Specials: Limits do not apply for mode:sequential. In this case the options are the F-Keynumbers of the command-movement you want to catch. Option 0, 0 with mode:sequential provides a shift_up/shift_down animation for a sequential shifter. Look into the Examples.
mode:
x-rotation
- Rotate around the x-axis, in some cases special rules apply here see below (gimbal lock)y-rotation
- Rotate around the y-axis, in some cases special rules apply here see below (gimbal lock)y-rotation
- Rotate around the y-axis, in some cases special rules apply here see below (gimbal lock)x-offset
- Offset along the x-axisy-offset
- Offset along the y-axisz-offset
- Offset along the z-axisevent:
How to use:
It’s best to test is a prop that has no rotations or offsets set on a node triangle like this:
Add the add_animation line AFTER the prop in your prop section that you want to animate:
Sources
Modes
Events
Autoanimation
GIMBAL LOCK To avoid axis corruption when rotating props: - Always place your prop with a y-rotation of 0
or 180°
. If you need to align your prop in another way, rotate the mesh in your mesh-editor!
To avoid axis corruption when rotating multiple props: - Use only the x and y axis together, skip z. If you need 3 axis rotation, do the z-axis with a n/b-rotator as the base for your prop definition nodes. Gimbal lock
Flexbodies are pretty much the same as props. The only difference between them is that flexbodies deform.
You can declare several flexbodies. Each must be composed of the two lines (prop-like line and forset line).
The first line of this section is exactly the same format as on the props section. Parameters:
As next, a line beginning with the word forset follows. Behind the word forset, you declare all nodes used for the deformation of the mesh (ranges are supported).
Notes about backwards compatibility:
,,
between forset entries, parser will ignore it silently.,
, colon :
, or nothing at all (lines like forset12,34,56
will be correctly evaluated as forset 12, 34, 56
) for backwards compatibility.(optional)[ Version 0.38.8+ ]
No parameters. Disables shadow casting of the last flexbody to improve complex truck FPS.
(optional)[ Version 0.38.8+ ]
Sets the cameramode in which the flexbody should be shown:
-2
(always visible); Flexbody visibility: -2
= all the time (default), -1
= external only, >=0
cinecam numberNote: It’s important to keep an eye on the number of vertices of your meshes. Not that there is a hard limit, but beyond 10000
vertices there could be a noticeable slowdown. As reference: the Dodge Charger mesh is about 4000
vertices.
Defines the most visible part of the truck: the body. It will dress the chassis with solid triangles. You must define each body panel (a continuous almost-flat section) in a different submesh section, in order to have sharp body angles, and to simplify texturing.
Most modern flexbodied trucks do not need a submesh section for visual purposes. However, the section is still required for collision to work.
A submesh has two subsections: the texcoords, that places nodes of the submesh on the texture image (coordinates between 0.0
and 1.0
) , and then the cab subsection, that draws the triangles, with triplets of node numbers.
n
: Placeholder. Does nothing.c
: This triangle will be a contact triangle that can contact with contacters nodes.b
: This triangle will be part of a buoyant hull.s
: [ Version 0.4+ ] This triangle will be part of a buoyant hull, mouse dragging will be disabled.r
: [ Version 0.4+ ] This triangle will be part of a buoyant hull, mouse dragging only.D
: (Combination of b and c flags) This triangle will be both a contact triangle AND a buoyant hull part.p
: [ Version 0.36a - 0.4.7.0 ] Makes the force required to pierce through the submesh triangle ten times bigger.u
: [ Version 0.36a - 0.4.7.0 ] Makes it impossible to pierce the submesh.F
: [ Version 0.36a+ ] Same as p
but also a boat hull.S
: [ Version 0.36a+ ] Same as u
but also a boat hull.The order in which the three points forming the triangles is given is important, as its winding defines in which direction it will be visible. The winding must be counterclockwise to be visible.
The easiest way to create a submesh is to use Blender 2.49b.
No params. If added, the triangles’ backsides will be black instead of see-through.
When making an invisible collision submesh for a flexbody vehicle, the “texcoords” section is not needed and should not be used.
set_collision_range is 0.02
as default value, and defines the maximum range (2
cm) around a truck’s collision triangles that collisions start to happen.
By increasing it, for example to 0.04
, penetrations become a lot more difficult.
Specifies groundmodel should be used for the trucks contactive submeshes. It has module-wide effect; it only needs to be defined once per file.
Parameter:
This replaces the x or y node options. The factor parameter should be “1”, because it is not used yet. The material should be “default” if no user-created one is made. (You could create your own particle emitter based on the default one: data/smoke.particle). Remember: The direction node is behind the ref node!
This section allows you to have different options selectable from the vehicle spawner menu. Almost any section (managedmaterials
, engine
, props
, flexbodies
, etc) can be used with this.
By using this section you can set some parameters of the Truck GUI. This can be helpful if you’re building a vehicle that has a relatively higher or lower speed than average.
Format: keyword
Legacy parameters (not affecting the v0.4 custom HUD system). Will be restored or removed soon.
Example:
Inline-section; modifies the skeleton display (activated by pressing K
) of the truck. Has module-wide effect; only needs to be issued once per file.
Parameters:
visibility_range_in_meters(nullable): Real number; default = 150; Empty value = -1
beam_thickness_in_meters(optional) (nullable): Real number; default = 0.01 (1 centimeter); Empty value = -1
Examples:
Beams visible from 150
meters away, beams are 1
centimeter in width (default values):
2km sight range with 9
centimeter wide beams:
The videocamera section describes how to set up multiple mirrors and extra cameras like a backup-camera for a truck or hook-camera for a crane.
Both, cameras and mirrors, use the same technique, cameras just add a reflective calculation and flip (mirror) the image generated.
Parameters:
256
, watch your FPS.256
, watch your FPS.0.1
- value<maxclipdistance. Useful to blend out things that should not be displayed. Good to tune FPS.32000
. Useful to blend out things that should not be displayed. Watch your FPS.-1
camera, 0
tracker camera (requires an alternative camera orientation node), 1
mirrors.-2
in here.Important:
.material
file material definition is strictly necessary and needs to match the material in the truck-file line. Material definition features a fall-back texture when camera is not active or not set. Just add a texture unit with a texture definition, it will be replaced with the generated texture when camera is setup correct and active automatically.Samples:
Example mirror setup from the 1988 Audi UR-Quattro: (They are currently disabled)
UV Mapped mirror mesh:
You can use this texture to help UV map your mirror mesh:
.material
file:
Node position reference:
Make sure vidscreen-disabled.png
is in your truck folder. Use your own texture and material names to avoid conflicts !
Note: Only works in the development builds
You can enable videocamera debug in RoRConfig which activates helpful meshes which show position and orientation of the video-cameras set up:
Notes:
2^n
(POW) means that you have to choose a number out of the following numbers:The extcamera command allows you to change the 3rd person camera behavior.
Currently, there are three modes you can use:
The classic mode (also default if you do not use this command)
The cinecam mode: it will rotate the camera around the cinecamera
The node mode: it will rotate the camera around a specified node
The final two modes are useful for a vehicle with detaching parts, so the camera is fixed in the view of the main vehicle.
In RoR 0.39.7 and above you can add a camerarail section to your beam objects. The camerarail generates a cSpline on base of the given nodes, on which you can move a camera. A new camera mode will be added ingame which is accessible with the “c”-button.
Camera controls:
CTRL
(left) + move mouse left/right: Move camera on spline. Speed up with Shift
or slow down with Alt
.CTRL
(left) + Shift
+ Space
: Enable/disable auto-trackingSyntax:
You can define up to 50
nodes per beam object. You can use one node several times. If the first node is the same as the last one, the spline will be closed and the camera can move on the rail continuously. Example:
If multiple beam objects, each with a camerarail
section, are connected with hooks, the game will try to connect the splines.
This way you can move the camera over multiple hooked vehicles without the need to switch the vehicle:
Object A (active) - Object B (hooked) - Object C (hooked)
The distance between the last camerarail node of one and the first camerarail node of another object needs to be under 5 meters.
Since version 0.36, vehicles can have custom sounds. By default, RoR uses a set of default sounds for your vehicle, but with the following sections you can customize these sounds.
Use this simple statement to disable all sounds that RoR automatically adds to your vehicle. This allows you to start from a clean slate, and add your custom sounds without interference from the automatically added sounds. Example :
Adds a sound source to your vehicle.
Parameters:
Parameters:
0
and emit a warning.This is a list of all default soundsources separated by engine type
This can be inserted in the file as is.
Please see this page for more information
The wings parameters are:
1.0
(100%), setting any other positive number increases or decrease overall wing efficacy. Useful for precision flight characteristics tuning.The type of control surface is set by a single character, and defines how the control surface will move depending on pilot inputs. Available control surface types are:
n
= Nonea
= Right aileronb
= Left aileronf
= Flape
= Elevatorr
= RudderS
= Stabilator with right hand axis (full body elevator), useful for e.g. a Mig25T
= Stabilator with left hand axis (full body elevator), useful for e.g. a Mig25
c
= Right elevon (right aileron + elevator), useful for e.g. Concorded
= Left elevon (left aileron + elevator), useful for e.g. Concordeg
= Right flaperon (right aileron + flap)h
= Left flaperon (left aileron + flap)U
= Taileron with right hand axis (full body elevator+aileron), useful for e.g. a F-15V
= Taileron with left hand axis (full body elevator+aileron), useful for e.g. a F-15i
= Right ruddervator (rudder + elevator), useful for V-tails like the Bonanzaj
= Left ruddervator (rudder + elevator), useful for V-tails like the BonanzaSpecial wing formats to reduce node/beam count and CPU load:
(Use at own risk!)
All examples lines refer to the node notation sample picture above.
‘A’ means Node A from that schematic diagram.
They work, no idea if they produce more or less lift then a wing with defined thickness.
Only use them for invisible wings with meshed props/flexbodies for the visual appearance and with a transparent material, skinning them results in an ugly visual appearance.
For precise aviation flare placement you can use a wing defined with only 2 nodes. It has no aerodynamic influence at all It has an extremely low node/beam count – Vital: Needs to be placed as first wing in the wings section. Use NACA0009.afl
as the airfoil.
– Defines a wing using only 3 nodes. Placing this wing first in the wing section results in the aviation flares appearing on the nodes A,B
( red/green ) and E
(white flash).
Works horizontally and vertically. (As on the tail.) Low node/beam count wing for self built flaps, ailerons, elevators or trimwings, very easy to animate with a single hydro.
Can be used with any active control surface and any afl-format
Known Issues: Sometimes vertical tailfin wings work only one direction. If RoR crashes exchange node A
and B
with each other.
– Defines a wing using only 4 nodes. Placed first in the wing section results in the aviation flares appearing on the nodes A,B
(red/green) and E,F
(white flash)
Works horizontally and vertically (As on the tail.)
Low node/beam count wing for main wings
Can be used with any active control surface and any afl-format.
Known Issues: sometimes vertical tailfin wings work only one direction. If RoR crashes exchange node A,B
and E,F
with each other
Airbrakes are a moving panel used to slow down an airplane (key bindings: 3
and 4
). They are positioned similarly to props.
These airbrakes can be easily added to a wing box, with noderef
, nodex
, nodey
and nodea being the four upper nodes of a box.
Parameters:
noderef
, nodex
, nodey
and nodea
).The turboprops section defines the turboprop engines, and makes the truck a plane!
It is important that this section comes AFTER the props section, because you will need to add a spinprop.mesh
entry to the props before turboprops will work.
One pale.mesh
per propeller blade can also be added for visible blades. Easy, eh? Each prop blade is associated to a blade tip node, and you must ensure the blade nodes are correctly interconnected with beams so it will spin freely around its axis, while maintaining a rigid prop disc.
See how the Antonov 12 is made. You can also make 2 or 3 blade props by putting a -1
instead of the blade tip node number(see the Twin Otter for example). Parameters are:
The fusedrag section helps the correct modeling of the fuselage contribution to the aerodynamic drag of a plane.
It also makes possible the “masking” of the aerodynamic contribution of an object loaded inside the plane.
It models the fuselage as a big wing section, with an airfoil (usually a symmetrical airfoil like NACA0009
). Fusedrag can also be used in road vehicles to aid top speed. The parameters are:
NACA0009.afl
Defines a turbojet. Parameters:
0
is NO, anything else (including -1
) is YES0
; Unused.Pistonprops act in almost the exact same way as turboprops minus two differences. The pitch is manually set and stays at a set value and it has a couplenode.
Parameters:
-1
.See: Boats
Screwprops are boats’ propellers. Currently, steering is only done by thrust vectoring.
The current syntax is prop node
, back node
, top node
, power
.
댓글 영역