VehicleController

VehicleController

From BeamNG

The vehicleController performs shifting and clutching behavior based on the transmission, shifting modes and assists chosen. It also restarts the engine when it stalls, sends input to the devices, and sends powertrain information to the ui and other systems. Every official vehicle with a powertrain uses vehicleController. Most mod vehicles suit this controller as well, unless they are using custom powertrain devices which need a custom controller.

The vehicleController is a so called "main" controller. Every vehicle needs a main controller to interface between the powertrain, the user and the UI. The most basic vehicles such as trailers don't run a full vehicleController but have a default "dummyController" instead which is slimmed down a lot and does not have any powertrain related control implemented.


Jbeam Properties

Name Type Optional Default Value Description
lowShiftDownRPM number true 2000 Controls the RPM that the controller will downshift at when there is 0 throttle applied (autoshifting modes/gearboxes only)
highShiftDownRPM number true 3500 Controls the RPM that the controller will downshift at when there is 100% throttle applied (autoshifting modes/gearboxes only)
lowShiftUpRPM number true 2500 Controls the RPM that the controller will upshift at when there is 0 throttle applied (autoshifting modes/gearboxes only)
highShiftUpRPM number true 5000 Controls the RPM that the controller will upshift at when there is 100% throttle applied (autoshifting modes/gearboxes only)
gearboxDecisionSmoothingUp number true 2 How quickly the controller reacts to an increase in throttle input (autoshifting modes/gearboxes only). A higher value means the controller will downshift more quickly when increasing throttle
gearboxDecisionSmoothingDown number true 5 How quickly the controller reacts to a decrease in throttle input (autoshifting modes/gearboxes only). A higher value means the controller will upshift more quickly when decreasing throttle
calculateOptimalLoadShiftPoints bool true false Overrides highShiftUpRPM and highShiftDownRPM with values calculated by looking at the engine torque curve and gear ratios (autoshifting modes/gearboxes only).
wheelSlipUpThreshold number true 100 Maximum total wheel sliding speed allowed before an upshift is blocked (autoshifting modes/gearboxes only). Helps stop the car from shifting up immediately when spinning the tires.
wheelSlipDownThreshold number true 20 Maximum total wheel sliding speed allowed before a downshift is blocked (autoshifting modes/gearboxes only). Helps stop the car from downshifting immediately when the driven tires lock up from braking.
transmissionShiftDelay number true 0.15 Minimum time taken (s) to complete a shift from one gear to the next, not including clutching time (manualGearbox except for when shifting with H-shifter, dctGearbox when chosen gear is not preselected).
transmissionGearChangeDelay number true 1 Minimum time (s) between 2 consecutive shifts when (autoshifting modes/gearboxes only).
neutralSelectionDelay number true 0.25 Minimum time taken (s) to shift from a gear to neutral or from neutral to a gear (autoshifting modes/gearboxes only).
clutchInRate number true 5 How fast the clutch is pushed in when shifting gears (manualGearbox in arcade or realistic with clutch assist modes). A value of 5 means it takes 1/5 seconds to complete the clutching.
clutchOutRate number true 5 How fast the clutch is let out when shifting gears (manualGearbox in arcade or realistic with clutch assist modes). A value of 5 means it takes 1/5 seconds to complete the clutching.
revMatchThrottle number true 0.5 How much throttle can be applied during a downshift to rev match (manualGearbox in arcade or realistic with throttle assist modes). 0.5 means half throttle can be applied.
dctClutchTime number true 0.1 How fast (s) the dctGearbox can shift gears if they are preselected.
automaticModes string true "PRNDS21M" The chosen modes that the automaticGearbox or dctGearbox can use. P=Park, R=Reverse, N=Neutral, D=Drive, S=Sport(highShift points only), 2=First 2 gears only, 1=First gear only, M=Manual.
defaultAutomaticMode string true "N" The gear which the automaticGearbox will start in on spawn.
clutchLaunchStartRPM number true 2000 Minimum RPM for the auto clutch to start a "launch" behavior (manualGearbox in arcade or realistic with clutch assist modes).
clutchLaunchTargetRPM number true 3000 The RPM the auto clutch tries to maintain during the "launch" behavior (manualGearbox in arcade or realistic with clutch assist modes).
cvtLowRPM number true =lowShiftUp The low load engine RPM target for the engine with cvt gearbox. The cvt will try to vary its ratio to achieve this engine speed when cruising.
cvtHighRPM number true =highShiftUp The high load engine RPM target for the engine with cvt gearbox. The cvt will try to vary its ratio to achieve this engine speed when accelerating at full throttle.
cvtTargetAVSmoothingIn number true 0.5 The responsiveness of the CVT to increase in throttle input (higher number causes faster downshifting decision when throttle is applied)
cvtTargetAVSmoothingOut number true 2 The responsiveness of the CVT to decrease in throttle input (higher number causes faster upshifting decision when throttle is applied)
cvtGearRatioSmoothingIn number true 20 How fast the gear ratio can actually decrease. A lower number increases smoothness but delays response to vehicle speed.
cvtGearRatioSmoothingOut number true 5 How fast the gear ratio can actually increase. A lower number increases smoothness but delays response to vehicle speed.