Truck Description File
From Rigs of Rods Wiki
This file is in text format. It contains all the structural, physical and visual parameters defining a truck. It is parsed by a very crude parser, so stick to the syntax, or expect crashes. Some keywords seem illogical because I did not know where I was going when I started this project. So be warned that this stuff is not foolproof. It is decomposed in sections, each section is announced by a keyword (except the title). Comments can be put anywhere by putting a ";" as the first character of the line.
See Version Requirement if you come across an orange box next to a section and you don't know what it means.
Building Philosophy
See Truck Concepts to understand the building philosophy. I recommend the following method of construction:
- Draw the blueprint of your truck on a drawing paper. Mark the nodes, and write their number.
- Edit your truck file and put the title, globals, engine, cameras, nodes and beams section.
- Run the game to see how it goes. If you forget some beams the truck will fold on itself!
- When the chassis seems good, add wheels, suspensions, direction and test-drive
- When the truck is sound, do the bodywork and texture, and mark most beams as invisible (displaying too much beams has a large performance impact)
To see a simple truck file example, see this Step by Step Truck Construction.
Is It a Truck, Plane, or Boat?
Before we start, let's ask an important question: Is it a truck, plane, or boat? Or what makes a truck a truck and a plane a plane, or a boat a boat? Simple:
- A truck is a description file containing an engine section
- A plane is a description file containing a turboprops section
- A boat is a description file containing a screwprops section
Also, notice that:
- You should not combine more than one propulsion (eg have both an engine and a turboprops section in the same file)
- If you have no propulsion, then you are making a load, and the file extension should be .load (see Creating a Load)
- You can have a wings section on a truck or a boat (e.g. to add aerodynamic spoilers for stability).
- You should have a fusedrag section on a plane to have a better aerodynamic modeling.
- A boat needs to have a hull which is defined in the submesh section.
Light Cars
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 creating a realistic car:
- Use engoptions to reduce the engine inertia and set the engine type to c
- Use brakes to reduce braking force
- Use and abuse set_beam_defaults to soften the car body, or it will look too strong and springy, almost indestructible.
- Experiment with the engine section to use higher RPM and correct gear ratios.
- Lighten the wheels as much as possible. This is not very easy as they become instable. Reducing the spring and damping of the wheels helps a lot. Suggested values for 100kg wheels: spring 150000 and damping 1000.
- Use the dashboard-small.mesh prop as a dashboard.
Truck File Syntax
We go through the sections. Order is important: If a section depends on another (for example: cinecams requires beams), the dependent must be placed AFTER the section it depends on (cinecam AFTER beams).
Required Sections
The game will run with these sections. Every one of these sections must be present for a vehicle!
Title
This is the only section not introduced by a keyword. It is the name of the truck, and it must absolutely be the first line of the file. e.g.
My nice truck
Globals
This section defines some global parameters, in only one line containing:
- dry mass - The weight RoR will try to give the truck (affected by minimum node weight, see below). Weight is measured in kilograms
- Load mass - mass of the nodes marked "l"
- Material name - The name of the material that will be used to texture the truck. This must be one of the material names specified in the material files. One of the existing materials can be used if you do not have your own material for the truck
globals ;dry mass, cargo mass, material 10000.0, 1000.0, tracks/semi
Nodes
With this section begins the structural description. Each line defines a node. The first parameter is the node number, and must absolutely be consecutive. The three following parameters are the x,y,z coordinates, in meters. You can attach an optional property to a node by adding a single character.
Recognized options:
- l: this node bears a part of the cargo load
- You can overwrite the mass of a single load node if you add the mass in kg behind the options. For example this will set the node mass to 2k kg:
14, 1.36, 0.00, 1.97, l 2000
Please note that the load-nodes where you specify the mass explicitly are not calculated with the global load mass anymore. So if you specify a custom mass on any load, you will also increase the mass on all other nodes, if you do not decrease the global mass.
| Requires |
| 0.35 |
| or later |
Debug Truck Mass Yesto your RoR.cfg. (Be sure to use a TAB before Yes and not to start the configurator). Look into your RoR.log after loading and you could see something like this:
04:09:05: Node 141 mass (20kg) too light. Resetting to minimass (50kg). 04:09:05: Node 0 : 3662 kg 04:09:05: Node 1 : 1730 kg ... 04:09:05: Node 13 : 1180 kg (normal load node: 6000 kg / 6 nodes) 04:09:05: Node 14 : 1180 kg (normal load node: 6000 kg / 6 nodes) ... 04:09:05: Node 136 : 5026 kg (overriden by node mass) ... 04:09:05: TOTAL VEHICLE MASS: 32399 kg
- f: this node will not produce sparks (usefull for support feet or hand made wheels)(New to 0.36)
- x: this node is the exhaust point (requires a "y" node) (also see the exhausts section)
- y: exhaust reference point, this point is at the opposite of the direction of the exhaust
- c: this node will not detect contact with ground (can be used for optimization, on inner chassis parts)
- h: this node is a hook point (e.g. the extremity of a crane)
- e: this node is a terrain editing point (used in the terrain editor truck)
- b: this node is assigned an extra buoyancy force (experimental)
- p: disables particles for this node (e.g. dust) (RoR 0.36.3 and above)
- L: enables node settings logging into the Logfile for this node (RoR 0.36.3 and above)
Set any option property, loadweight, friction-, volume- and surface-coefficents as default with set_node_defaults.
nodes ;id, x, y, z, options ;main chassis 0, 0.00, 0.75, 0.66 1, 0.00, 0.75, 1.84 2, 0.63, 0.75, 0.66 3, 0.63, 0.36, 0.66,l 4, 0.63, 0.75, 1.84 5, 0.63, 0.36, 1.84 6, 1.48, 0.75, 0.66,l 7, 1.48, 0.00, 0.66 8, 1.48, 0.75, 1.84,c 9, 1.48, 0.00, 1.84,x 10, 2.33, 0.75, 0.66,y 11, 2.33, 0.00, 0.66This section supports multiple options as argument. If you want a 'f' and 'b' node together you could write something like this:
11, 2.33, 0.00, 0.66, fb
Beams
This section defines all the beams connecting nodes. Each line describes a beam. The first two parameters are the node numbers of the two connected nodes. Order has no importance. There is an optional 3rd parameter, composed of a single character. Recognized options are:
- i: this beam is invisible. Very useful to hide "cheating" structural beam, or to improve performances once the truck is textured.
- r; this beam is a rope (opposes no force to compression)
beams ;node1, node2, options 0, 1 2, 4 3, 5, i 6, 8, i 7, 9 10, 12, i 11, 13, i
This section supports multiple options as argument. If you want a 'i' and 'r' node together you could write something like this:
11,13,ir
Cameras
This section is important. It helps to position the truck in space, by defining a local direction reference. For example this is used to measure the pitch and the roll of the truck. It is also very important to orient the 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), and 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.
cameras ;center,back,left 0,2,1
Cinecam
This defines the position of the in-truck cam. It is a special node suspended to eight chassis nodes. The parameters are the 3 coordinates of the point and the 8 nodes numbers to which it is binded. Note that if you input nodes that do not exist, your vehicle will most likely explode. There are also two optional values (starting from RoR 0.35) to define the spring and damping factors of the links to the camera, do adjust its movements. The default values are 8000 and 800.
cinecam ;x,y,z, 8 bindings, spring, damping 0.66, 2.0, 1.8, 75,76,77,78,73,74,53,54, 8000.0, 800.0
End
The file MUST TERMINATE by end or it will crash.
end
Organizational Sections
These sections are not required, but will make it easier to locate your file or work with. Do not use brackets in your syntax, they are used to mark sections!
Fileformatversion
; ror <0.32 fileformatversion 1 ; ror >= 0.32 and < 0.36 fileformatversion 2 ; ror >= 0.36 fileformatversion 3
- Version 1 = pre 0.32
- Version 2 = 0.32 - 0.35
- Version 3 = post 0.36
- Leaving out this tag will result in version 1.
Example:
fileformatversion 2
Author
author <type> <authorid> <authorname> <email>
- type = author of what? recommended values: chassis, texture, support
- authorid = id of the members forum account, so the user may write him a message or view his other trucks. -1 if none
- To get the authorid: log into the forums and visit http://repository.rigsofrods.com/. The AuthorID should be displayed on the left side.
- authorname = name of the author
- email = email address of the author (this is optional and can be left out)
for example:
author chassis 4 heinz_peter heinz@mail.com author texture 123 forname_surname_othername someuser@mail.com author support 5487 otheruser otheruser@mail.com
Please note: Do not use spaces in the type or authorname or email. Instead use the underscore ( _ ). In the game it will be replaced with a space.
Description
description
this is just some text
test2134124
123123123
please no keywords in here!
end_description Pretty self explaining. Only the first 3 lines will get displayed in the Truck HUD.
Fileinfo
; syntax: fileinfo <uniqueid>, <categoryid>, <fileversion> ; example: fileinfo 000UID, 107, 2
- uniqueid: this field specifies the unique file ID (you get one by uploading it to the repository). -1 for none
- you can get a unique ID here: http://repository.rigsofrods.com/uniqueid/
- categoryid: this is the category number from the repository. -1 for none
- you can find a list of valid numbers there: Truck Categories
- fileversion: this opens the possibility to update this mod. the version should be simple integers: 1 for version one, 2 for version two and so on. The version number is an integer number, so do not use character other than 0-9 or . or
Help
The help section gives the name material used for the help panel on the dashboard. This material must be defined elsewhere in the MaterialFile. This is optional.
help tracks/semihelp
Comments
Comments can be put anywhere by putting a ";" as the first character of the line. You can comment out several lines of text using this format:
comment
...
anything you want to comment out
...
end_comment
Vehicle-specific
Sections that are used mostly for ground vehicles.
Engine
The engine section contains the engine parameters. Parameters are:
- Minimum RPM - The engine speed in which the automatic transmission downshifts and the clutch engages.
- Maximum RPM - The engine speed in which the automatic transmission upshifts. Actual redline is +20% rpm.
- Torque - A number representing the 'torque' of the engine. The higher the value, the faster a truck will accelerate. RoR uses a Flat torque model, usually correct for large intercooled turbo diesels. The units of torque are in Newton*Meters (N*m).
- Final Drive Ratio - A global gear conversion ratio.
- Rear gear ratio - Gear ratio of reverse. For every turn of the engine, the wheels will turn this many times.
- Neutral gear ratio - Gear ratio of neutral gear???
- First gear ratio - Gear ratio of 1st gear
- Second/etc gear ratio - Gear ratio of all further gears. Note there must be between 3 and 15 forward gears. The final gear must be followed by a -1 value.
engine ;min rpm, max rpm, torque, differential, reverse, neutral, 1st, 2nd, 3rd, 4th, 5th, 6th... 1000.0, 1500.0, 8000.0, 2.00, 10.85, 10.00, 13.86, 9.52, 6.56, 5.48, 4.58, 3.83, 3.02, 2.53, 2.08, 1.74, 1.43, 1.20, 1.00, -1.0
A great source of practical gear ratios is from 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 too high a gear.
Engoption
Engoption sets optional parameters to the engine, mainly for car engines. Parameters are:
- Engine inertia: the default game value is 10.0, which is correct for a large diesel engine, but for smaller engines you might want smaller values, like 1.0 or 0.5 for small atmospheric engines.
- Engine type: valid types are t for truck engine and c for car engine. This changes engine sound and other engine characteristics.
Requires 0.36.2 or later - clutch force: (only available for and after 0.36.2)
- -1 for default (same as leaving it out). default values: 10000 for trucks, 5000 for cars
Shifter timings (requires ROR 0.36.2 or higher)
- shifttime: Time to shift in seconds , Values > 0, -1 = default = 0.2 seconds
- clutchtime: Time the clutch needs to apply in seconds, Values > 0, -1 = default = 0.5 seconds
- postshifttime: Time until full torque is transferred in seconds, Values > 0, -1 = default = 0.2 seconds
- Shifter timings needs a defined clutchforce to work, add -1 for clutchforce setting if you want the clutch to be default
engoption ;inertia, type, clutchforce, shifttime, clutchtime, postshifttime 0.5, c, 5000.0, 0.75, 0.9, 0.75 ;sample shift timings for a mid size truck
tip: Use the "Engine inertia" value if the engine won't start fast. With 0.1 the engine will start instantly. With 10, the engine requires ~30 seconds of cranking before it starts. Values between 1 and 3.5 are great for vehicles that you drive frequently, race vehicles and the like that you want to start fast. Also, 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. Also, with values over 10, it may not start at all.Brakes
This allows you to change the default braking force value (the default is 30000), generally to a lower value for smaller trucks and cars.
brakes 1500
In 0.36.3 and above, there is an optional second field that allows parking brake force to be changed.
Requires 0.36.3 or later brakes 20000, 15000
Wheels
This section is important: it defines the wheels! Parameters are:
- Radius - The radius of the wheel, in metres
- Width - This value has been ignored since 0.32, but is still required for compatibility reasons. Wheels now occupy the full distance between node1 and node2.
- number of rays - The number of 'pie pieces' that make up the wheel. For reference, (3) makes the wheel triangular, and (4) makes the wheel square. Recommended values are between 10 and 16.
- Node 1 - The node where the wheel starts
- Node 2 - The node where the wheel ends
- Rigidity Node - The number of a special rigidity node (see explanation about Axle Rigidity). Use (9999) if there is no rigidity node.
- Wheel Braking - (0) for unbraked wheels, (1) for brakes wheels. For directional braking, as found in aeroplanes, use (2) for a left wheel, (3) for a right wheel and in 0.37, (4) for a wheel with a footbrake, but no parkingbrake
- Wheel Drive - (0) for undriven wheels, (1) for wheels driven forwards, (2) for wheels driven backwards
- Reference arm node - The reference arm node for the wheel. This is where reaction torque is applied to the chassis. Set it to a node in front of the wheel for more traction and behind the wheel for less traction. Setting the reference arm node to the same node as Node 1 or Node 2 gets rid of the effects of the Reference Arm Node.
- Mass - Mass of the wheel, in kilograms
- Springiness - the stiffness of the wheel, somewhat equivalent to tire pressure. Having too much spring will make the steering wheels bounce back and forth during understeer, sending vibrations through the entire vehicle.
- Damping - the rebound rate of the wheel
- Materials - Face material and band material (no comma between them) if you don't have a custom material use "tracks/wheelface" for the face and "tracks/wheelband1" for a single wheel or "tracks/wheelband2" for dual mounted wheels.
wheels ;radius, width, numrays, node1, node2, snode, braked, propulsed, arm, mass, spring, damping, facemat bandmat 0.54, 0.40, 12, 35, 36, 9999, 1, 0, 3, 200.0, 800000.0, 4000.0, tracks/wheelface tracks/wheelband1 0.54, 0.40, 12, 37, 38, 9999, 1, 0, 5, 200.0, 800000.0, 4000.0, tracks/wheelface tracks/wheelband1 0.54, 0.80, 12, 39, 40, 41, 1, 1, 25, 400.0, 800000.0, 4000.0, tracks/wheelface tracks/wheelband2 0.54, 0.80, 12, 41, 42, 40, 1, 1, 23, 400.0, 800000.0, 4000.0, tracks/wheelface tracks/wheelband2
Notes:
- Wheel breaking strength is set by the last Beam defaults in the truck file before the wheels section. this can help the wheel to go faster before it breaks.
- The order in which the wheels are declared is important: each consecutive pair of wheels is grouped into an axle. A truck cannot have an odd number of powered wheels, since one wheel would not be in a pair. If this happens, the odd wheel will not move.
Wheels2
This section improves wheels by simulating both wheel tyres and rims. The player is able to set tire pressure via key input.
- Rim radius - The radius of the wheel rim (meters)
- Tyre radius - The radius of the tyre, measured from the centre of the wheel.
- Width - This value has been ignored since 0.32, but is still required for compatibility reasons. Wheels now occupy the full distance between node1 and node2.
- Number of rays - The number of 'pie pieces', or corners, that make up the wheel. For reference, (3) makes the wheel triangular, and (4) makes the wheel square. Recommended values are between 10 and 16.
- Node 1 - The node where the wheel starts
- Node 2 - The node where the wheel ends
- Rigidity Node - The number of a special rigidity node (see Axle Rigidity explanation). Use (9999) if there is no rigidity node.
- Wheel Braking - (0) for an unbraked wheel, (1) for a braked wheel. For directional braking, as found in the planes, use (2) for a left wheel and (3) for a right wheel.
- Wheel Drive - (0) for an undriven wheel, (1) for a wheel driven forwards, (2) for a wheel driven backwards.
- Reference arm node - The reference arm node for the wheel. This is where reaction torque is applied to the chassis. Set it to a node in front of the wheel for more traction and behind the wheel for less traction.
- Mass - Mass of the wheel (kilograms).
- Rim springiness - The stiffness of the wheel rim.
- Rim damping - The rebound rate of the wheel rim.
- Tyre springiness - The stiffness of the tyre.
- Tyre damping - The rebound rate of the tyre.
- Materials - Face material and band material (no comma between them) if you don't have a custom material, use "tracks/wheelface" for the face and "tracks/wheelband1" for a single wheel or "tracks/wheelband2" for dual mounted wheels.
wheels2 ;radius,radius2,width,numrays,node1,node2,snode,braked,propulsed, arm, mass, rim spring, rim damping, simple spring, simple damping, facemat bandmat 0.335, 0.625, 0.40, 12, 44, 45, 9999, 1, 1, 3, 280.0, 900000.0, 200.0, 400000.0, 2000.0, tracks/daffwheelface tracks/dafwheelband 0.335, 0.625, 0.40, 12, 46, 47, 9999, 1, 1, 5, 280.0, 900000.0, 200.0, 400000.0, 2000.0, tracks/daffwheelface tracks/dafwheelband 0.335, 0.625, 0.40, 12, 48, 49, 50, 1, 1, 31, 280.0, 900000.0, 200.0, 200000.0, 2000.0, tracks/dafrwheelface tracks/dafwheelband 0.335, 0.625, 0.40, 12, 50, 51, 49, 1, 1, 33, 280.0, 900000.0, 200.0, 200000.0, 2000.0, tracks/dafrwheelface tracks/dafwheelband 0.335, 0.625, 0.40, 12, 52, 53, 54, 1, 1, 31, 280.0, 900000.0, 200.0, 200000.0, 2000.0, tracks/dafrwheelface tracks/dafwheelband 0.335, 0.625, 0.40, 12, 54, 55, 53, 1, 1, 33, 280.0, 900000.0, 200.0, 200000.0, 2000.0, tracks/dafrwheelface tracks/dafwheelband
Please note:
- wheels2 will be replaced with normal wheels during multiplayer.
- wheels2 can be deactivated completely in the configurator.
Meshwheels
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 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 command, except the side value that 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 that:Requires 0.35 or later
Here is an example picture of a rim mesh, as it should be modelled. The tire geometry is added afterward and dynamically by the game, and will flex as a real tire.
meshwheels ;tire_radius, rim_radius,width,numrays,node1,node2,snode,braked,propulsed, arm, mass, spring, damping, side, meshname material 0.35, 0.21, 0.5, 14, 32, 33, 34, 1, 1, 18, 200.0, 300000.0, 2000.0, l, dodgechargerwheel.mesh dodgechargerband 0.35, 0.21, 0.5, 14, 34, 35, 33, 1, 1, 26, 200.0, 300000.0, 2000.0, r, dodgechargerwheel.mesh dodgechargerband 0.35, 0.21, 0.5, 14, 44, 45, 9999, 1, 0, 53, 200.0, 350000.0, 2000.0, l, dodgechargerwheel.mesh dodgechargerband 0.35, 0.21, 0.5, 14, 46, 47, 9999, 1, 0, 50, 200.0, 350000.0, 2000.0, r, dodgechargerwheel.mesh dodgechargerband
Shocks
Shocks can be seen as tunable beams, useful for suspensions. Parameters are:
- Node 1 - The node where the shock starts.
- Node 2 - The node where the shock ends.
- Spring rate - the 'stiffness' off the shock. The higher the value, the less the shock will move for a given bump.
- Damping - The 'resistance to motion' of the shock. The best value is given by 2*sqrt(suspended mass*spring).
- Maximum contraction - The shortest length the shock can be, as a proportion of its original length. (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 this value allows, it will become as rigid as a normal beam.
- Maximum extension - The longest length a shock can be, as a proportion of its original length. (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.
- Precompression - Changes compression or extension of the suspension when the truck spawns. This can be used to 'level' the suspension of a truck if it sags in game (1.0 is the default.
- Option flag (optional)
- (i) makes the shock invisible
- (L) or (R) Stability active suspension can be made with (L) for suspension on the truck's left and (R) for suspension on the truck's right
shocks ;critical damping=2*sqrt(mass*spring) ;id1, id2, spring, damping, shortbound, longbound, precomp, options 36, 6, 500000, 100000, 0.3, 0.3, 1.0 37, 8, 500000, 100000, 0.3, 0.3, 1.0, l 38, 2, 500000, 100000, 0.3, 0.3, 1.0, r
Shocks2
Requires 0.36.2 or later - node1: first node of the shock
- node2: second node of the shock
- springin: spring value applied when shock compressing
- dampin: damping value applied when shock compressing
- progspringin: Progression factor springin, 0 = disabled, 1...x as multipliers, example:maximum springrate == springrate + (factor*springrate)
- progdampin: Progression factor dampin, 0 = disabled, 1...x as multipliers, example:maximum dampingrate == springrate + (factor*dampingrate)
- springout: spring value applied when shock extending
- dampout: damping value applied when shock extending
- progspringout: Progression factor springout, 0 = disabled, 1...x as multipliers, example:maximum springrate == springrate + (factor*springrate)
- progdampout: Progression factor dampout, 0 = disabled, 1...x as multipliers, example:maximum dampingrate == springrate + (factor*dampingrate)
- shortbound]: shortbound limit in percentage ( 1.00 = 100% )
- longbound: longbound limit in percentage ( 1.00 = 100% )
- precomp: shock precompression setting
- options:
- i: invisble (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 beam
- M: Absolute metric values for shortbound/longbound, settings apply without regarding to the orignal length of the beam.(Use with caution, check ror.log for errors)
- i: invisble (default is visible)
shocks2 ;invisble softbump shock, high value progressive for inbound, linear low values for outbound node1, node2, springin, dampin, progspringin, progdampin, springout, dampout, progspringout, progdampout, shortbound, longbound, precomp, options 45, 80, 22000, 2000, 5, 5, 2000, 1500, 0, 0, 0.8, 0.1, 1, is ;visble hardbump shock, high value progressive for inbound and outbound, boundaries apply metric in meters node1, node2, springin, dampin, progspringin, progdampin, springout, dampout, progspringout, progdampout, shortbound, longbound, precomp, options 45, 80, 22000, 2000, 15, 10, 22000, 2000, 15, 10, 0.5, 0.5, 1, m ;visble hardbump shock, high value progressive inbound only shock, boundaries apply metric as absolute values in meters node1, node2, springin, dampin, progspringin, progdampin, springout, dampout, progspringout, progdampout, shortbound, longbound, precomp, options 45, 80, 22000, 2000, 5, 5, 0, 0, 0, 0, 0.2, 2.5, 1, M
IMPORTANT:- shocks2 need at least 1500+ as a minimum damping value when using them as inbound/outbound only. (When your shocks2 truck bottoms out at spawn, damping is too low (or the springs dont support the weight of the truck)
- soft bump shocks need some boundary limit ( 5%+ ) to work proper as soft bump boundaries.
- You will find any errors in the ror.log regarding to wrong values in 'M' setting or any other shock values.
Shockswapping help:
These is an example to get started with replacing shocks with shocks2. In this example, the shocks2 have exactly the same functionality then the orignal shocks. After adding the shocks2 delete the old shock and you are fine to tune/tweak your truck.shocks ;id1, id2, spring, damping, shortbound, longbound, precomp, options 36, 6, 500000, 100000, 0.3, 0.3, 1.0 shocks2 node1, node2, springin, dampin, progspringin, progdampin, springout, dampout, progspringout, progdampout, shortbound, longbound, precomp, options 36, 6, 500000, 100000, 0, 0, 500000, 100000, 0, 0, 0.3, 0.3, 1.0
Hydros
The hydros section concerns only the steering actuators! they are beams which change their length depending on the direction command. The parameters are:
- Node 1 - The node where the hydro starts
- Node 2 - The node where the hydro ends
- lengthening factor - How much the hydro moves when a steering key is pressed (expressed as a proportion of the original length). Positive values extend when steering left and contract when steering right.
- Option flag (optional)
- Option flags useful for land vehicles:
- (s) - disables the hydro at high speed (as seen sometimes with rear steering axles on large trucks)
- (i) - makes the hydro invisible
- Option flags useful for airplanes: These are used to hack a thrust vectoring system for airplanes (to command a hydro with flight control inputs instead of steering input):
Requires 0.36 or later - (a) - hydro commanded by aileron input
- (r) - hydro commanded by rudder input
- (e) - hydro commanded by elevator input
- (u) - hydro commanded by the combination of aileron input and elevator input
- (v) - hydro commanded by the combination of inverse aileron input and elevator input
- (x) - hydro commanded by the combination of aileron input and rudder input
- (y) - hydro commanded by the combination of inverse aileron input and rudder input
- (g) - hydro commanded by the combination of elevator input and rudder input
- (h) - hydro commanded by the combination of inverse elevator input and rudder input
hydros ;node1, node2, factor, options 43, 37, -0.2 45, 37, 0.2 46, 36, 0.2, s 48, 36, -0.2, s
Hydros can use inertia.
Animators
Requires 0.37.68 or later 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:
- Node 1 - The node where the animator starts
- Node 2 - The node where the animator ends
- lengthening factor - A coefficent how much the animator moves
- Option string
- Options:
- (vis) - creates a visble animator ( not needed but helps to read the truck file )
- (inv) - creates an invisble animator
- (airspeed) - speed for any vehicle, works like a gps based speed ( real movement, not wheelspeed )
- (vvi) - vertical velocity indicator
- (altimeter100k) - height, full scale
- (altimeter10k) - height , medium scale, will flip to back zero when passing over 10k, 20k, 30k...etc
- (altimeter1k) - height , small scale, will flip back to zero when passing over 1k, 2k, 3k...etc
- (aoa) - dashboard AOA
- (flap) - flap indicator and real flapwing animation
- (airbrake) - airbrake indicator and real airbrake animation
- (roll) - roll ( virtual horizon) will flip at 180 ° to -180, can be used for an autotrim feature
- (pitch) - pitch ( virtual horizon) will flip at 180 ° to -180, can be used for an autotrim feature
- (throttle1) - throttle set to engine1, can be used for thruster mechanics. Valid sources: throttle1, thjrottle2, ..., throttle8
- (rpm1) - rpm of engine1, can be used for thruster mechanics. Valid sources: rpm1, rpm2, ..., rpm8
- (aerotorq1) - torque of engine1, makes only sense with propeller engines. Valid sources: aerotorq1, aerotorq2, ..., aerotorq8
- (aeropit1) - pitch of engine1, makes only sense with propeller engines. Valid sources: aeropit1, aeropit2, ..., aeropit8
- (aerostatus1) - status of engine1, off/on/fire. Valid sources: aerostatus1, aerostatus2, ..., aerostatus8
- (brakes) - brake pedal status
- (accel) - accelerator pedal status
- (clutch) - clutch pedal animation
- (speedo) - wheelspeed ratio, scales with guisetting speedomax ( use it even if there is no custom overlay dashboard, simplifies the adjustment a lot )
- (tacho) - rpm visualization, scales with guisetting tachomax ( use it even if there is no custom overlay dashboard, simplifies the adjustment a lot )
- (turbo) - turbo psi
- (parking) - 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 psoitions
- (sequential) - sequentiell 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 indicators
- (torque) - animator to simulate engine torque, usefull in addition to wheel nodearms
- (heading) - current heading of the truck
- (difflock) - difflock status of the truck ( works only when differentials are present )
- (rudderboat) - steering hydro for boats
- (throttleboat) - throttle staus for boats
All options need to be connected by an underscore "|", please refer to the example below. You can stack multiple options (like: airpseed | vvi | inv), but its not recommended and may result in weird behaviors. All animators are scaled to a maximum of -1/+1 as default coefficent, use the ratio setting to get the movment you want. Speed or force of the animators is NOT settable, though you can alter movment 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 shock2. 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.
animators ;node1, node2, factor, options 32, 26, 0.09, shifterlin | inv 5, 27, 0.1, accel | inv 5, 28, 0.1, brake | inv 5, 29, 0.1, clutch | inv 36, 41, -0.4, speedo | inv ;this one is visible 49, 3, -0.9, torque | vis
Behavior
These sections are for commands and other behaviors that the vehicle can do.
Commands
The commands section describes the "real" hydros, 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:
- Node 1 - The node where the command beam starts
- Node 2 - The node where the command beam ends
- Rate of extension/contraction - How fast the command beam moves
- Maximum contraction - The shortest length that the command beam will try to be, as a proportion of its startup length
- Maximum extension - The longest length the command beam will try to be, as a proportion of its startup length
- Contraction key - A number representing the function key needed to compress the command beam. More than one can be controlled with the same key. (see below for keymap)
- Extension key - The key used to extend the command beam.
- Option flag (optional) - (i) makes the command beam invisible. (r) makes the command behave like a rope or a winch (no compression strength). (n) should be used as a filler when a description field is needed.
- Description (optional) - A text description that tells the user what the command beam does when the it is activated. There is no need to put a key in front of the text (like F1:_do_something) this will be done automatically!
commands ;id1, id2, rate, short, long, keys, keyl, options description 10, 91, 0.1, 1.0, 7, 1, 2, i, descriptive_text 12, 93, 0.1, 1.0, 7, 1, 2, i 14, 90, 0.1, 1.0, 7, 1, 2 16, 92, 0.1, 1.0, 7, 1, 2 114, 122, 0.2, 1.0, 19, 3, 4 115, 123, 0.2, 1.0, 19, 3, 4, n, descriptive_text_2 126, 132, 0.1, 0.1, 1.0, 5, 6, r
That is the default keymap:
- 1 = F1
- 2 = F2 ...
- 13 = CTRL+F1 ...
- 25 = ALT+F1 ...
- 37 = CTRL+ALT+F1 ...
Commands2
The commands2 section is an improved commands section. The main differences are:
- Different rates for shortening and lengthening the command.
- Taking multiple option characters at once (i.e. invisible rope)
- New option types.
The parameters are:
- Node 1 - The node where the command beam starts
- Node 2 - The node where the command beam ends
- Shortening rate - How fast the command beam shortens
- Lengthening rate - How fast the command beam lengthens
- Maximum contraction - The shortest length that the command beam will try to be, as a proportion of its startup length
- Maximum extension - The longest length the command beam will try to be, as a proportion of its startup length
- Shortening key - A number representing the function key needed to compress the command beam. More than one can be controlled with the same key. (see below for keymap)
- Lengthening key - The key used to extend the command beam.
- Option flag(s) (optional) - (n),(i) and (r) are also available.
- (n) should be used as a filler when a description field is needed.
- (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/shortning 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.
- Description (optional) - A text description that tells the user what the command beam does when it is activated. There is no need to put a key in front of the text (like F1:_do_something): this will be done automatically!. Note that there is no comma between the option flags and the description
commands2 ;id1, id2, rateShort, rateLong, short, long, keys, keyl, options Description 61, 113, 0.1, 0.5, 1.0, 4, 1, 2, of 62, 112, 0.1, 0.5, 1.0, 4, 1, 2, onf desc
Note:
- you may mix command/command2 sections, depending on what you want to use. example:
commands2 ;id1, id2, rateShort, rateLong, short, long, keyS, keyL, options description 61, 113, 0.1, 0.5, 1.0, 4, 1, 2, of 62, 112, 0.1, 0.5, 1.0, 4, 1, 2, onf Boom commands 116,124,0.1,1.0, 2.6, 3, 4 117,125,0.1,1.0, 2.6, 3, 4, n Underlift commands2 ;id1, id2, rateShort, rateLong, short, long, keys, keyl, options Description 136,116, 0.4,4.4,1.0, 10, 5,6 136,117, 0.4,4.4,1.0, 10, 5,6
Inertia
Requires 0.36.2 or later The inertia feature lets you sepcify an inertia function for your command. This highly reduces swing of commands since they operate smoothly
commands2 ;id1, id2, rateShort, rateLong, short, long, keyS, keyL, options description startDelay, stopDelay, startFunction stopFunction 115,123,0.1,1.0, 19,3, 4,n,First_Joint 0.5,0.5, smoothcrane revprogressiv 127,133,0.1,1.0, 10.5, 5, 6, n, Second_Joint 0.7,0.5, smoothcrane revprogressiv 137,147,0.1,1.0, 10.5, 7, 8, n, Third_Joint 0.7,0.5, smoothcrane revprogressiv 143,148,0.05,0.5, 2.0,9,10,n,Extremity_Joint 0.7,0.5, smoothcrane revprogressiv
- startDelay: delay upon command start
- stopDelay: delay upon command stop
- startFunction, stopFunction: what spline should be used for start/stop. See picture below.
- NOTE: Inertia delay values are not in seconds, but are a factor (the lower the value, the more inertia there is). Also, a description or some kind of placeholder character must be placed between the option flag and the inertia property. An underscore works great as a placeholder since RoR interprets the underscore as just a space.
Set_inertia_defaults
this command will set the defaults for all following commands, hydros, animators and rotators. To reset it to the default value, use '-1'
;set_inertia_defaults startDelay, stopDelay, startFunction stopFunction set_inertia_defaults 0.5, 0.5, smoothcrane revprogressiv ... set_inertia_defaults 0.7,0.5, smoothcrane revprogressiv ... ; reset: set_inertia_defaults -1
Rotators
Rotators are alternate commands(hydros) that allows you to do turntables, like in the base of a rotating crane. They use 10 reference nodes:
- 2 nodes to define the axis of rotation
- 4 nodes (must be a square, centered with the axis) to define the baseplate
- 4 nodes (again, a square, centered with the axis) to define the rotating plate.
Then, in a similar way to commands, comes the rate of rotation, and the numbers of the left and right function keys. Rotators can use inertia.
The reference nodes for the baseplate and rotator plate must also match each other in order, ie 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 line and attached picture. Both plates must be identical!
rotators ;axis1, axis2, a1, a2, a3, a4, b1, b2 b3, b4, rate, keyleft, keyright 29, 30, 31, 32, 34, 33, 37, 38, 36, 35, 0.1, 1, 2
Forwardcommands
Forwards 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.
forwardcommands
Importcommands
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.
importcommands
Set_beam_defaults
This is not a section, but a self-contained line that can be inserted anywhere in the truck file. It changes the beams (but also 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.). This method is better than the globeams command that is now deprecated. The parameters comes on the same line, after set_beam_defaults. You can use the first parameters (most useful) and safely ignore the last parameters. They are:
- Springiness - The ovreall stiffness of a beam. The higher the value the stiffer the beam. (Default is 9000000)
- Damping constant - The resistance to motion of a beam (Default is 12000)
- Deformation threshold constant - 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 (Default is 400000)
- Breaking threshold constant - The amount of force that must be applied to a beam before it will break. (Default is 1000000)
- Beam diameter (optional) - 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. (Default is 0.05)
- Beam material (optional) - (default is tracks/beam)
- Plastic deformation coefficient (optional) - (default is 0.0), Valid range: 0.0 - 1.0
To use default values without having to type the numbers, use -1 in each field. Example:
set_beam_defaults -1, -1, -1, -1
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 and 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:
; syntax is set_beam_defaults spring, damping, deform, break, diameter, material set_beam_defaults 3000000, 10000, 100000, 250000, 0.02, tracks/beamblack
If you want to keep a rigid chassis base and drivetrain, you can do:beams ;base chassis and drivetrain with the default high-strength settings 1,2 2,3 ... 3,4 ;car body, softer setting set_beam_defaults 3000000, 10000, 100000, 250000 5,6 6,7 ... ;return to stronger defaults for the rest (e.g. hydros) set_beam_defaults -1, -1, -1, -1 ...
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:
;set_beam_defaults spring, damping, deform, break, diameter, material, deform_coef set_beam_defaults 3000000, 10000, 100000, 250000, 0.02, tracks/beamblack, 0.9
Plastic Deform coef is 0.0 by default (elastic deformation). By setting it as property you can tune the related beam group to your needs. Valid values: 0.0 - 1.0, do not exceed that range! Plastic-Coef 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!
Set_node_defaults
This is not a section, but a self-contained line that can be inserted anywhere in the truck file. It changes the nodes (including wheel and camera nodes) declared after this line. 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 comes on the same line, after set_node_defaults. Merged into RoR SVN Revision 746, its available in the RoR-Stream/updater service as "use experimental" setting in the new installer service. You can use the first parameters (most usefull) and safely ignore the last parameters, if not defined default settings apply. They are:
- loadweight - The default loadweight mass applied to a node. Will be overriden by an per node definition ( property "l" ). Adds loadweight, minimass calculation unaffected (Default is 0)
- friction - Coefficient to lower/raise friction of a node which alters its traction abilities. (Default is 1.0)
- volume - Coefficient to lower/raise buoyancy of a node, this only applies when the node is in a fluid . (Default is 1.0)
- surface - Coefficient to lower/raise the surface of a node, this only applies when the node is in a fluid*. (Default is 1.0)
- options - Set any node-option property as default. You dont need to set the "l" property if a default loadweight is set.
Important: Buoyancy volume and drag surface settings only have effect on fluids defined in groundmodels.cfg ( mud definitions ), so right they dont work with the standard RoR Water yet.
To use default values without having to type the numbers, use -1 in each field. Example:
set_node_defaults -1, -1, -1, -1
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 mudsurface, 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 set_node_defaults -1, 1.1, 5, 1.25, b ;chassis, loaded with 5 kg per node, reduced traction, no buoyancy, higher drag surface set_node_defaults 5, 0.5, 0, 2 ; tracks example, high traction, low buoyancy, low surface, loaded with 50 kg per node set_node_defaults 50, 1.2, 0.3, 0.5 ;steam boat paddlewheel, loaded with 75 kg per node, no traction, no buoyancy, high drag surface set_node_defaults 75, 0, 0, 3 ;contactless with default settings set_node_defaults -1, -1, -1, -1, c
The new "L" node property option will help to understand and use set_node_defaults , "p" node property option will boost fps even with tracked vehicles on slower computers. -> nodes
Enable_advanced_deformation
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:enable_advanced_deformation
This will remove any limit and thresholds from the set_beam_defaults processing. Its recommended to use it for the development of good deforming flexbody nodebeam-structures.
Rollon
Enables collision between wheels and the contactable textured surfaces of a truck.
rollon
Contacters
The contacters section lists the nodes that may contact with cab triangle. This concerns only contacts with other trucks or loads. You can easily omit this section at first.
contacters 34 18 20 22 24 26 28 30 32
Gripnodes
the gripnodes feature was removed in favor of the slidenodes feature
Ropes
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 particularity: 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.
ropes ;order is important: root->end 116,134 130,136 116,135 130,137
Fixes
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 usefull to make fixed scenery elements from beams, like bridges. Just add the node number that you want to fix.
fixes 2 3 12
Minimass
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)
minimass 10.0
Ties
Ties are also special beams that have no compression strength (they can shorten easily) but have standard extension strength, like a cable or a chain. Like Ropes, they 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. The parameters are:
- the number of the root node (the starting point of the beam)
- the maximum reach length
- the rate of auto-shortening
- the shortest length possible
- the longest length possible (recommended you keep it as 1.0).
- (optional) you can make a tie visible (default) with the n' option or invisible with the ioption
- (optional) the force (in Newtons) when the ties stop to shorten. Default is 12000.
ties ;root, max len, rate, short, long (, flag, maxforce) 58, 1.5, 0.5, 0.3, 1.0 62, 1.5, 0.5, 0.3, 1.0 59, 1.5, 0.5, 0.3, 1.0 63, 1.5, 0.5, 0.3, 1.0, n, 5000
Ropables
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.
ropables ; node-id, group, multilock 0, 0, 0 1, -1
the group and multilock arguments are only available in RoR 0.36.3 and later.
- group:
- default: -1 = all groups
- multilock:
- 0=disable, 1=enable: this specifies if this ropable can be locked by many ties/ropes
Hookgroups
This section adds support for multiple hooks and grouping. It is available in 0.36.3 and above.Requires 0.36.3 or later hookgroup ; node-id, group 0, 0 1, -1
- group:
- -1 = all groups
Particles
This enables/disables a particle cannon in the game (use the 'G' key).
particles ;source, back reference, particle_system_name 19, 5, tracks/particles/water1 19, 5, tracks/particles/waterGreen 16, 3, tracks/particles/water1 16, 3, tracks/particles/waterRed
(You can create your own particle. A template can be found in data/water.particle)Rigidifiers
Rigidifiers enforce the relative angle of two interconnected beams. Say you have three nodes: a, b, c with two beams "ab" and "bc". This operator applied to a,b,c will have a similar effect of trussing with an "ac" beam, but it will work in any configuration, including if a,b,c are aligned. This operator can help a lot to do constructions that are hard to achieve by trussing, like landing gears, parts of cranes or support legs, and to maintain a pair of beams aligned. Note that this operator is computationally expensive, and it should be used sparingly. Trussing with beams is comparatively cheap and should be preferred to this operator.Requires 0.35 or later rigidifiers ;node a, node b, node c, spring, damping 1, 2, 3, 1000000.0, 50000.0
Torque Curve
This allows you to assign predefined torque curves or your own custom curves to a truck. Predefined options are: default, diesel, turbodiesel, gas, turbogas, wheelloader, compacttractor, tractor, hydrostaticRequires 0.36.2 or later Predefined Curve Example:
torquecurve turbogas
The first number is RPM where the power begins, and the second defines power as a percent of total torque.
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.
Custom curve example:
torquecurve 0,0 1000,0.79 1500,0.9 2000,0.97 2500,0.99 3000,0.9 3500,0.77
Engine dying in idle and first gear ? Just define a single higher peak value where you want the engine to idle... like adding
... 700, 0.2 800, 0.6 900, 0.4 ...
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 torquercurve made for a small diesel engine:
Idle: ~600 RpM, Max @ 1900 RPM, slight and constant torque increase over the used RpM bandwidth, hard torque dropoff in the overev area.
Axles
Requires 0.36.2 or later This section defines axles on a vehicle, allowing more accurate distribution of torque among the wheels.
Sample axle section
axles w1(1 2), w2(3 4), d(ol) ; axle 1 w1(5 6), w2(7 8), d(l) ; axle 2
The axle section introduces open differentials, and Spooled (aka locked) differentials. 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 if different from other sections in that it is broken into properties, properties are not order dependent, currently the available properties are:
- w1(<node1> <node2>) - this defines which wheel the axle is attached to, <node1> and <node2> refer to the node1 and node2 as defined in the wheel section
- w2(<node1> <node2>) - wheel 2, same as w1, this is the second wheel attached to the axle. w1 and w2 are interchangeable.
- d(<list of diff types>) - Defines the available differential types for this axle. the list of axles is cycled through in the order specified, differential types maybe specified more than once. Each differential type is specified by a single letter, the letters are not to be separated by spaces or any other character. if no differentials are specified the axles will default to opened and locked.
- Available differential types
- o - open
- l - locked
- s - Split evenly (each wheel gets equal torque regardless of wheel speed)
- Available differential types
Rescuer
rescuer
This single keyword placed in the truck file will make the truck a rescuer, like the Scania Wrecker, it can be entered by pressing "R."
Look & Feel
Managedmaterials
Managed materials helps you to use complex material effects (for example reflective materials like chromes, dynamic damage materials, bumpmapped 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.Requires 0.36 or later The generic format of this section is :
- Material name - the name of the material you are creating. You can use this material for any of your meshes (flexmeshes, props, etc.). This material name must not be defined anywhere else (for example in a .material file).
- Effect name - the name of the effect you want to use. Valid names are defined below.
- Effect parameters - a variable number of parameters, depending on the effect your are using. See below for the description.
Attention: never 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.
Available effects are :
- flexmesh_standard - This effect defines an opaque, reflective and damageable material for flexmeshes. This will work only for flexmeshes! It takes 3 parameters:
- a standard texture name: this is the base, undamaged texture.
- a damaged texture name (or "-" if no damage texture): similar to the standard texture, but with damages.
- a specular map texture name (or "-" if no specular map texture): a greyscale image that maps the "shinyness" of the material, from dark for matte to white for chromed.
- flexmesh_transparent - This effect defines a semi-transparent, reflective and damageable material for flexmeshes. This will work only for flexmeshes! It takes 3 parameters:
- a standard texture name: this is the base, undamaged texture. The alpha channel of this texture is used to define transparency.
- a damaged texture name (or "-" if no damage texture): similar to the standard texture, but with damages.
- a specular map texture name (or "-" if no specular map texture): a greyscale image that maps the "shinyness" of the material, from dark for matte to white for chromed.
- mesh_standard - This effect defines an opaque, reflective material for any mesh (like wheel rims, props, etc.) It takes 2 parameters:
- a standard texture name: this is the base, undamaged texture.
- a specular map texture name (or "-" if no specular map texture): a greyscale image that maps the "shinyness" of the material, from dark for matte to white for chromed.
- mesh_transparent - This effect defines a semi-transparent, reflective material for any mesh (like wheel rims, props, etc.) It takes 2 parameters:
- a standard texture name: this is the base, undamaged texture. The alpha channel of this texture is used to define transparency.
- a specular map texture name (or "-" if no specular map texture): a greyscale image that maps the "shinyness" of the material, from dark for matte to white for chromed.
Examples:
managedmaterials ;new_material effect parameters... mytruck/mainbody flexmesh_standard mytruckbody.png mytruckbody-dmg.png mytruckbody-spec.png mytruck/windows flexmesh_transparent mytruckbody.png mytruckbody-dmg.png mytruckbody-spec.png mytruck/rims mesh_standard mytruckrims.png allshiny-spec.png
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 the game authors (Thomas or Pricorde) for inclusion to the managedmaterial library of RoR.
Materialflarebindings
See also: Flares Tutorial
This can bind a material to a flare. For example you can change your meshs texture depending on a flare's visibility.the format is
- flare number : counting starts from zero. Just count down your flares in the flares section to find the correct number.
- material name : The material that you want to change. It must contain one technique, one pass and a special Texture Unit State (see below for an example)
flares 51,1,79, 0.23, 0.50, b, -1, 300, 0.2 myTruck/MyBrakeFlare materialflarebindings 1, myBrakeMaterial
the material must have a special form:
material myBrakeMaterial { technique { pass { texture_unit { anim_texture truck_brake_material.png 2 0 } } } }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. (However you could make automatically animated textures by setting 0 so 0.5 or so) This section should be after the flares section and before the props and flexbodies section in order to have the lights working properly.
Flares
See also: Flares Tutorial
- Reference Node
- X Coordinate
- Y Coordinate
- X Offset
- Y Offset - These define where the light flares will be. It is positioned relative to 3 nodes of the chassis. One node is the reference node, and the two others define a base (x,y). So the flare is in the plane defined by the 3 nodes, and is placed relative to the reference node by adding a fraction of the vectors ref->x and ref->y. The three first parameters are the 3 nodes numbers (ref,x,y) and the two next gives what amount of ref->x and ref->y to add to displace the flare point (these two should be logically between 0 and 1, or else that means you use the wrong base triangle and if the body flexes too much the flare will not stick to the body correctly).
- Type field:
- f (default mode when not stated): frontlight
- 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 controlnumber))
- Control Number - This determines how this light is switched on and off, if you chose a user controlled light. Valid user defined control numbers are 0-500. If you chose a non-user controlled light(i.e. brake light) you should say -1 here.
- Blinkdelay - 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 -1 to use the default value of 500ms. Use a value of 0 to create a non-blinking light.
- Size - This determines how big the flare will be. Reasonable values are between 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)
- Material Name - This field determines what material should be used for the flare display. If you want to use the standard material, use 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.
flares ;RefNode,X,Y,OffsetX,OffsetY, Type, ControlNumber, BlinkDelay, size MaterialName ;example for a most default one: 51,1,79, 0.23, 0.50, b, -1, 0, -1 default ;example for a custom brake light 51,1,79, 0.23, 0.50, b, -1, 300, 0.2 myTruck/MyBrakeFlare ;example for a User controlled Fog Light (by light control-event 0) 51,1,79, 0.23, 0.50, u, 0, 0, 0.3 myTruck/MyFogFlare
Flares2
Flares2 are the same as normal flares, except they add an offsetz argument inbetween:
flares2 ;RefNode,X,Y,OffsetX, OffsetY, OffsetZ, Type, ControlNumber, BlinkDelay, size MaterialNameProps
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 of these objects). Like flares, they use an annoying 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
Please read this guide if you want to use high quality meshes: Mesh LODs.
Parameters are:
- Reference node - The base node, used to define the coordinate system
- X direction node - The node that defines the X direction (this can be visualised as a line pointing from the reference node to this node)
- Y direction node - The node that defines the Y direction (this can be visualised as a line pointing from the reference node to this node)
- X direction offset - The amount the prop should be moved in the X direction from the reference node. The distance it is moved depends on the distance between the Reference node and the X direction node (it's proportional): (0) leaves the prop on the reference node, (1) moves it all the way to the X direction node, and (0.5) puts the prop half-way between the two
- Y direction offset - The amount the prop should be moved in the Y direction from the reference node. Like the X direction offset, the amount it is proportional to the distance between the reference node and the Y direction node.
- Straight up offset - Imagine a surface which the X and Y directions pass straight through. If looking along that surface is the forwards direction, then this field moves the prop straight up. Unlike the X direction offset and the Y direction offset, the amount for the straight up offset is measured in meters
- X axis rotation - The amount the prop should be rotated about the X axis
- Y axis rotation - The amount the prop should be rotated about the Y axis
- Straight up axis rotation - The amount the prop should be rotated about the 'straight up' axis
- Mesh name - The name of the Ogre3D mesh object used for the prop. Note that meshes with the name beginning with "dashboard", "leftmirror", "rightmirror", "seat", "beacon", "pale" and "spinprop" are reserved as they employ some magic to work. The first "seat" mesh is made translucent, so it should be 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.
props ;ref,x,y,offsetx,offsety,offsetz,rotx,roty,rotz,mesh 93,95,92, 0.50, 0.37, 0.0, 90, 0, 0, airintake.mesh
Note:
- The X Direction offset and the Y direction offset should logically between 0 and 1, or else that means you use the wrong base triangle and if the body flexes too much the prop will not stick to the body correctly.
- The coordinate system is actually really similar to 'normal coordinates', but it allows the angle between the two axes (ie. the angle between the X direction node, the Reference node, and the Y direction node) to be any value, not just 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.
Special Props
- Dashboard (to add a custom direction wheel to your dashboard)
Requires 0.35 or later ;ref,x,y,offsetx,offsety,offsetz,rotx,roty,rotz,mesh dirwheelmesh x offset, y offset, z offset, rotation angle ; the default dirwheel would be: 72,71,74, 0.50, 1.0, -0.05, 0, 0, 0, dashboard.mesh dirwheel.mesh -0.67, -0.61, 0.24 ; an example for a custom one with 720 degree: 72,71,74, 0.50, 1.0, -0.05, 0, 0, 0, dashboard.mesh seat.mesh -0.67, -0.51, 0.14, 720 ; an example for a custom dashboard with custom wheel one with 200 degree: 72,71,74, 0.50, 1.0, -0.05, 0, 0, 0, dashboard-test123.mesh seat.mesh -0.67, -0.51, 0.14, 200 ;important: you dashboard must be named like 'dashboard-something' in order to be detected as dashboard
Here you can see the standard reference nodes, and offset for the dashboard. Then, there is the steering wheel mesh, and it's offsets.- Beacon (to change the beacon's color and flare material)
Requires 0.35 or later - if you want to use you own mesh as beacon it should be named beacon-<somename>.mesh, e.g. beacon-blue.mesh
;ref,x,y,offsetx,offsety,offsetz,rotx,roty,rotz,mesh flareMaterialName colorRed, colorGreen, colorBlue ; the default beacon would be: 19,73,16, 0.1, 0.1, 0, 90, 0, 0, beacon.mesh tracks/beaconflare 1, 0.5, 0 ; the red beacon would be: 19,73,16, 0.1, 0.1, 0, 90, 0, 0, beacon.mesh tracks/redbeaconflare 1, 0, 0 ; example for a custom beacon: 19,73,16, 0.1, 0.1, 0, 90, 0, 0, beacon.mesh tracks/greenflare 0, 1, 0
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.Add_animation
Requires 0.37.68 or later Animate your existing props related to game data or keypress events. Up to 10 rotations and offsets depending on different sources are valid for one prop. The parameters are:
add_animation ratio, option1, option2, source: source, mode: mode1, mode2... mode3, ( event:event )
- ratio - A coefficent for the animation, prop degree if used with mode: rotation and propoffset if used with mode: offset
- option1 - Lower Limiter for the animation, remeber to use a negative value when source can be negative ( like wheelsteering ). Use 0 for both options to get default limits ( Full circle rotation ( -180/+180°) or -10/+10 for offsets. Limits always apply to the props spawning position.
- option1 - Upper Limiter for movment, remeber to use a psoitive value when source can be negative ( like wheelsteering ). Use 0 for both options to get default limits ( Full circle rotation ( -180/+180°) or -10/+10 for offsets. Limits always apply to the props spawning position.
- source: - a list of sources to use, its recommended to use only 1 per add_animation line, though multiple sources are possible too.
- mode: - a list of modes to use, multiple modes are valid
- event: - an optional input, only needed for source: event. It determines the keypress event to catch for the animation
- source:
- (airspeed) - speed for any vehicle, works like a gps based speed ( real movement, not wheelspeed )
- (vvi) - vertical velocity indicator
- (altimeter100k) - height, full scale (100k)
- (altimeter10k) - height , medium scale (10k)
- (altimeter1k) - height , precision scale (1k)
- (aoa) - Angle of Attack for wings
- (flap) - flap indicator
- (airbrake) - airbrake indicator
- (roll) - roll ( virtual horizon)
- (pitch) - pitch ( virtual horizon)
- (throttle1) - throttle set to engine1. Valid sources: throttle1, thjrottle2, ..., throttle8
- (rpm1) - rpm of engine1. Valid sources: rpm1, rpm2, ..., rpm8
- (aerotorq1) - torque of engine1, makes only sense with propeller engines. Valid sources: aerotorq1, aerotorq2, ..., aerotorq8
- (aeropit1) - pitch of engine1, makes only sense with propeller engines. Valid sources: aeropit1, aeropit2, ..., aeropit8
- (aerostatus1) - status of engine1, off/on/fire. Valid sources: aerostatus1, aerostatus2, ..., aerostatus8
- (brakes) - brake pedal status
- (accel) - accelerator pedal status
- (clutch) - clutch pedal animation
- (speedo) - wheelspeed ratio, scales with guisetting speedomax ( use it even if there is no custom overlay dashboard, simplifies the adjustment a lot )
- (tacho) - rpm visualization, scales with guisetting tachomax ( use it even if there is no custom overlay dashboard, simplifies the adjustment a lot )
- (turbo) - turbo psi
- (parking) - 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 psoitions
- (sequential) - 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 torque
- (heading) - current heading of the truck
- (difflock) - difflock status of the truck ( works only when differentials are present )
- (rudderboat) - steering status for boats
- (throttleboat) - throttle stauts for boats
- (steeringwheel) - steering stauts for trucks
- (aileron) - ailerons status for airplanes
- (elevator) - elecvator status for airplanes
- (rudderair) - rudder status for airplanes
- (permanent) - a permanent source, active when you are in the truck
- (event) - a source triggered by akeypress, 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-movment 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-axis
- (y-offset) - offset along the x-axis
- (z-offset) - offset along the x-axis
- (autoanimate) - rotation or offset is applied as long as source is not 0. Usefull for driveshafts, fans, etc.
- (noflip) - a prop will flip to the opposite limit when a limit is reached, with this mode it just stops at the set limit
- (bounce) - a prop will flip to the opposite limit when a limit is reached, with this mode it just rebound at the set limit. Only usefull with mode: noflip
- (eventlock) - will lock a toggled event in its current sttus, usefull for switches and staus levers. Only works with mode:event and a correct defined event:
- event:
- (rorkeypressevent) - all ror keypress events. A list of valid RoR events: KeypressEvents: http://wiki.rigsofrods.com/pages/Keypress_Events
How to use:
Best to test is a prop that has no rotations or offsets set on a node triangle like this:
n1, 0, 1, 0 n2, 0, 1, 1 n3, 0, 0, 0
Add the add_animation line AFTER the prop in your prop-section you want to animate:
Sources
add_animation 200, 0, 0, source: steeringwheel, mode: x-rotation ;Prop now animated by steeringwheel input. ;Refer to the '''source:''' list above for the different sources avail. add_animation 10, 1, 2, source: sequential, mode: y-rotation add_animation 10, 3, 4, source: sequential, mode: x-rotation ;a joystick animation related to F1-F4 ( look below for the GIMBAL LOCK issue!) add_animation 0.02, 1, 0, source: sequential, mode: y-offset ;button animation getting pressed on F1 add_animation 10, 0, 0, source: sequential, mode: y-offset ;sequential shifter reacting to shift up/down
Modes
add_animation 145, 0, 0, source: airspeed, mode: x-rotation ;Airspeed indicator needle rotating x axis add_animation 145, 0, 0, source: airspeed, mode: y-rotation ;Airspeed indicator needle rotating y axis add_animation 145, 0, 0, source: airspeed, mode: z-offset ;Airspeed indicator sliding z axis add_animation -90, 0, 0, source: pitch , mode: y-rotation add_animation 180, 0, 0, source: roll, mode:x-rotation ;virtual attitude indicator (artifical horizion)( look below for the GIMBAL LOCK issue!)
Eventsadd_animation 45, 0, 0, source: event, mode: x-rotation, event: TRUCK_TOGGLE_CONTACT ;Prop will rotate 45° x-axis when the starter key is pressed. ;There is only one event allowed with '''mode:event''' add_animation 45, 0, 0, source:event, mode:x-rotation, eventlock, event:TRUCK_TOGGLE_CONTACT add_animation 45, 0, 0, source:event, mode:x-rotation, event:TRUCK_STARTER ;This rotates the prop related to ignition status and additional 45° when the starter is pressed ;Its valid to stack up to 10 animations of any kind to one single prop.
Autoanimationadd_animation 0.005, 0, 0, source: permanent, mode: x-offset, autoanimate ;It will animate the related prop on the x-offset add_animation -0.005, 0, 0, source: permanent, mode: x-offset, autoanimate ;Moving direction changed. add_animation -0.005, 0, 0, source: permanent, mode: x-offset, autoanimate, noflip ;Will stop now at the limit and not flip anymore. So now it just moves one direction and thats it. add_animation -0.005, 0, 0, source: permanent, mode: x-offset, autoanimate, noflip, bounce ;Will start moving left / right itself just according to the default limits add_animation -0.005, -5, 20, source: permanent, mode: x-offset, autoanimate, noflip, bounce ;Will start moving left / right itself just according to the user custom limits. ;Keep in mind: for rotation and offset, first limits needs to be <=0 second >=0 ;Limits are like prop offsets for offsets, default ( opt1=opt2=0) limit is +-10 add_animation -0.005, 15, 20, source: permanent, mode: x-offset, autoanimate, noflip, bounce ;The prop will jump instantly at start and bounce between that limits, which might be a bit confusing. add_animation -0.005, 15, 20, source: permanent, mode: x-rotation, autoanimate ;Rotating instead of sliding. All the settings for offsets can be used with rotation too. ;Limits are in degree for rotations, default ( opt1=opt2=0) limit is +-180° ( a full circle)
GIMABL 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 i another way, rotate the mesh in your mesh-editor ! To avoid axis corruption when rotating props multiple: - Use only the x and y axis together, skip z. If you need 3 axis roation, do the z-axis with a n/b-rotator as the base for your prop definition nodes. Info here: http://wapedia.mobi/en/Gimbal_lock
Flexbodies
Flexbodies are pretty much the same as props. The only difference between them is that flexbodies deform. The first line of this section is exactly the same format as on the props section. 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). These nodes should be outer nodes of the vehicle, those that are close to the mesh.You can declare several flexbodies. Each must be composed of the two lines (prop-like line and forset line). Note: 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 mesh is about 4000 vertices.
Please read this guide if you want to use high quality meshes: Mesh LODs.
flexbodies ;ref,x,y,offsetx,offsety,offsetz,rotx,roty,rotz,mesh 3,4,19, 0, 0, 0.027, 90, 0, 90, dodgecharger.mesh forset 0-16, 23-24, 31, 54-125
If you want to place your flexbody global, so in the node-coordinatesystem of your truck you just have to declare -1 as ref-node.
Please refer to this thread for more information.
Submesh
This last part 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. A submesh has two subsection: 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. The nodes used in the cab subsection must be present in the texcoord subsection. 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 (IIRC). There is an optional flag to the cab subsection:
- If you add c to the triangle, this triangle will be a contact triangle, that can contact with contacters nodes.
- If you use b, this triangle will be part of a buoyant hull.
- If you use D, this triangle will be both a contact triangle AND a buoyant hull part (combination of the b and c flags).
- new flags (>=0.36a)
- p: force required to pierce through is ten times bigger
- u: impossible to pierce
- F: force required to pierce through is ten times bigger plus boat hull (D)
- S: impossible to pierce plus boat hull (D)
mcreed has contributed a cool Texturing Tutorial that describes how to fill the submesh and cab parts of the truck file.
When the tag "backmesh" is added, the triangles backsides of the submesh will be black instead of see-through.
;cabin top submesh texcoords 75, 0.172, 0.334 76, 0.172, 0.665 77, 0.291, 0.334 78, 0.291, 0.665 cab 75,76,78 75,78,77 ;cabin back submesh texcoords 77, 0.291, 0.334 78, 0.291, 0.665 53, 0.422, 0.334 54, 0.422, 0.665 6, 0.422, 0.334 8, 0.422, 0.665 cab 77,78,54 77,54,53 53,54,8,c 53,8,6,c backmesh
When making an invisible collision submesh for a flexbody vehicle, the "texcoords" section is not needed and should not be used.
;front bumper submesh cab 126,121,127,c 132,126,127,c 133,132,127,c 125,120,121,c 126,125,121,c ...
Exhausts
This replaces the x or y node options. The factor should be one, as it is not used yet. The material should be "default" or any other custom created one. (You could create your own particle emitter based on the default one: data/smoke.particle). Remember: The direction node is behind the ref node!
exhausts ;ref node, direction node, factor material 103, 99, 1 default 105, 98, 1 default
Sections
sectionconfig 0 lowspeed sectionconfig 0 highspeed section 0 lowspeed engine 1000.000000, 1500.000000, 5000.000000, 2.000000, 10.850000, 9.520000, 6.560000, 5.480000, 4.580000, 3.830000, 3.020000, 2.530000, 2.080000, 1.740000, 1.430000, 1.200000, 1.000000, -1.000000, 0.000000, 0.000000, 0.000000 end_section section 0 highspeed engine 1000.000000, 15000.000000, 5000.000000, 2.000000, 10.850000, 9.520000, 6.560000, 5.480000, 4.580000, 3.830000, 3.020000, 2.530000, 2.080000, 1.740000, 1.430000, 1.200000, 1.000000, -1.000000, 0.000000, 0.000000, 0.000000 end_section section 0 highspeed lowspeed ;triggered with both end_section
Guisettings
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.
- tachoMaterial - The name of the tachometer face (must be defined in a material file). Default: tracks/Tacho
- speedoMaterial - The name of the speedometer face (must be defined in a material file). Default: tracks/Speedo
- speedoMax - The highest number that is on the speedometer (values 10-32000) Speedometer needle goes from -140° to 140°. Default: 140 (kph)
- useMaxRPM - Whether or not to use the max rpm (in the engine section) as the highest number on the tachometer. Note that your actual max rpm is MaxRPM+20%. Do not include the 20% on your tachometer or it will be inaccurate. Tachometer needle is from -120° to 120°. Default is 0 (off).
- helpMaterial - The help material (a picture that shows command instructions). Default: tracks/black
- (>0.36) interactiveOverviewMap - enables / disables the activation of the interactive map for the truck. possible arguments: off, simple, zoom
- (>0.36) debugBeams : enables certain beam/node debug options for the truck. Valid options:
- node-numbers : displays labels with node numbers
- beam-numbers : displays labels with beam numbers
- node-and-beam-numbers : both node and beam ids
- node-mass : node mass in kg
- node-locked : node locked?
- beam-compression : compression of the beam
- beam-broken : displays if a beam is broken, if not, displays nothing
- beam-stress : displays stress of a beam
- beam-strength : displays strength of a beam
- beam-hydros : displays hydro position
- beam-commands : displays commands position
For example (keyword<SPACE>value):
guisettings tachoMaterial tracks/MyTacho speedoMaterial tracks/MySpeedo speedoMax 80 useMaxRPM 1 interactiveOverviewMap zoom
Set_skeleton_settings
This modifies the skeleton display of the truck.
The format is:
- set_skeleton_settings <float: sight-range>, <float: beam diameter>
The default values are:
set_skeleton_settings 150, 0.01
(150 meter visible, beam is 1 centimeters width.)For example:
set_skeleton_settings 2000, 0.09
will result in 2km sightrange with 9 centimeters width beams.Envmap
This section is currently not used. It has no effect putting anything there. However, it may be used in future versions.
Sounds
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.Requires 0.36 or later disabledefaultsounds
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 :
disabledefaultsounds
soundsources
Adds a sound source to your vehicle. In this section, you can add many sound sources defined as a node number (the place where your sound will com from), and a sound script name. Sound scripts are defined in soundscript files. You can use game-defined sound scripts or your own sound scripts. Example :
soundsources 23, my_diesel 23, my_turbo 135, tracks/default_horn
Default
This is a list of all default soundsources seperated by engine type
This can be inserted in the file as is.
Engine (Diesel)
soundsources 1, tracks/default_diesel 1, tracks/default_force 1, tracks/default_starter 1, tracks/default_turbo 1, tracks/default_air_purge 1, tracks/default_horn 1, tracks/default_pump 1, tracks/default_screetch 1, tracks/default_brakes 1, tracks/default_parkbrakes 1, tracks/default_air 1, tracks/default_shift 1, tracks/default_break 1, tracks/default_creak 1, tracks/default_gear_slide 1, tracks/default_reverse_beep 1, tracks/default_turn_signal
Engine (Gasoline)
soundsources 1, tracks/default_car 1, tracks/default_starter 1, tracks/default_horn 1, tracks/default_pump 1, tracks/default_police 1, tracks/default_screetch 1, tracks/default_brakes 1, tracks/default_parkbrakes 1, tracks/default_shift 1, tracks/default_break 1, tracks/default_creak 1, tracks/default_gear_slide 1, tracks/default_turn_signal
Airplane (Prop)
soundsources 1, tracks/default_turboprop_start1 1, tracks/default_turboprop_lopower1 1, tracks/default_turboprop_hipower1 1, tracks/default_turboprop_start2 1, tracks/default_turboprop_lopower2 1, tracks/default_turboprop_hipower2 1, tracks/default_turboprop_start3 1, tracks/default_turboprop_lopower3 1, tracks/default_turboprop_hipower3 1, tracks/default_turboprop_start4 1, tracks/default_turboprop_lopower4 1, tracks/default_turboprop_hipower4 1, tracks/default_turboprop_start5 1, tracks/default_turboprop_lopower5 1, tracks/default_turboprop_hipower5 1, tracks/default_turboprop_start6 1, tracks/default_turboprop_lopower6 1, tracks/default_turboprop_hipower6 1, tracks/default_turboprop_start7 1, tracks/default_turboprop_lopower7 1, tracks/default_turboprop_hipower7 1, tracks/default_turboprop_start8 1, tracks/default_turboprop_lopower8 1, tracks/default_turboprop_hipower8
Airplane (Jet)
soundsources 1, tracks/default_turbojet_start1 1, tracks/default_turbojet_lopower1 1, tracks/default_turbojet_hipower1 1, tracks/default_turbojet_afterburner1 1, tracks/default_turbojet_start2 1, tracks/default_turbojet_lopower2 1, tracks/default_turbojet_hipower2 1, tracks/default_turbojet_afterburner2 1, tracks/default_turbojet_start3 1, tracks/default_turbojet_lopower3 1, tracks/default_turbojet_hipower3 1, tracks/default_turbojet_afterburner3 1, tracks/default_turbojet_start4 1, tracks/default_turbojet_lopower4 1, tracks/default_turbojet_hipower4 1, tracks/default_turbojet_afterburner4 1, tracks/default_turbojet_start5 1, tracks/default_turbojet_lopower5 1, tracks/default_turbojet_hipower5 1, tracks/default_turbojet_afterburner5 1, tracks/default_turbojet_start6 1, tracks/default_turbojet_lopower6 1, tracks/default_turbojet_hipower6 1, tracks/default_turbojet_afterburner6 1, tracks/default_turbojet_start7 1, tracks/default_turbojet_lopower7 1, tracks/default_turbojet_hipower7 1, tracks/default_turbojet_afterburner7 1, tracks/default_turbojet_start8 1, tracks/default_turbojet_lopower8 1, tracks/default_turbojet_hipower8 1, tracks/default_turbojet_afterburner8
Airplane (Piston)
soundsources 1, tracks/default_pistonprop_start1 1, tracks/default_pistonprop_lopower1 1, tracks/default_pistonprop_hipower1 1, tracks/default_pistonprop_start2 1, tracks/default_pistonprop_lopower2 1, tracks/default_pistonprop_hipower2 1, tracks/default_pistonprop_start3 1, tracks/default_pistonprop_lopower3 1, tracks/default_pistonprop_hipower3 1, tracks/default_pistonprop_start4 1, tracks/default_pistonprop_lopower4 1, tracks/default_pistonprop_hipower4 1, tracks/default_pistonprop_lopower5 1, tracks/default_pistonprop_hipower5 1, tracks/default_pistonprop_lopower6 1, tracks/default_pistonprop_hipower6 1, tracks/default_pistonprop_lopower7 1, tracks/default_pistonprop_hipower7 1, tracks/default_pistonprop_lopower8 1, tracks/default_pistonprop_hipower8
Marine (Large)
1, tracks/default_marine_large
Marine (Small)
1, tracks/default_marine_small
Aircraft
Wings
- Please see RoRBook/Wings for more information
The wings parameters are:
- (A) Front left down node number
- (B) Front right down node number
- (C) Front left up node number
- (D) Front right up node number
- (E) Back left down node number
- (F) Back right down node number
- (G) Back left up node number
- (H) Back right up node number
- Texture X coordinate of the front left of the wing (in the texture defined in "globals")
- Texture Y coordinate of the front left of the wing (in the texture defined in "globals")
- Texture X coordinate of the front right of the wing (in the texture defined in "globals")
- Texture Y coordinate of the front right of the wing (in the texture defined in "globals")
- Texture X coordinate of the back left of the wing (in the texture defined in "globals")
- Texture Y coordinate of the back left of the wing (in the texture defined in "globals")
- Texture X coordinate of the back right of the wing (in the texture defined in "globals")
- Texture Y coordinate of the back right of the wing (in the texture defined in "globals")
- Type of control surface: see below
- Relative chord point at which starts the control surface (between 0.0 and 1.0)
- Minimum deflection of the control surface, in degree (negative deflection)
- Maximum deflection of the control surface, in degree (positive deflection)
- Airfoil file to use
- coefficent (optional) Default is 1.0 (100%), setting any other positive number increases or decrease overall wing efficency. Usefull 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'=none
- 'a'=right aileron
- 'b'=left aileron
- 'f'=flap
- 'e'=elevator
- 'r'=rudder
- 'S'=stabilator with right hand axis (full body elevator), useful for e.g. a Mig25
- 'T'=stabilator with left hand axis (full body elevator), useful for e.g. a Mig25
Requires 0.36 or later - 'c'=right elevon (right aileron + elevator), useful for e.g. Concorde
- 'd'=left elevon (left aileron + elevator), useful for e.g. Concorde
- 'g'=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-15
- 'V'=taileron with left hand axis (full body elevator+aileron), useful for e.g. a F-15
- 'i'=right ruddervator (rudder + elevator), useful for V-tails like the Bonanza
- 'j'=left ruddervator (rudder + elevator), useful for V-tails like the Bonanza
wings ;main wing 28,22,29,23,18,20,19,21, 0.509, 0.999, 0.555, 0.751, 0.752, 0.999, 0.752, 0.751, a, 0.75, -24, 24, NACA64.1.412.afl ; this wing is force efficeny reduced to 50% 26,28,27,29,16,18,17,19, 0.804, 0.711, 0.818, 0.617, 0.999, 0.711, 0.999, 0.617, f, 0.75, -30, 0, NACA64.1.412.afl 0.75 ; this wing is force efficeny uograded to 300% ( equals 3 wings of the same type ) 90,26,25,27,14,16,15,17, 0.783, 0.844, 0.804, 0.711, 0.999, 0.844, 0.999, 0.711, f, 0.75, -30, 0, NACA64.3.618.afl 3.0 0,90,24,25, 4,14,13,15, 0.764, 0.933, 0.784, 0.844, 0.999, 0.933, 0.999, 0.844, f, 0.75, -30, 0, NACA64.3.618.afl 2, 0,46,24, 6, 4,12,13, 0.756, 0.999, 0.764, 0.933, 0.999, 0.999, 0.999, 0.933, n, 1.0, 0, 0, NACA0009.afl 44, 2,45,46,30, 6,31,12, 0.783, 0.844, 0.764, 0.933, 0.999, 0.844, 0.999, 0.933, f, 0.75, -30, 0, NACA64.3.618.afl 42,44,43,45,32,30,33,31, 0.804, 0.711, 0.783, 0.844, 0.999, 0.711, 0.999, 0.844, f, 0.75, -30, 0, NACA64.3.618.afl 40,42,41,43,34,32,35,33, 0.818, 0.617, 0.804, 0.711, 0.999, 0.617, 0.999, 0.711, f, 0.75, -30, 0, NACA64.1.412.afl 38,40,39,41,36,34,37,35, 0.555, 0.751, 0.509, 0.999, 0.752, 0.751, 0.752, 0.999, b, 0.75, -24, 24, NACA64.1.412.afl ;rudder 101,107,102,108,103,109,104,110, 0.017, 0.746, 0.087, 0.492, 0.262, 0.746, 0.204, 0.492, r, 0.56, -35, 35, NACA0009.afl 99,101,100,102,105,103,106,104, 0.017, 0.999, 0.132, 0.747, 0.262, 0.999, 0.253, 0.747, n, 1.0, 0, 0, NACA0009.afl ;elevators 144,154,146,155,142,152,105,153, 0.763, 0.457, 0.840, 0.244, 0.999, 0.457, 0.983, 0.244, e, 0.64, -33, 33, NACA0009.afl 145,144,147,146,143,142,106,105, 0.756, 0.999, 0.764, 0.933, 0.999, 0.999, 0.999, 0.933, n, 1.0, 0, 0, NACA0009.afl 150,145,151,147,148,143,149,106, 0.840, 0.244, 0.763, 0.457, 0.983, 0.244, 0.999, 0.457, e, 0.64, -33, 33, NACA0009.afl
Specialwing formats to reduce node/beam count and cpu load: ( use at your 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 invisble wings with meshed props/flexbodies for the visual appearance and with a transparent material, skinning them results in an ugly viusal appearance.- Flarewing using 2 nodes
-- for precise aviation flare placment you can use a wing defined with only 2 nodes
-- it has no aerodynamical influence at all
-- low node/beam count
-- Vital: Needs to be placed as first wing in the wings section, use the NACA0009.afl
wings A,B,A,B,A,B,A,B,0,0,0,0,0,0,0,0,n,0,0,0, NACA0009.afl
- Trim or main wing using 3 nodes
-- defines a wing with only 3 nodes
-- placed first in the wing section results in the aviation flares appear on the nodes A,B ( red/green ) and E ( white flash )
-- works horizontal and vertical (tailfin wing)
-- 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
wings A,B,A,B,E,E,E,E,0,0,0,0,0,0,0,0,n,0,0,0, NACA0009.afl
- Trim or main wing using 4 nodes
-- defines a wing with only 4 nodes
-- placed first in the wing section results in the aviation flares appear on the nodes A,B ( red/green ) and E,F( white flash )
-- works horizontal and vertical (tailfin wing)
-- 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
wings A,B,A,B,E,F,E,F,0,0,0,0,0,0,0,0,n,0,0,0, NACA0009.afl
Airbrakes
Airbrakes are a moving panel used to slow down an airplane (key bindings: "3" and "4"). They are positioned similarly to "props", with noderef, nodex, nodey, offsetx, offsety, offsetz. nodea is an additional node to make the braking forces symmetric (they are applied to noderef, nodex, nodey and nodea). Width and length define the dimension of the panel, and max angle the maximum inclination angle. Then comes two texture coordinates which apply to the main texture of the vehicle. These airbrakes can be easily added to a wing box, with noderef, nodex, nodey and nodea being the four upper nodes of a box.Requires 0.35 or later airbrakes ; noderef, nodex, nodey, nodea, offsetx, offsety, offsetz, width, length, max angle, texcord x1, texcoord y1, texcoord x2, texcoord y2 95, 105, 113, 125, 0.2, 0.0, 0.0, 2.0, 3.0, 60.0, 0.044, 0.205, 0.124, 0.146
Turboprops
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 turboiprops will work. One pale.mesh per propeller blade can also be aded 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 is made. Parameters are:
- Reference node number (center of the prop)
- Prop axis node number (back of the prop)
- Blade 1 tip node number
- Blade 2 tip node number
- Blade 3 tip node number
- Blade 4 tip node number
- Power of the turbine (in kW)
- Airfoil of the blades
turboprops 122,173,174,175,176,177, 3000.0, Clark-Y.afl 113,168,169,170,171,172, 3000.0, Clark-Y.afl 116,158,159,160,161,162, 3000.0, Clark-Y.afl 119,163,164,165,166,167, 3000.0, Clark-Y.afl
Fusedrag
The fusedrag section helps the correct modeling of the fuselage contribution to the aerodynamic drag of a plane. It makes also possible to "mask" 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:
- Number of the front-most node of the fuselage
- Number of the rear-most node of the fuselage
- Approximate width of the fuselage
- Airfoil name
fusedrag 131, 51, 4.0, NACA0009.afl
Turbojets
Defines a turbojet. Parameters are:Requires 0.35 or later - nodefront - a node at the air intake
- nodeback - a node at the base of the nozzle
- nodeside - a node at the side of the engine, for reference.
- is_reversable - Unused
- dry thrust - the thrust without afterburner (in kilonewtons)
- wet thrust - the total thrust with afterburner, or zero if it does not apply.
- front diameter - Unused
- back diameter - the nozzle diameter
- nozzle length - the length of the nozzle. This will automatically add a nozzle prop at the end of the engine, with the diameter and length specified.
turbojets ;nodefront, nodeback, nodeside, is_reversable, dry_thrust(kN), wet_thrust(kN), front_diameter, back_diameter, nozzle_length 272, 273, 277, 0, 73.5, 100.1, 1.2, 1.66, 0.73 274, 275, 276, 0, 73.5, 100.1, 1.2, 1.66, 0.73
Pistonprops
pistonprops ;ref, back, p1, p2, p3, p4, couplenode, power, pitch, propfoil 122,173,174,175,176,177, -1, 3000.0, -10, Clark-Y.afl 113,168,169,170,171,172, -1, 3000.0, -10, Clark-Y.afl 116,158,159,160,161,162, -1, 3000.0, -10, Clark-Y.afl 119,163,164,165,166,167, -1, 3000.0, -10, Clark-Y.afl
Boats
Screwprops
Screwprops are boats propellers. As of RoR 0.31, the definition of this section is not stabilized, and is bound to change as the propeller model will improve. Currently, steering is only done by thrust vectoring. The current format is prop node, back node, top node, power.
screwprops ;prop node,back node,top node,power 88,93,91,100000.0 89,92,90,100000.0
New
Slide Node Sections
Slide Nodes
Requires 0.36.3 or later Slide nodes are a simple constraining mechanism that greatly simplifies some mechanical structures, and makes some previously impossible mechanics possible.
What is are slide nodes? The simple constraining of a node to a beam gives the appearance that the node is stuck to beam but can freely slide back and forth
The syntax is straight forward
slidenodes ;id, node id list 1, 7, 8, 9, 10
The first number is the ID of the node that acts as the slide node. The list of number after the first number is the beam list, this is the id if the nodes forming a rail the node can slide on. This list must be a series of beam that are connected in that order. In the example above the beams are defined by 7, 8, 9, 10. This mean that a beam must exist between nodes 7 and 8, a beam between 8 and 9, a beam and a beam between 9 and 10.
After the beam list comes the options, these options are specified with a numerical designator followed by a value, they are not order dependant but MUST come at the end of the line.
Options:
- Spring Rate (s): Force that holds the node to the rail (default: 9000000)
- Break Force (b): Force at which the node will seperate from the rail (default: infinity, ie never)
- Tolerence (t): Distance from the rail before rail forces are applied to the node (default 0)
slidenodes ;id, node id list 1, 7, 8, 9, 10, s9000, b10000, t0.1,
Rail Groups
Requires 0.36.3 or later This section allows the creation of rails that slide nodes can slide on without having to associate it with a specific rail. These would be used for rails that would be attached to by other vehicles
the synax
railgroups ;id, node id list 1, 7, 8, 9, 10 slidenodes ;id, node id list 1, g1
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.
railgroups ;id, node id list 1, 7, 8, 9, 10, 7 slidenodes ;id, node id list 1, g1
Deprecated
Globeams
This section is very special and should not be used for most designs. It was created to make the bridge. It allows you to alter the default mechanical and visual beam properties. The parameters are: default stress at which beams deforms (in Newtons), default stress at which beams break, default beams diameter (in meter), default beams material. This section is deprecated and should not be used for truck designs. Use the more powerfull set_beam_defaults instead.
globeams 500000, 1000000, 0.5, tracks/beam
Truck File Format Verification
To ensure that your .truck or .load format is correct you can use the RoR Truck Format Tester
See Also
Proposed Description File Sections




