Particles Module Reference
Module defined in `lua/common/particles.lua`. Manages the global registry of material-to-particle interaction rules. Defines which particle effects (dust, sparks, mud, snow) are spawned when specific material pairs interact during collisions, tire contact, or scraping. Shared across both GE and VE contexts.
Module defined in lua/common/particles.lua. Manages the global registry of material-to-particle interaction rules. Defines which particle effects (dust, sparks, mud, snow) are spawned when specific material pairs interact during collisions, tire contact, or scraping. Shared across both GE and VE contexts.
See Also
- ParticleFilter: For impact evaluation.
Public API
| Function | Signature | Description |
|---|---|---|
getMaterialByID | (mats, i) (**callable**) | Returns material definition for ID. |
getMaterialIDByName | (mats, s) (**callable**) | Finds ID for name; returns fallback if missing. |
getMaterialsParticlesTable | () (**callable**) | Returns master material list and interaction rule map. |
getOrAddMaterialIDByName | (mats, s) (**callable**) | Finds ID or appends temporary definition. |
Usage Example
-- Look up the particle rules for a specific ground material
local mats, rules = particles.getMaterialsParticlesTable()
local matId = particles.getMaterialIDByName(mats, "ASPHALT")Particlefilter Module Reference
Module defined in `lua/vehicle/particlefilter.lua`. Filters collision events to determine which impacts should trigger particle effects (sparks, dust, debris). Evaluates perpendicular velocity and penetration depth thresholds to avoid spawning particles for minor or irrelevant contacts.
Powertrain Module Reference
Module defined in `lua/vehicle/powertrain.lua`. This is the physical powertrain simulation engine, managing the interconnected tree of [Devices](/docs/api/ve/powertrain/FOLDER_OVERVIEW) (engines, transmissions,