Skip to content

Vehicles

All in bs_vehicles/config/config_vehicles.lua. World vehicles were added with migration 029_vehicle_world.sql.

Vehicles.World = {
max = { car = 20, pickup = 8, van = 5, bike = 4, offroad = 3 },
pool = { car = 'emperor2:4,tornado3:3,tornado4:2,voodoo2:3', ... }, -- model:weight
fuelMin = 0, fuelMax = 50,
ringMin = 260.0, ringMax = 650.0, -- how far from a player a client looks for a road spot
playerClear = 180.0, -- never this close to a player
safePad = 40.0, -- plus padding around safe zones, outposts, flags
vehicleClear = 25.0,
wreckMinutes = 120,
}
  • max is a fixed count per category. Claimed ones still count. The server asks clients for clear road spots while it still owes vehicles, so they appear around where people travel, never in front of them.
  • Counts are only refilled on a server restart. A vehicle that exists is saved, forever, until it’s destroyed.
  • Exploded vehicles become wrecks and are deleted after wreckMinutes. The next restart tops the category up again.
  • pool is editable in F1, so you can add models without touching the file.
Vehicles.Missing = {
{ id = 'battery', item = 'battery', stops = 'start' },
{ id = 'sparkplug', item = 'spark_plug', stops = 'start' },
{ id = 'fueltank', item = 'fuel_tank', stops = 'fuel' },
}

Every world vehicle starts without these. Vehicles.FitTime is how long fitting takes. Wrecks drop them sometimes when stripped (Vehicles.Scrap).

  • Vehicles.Fuel: drain, idle drain, leak drain from a holed tank, can amount, siphoning.
  • Vehicles.Pumps: pumps only work inside bs_world generator zones, each has a reserve that refills per minute. jump lets players hotwire a pump off their battery.
  • Vehicles.Stations: gas stations players can search for old cans. /bs_station_here helps you fix a misplaced one.

Vehicles.Parts lists engine, battery, radiator, brakes, tyres and transmission with warn / fail lines, wear per km and repair costs. Vehicles.Effects is what a worn part does to the car. Temp fixes are in Vehicles.Settings (tempFix*).

Vehicles.Lockpick = {
pins = 3, zoneMin = 0.08, zoneMax = 0.22, speedMin = 1.35, speedMax = 0.75,
misses = 2, breakChance = 0.5, maxLevel = 20,
}

Needs a lockpick item. Not allowed inside safe zones. A successful pick wipes the claim and the keys. The server checks the attempt took a believable amount of time.

The vehicle wheel is G (bs_vehiclewheel). Dash HUD toggles are /bs_carhud and /bs_carhud_units.