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
Client CanvasCaustics PostFXChromatic Lens PostFXClient CoreDepth of Field PostFXEdge AA PostFXPostFx Flash EffectPostFx Fog EffectsPostFx FXAA Anti-AliasingGamma PostFXPostFx Glow EffectShadow Maps InitClient LightingPostFx Light Ray EffectAdvanced Lighting - Light VisualizationPostFx Masked Screen BlurMotion Blur PostFXObjects Required for StartupClient Parse ArgsClient PostFX ManagerRender ManagerAdvanced Lighting - ShadersBasic Lighting - Shadow FilterAdvanced Lighting - Shadow VisualizationPostFx SMAA Anti-AliasingPostFx SSAO (Screen-Space Ambient Occlusion)PostFx Turbulence EffectPostFx Utilities

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 ExtensionsClient

Client Parse Args

Parses command-line arguments passed to the BeamNG engine, handling flags for logging, display, vehicles, levels, Lua execution, and tech communication.

Parses command-line arguments passed to the BeamNG engine, handling flags for logging, display, vehicles, levels, Lua execution, and tech communication.


Module Overview

PropertyValue
Sourcelua/ge/client/parseArgs.lua
ReturnsModule table M
Dependenciestech/techCore (optional, for -tcom)

Module State

FieldTypeDescription
M.argstableParsed arguments (e.g., vehicleConfig)

Public Functions

FunctionArgsReturnsDescription
M.defaultParseArgs--Parses $Game::argc / $Game::argv* console variables

Supported Command-Line Arguments

ArgumentNext ArgDescription
-log<mode>Set log mode (0, 1, 2); dumps existing console first
-cefdev-Enable CEF developer console
-fullscreen-Force fullscreen mode
-windowed-Force windowed mode
-vehicleConfig<path>Set vehicle config (e.g., "pickup/myConfig.pc")
-vehicle<arg>Set $beamngVehicleArgs variable
-luafile<file>require() a Lua file at startup
-lua<code>Queue Lua code string for execution
-onLevelLoad_ext<ext>Queue extension to load on level load
-level<name>Set $levelToLoad for auto-loading
-worldeditor-Deprecated (logs error, suggests -worldEditor)
-tcom-Load tech/techCore extension and open server
-tcom-capture-Load tech/techCore extension only

Helper Functions (Local)

FunctionArgsReturnsDescription
pushFrontlist, token, delimstringPrepend token to delimited list
pushBacklist, token, delimstringAppend token to delimited list
popFrontlist, delimstringRemove first token from list

Console Variables Read

VariablePurpose
$Game::argcArgument count
$Game::argv0 ... $Game::argvNIndividual arguments

Console Variables Set

VariableBy FlagValue
$logModeSpecified-logtrue
$beamngVehicleArgs-vehicleNext arg
$levelToLoad-levelNext arg

Usage Example

local parseArgs = require("client/parseArgs")
parseArgs.defaultParseArgs()

-- Access parsed args
if parseArgs.args.vehicleConfig then
  -- Load specific vehicle config
end

Notes

  • Arguments are read from TorqueScript $Game::argv* variables, not Lua arg.
  • -tcom errors are caught with pcall for graceful failure.
  • -worldeditor is explicitly deprecated in favor of -worldEditor (camelCase).

See Also

  • client/init - Client startup (called after arg parsing)

Objects Required for Startup

Creates all GUI control profiles and the default cursor required before any UI can be displayed. This is one of the first modules loaded during engine initialization.

Client PostFX Manager

Central manager for all post-processing effects (PostFX). Handles initialization, preset loading/saving, backup/restore, and per-effect settings synchronization (SSAO, HDR, DOF, LightRays).

On this page

Module OverviewModule StatePublic FunctionsSupported Command-Line ArgumentsHelper Functions (Local)Console Variables ReadConsole Variables SetUsage ExampleNotesSee Also