RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Bananabench AsyncBananabench CSVBananabench JSONBananabench PrintBananabench XMLBananabenchPhysics BenchmarkBeamConsole Folder OverviewJSON PerformanceConsole MainResave Parts ConfigsServer TestsSimple LoadSimulation TestDynamic Collision TestMain Development TestUnit Tests

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 Referenceconsole

Console Main

Script defined in `lua/console/main.lua`. Bootstrap/initialization script that sets up the Lua environment for console mode, configuring package paths and loading core dependencies.

Script defined in lua/console/main.lua. Bootstrap/initialization script that sets up the Lua environment for console mode, configuring package paths and loading core dependencies.


Functions/Exports

None (environment setup script).

What It Sets Up

  1. Package paths - sets package.path to include console, gui, common, socket, and root lua directories
  2. Extensions system - loads extensions module and adds ge/common extension paths
  3. Core libraries - requires: luaCore, common/cdefs, utils, mathlib
  4. Engine stub - creates Engine.Profiler with no-op pushEvent/popEvent functions

Usage

require("lua/console/main")  -- or rerequire
-- Environment is now ready for console scripts

Internal Notes

  • Must be loaded before other console scripts that depend on the standard BeamNG Lua environment
  • Engine global is a minimal stub (no real engine in console mode)
  • Clears package.cpath (no C modules in console mode)

See Also

  • BeamConsole Folder Overview - Directory overview
  • bananabench-async Reference - Related reference
  • bananabench-csv Reference - Related reference
  • bananabench-json Reference - Related reference
  • Console Commands Guide - Guide

JSON Performance

Script defined in `lua/console/json-performance.lua`. Comprehensive serialization performance benchmark comparing JSON, lpack, lpack binary, and string.buffer encode/decode speeds.

Resave Parts Configs

Script defined in `lua/console/resave-pcs.lua`. Utility that iterates through all vehicles and re-saves their `.pc` (part configuration) files, useful for migrating or normalizing config formats.

On this page

Functions/ExportsWhat It Sets UpUsageInternal NotesSee Also