Fire Module Reference
Module defined in `lua/vehicle/fire.lua`. Physics-based fire and thermal simulation. Fire can be triggered by high temperatures, collisions, or fuel tank ruptures.
Module defined in lua/vehicle/fire.lua. Physics-based fire and thermal simulation. Fire can be triggered by high temperatures, collisions, or fuel tank ruptures.
See Also
- DamageTracker: For fire-related component failure.
- EnergyStorage: For fuel tank interactions.
Interactions
- Damage: Fire triggers damage events in
damageTracker. - Energy: Fire consumes energy from
energyStorageif a fuel tank is involved. - Electrics: Extreme heat can disable electrical systems.
State Fields
| Variable | Description |
|---|---|
debugData | Table containing internal fire simulation state for debugging. |
flammableNodes | Master JBeam definition table for flammable nodes. |
hotNodes | Subset of nodes currently burning. |
Public API
| Function | Signature | Description |
|---|---|---|
explodeNode | (cid) | Instant ignition/explosion of node. |
explodeVehicle | () | Global vehicle explosion. |
extinguishVehicle | () / extinguishVehicleSlowly() | Thermal resets or gradual chemical energy depletion. |
getClosestHotNodeTempDistance | (cid) | Samples environmental heat from nearest fire. Returns multiple values. |
igniteNode | (cid, temp) | Manual ignition triggers for specific nodes. |
igniteRandomNode | () | Ignites a random flammable node at maximum temperature. |
igniteRandomNodeMinimal | () | Ignites a random flammable node just above its flash point. |
igniteVehicle | () | Triggers ignition across the entire vehicle. |
init | () | Setup: cache container beams and identify vehicle center. |
nodeCollision | (p) | Frictional heat application callback. |
reset | () | State cleanup. |
updateGFX | (dt) | Main loop: conduction, radiation, and particles. |
Usage Example
fire.explodeNode(123)fire.explodeVehicle()Extensions Module Reference
Infrastructure for managing vehicle extensions, dependency resolution, and event hooking. This module allows for modular scripts to be loaded, unloaded, and updated at runtime, providing a flexible pl
Vehicle Engine True Globals
Global variables and functions available in the BeamNG vehicle Lua VM (VE context). These globals provide access to vehicle physics, data, UI communication, and inter-VM bridging to the Game Engine (G