RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Freeroam Big Map MarkersFreeroam Big Map ModeFreeroam Big Map POI ProviderFreeroam Crash Cam ModeFreeroam Crash Cam Mode LoaderFreeroam Drag RaceFreeroam FacilitiesFreeroamFreeroam ConfiguratorFreeroam Gas StationsFreeroam Level StatsFreeroam OrganizationsFreeroam Special TriggersFreeroam Vue Big Map

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 Extensionsfreeroam

Freeroam Gas Stations

Manages gas station POI formatting and simple vehicle refueling in freeroam. Defers to career fuel module when career mode is active.

Manages gas station POI formatting and simple vehicle refueling in freeroam. Defers to career fuel module when career mode is active.


Public API

FunctionSignatureReturnsDescription
M.gasStationCenterRadius(facility)vec3, numberCalculates center position and radius from pump objects
M.formatGasStationPoi(gasStation)tableFormats a gas station facility as a POI element
M.refuelCar(gasStation, fuelTypes, veh)nilRefuels a vehicle at a gas station

Hooks

HookPurpose
M.onGetRawPoiListForLevelAdds gas station POIs if career or setting enabled
M.onActivityAcceptGatherDataProvides refuel/recharge button for activity accept UI

Fuel Type Mapping

Energy TypeTranslation KeySound
gasolinerefuelFueling_Petrol_Simple
dieselrefuelFueling_Petrol_Simple
electricEnergyrechargeFueling_Electric_Simple
n2orefuelFueling_Petrol_Simple
anyrefuelFueling_Petrol_Simple

The air fuel type is ignored during refueling.

How It Works

  1. POI Creation: onGetRawPoiListForLevel iterates facilities, creates POI elements with pump positions and electric/fuel icons
  2. Activity UI: When player enters a gas station zone, the accept UI shows a refuel/recharge button with fuel type props
  3. Refueling: refuelCar queries vehicle energy storage, fills compatible tanks to max, shows success/partial/fail messages
  4. Career Redirect: If career is active, hands off to career_modules_fuel.startTransaction() instead

Usage Examples

-- Format a gas station as POI
local poi = freeroam_gasStations.formatGasStationPoi(gasStationFacility)

-- Manually refuel
local veh = getPlayerVehicle(0)
local fuelTypes = {gasoline = true, diesel = true}
freeroam_gasStations.refuelCar(gasStationElem, fuelTypes, veh)

Notes

  • Gas stations appear on bigmap with fuel pump or charge icon depending on energy types
  • Refueling uses core_vehicleBridge to query and set energy storage
  • Mixed fuel stations (multiple types) use refuelMixed translation key
  • POI visibility controlled by enableGasStationsInFreeroam setting or career mode

See Also

  • Freeroam Big Map Markers - Related reference
  • Freeroam Big Map Mode - Related reference
  • Freeroam Big Map POI Provider - Related reference
  • Freeroam Guide - Guide

Freeroam Configurator

Manages the freeroam configuration screen - level/spawn point selection, vehicle selection, and gameplay options. Persists configuration to disk and provides tile data for the UI.

Freeroam Level Stats

Tracks and persists usage statistics for levels and spawn points. Records spawn counts and timestamps, provides sorted top-level and top-spawn-point queries.

On this page

Public APIHooksFuel Type MappingHow It WorksUsage ExamplesNotesSee Also