RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

BeamObjectPool Folder OverviewObjectPool main Reference

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 Referenceobjectpool

BeamObjectPool Folder Overview

Single-file module implementing BeamNG's object pool Lua VM.

Single-file module implementing BeamNG's object pool Lua VM.

Files

  • main.lua - Object pool VM that manages vehicle objects in a shared pool. Provides CRUD operations (get/set/move/delete), vehicle initialization via jbeam stage2, event handler stubs for collisions/damage, and a _G metatable system for per-object global variable scoping.

Architecture

The object pool acts as an intermediary between the engine and vehicle Lua VMs. Objects are stored as lpack-serialized tables, with _setObj() switching the active object context so global variable access routes to the correct object's data.

SceneTree - Scene Graph Queries

Reference for `scenetree`, the scene graph interface for finding and manipulating engine objects (vehicles, lights, sound emitters, terrain, GUI elements, etc.).

ObjectPool main Reference

Module defined in `lua/objectpool/main.lua`. Object pool Lua VM that manages vehicle objects in a shared pool, providing spawn, get, move, set, and delete operations. Acts as the bridge between the Be

On this page

FilesArchitecture