RoRBook/Set beam defaults
From Rigs of Rods Wiki
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 overall 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
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:set_beam_defaults -1, -1, -1, -1
If you want to keep a rigid chassis base and drivetrain, you can do:; syntax is set_beam_defaults spring, damping, deform, break, diameter, material set_beam_defaults 3000000, 10000, 100000, 250000, 0.02, tracks/beamblack
;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!