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

Discover

Reference for `gameplay_discover`, the main entry point for the "Discover" experience system. Loads curated gameplay experiences (freeroam scenarios and missions) from Lua modules, presents them as pa

Reference for gameplay_discover, the main entry point for the "Discover" experience system. Loads curated gameplay experiences (freeroam scenarios and missions) from Lua modules, presents them as paginated cards in the UI, and launches them.


Overview

The Discover system provides curated gameplay experiences accessible from the main menu. Each experience is either a freeroam scenario (spawns vehicles, sets up tasks) or a mission reference. Experiences are organized into versioned pages (e.g., "0.37 Highlights", "New Player Experience").


Exports

FunctionSignatureDescription
loadDiscovers()Scan and load all discover modules (lazy, runs once)
startDiscover(discoverId)Launch a discover experience by ID
getDiscoverPages()Get all discover pages with sections and cards
onInit()Check CLI args for -discover flag
basicControlsIntroPopup()Show device-appropriate basic controls popup
introPopup(id)Show a one-time HTML popup tutorial
clearTasksOnClientEndMission()Flag to clear tasklist when mission ends
onClientEndMission()Clear tasklist if flagged
onLoadingScreenFadeout()Clear the loading lock
M.basicControlsIntroPopup()-
M.clearTasksOnClientEndMission()-
M.getDiscoverPages()-
M.introPopup(id)-
M.loadDiscovers()-
M.onClientEndMission()-
M.onInit()-
M.onLoadingScreenFadeout()-
M.startDiscover(discoverId)-

Experience Structure

Each experience module (e.g., discover_037.lua) returns:

{
  pageInfo = {
    title = "0.37 Highlights",
    sections = {
      { title = "Freeroam Experiences", type = "freeroam", discoverIds = {...} },
      { title = "Missions", type = "mission", discoverIds = {...} },
    },
    description = { title = "...", description = "...", image = "..." },
    order = -1,  -- Lower = shown first
  },
  experiences = {
    { type = "freeroam", id = "037_limousine", name = "...", trigger = function(M) ... end },
    { type = "mission", id = "037_villaVip", missionId = "italy/arrive/005-villaVip" },
  }
}

How It Works

  1. loadDiscovers() scans lua/ge/extensions/gameplay/discover/*.lua and loads all modules
  2. Each module registers its experiences in discoversById and page info in pageInfosById
  3. getDiscoverPages() builds a sorted page list with formatted experience cards
  4. startDiscover(id) launches an experience - either starts a mission or calls the trigger function

Mission Experiences

Mission-type experiences resolve their name, description, and icon from the mission system:

{ type = "mission", id = "my_mission", missionId = "italy/arrive/005-villaVip" }

Freeroam Experiences

Freeroam experiences have a trigger function that sets up the level, spawns vehicles, configures tasks:

{
  type = "freeroam",
  id = "my_experience",
  trigger = function(M)
    freeroam_freeroam.startFreeroamByName("italy", "spawn_town", nil, false, function()
      -- spawn vehicles, set tasks, etc.
    end)
    return true
  end
}

Intro Popups

basicControlsIntroPopup() detects the player's input device (wheel, gamepad, keyboard) and shows a device-specific HTML popup from /gameplay/discover/popups/basicDriving_<device>/content.html. Each popup is shown only once per session.


CLI Support

The game can be launched with -discover <id> to automatically start a discover experience on boot.


Key Behaviors

  • setExtensionUnloadMode(M, "manual") - Extension stays loaded permanently
  • Discover modules are loaded lazily on first access
  • lastDiscover prevents double-loading during level transitions
  • Pages are sorted by order field (lower numbers first)
  • Default images are provided for experiences without custom thumbnails

See Also

  • Gameplay Achievement - Related reference
  • Gameplay City - Related reference
  • Force Field - Related reference
  • Gameplay Systems Guide - Guide

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.

Force Field

Applies a gravitational planet effect around the player vehicle, pushing or pulling other vehicles. Toggled via radial menu. Disabled automatically during career mode.

On this page

OverviewExportsExperience StructureHow It WorksMission ExperiencesFreeroam ExperiencesIntro PopupsCLI SupportKey BehaviorsSee Also