RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

cdefDebugDraw ReferencecdefGpuMesh ReferencecdefImgui ReferencecdefMath Referencecdefs ReferencecontrolSystems Referencecsvlib ReferencedelayLine Referencedequeue ReferencedevUtils ReferenceEvent Referenceextensions Referencefilters Referencegraphpath Referenceguihooks ReferenceinputFilters ReferenceinterpolatedMap Referenceintrospection ReferencejbeamWriter Referencejson-ast Referencejson ReferencejsonDebug ReferencejsonPrettyEncoderCustom Referencekdtreebox2d Referencekdtreebox3d Referencekdtreepoint3d Referencelpack ReferenceluaBinding ReferenceluaCore ReferenceluaProfiler Referencemathlib Referenceparticles Referencequadtree Referencesettings ReferencetcpServer ReferencetimeEvents Referenceutils Reference
ExpressionParser ReferenceGroups ReferenceInteraction ReferenceIO ReferenceLinks ReferenceLoader ReferenceMaterials ReferenceOptimization ReferenceScaling ReferenceSectionMerger ReferenceSlotSystem ReferenceTableSchema ReferenceUtils ReferenceVariables Reference
Assorted ReferenceCamera ReferenceColors ReferenceEvents ReferenceLicensePlatesSkins ReferenceMeshs ReferenceMirror ReferenceNodeBeam ReferencePaints ReferenceVisual Ropes ReferenceWheels 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 Referencecommonjbeamsections

Colors Reference

Module defined in `lua/common/jbeam/sections/colors.lua`. Applies vehicle color configuration from legacy color format to the 3D vehicle object.

Module defined in lua/common/jbeam/sections/colors.lua. Applies vehicle color configuration from legacy color format to the 3D vehicle object.


Exports

Functions

M.process(vehicleObj, vehicleConfig, vehicle)

Sets the vehicle's base color and two palette colors from vehicleConfig.colors. Converts RGBA arrays to ColorF linear values and assigns to vehicleObj.color, vehicleObj.colorPalette0, vehicleObj.colorPalette1.

  • Parameters:
    • vehicleObj - userdata - C++ vehicle object
    • vehicleConfig - table - Vehicle config with colors array of {r, g, b, a} arrays
    • vehicle - table - Assembled vehicle data (unused)
  • Returns: self (module table, for chaining)

Internal Notes

  • Legacy color format: vehicleConfig.colors = {{r,g,b,a}, {r,g,b,a}, {r,g,b,a}}.
  • Uses ColorF(...):asLinear4F() for gamma-to-linear conversion.
  • This is the older color system; newer vehicles use the paints system instead.

Camera Reference

Module defined in `lua/common/jbeam/sections/camera.lua`. Processes camera definitions from JBeam data, handling onboard, relative, and onboard2 camera types with retrocompatibility upgrades.

Events Reference

Module defined in `lua/common/jbeam/sections/events.lua`. Processes event definitions and physics triggers from JBeam data, creating trigger objects on the vehicle's C++ object.

On this page

ExportsFunctionsM.process(vehicleObj, vehicleConfig, vehicle)Internal Notes