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

Almost every aspect of how the Powertrain of a vehicle behaves can be controlled with these variables

General

These variables effect all transmission types.

Name Type Optional Default Value Description
lowShiftDownRPM number true 2000 Controls the RPM that the controller will downshift at when there is less than 100% 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 less than 100% 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
aggressionSmoothingUp number true 1.5 How quickly the controller reacts to an increase in aggression (autoshifting modes/gearboxes only). A higher value means the controller will downshift more quickly when increasing throttle
aggressionSmoothingDown number true 0.15 How quickly the controller reacts to a decrease in aggression 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).
useSmartAggressionCalculation bool true true Activates intelligent aggression calculation based on vehicle speed, and throttle and brake inputs. Disable for to simulate mechanical or older electronic gearboxes.
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).
aggressionHoldOffThrottleDelay number true 2.25 If smart aggression calculation is used, the aggression factor will be held for the set amount of time (s) after the throttle is released, before dropping.
automaticModes string true "PRNDS21M" The chosen modes that the automaticGearbox, cvtGearbox 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.
autoDownShiftInM bool true true Downshifts autoshifting gearboxes in manual mode if RPMs fall too low. Set false to disable.
Manual Transmission

These variables only effect manualGearboxes.

Name Type Optional Default Value Description
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.
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).
Automatic Transmission

These variables only effect automaticGearboxes.

Name Type Optional Default Value Description
maxGearChangeTime number true 0 Sets maximum time (s) automatic gearbox will spend changing gears. Used for slow, smooth shifts when throttle is low. Set 0 to automatically calculate.
minGearChangeTime number true 0 Sets minimum time (s) automatic gearbox will spend changing gears. Used for fast shifts when throttle is high. Set 0 to automatically calculate.
sportGearChangeTime number true 0 Sets time (s) automatic gearbox will spend changing gears when in sport or manual mode. Set 0 to automatically calculate.
throttleCoefWhileShifting number true 1.0 Cuts throttle by set percent while shifting to increase smoothness. Will not occur in sport/manual mode. Set 1 to disable for older style mechanical gearboxes
torqueConverterLockupRPM number true 0 Minimum RPM at which the torque converter locks up. This is based on the RPM of the converter output, so it will occur at the same speed even if the converter is heavily slipping.
torqueConverterLockupMinGear number true 0 The torque converter will try to lock when the transmission is at or above the gear specified.
torqueConverterLockupRange number true torqueConverterLockupRPM*0.2 RPM range over which the lockup clutch activates.
torqueConverterLockupRate number true 5 Sets how fast the lockup clutch can activate/deactivate.
torqueConverterLockupInRate number true torqueConverterLockupRate*2 Sets how fast the lockup clutch can activate.
torqueConverterLockupOutRate number true torqueConverterLockupRate Sets how fast the lockup clutch can deactivate.
DCT Transmission

These variables only effect dctGearboxes.

Name Type Optional Default Value Description
dctClutchTime number true 0.1 How fast (s) the dctGearbox can shift gears if they are preselected.
CVT Transmission

These variables only effect cvtGearboxes.

Name Type Optional Default Value Description
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.