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
Indicates the horn is active.
Indicates a reverse gear is selected.
Angle of the steering wheel accounting for the in-game assists.
Angle of the steering wheel.
Lights
Combines the brake electrics with the signal_R electric. Lights up if either of those are on. Used for american style indicator/lights.
Combines the brake electrics with the signal_L electric. Lights up if either of those are on. Used for american style indicator/lights.
Brake output with account for ABS flashing.
Indicates the fog lights are turned on.
Flashing function when hazards are on.
Indicates the hazards have been turned on.
Tells if the high beams are turned on.
Right police wigwag headlight. Controlled by normal highbeam values if lightbar is off, and if it’s on, only the wigwag signal has control.
Left police wigwag headlight. Controlled by normal highbeam values if lightbar is off, and if it’s on, only the wigwag signal has control.
Indicates the current police flashing/beacon lights mode (0 is off, 1 is lights, 2 is lights + siren).
index of the current light mode (0 is off, 1 is lowbeams, 2 is highbeams).
index of the current light mode (0 is off, 1 is lowbeams, 2 is highbeams).
Tells if the low beams are turned on.
Tells if either the low or high beams are turned on.
Combines the lowhighbeam electrics with the signal_R electric. Lights up if either of those are on. Used for american style indicator/lights.
Combines the lowhighbeam electrics with the signal_L electric. Lights up if either of those are on. Used for american style indicator/lights.
Parking brake output with account for ABS flashing.
Indicates a reverse gear is selected.
Right police wigwag reverse light. Controlled by wigwag signals in forward and neutral gears and reverse lights in reverse gears.
Left police wigwag reverse light. Controlled by wigwag signals in forward and neutral gears and reverse lights in reverse gears.
Flashes if the left turn signal or hazards are turned on.
Flashes if the right turn signal or hazards are turned on.
Indicates the left indicator is selected.
Indicates the right indicator is selected.
Varies depending on which turn signal is selected (right is 1, left is -1)
Vehicle status
m/s^2 (meters per second squared)
Acceleration of the vehicle on the X axis.
m/s^2 (meters per second squared)
Acceleration of the vehicle on the Y axis.
m/s^2 (meters per second squared)
Acceleration of the vehicle on the Z axis.
Speed of the vehicle compared to the airflow, taking into account wind.
Speed of the vehicle compared to the world.
rad/s (radians per second)
Average angular velocity of the vehicle’s wheels.
Current forced ignition boost.
Maximum achievable forced ignition boost.
Electrical load used by things like the starter.
Ratio of fuel left to max fuel.
Engaged gear, reverse gears are negative numbers and neutral is 0.
Whether the vehicle is equipped with an anti-lock braking system.
0 = ignition off, 1 = accessory only, 2 = ignition on (engine running or not), 3 = starter running.
Indicates the vehicle is running on less than 10% of its max fuel.
Indicates a tire is deflated.
Indicates the oil temperature is greater than 130°C.
Smoothed engine speed value for use with tachometers.
Spin function based on engine RPM. Used for spinning pulley props.
0 = ignition off, 1 = ignition on, false = vehicle has no ignition system.
Vehicle trip counter level.
Speed of the car measured at the wheels.
Other