Electrics refer to all the information that is created by the vehicle’s systems for use by other systems and the jbeam itself, notably for things like hydros
and props
.
It includes mostly information about the vehicle’s status, things like the speed, the status of lights, engine information, etc. You can think of it as the network of sensors and switches that are connected to the car’s ECU.
You can see the current state of a vehicle’s electrics by choosing the current vehicle in the console and entering “dump(electrics)”
As electrics can have multiple sources, there is no definitive list of all the electrics. The main ones are available here, along with the vehicle controller
page.
Most electrics are defined in base SI units, and will often need to be converted when using them for gauges and displays.
Electrics
These are the electrics which are managed by vehicleLua and not tied to specific controllers or drivetrain elements.
Vehicle controls
Description
Clutch output.
Description
Clutch input.
Description
Indicates the horn is active.
Description
Parking brake output.
Description
Parking brake input.
Description
Indicates a reverse gear is selected.
Description
Angle of the steering wheel accounting for the in-game assists.
Description
Angle of the steering wheel.
Description
Steering input.
Description
Throttle input.
Lights
Description
Combines the brake electrics with the signal_R electric. Lights up if either of those are on. Used for american style indicator/lights.
Description
Combines the brake electrics with the signal_L electric. Lights up if either of those are on. Used for american style indicator/lights.
Description
Brake output with account for ABS flashing.
Description
Indicates the foglights are turned on.
Description
Flashing function when hazards are on.
Description
Indicates the hazards have been turned on.
Description
Tells if the high beams are turned on.
Description
Right police wigwag headlight. Controlled by normal highbeam values if lightbar is off, and if it’s on, only the wigwag signal has control.
Description
Left police wigwag headlight. Controlled by normal highbeam values if lightbar is off, and if it’s on, only the wigwag signal has control.
Description
Indicates the current police flashing/beacon lights mode (0 is off, 1 is lights, 2 is lights + siren).
Description
index of the current light mode (0 is off, 1 is lowbeams, 2 is highbeams).
Description
index of the current light mode (0 is off, 1 is lowbeams, 2 is highbeams).
Description
Tells if the low beams are turned on.
Description
Tells if either the low or high beams are turned on.
Name
lowhighbeam_signal_R
Description
Combines the lowhighbeam electrics with the signal_R electric. Lights up if either of those are on. Used for american style indicator/lights.
Name
lowhighbeam_signal_L
Description
Combines the lowhighbeam electrics with the signal_L electric. Lights up if either of those are on. Used for american style indicator/lights.
Description
Currently unused
Description
Parking brake output with account for ABS flashing.
Description
Indicates a reverse gear is selected.
Description
Right police wigwag reverse light. Controlled by wigwag signals in forward and neutral gears and reverse lights in reverse gears.
Description
Left police wigwag reverse light. Controlled by wigwag signals in forward and neutral gears and reverse lights in reverse gears.
Description
Flashes if the left turn signal or hazards are turned on.
Description
Flashes if the right turn signal or hazards are turned on.
Description
Indicates the left indicator is selected.
Description
Indicates the right indicator is selected.
Description
Varies depending on which turn signal is selected (right is 1, left is -1)
Vehicle status
Units/Values
m/s^2 (meters per second squared)
Description
Acceleration of the vehicle on the X axis.
Units/Values
m/s^2 (meters per second squared)
Description
Acceleration of the vehicle on the Y axis.
Units/Values
m/s^2 (meters per second squared)
Description
Acceleration of the vehicle on the Z axis.
Units/Values
m/s (meters per second)
Description
Speed of the vehicle compared to the airflow, taking into account wind.
Units/Values
m/s (meters per second)
Description
Speed of the vehicle compared to the world.
Description
Altitude of the vehicle.
Units/Values
rad/s (radians per second)
Description
Average angular velocity of the vehicle’s wheels.
Description
Current forced ignition boost.
Description
Maximum achievable forced ignition boost.
Description
Electrical load used by things like the starter.
Description
Ratio of fuel left to max fuel.
Description
Displayed gear.
Description
Engaged gear, reverse gears are negative numbers and neutral is 0.
Description
Selected gearbox mode.
Units/Values
true or false
Description
Whether the vehicle is equipped with an anti-lock braking system.
Units/Values
0, 1, 2 or 3
Description
0 = ignition off, 1 = accessory only, 2 = ignition on, 3 = engine fired up.
Description
Indicates the vehicle is running on less than 10% of its max fuel.
Description
Indicates a tire is deflated.
Description
Vehicle odometer level.
Description
Indicates the oil temperature is greater than 130°C.
Description
Smoothed engine speed value for use with tachometers.
Description
Spin function based on engine RPM. Used for spinning pulley props.
Units/Values
0, 1 or false
Description
0 = ignition off, 1 = ignition on, false = vehicle has no ignition system.
Description
Vehicle trip counter level.
Units/Values
m/s (meters per second)
Description
Speed of the car measured at the wheels.
Other
Description
Always equals 0.