Vehicle Editor - JBeam Spellchecker
Validates JBeam modifier names across all vehicle files by checking them against a whitelist of known valid modifiers per section type.
Validates JBeam modifier names across all vehicle files by checking them against a whitelist of known valid modifiers per section type.
Module Exports
| Export | Type | Description |
|---|---|---|
M.menuEntry | string | "JBeam Spellchecker" - menu label |
M.open | function | Opens the spellchecker window |
M.onUpdate | hook | Renders ImGui window with analysis button |
M.onSerialize | hook | Persists window state |
M.onDeserialized | hook | Restores window state |
Key Internals
| Variable | Type | Purpose |
|---|---|---|
windowOpen | BoolPtr | Window visibility |
allSections | table | Whitelist of valid modifiers per JBeam section |
Covered Sections
flexbodies, props, nodes, beams, triangles, hydros, torsionbars, torsionHydros, variables
How It Works
analyze()scans all*.jbeamfiles undervehicles/- For each file, parses JSON and iterates all parts
- For each recognized section with tabular data:
- Extracts the header row
- Walks data rows looking for inline modifier dictionaries
- Checks each modifier key against
allSections[sectionName] - Logs an error for any unrecognized modifier name
- Results appear in the game console
Lua Code Example
-- Open the spellchecker
extensions.editor_vehicleEditor_staticEditor_veJBeamSpellchecker.open()
-- Click "Start Analysis" to scan all vehicle JBeam files
-- The whitelist covers all common JBeam table modifiers, e.g.:
-- allSections.beams = {
-- beamSpring = true, beamDamp = true, beamDeform = true,
-- beamStrength = true, beamType = true, breakGroup = true, ...
-- }
-- allSections.nodes = {
-- nodeWeight = true, group = true, collision = true,
-- selfCollision = true, frictionCoef = true, ...
-- }
-- Analysis walks every jbeam file:
-- local filePaths = FS:findFiles('vehicles', "*.jbeam", -1, false, false)
-- for _, filePath in ipairs(filePaths) do
-- local data = parseFile(filePath)
-- analyzeJBeamFile(filePath, fileName, data)
-- end
-- Modifier extraction from rows:
-- if tableIsDict(rowValue) then
-- mods = rowValue -- entire row is a modifier dict
-- else
-- -- check inline options after header columns
-- for rk = headerSize1, #rowValue do
-- if type(rv) == 'table' and tableIsDict(rv) then
-- mods = rv
-- break
-- end
-- end
-- end
-- Invalid modifiers logged as:
-- log('E', '', 'vehicles/xyz/part.jbeam: Section: beams Modifier: "beamStregnth" not valid!')See Also
- Vehicle Editor - JBeam Beautifier - Related reference
- Vehicle Editor - JBeam Modifier Leaking Visualizer - Related reference
- Vehicle Editor - JBeam Table Visualizer - Related reference
- World Editor Guide - Guide
Vehicle Editor - JBeam Modifier Leaking Visualizer
Analyzes and visualizes JBeam modifier leaking - when a modifier set in one part affects rows in a different part due to the cascading nature of JBeam table modifiers.
Vehicle Editor - JBeam Table Visualizer
Visualizes numeric table data from JBeam files as interactive 2D plots with Catmull-Rom curve interpolation, useful for inspecting torque curves, gear ratios, and other tabular data.