RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Bananabench AsyncBananabench CSVBananabench JSONBananabench PrintBananabench XMLBananabenchPhysics BenchmarkBeamConsole Folder OverviewJSON PerformanceConsole MainResave Parts ConfigsServer TestsSimple LoadSimulation TestDynamic Collision TestMain Development TestUnit Tests

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 Referenceconsole

Resave Parts Configs

Script defined in `lua/console/resave-pcs.lua`. Utility that iterates through all vehicles and re-saves their `.pc` (part configuration) files, useful for migrating or normalizing config formats.

Script defined in lua/console/resave-pcs.lua. Utility that iterates through all vehicles and re-saves their .pc (part configuration) files, useful for migrating or normalizing config formats.


Functions/Exports

getAllVehicles() (local)

Scans vehicles directory, returns list of vehicle directory names.

getConfigList(vdir) (local)

Scans a vehicle directory for .pc files, returns list of config filenames.

ResaveConfigs() (global)

Main function - iterates all vehicles, spawns each one, loads each .pc config via partmgmt.loadLocal(), then saves it back via partmgmt.saveLocal().

  • Skips: common, box, bathtub vehicles
  • Reports total configs resaved

Usage

beamng -console lua/console/resave-pcs.lua
# Automatically runs ResaveConfigs()

Internal Notes

  • Spawns vehicles via BeamEngine:spawnObject to initialize them before config resave
  • Uses queueLuaCommand to execute part management commands on the vehicle object
  • Calls BeamEngine:update(2, 2) after each config load/save to process queued commands
  • Auto-executes ResaveConfigs() at module load

See Also

  • BeamConsole Folder Overview - Directory overview
  • bananabench-async Reference - Related reference
  • bananabench-csv Reference - Related reference
  • bananabench-json Reference - Related reference
  • Console Commands Guide - Guide

Console Main

Script defined in `lua/console/main.lua`. Bootstrap/initialization script that sets up the Lua environment for console mode, configuring package paths and loading core dependencies.

Server Tests

Script defined in `lua/console/servertests.lua`. Simple test runner entry point that loads and executes the unit tests module.

On this page

Functions/ExportsgetAllVehicles() (local)getConfigList(vdir) (local)ResaveConfigs() (global)UsageInternal NotesSee Also