RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensions

`suspensionFrequencyTester` - Suspension Natural Frequency Analysis

Debug extension that measures suspension natural frequencies on the player vehicle's front and rear axles. Displays an ImGui window with frequency spectrum analysis and category matching (Luxury, Spor

Debug extension that measures suspension natural frequencies on the player vehicle's front and rear axles. Displays an ImGui window with frequency spectrum analysis and category matching (Luxury, Sporty, Rally, etc.).


Exports

FunctionSignatureDescription
run()Open the tester window and reset all measurements

Lifecycle Hooks

HookDescription
onUpdatePer-frame: samples node Z positions and feeds frequency filters

How It Works

Running the Tester

Activate from the in-game console:

extensions.suspensionFrequencyTester.run()

Setup for accurate results:

  1. Move the vehicle to a flat, low-friction surface (ice)
  2. Remove suspension damping if possible (isolates spring frequency)
  3. Run the tester - let the vehicle bounce for several seconds

What It Measures

The tester samples the Z-position of two axle nodes each frame, then passes the signal through a bank of frequency-existence filters spanning 0.5 Hz to 5.0 Hz. This produces an amplitude spectrum showing which frequencies are present in the suspension's natural oscillation.

Frequency Categories

Results are categorized against real-world suspension frequency benchmarks:

CategoryFrequency (Hz)Description
Too Soft0.9Below usable range
Luxury1.1Comfort-oriented (limousines)
Average1.2Typical passenger car
Sporty1.4Sport sedans, GTs
Rally1.8Rally / off-road
Racetrack2.2Circuit racing
Aero-Critical5.0F1 / downforce-dependent

Each category shows a "match" score (integral of amplitudes in that frequency range, divided by the Hz range), color-coded by intensity.

ImGui Window

The debug window provides:

  • Node ID inputs: Front and rear axle node IDs (default: 279, 425)
  • Frequency resolution: Slider for number of detected frequencies (100–3000)
  • Detector accuracy: Slider for frequency-existence window (1–5, higher = more lag)
  • Category table: Per-node breakdown of frequency category matches
  • Spectrum plot: Full frequency spectrum graph (0.5–5.0 Hz)

Internals

  • Frequency detection: Uses newFreqExists() - a C++ frequency-existence filter that detects whether a given frequency is present in a time-domain signal
  • Sampling: Each frame, veh:getNodePositionXYZ(nodeId) provides the Z-coordinate of the axle node. This is fed to all frequency filters simultaneously
  • Filter bank: By default, 1000 filters spaced linearly from 0.5 Hz to 5.0 Hz
  • Dual-node: Measures front and rear axles independently to detect pitch-mode vs heave-mode frequencies
  • Category scoring: For each category, sums amplitudes in the frequency range and divides by the Hz width, then normalizes across all categories for color intensity

Configuration

The default node IDs (279, 425) are hardcoded for a specific vehicle. For other vehicles, you'll need to find the correct axle node IDs:

-- Use the node editor or console to find axle nodes
-- Then adjust in the ImGui window's input fields

Use Cases

  • Suspension tuning: Verify that spring rates produce the intended ride frequency
  • Mod validation: Check that custom suspension setups fall within realistic ranges
  • Debugging: Identify unexpected resonance or overly soft/stiff setups
  • Education: Visualize the relationship between spring rate, mass, and natural frequency

Additional Exports

KeySignatureDescription
M.onUpdate(dtReal, dtSim, dtRaw)(No description available)
M.run()(No description available)

`spawn` - Vehicle Spawning & Safe Placement

Core vehicle spawning, safe teleportation, and collision-free placement system. Handles creating vehicles, finding non-intersecting positions, ground snapping, and trailer coupling.

C2 WebSocket Handler

Core WebSocket server for the C2 (Command & Control) system. Provides a JSON message bus on localhost for external tools to communicate with the game engine.

On this page

ExportsLifecycle HooksHow It WorksRunning the TesterWhat It MeasuresFrequency CategoriesImGui WindowInternalsConfigurationUse CasesAdditional Exports