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 Facilities

Manages level facilities (garages, gas stations, dealerships, computers, delivery providers, dragstrips). Loads facility definitions from JSON, provides parking spot lookups, and formats facilities as

Manages level facilities (garages, gas stations, dealerships, computers, delivery providers, dragstrips). Loads facility definitions from JSON, provides parking spot lookups, and formats facilities as POI elements for the big map and playmode markers.


Public API

FunctionSignatureReturnsDescription
M.getFacilities(levelName)tableReturns all facilities for a level, keyed by type list name
M.getFacility(type, id)table|nilReturns a single facility by type and ID
M.getFacilitiesByType(type, levelName?)tableReturns all facilities of a given type
M.getGarage(id)table|nilShortcut for getFacility("garage", id)
M.getGasStation(id)table|nilShortcut for gas station
M.getDealership(id)table|nilShortcut for dealership
M.getParkingSpotsForFacility(facility)tableReturns parking spots from sites file
M.getZonesForFacility(facility)tableReturns zones from sites file
M.getAverageDoorPositionForFacility(facility)vec3Average position of facility doors
M.getClosestDoorPositionForFacility(facility)vec3Closest door to camera
M.getGaragePosRot(poi, veh)vec3, quatBest parking spot position/rotation for a vehicle
M.teleportToGarage(garageId, veh, resetVeh)nilTeleports vehicle to garage parking spot
M.formatFacilityToRawPoi(f, elements)nilConverts facility to raw POI element

| M.onGetRawPoiListForLevel | (levelIdentifier, elements) | nil | Formats dealerships, computers, dragstrips as POI elements for the level | | M.onActivityAcceptGatherData | (elemData, activityData) | nil | Provides context-specific accept buttons for facility activities | | M.walkingMarkerFormatFacility | (f, elements) | - | | M.zoneMarkerFormatFacility | (f, elements, bigMapIcon) | - |

Facility Types

TypeList NameMarker Type
garagegarageszoneMarker
gasStationgasStationsgasStationMarker
dealershipdealershipswalkingMarker
computercomputerswalkingMarker
privateSellerprivateSellers-
deliveryProviderdeliveryProviderswalkingMarker
dragstripdragstripswalkingMarker

How It Works

  1. Loading: getFacilities(levelName) parses info.json + *.facilities.json files in the level's facilities/ folder
  2. Parsing: Each facility entry gets sanitized with defaults for id, preview, sitesFile, zoneNames, parkingSpotNames
  3. POI Integration: onGetRawPoiListForLevel formats dealerships, computers, and dragstrips as POI elements
  4. Activity Accept: onActivityAcceptGatherData provides context-specific buttons (open garage, view inventory, use computer, view drag history)

Facility JSON Structure

{
  "garages": [{
    "id": "garage_west",
    "name": "West Garage",
    "preview": "garage_west.jpg",
    "sitesFile": "facilities.sites.json",
    "parkingSpotNames": ["spot1", "spot2"],
    "zoneNames": ["zone_garage"],
    "doors": [["doorObj", 0, 6]]
  }]
}

Notes

  • Facilities are cached per level in facilitiesByLevel
  • Sites files can be a single string or array of paths
  • Preview images fall back to noPreview.jpg
  • Career-only: dealerships, computers shown as POIs; garages via zone markers

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 Drag Race

Manages a quarter-mile drag race against an AI opponent in freeroam mode. Handles staging lights, countdown tree, start detection, finish timing, displays, and opponent AI behavior.

Freeroam

M.dependencies = {"core_environment"}

On this page

Public APIFacility TypesHow It WorksFacility JSON StructureNotesSee Also