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
Career BranchesCareer System CoreCareer Save System
Career Computer MenuCareer Fuel SystemInspect VehicleVehicle InventoryLinear TutorialLoaner VehiclesCareer LogLogbookMarketplaceMission WrapperCareer Painting ModuleCareer Part Inventory ModuleCareer Part Shopping ModuleCareer Payment ModuleCareer Permissions ModuleCareer Playbook Writer ModuleCareer Player Abstract ModuleCareer Player Attributes ModuleCareer Player Driving ModuleCareer Quick Travel ModuleCareer Rentals ModuleCareer Reputation ModuleCareer Spawn Points ModuleCareer Speed Traps ModuleCareer Test Drive ModuleCareer Tether ModuleCareer Tuning ModuleCareer UI Utils ModuleCareer Unlock Flags ModuleCareer Value Calculator ModuleVehicle Class GroupingVehicle Deletion ServiceVehicle PerformanceVehicle Shopping

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 Extensionscareermodules

Vehicle Shopping

M.dependencies = {'career_career', 'util_configListGenerator'}

Dependencies

M.dependencies = {'career_career', 'util_configListGenerator'}

Full vehicle marketplace for career mode. Generates dealership and private seller inventories, handles purchasing, trade-ins, insurance, vehicle spawning, and delivery.


Public API

FunctionSignatureReturnsDescription
M.openShop(seller, originComputerId, screenTag)nilOpens the vehicle shopping UI
M.endShopping()nilCloses all shopping menus
M.cancelShopping()nilReturns to computer menu or closes
M.showVehicle(shopId)nilInspects a vehicle from the shop
M.quickTravelToVehicle(shopId)nilTeleports to and inspects a vehicle
M.navigateToPos(pos)nilSets ground marker navigation to position
M.getShoppingData()tableFull shop data for UI (vehicles, dealerships, player attrs)
M.getVehicleInfoByShopId(shopId)table/nilVehicle info by shop ID
M.getVehiclesInShop()tableAll vehicles currently in the shop
M.updateVehicleList(fromScratch)nilRegenerates shop inventory (expiry + new stock)
M.getCurrentSellerId()string/nilCurrently active seller/dealership ID
M.getVisualValueFromMileage(mileage)numberVisual condition multiplier (0.75–1.0) from mileage
M.openPurchaseMenu(purchaseType, shopId, insuranceId)nilOpens purchase confirmation UI
M.buyFromPurchaseMenu(purchaseType, options)nilExecutes vehicle purchase
M.cancelPurchase(purchaseType)nilCancels purchase flow
M.updateInsuranceSelection(insuranceId)nilUpdates insurance choice in purchase flow
M.sendPurchaseDataToUi()nilPushes purchase data to UI
M.openInventoryMenuForTradeIn()nilOpens inventory picker for trade-in selection
M.removeTradeInVehicle()nilRemoves trade-in from current purchase
M.buySpawnedVehicle(buyVehicleOptions)nilBuys an already-spawned inspection vehicle
M.getEligibleVehiclesWithoutDealershipVehicles(eligible, seller)tableFilters out vehicles already in dealership

Hooks

HookPurpose
M.onVehicleSpawnFinishedAdds spawned vehicle to inventory
M.onAddedVehiclePartsToInventorySets year, original parts, finalizes purchase
M.onEnterVehicleFinishedRemoves unused player vehicles after purchase
M.onExtensionLoadedLoads saved shop data from save slot
M.onSaveCurrentSaveSlotPersists shop data to save file
M.onShoppingMenuClosedRemoves tether on menu close
M.onComputerAddFunctionsAdds "Vehicle Marketplace" to computer
M.onUpdateWatches for expiring watched vehicles
M.onUiChangedStateTracks UI state for update gating
M.onClientStartMissionClears shop on mission start

Key Constants

ConstantValueDescription
vehicleDeliveryDelay60sDelivery time for distant purchases
vehicleOfferTimeToLive600sHow long a vehicle stays in shop
dealershipTimeBetweenOffers60sBase interval for new stock
salesTax7%Tax rate applied to purchases
customLicensePlatePrice$300Cost of custom plate

Price Rounding

TypeRule
prestigeRound up to xxx495 or xxx995
privateRound up to nearest 100
dealerRound up to nearest 20
defaultRound up to nearest 10

Usage Examples

-- Open the shop from a dealership
career_modules_vehicleShopping.openShop("usedCars_01")

-- Open from a computer terminal
career_modules_vehicleShopping.openShop(nil, computerId)

-- Get all vehicles currently for sale
local vehicles = career_modules_vehicleShopping.getVehiclesInShop()
for _, v in ipairs(vehicles) do
  print(v.Brand, v.Name, v.Value)
end

Vehicle Performance

Runs the vehicle performance certification test (drag strip + skidpad). Records acceleration, braking, and lateral G data. Manages cinematic camera sequences during testing.

Career Branches Landing Page

Builds UI data for the career progress landing page - domain selection, branch skill cards, mission lists, facility data, and breadcrumb navigation.

On this page

DependenciesPublic APIHooksKey ConstantsPrice RoundingUsage Examples