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

Career Fuel System

M.dependencies = {'career_career'}

Dependencies

M.dependencies = {'career_career'}

Manages vehicle refueling at gas stations - handles fuel types, flow rates, pricing with insurance discounts, sound effects, and payment transactions.


Module Info

FieldValue
Pathextensions/career/modules/fuel.lua
Globalcareer_modules_fuel
Dependenciescareer_career

Public API

FunctionSignatureDescription
startTransaction(gasStation)Begins refueling at a gas station. Opens UI, turns off ignition
getFuelData()Returns current fuel tank data array
isCurrentlyFueling()Returns true if any tank is actively being filled
getFuelingData()Returns fueling session data (price, energy added per tank)
payPrice()Stops fueling, deducts money, saves, ends transaction
onChangeFlowRate(factor)Sets fuel flow rate (0–1). Auto-starts/stops fueling
uiButtonStartFueling(energyType)Starts fueling all tanks of a given energy type
uiButtonStopFueling(energyType)Stops fueling for an energy type
requestRefuelingTransactionData()Requests energy storage data from vehicle bridge
uiCancelTransaction()Cancels and pays for any fuel dispensed
sendUpdateDataToUI()Sends current fuel data to UI
minimumRefuelingCheck(vehId)Emergency refuel: fully charges electric, adds 5% if nearly empty

Hooks

HookDescription
onUpdateFills tanks per frame, updates UI, plays sounds, auto-cancels if driving
onCareerModulesActivatedSets up audio sources
onClientStartMissionSets up audio sources
onClientEndMissionClears audio source IDs

Supported Energy Types

TypeFactor (MJ→unit)UnitDescription
gasoline31.125LStandard gasoline
diesel36.112LDiesel fuel
kerosine34.4LKerosene/jet fuel
n2o8.3kgNitrous oxide
electricEnergy3.6kWhElectric charge

Fuel Flow

startTransaction(gasStation)
  ├─ Set ignition to 0
  ├─ Push "Refueling" action map
  ├─ Request energy storage data from vehicle
  ├─ Open refueling UI
  └─ Check for insurance fuel discount

onChangeFlowRate(factor) - per-frame
  ├─ Start/stop fueling based on factor
  └─ Scale flow rate (0 = stop, 1 = max)

payPrice()
  ├─ Stop all fueling
  ├─ Deduct money (unless work loaner)
  ├─ Pop action map
  ├─ Save career
  └─ Return to play state

Usage Example

-- Start refueling (called from facility interaction)
career_modules_fuel.startTransaction(gasStationData)

-- Check if currently fueling
if career_modules_fuel.isCurrentlyFueling() then
  print("Fueling in progress")
end

-- Emergency refuel check
career_modules_fuel.minimumRefuelingCheck()

See Also

  • career_modules_playerAttributes - Money deduction
  • career_modules_inventory - Current vehicle lookup
  • career_modules_insurance_insurance - Fuel discount data
  • freeroam_facilities_fuelPrice - Base fuel prices

Additional Exports

Values/Properties

ExportDescription
M.getFuelDataValue: getFuelData
M.getFuelingDataValue: getFuelingData
M.isCurrentlyFuelingValue: isCurrentlyFueling
M.minimumRefuelingCheckValue: minimumRefuelingCheck
M.onCareerModulesActivatedValue: onCareerModulesActivated
M.onChangeFlowRateValue: onChangeFlowRate
M.onClientEndMissionValue: onClientEndMission
M.onClientStartMissionValue: onClientStartMission
M.onUpdateValue: onUpdate
M.payPriceValue: payPrice
M.requestRefuelingTransactionDataValue: requestRefuelingTransactionData
M.sendUpdateDataToUIValue: sendUpdateDataToUI
M.startTransactionValue: startTransaction
M.uiButtonStartFuelingCalled by UI
M.uiButtonStopFuelingValue: uiButtonStopFueling
M.uiCancelTransactionValue: uiCancelTransaction

Career Computer Menu

M.dependencies = {"career_career"}

Inspect Vehicle

Manages vehicle inspection and test drive flow for dealership/private vehicle purchasing. Spawns vehicles at parking spots, handles player travel to inspection location, manages tethers to prevent lea

On this page

DependenciesModule InfoPublic APIHooksSupported Energy TypesFuel FlowUsage ExampleSee AlsoAdditional ExportsValues/Properties