RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Gameplay AchievementGameplay CityDiscoverForce FieldGarage ModeMarker InteractionParking SystemGameplay Playmode MarkersGameplay PoliceGameplay RallyGameplay Rally LoopGameplay Raw POIsGameplay Skidpad TestSpeed Trap LeaderboardsSpeed Traps and CamerasGameplay StatisticsTaxi Ride SystemTraffic SystemVehicle PerformanceWalking

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 Extensionsgameplay

Garage Mode

Manages the garage environment for vehicle inspection/customization. Handles camera orbit setup, vehicle freezing, ceiling/pillar auto-hide, lighting groups, input blocking, and garage-to-test-drive t

Manages the garage environment for vehicle inspection/customization. Handles camera orbit setup, vehicle freezing, ceiling/pillar auto-hide, lighting groups, input blocking, and garage-to-test-drive transitions.


Public API

FunctionSignatureReturnsDescription
M.start(useCurrentLocation, skipInventoryStep?)nilEnters garage mode; loads garage level or uses current location
M.stop()nilExits garage mode, unfreezes vehicle, restores camera
M.isActive()booleanReturns whether garage mode is active
M.zoom(value)nilApplies camera zoom with acceleration
M.setCamera(preset)nilSets orbit camera to named preset (default/front/back/side/left/right/top)
M.testVehicle()nilDrives vehicle out of garage, fades to black, loads test level
M.setLighting(state?)nilSets 3 light groups on/off; nil resets all to on
M.getLighting()tableReturns {bool, bool, bool} light state
M.setGarageMenuState(state)nilTracks current menu (e.g. "paint" marks vehicle dirty)
M.getGarageMenuState()string|nilCurrent menu state
M.setObjectsAutohide(v)nilEnables/disables ceiling/pillar auto-hiding
M.isObjectsAutohide()booleanCurrent auto-hide state
M.setVehicleDirty(dirty, switched?)nilMarks vehicle as modified (career only)
M.getLastOwnedVehicleId()idLast vehicle entered in career
M.initStepFinished()nilAdvances multi-module garage init sequence
M.garageModeStartStep()nilSaves career data as part of init sequence
M.dependenciesvalue-Returns list of extension dependencies
M.onClientPreStartMission(levelPath)-Callback for ClientPreStartMission event
M.onClientStartMission(levelPath)-Callback for ClientStartMission event
M.onDeserialized(v)-Callback for Deserialized event
M.onEnterVehicleFinished(vehicleId)-Callback for EnterVehicleFinished event
M.onSerialize()-Callback for Serialize event
M.onSpawnCCallback(vehicleId)-Callback for SpawnCCallback event
M.onThumbnailTriggered(active)-Callback for ThumbnailTriggered event
M.onVehicleSaveFinished()-Callback for VehicleSaveFinished event
M.onVehicleSpawned(vehicleId)-Callback for VehicleSpawned event

Dependencies

  • core_jobsystem, core_vehicle_manager

Internals

Camera Presets

camPresets = {
  default = vec3(145, -5, 0),
  front   = vec3(180, 0, 0),
  back    = vec3(0, 0, 0),
  side    = vec3(90, 0, 0),
  top     = vec3(90, -90, 0),
}

Object Auto-Hide

Three object groups auto-hide based on camera position:

  • hide_from_camera (ceiling) - hides when camera Z > 108.1
  • hide_from_camera_pillars_west - hides when camera X > 10
  • hide_from_camera_pillars_east - hides when camera X < -10

Vehicle Freezing

After spawning, waits 5 frames then calls setFreeze(true) via core_vehicleBridge. Engine is turned off via spawnWithEngineRunning = false.

Input Blocking

Blocks: funStuff, bigMap, vehicleMenues, vehicleTeleporting, physicsControls, aiControls, walkingMode, resetPhysics. Pushes GarageMode action map.

Init Sequence

Multi-module init: gameplay_garageMode → career_modules_inventory → career_modules_linearTutorial, each calling garageModeStartStep() then initStepFinished().

How It Works

  1. start(useCurrentLocation) - if current location: sets orbit cam, freezes vehicle, blocks input, sets gamestate to garage
  2. If not current location: loads garage_v2 level, activates on onClientPreStartMission
  3. Per frame: auto-hides ceiling/pillars based on camera, manages zoom deceleration
  4. stop() unfreezes vehicle, pops action map, restores camera FOV/rotation, sets gamestate to freeroam

Hooks / Lifecycle

FunctionDescription
onVehicleSpawnedTeleports spawned vehicle to spawn point, queues freeze
onSpawnCCallbackTurns off engine on spawn via additional vehicle data
onClientPreStartMissionActivates garage mode on level load or deactivates on leave
onClientStartMissionReplaces vehicle if vehicleToLoad is set
onSerializeSaves active state
onDeserializedRestores active state
onThumbnailTriggeredManages garage mode and object visibility during thumbnail capture
onEnterVehicleFinishedTracks last owned vehicle ID
onVehicleSaveFinishedAdvances garage init sequence after vehicle save

Usage Example

-- Enter garage at current location
gameplay_garageMode.start(true)

-- Set camera angle
gameplay_garageMode.setCamera("front")

-- Exit garage
gameplay_garageMode.stop()

See Also

  • Gameplay Achievement - Related reference
  • Gameplay City - Related reference
  • discover - Discover / Experience System - Related reference
  • Gameplay Systems Guide - Guide

Force Field

Applies a gravitational planet effect around the player vehicle, pushing or pulling other vehicles. Toggled via radial menu. Disabled automatically during career mode.

Marker Interaction

Central system for rendering and interacting with playmode markers (mission markers, parking spots, gas stations, etc.). Manages marker visibility, speed-based interaction gating, activity prompts, na

On this page

Public APIDependenciesInternalsCamera PresetsObject Auto-HideVehicle FreezingInput BlockingInit SequenceHow It WorksHooks / LifecycleUsage ExampleSee Also