RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Gameplay AchievementGameplay CityDiscoverForce FieldGarage ModeMarker InteractionParking SystemGameplay Playmode MarkersGameplay PoliceGameplay RallyGameplay Rally LoopGameplay Raw POIsGameplay Skidpad TestSpeed Trap LeaderboardsSpeed Traps and CamerasGameplay StatisticsTaxi Ride SystemTraffic SystemVehicle PerformanceWalking

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 Extensionsgameplay

Gameplay Achievement

Tracks the "Kilometer Kickoff" Steam/platform achievement - unlocked when total vehicle odometer exceeds 1,000 km (1,000,000 meters).

Tracks the "Kilometer Kickoff" Steam/platform achievement - unlocked when total vehicle odometer exceeds 1,000 km (1,000,000 meters).


Public API

| Function | Signature | Returns | Description | |------ | M.dependencies | table | {"gameplay_statistic"} |----|-----------|---------|-------------| | M.statCallback | (key, oldvalue, newvalue) | nil | Callback for odometer statistic changes |

Hooks

HookPurpose
M.onExtensionLoadedChecks if achievement already unlocked; registers stat callback if not

Dependencies

  • gameplay_statistic

How It Works

  1. On load, checks if KILOMETER_KICKOFF is already unlocked via OnlineServiceProvider
  2. If not unlocked, reads current vehicle/total_odometer.length stat
  3. If already over 1,000,000m, unlocks immediately
  4. Otherwise, registers a callback on the odometer stat
  5. Callback updates KMPASSED platform stat (in km) on each change
  6. When threshold exceeded, unlocks achievement and unloads itself

Usage Examples

-- Extension loads automatically and self-manages
-- No manual interaction needed

-- The stat callback is registered as:
gameplay_statistic.callbackRegister("vehicle/total_odometer.length", false, M.statCallback)

Notes

  • Self-unloading: removes callback and calls extensions.unload("gameplay_achievement") after unlock
  • Returns false from onExtensionLoaded to prevent loading if already unlocked
  • Platform stat KMPASSED is set in kilometers (value * 0.001)

Module Variables

VariableTypeDescription
M.dependenciestable{"gameplay_statistic"}

See Also

  • Gameplay City - Related reference
  • discover - Discover / Experience System - Related reference
  • Force Field - Related reference
  • Gameplay Systems Guide - Guide

Freeroam Facilities Fuel Price

Manages fuel price display on gas station 7-segment signs. Reads price configuration from facility data, applies randomness, and renders prices via TSStatic shape swapping.

Gameplay City

Loads and queries city-level site data (zones, parking spots) with priority-based zone lookups. Used for level metadata like traffic rules, vehicle groups, and delivery routing.

On this page

Public APIHooksDependenciesHow It WorksUsage ExamplesNotesModule VariablesSee Also