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
Activity ManagerAudio Bank ManagerAudio Ribbon SystemBus Route ManagerCamera SystemCore Chat (IRC)Core CheckpointsCore Command HandlerCoupler Camera ModifierDevices (RGB Peripherals)Dynamic PropsEnvironmentFlowgraph ManagerForestFun StuffGame ContextGame StateGround Marker ArrowsGround MarkersHardware InfoHighscoresHotlappingInventoryJob SystemLap TimesLevelsLoad Map CommandMetricsMod ManagerMultiseatMultiseat CameraMulti SpawnOnlinePaths (Camera Paths)Quick Access (Radial Menu)Recovery PromptRemote ControllerReplayRepositoryRope Visual TestScheme Command ServerCore SnapshotCore SoundsCore TerrainTraffic SignalsTrailer RespawnVehicle Active PoolingVehicle Bridge (GE ↔ VLua Communication)Vehicle MirrorsVehicle PaintsCore VehiclesVehicle TriggersVersion UpdateWeather SystemWindows Console

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 Extensionscore

Vehicle Paints

Resolves, caches, and distributes vehicle paint data including paint libraries, paint collections, multi-paint setups, and random paint selection with weighted probability distributions.

Resolves, caches, and distributes vehicle paint data including paint libraries, paint collections, multi-paint setups, and random paint selection with weighted probability distributions.


Public API

FunctionSignatureDescription
M.setupPaints(model, configs)Resolves all paints for a model: library paints, collections, multi-paint setups, and per-config defaults
M.getRandomPaints(model_key, config_key)Returns a random paint result {type, paintName1, paintName2, paintName3} using weighted distribution
M.getRandomPaintsByVehicle(vehId)Returns {paintName1, paintName2, paintName3} for an existing vehicle
M.testRandomPaint(model_key, config_key, amount)Logs paint distribution statistics for testing

Internal Functions

FunctionDescription
getPaintById(id)Returns a paint from the global cache by id
getPaintCollectionById(id)Returns a paint collection by id
buildPaintCaches()Parses all .paintLibrary.json files and caches paints, collections, and multi-paint setups
resolvePaintHelper(...)Resolves a paint key/object to an actual paint, adding to model if needed
resolveMultiPaintSetupHelper(...)Resolves a multi-paint setup (3 paint slots)
setupRandomPaintHelper(model_key)Builds weighted random paint distribution for model + configs

Paint Resolution Order

  1. Direct name match in model.paints
  2. ID lookup in paint library cache
  3. Name lookup in paint library cache (with warning)

Usage Example

-- Get random paints for traffic spawning
local paints = core_vehiclePaints.getRandomPaints("pickup", "d15_4wd_A")
-- paints = {type="paint", paintName1="Red", paintName2="Red", paintName3="Red"}

-- Or by existing vehicle
local paintNames = core_vehiclePaints.getRandomPaintsByVehicle(vehId)
-- paintNames = {"Metallic Blue", "Metallic Blue", "Metallic Blue"}

-- Test distribution (logs to console)
core_vehiclePaints.testRandomPaint("pickup", "d15_4wd_A", 10000)

Vehicle Mirrors

Renders vehicle mirror reflections by computing reflection camera transforms from mirror node positions and the player camera.

Core Vehicles

Central vehicle management - model/config catalog, spawning, replacing, removing, license plates, coupler/trailer management, and vehicle collections (multi-vehicle configs).

On this page

Public APIInternal FunctionsPaint Resolution OrderUsage Example