RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
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
Vehicle ColorsVehicle In-Place EditVehicle ManagerVehicle MirrorVehicle Part Management

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 Extensionscorevehicle

Vehicle Part Management

Manages vehicle part configurations - saving/loading `.pc` files, highlighting/selecting parts in the UI, and merging config changes (parts, vars, paints) into the active vehicle.

Manages vehicle part configurations - saving/loading .pc files, highlighting/selecting parts in the UI, and merging config changes (parts, vars, paints) into the active vehicle.


Public API

FunctionSignatureDescription
M.save(filename)Saves current player vehicle part config to a .pc file
M.saveLocal(fn)Saves config relative to the vehicle directory
M.savedefault()Sets the current vehicle as the default (settings/default.pc)
M.saveLocalScreenshot(fn)Begins screenshot workflow for config thumbnail
M.saveLocalScreenshot_stage2(fn)Stage 2 of screenshot capture
M.saveVehicleCollection(collectionTree, filename)Saves a multi-vehicle collection (format 4)
M.compileVehicleCollection(collectionTree)Compiles collection tree into a flat vehicles list
M.buildConfigFromString(vehicleDir, configData, onlyReturnChosenConfig)Parses a config from string/table/file path
M.setConfig(inData, respawn)Merges config data into the player vehicle (alias for mergeConfig)
M.setConfigPaints(data, respawn)Merges paint data into config
M.setConfigVars(data, respawn)Merges tuning variables into config
M.setPartsConfig(data, respawn)Deprecated - use setPartsTreeConfig
M.setPartsTreeConfig(dataTree, respawn)Merges a parts tree into the config
M.getConfig()Returns the current player vehicle config table
M.resetConfig()Resets parts and vars to empty
M.resetAllToLoadedConfig()Reloads the original .pc file
M.resetPartsToLoadedConfig()Resets parts only to loaded config
M.resetVarsToLoadedConfig()Resets vars only to loaded config
M.loadLocal(filename, respawn)Loads a config file and replaces the vehicle
M.removeLocal(filename)Deletes a saved .pc and its thumbnail
M.getConfigList()Returns all .pc files for the current vehicle
M.openConfigFolderInExplorer()Opens vehicle directory in OS file explorer
M.sendDataToUI()Sends full part config data to the UI (CEF)
M.sendPartsSelectorStateToUI()Sends parts selector highlight state to UI
M.partsSelectorChanged(state)Debounced handler for UI part selector changes
M.highlightParts(parts, inVehID?)Sets which parts are highlighted (eye icon)
M.selectParts(parts, inVehID?)Temporarily highlights hovered parts at 0.2 alpha
M.setNewParts(inVehID?)Merges new parts into the highlight set after config change
M.showHighlightedParts(inVehID?)Re-applies current highlight alpha
M.setHighlightedPartsVisiblity(alpha, inVehID?)Sets transparency of highlighted parts
M.changeHighlightedPartsVisiblity(deltaAlpha, inVehID?)Changes transparency by delta
M.resetVehicleHighlights(onlyIfVehChanged, inVehID?)Clears highlight data
M.hasAvailablePart(partName)Returns true if the named part exists for the player vehicle
M.setSkin(skin)Sets the paint_design slot to a named skin
M.reset()Alias for sendDataToUI

Hooks

HookDescription
M.onVehicleSpawnedInvalidates rich part info cache
M.onUpdateProcesses debounced parts selector changes
M.onSerialize / onDeserializedPersist/restore parts data and rich part info
M.onDeserialized(data)Restores part management state from save.
M.savePartConfigFileStage2(partsCondition, filename)Saves part config file (Format2).

Module State

VariableTypeDefault
savePartConfigFileStage2variessavePartConfigFileStage2_Format2

Usage Example

-- Save current vehicle config
extensions.core_vehicle_partmgmt.saveLocal("my_custom_config")

-- Merge new paint and respawn
extensions.core_vehicle_partmgmt.setConfigPaints({paint1, paint2, paint3}, true)

-- Check if a part exists
if extensions.core_vehicle_partmgmt.hasAvailablePart("pickup_bed_longhorn") then
  log("I", "", "Part available!")
end

See Also

  • Vehicle Colors - Related reference
  • Vehicle In-Place Edit - Related reference
  • Vehicle Manager - Related reference
  • Core Systems Guide - Guide

Vehicle Mirror

Manages vehicle mirror angle offsets with mouse interaction and per-config persistence.

Editor AI Tests

Editor tool window for debugging AI path/route planning and tuning AI driving parameters. Two tabs: Route (navgraph routing) and AI Vehicles (parameter tuning).

On this page

Public APIHooksModule StateUsage ExampleSee Also