RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Ambient SoundUI Apps ManagerUI AudioBindings LegendCamera Distance AppDeveloper ConsoleCredits MusicExternal WebSocket ServerFade ScreenGame BlurGameplay App ContainersGrid SelectorLivery EditorMessages DebuggerMessages/Tasks App ContainersMission InfoPolice InfoTop BarUI ModsNavigation Map DataVehicle Paint EditorVehicle Vicinity AppUI Visibility
Gameplay SelectorTile ClusteringGameplay Selector TilesTile Sorting
Campaign Tiles GeneratorLevel Tiles GeneratorMission Tiles GeneratorScenario Tiles Generator

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 ExtensionsuigameplaySelectortileGenerators

Campaign Tiles Generator

Tile generator for legacy campaign entries in the gameplay selector grid.

Tile generator for legacy campaign entries in the gameplay selector grid.


Overview

ui_gameplaySelector_tileGenerators_campaignTiles provides campaign tiles and detail panels for the gameplay selector. Campaigns are loaded from campaign_campaignsLoader and marked as legacy/deprecated content.

Extension path: lua/ge/extensions/ui/gameplaySelector/tileGenerators/campaignTiles.lua


Exports (M)

Hook HandlerSignatureDescription
onGameplaySelectorGetTiles(items, backend)Adds campaign tiles to the items list.
onGameplaySelectorGetDetails(itemDetails, details, buttonInstance, backend)Provides detail panel for a selected campaign.

Internals

Tile Structure

Each campaign item includes:

{
  name = translate(campaign.title),
  system = "Campaigns (deprecated)",
  type = "Campaign (deprecated)",
  level = translate(core_levels.getLevelTitle(campaign.level)),
  sourceIcons = {},          -- beamNG icon if official, bug icon if auxiliary
  order = -tonumber(campaign.date),
  isLegacy = true,
  key = "campaign_<sourceFile>",
  validBackends = {gameplaySelector = true},
}

Detail Panel

The detail panel includes:

  • Specifications: difficulty, authors, creation date, multiplayer info, scenario count
  • Legacy notice: "Campaign system is outdated"
  • Tags: official, auxiliary, mod info
  • Button: "Start Campaign" - calls campaign_campaignsLoader.start(campaign) and tracks recent usage

Key Generation

local function getKeyFromDetails(details)
  return string.format("campaign_%s", details.campaignSourceFile)
end

How It Works

  1. The gameplay selector fires onGameplaySelectorGetTiles hook
  2. This generator iterates all campaigns from campaign_campaignsLoader.getList()
  3. Each campaign is converted to a tile with system/type/level metadata
  4. When a user selects a campaign, onGameplaySelectorGetDetails loads full data
  5. The "Start Campaign" button launches the campaign and tracks recent usage

Additional Exports

The following exports are available but not yet documented in detail:

  • M.onGameplaySelectorGetDetails
  • M.onGameplaySelectorGetTiles

See Also

  • Level Tiles Generator - Related reference
  • Mission Tiles Generator - Related reference
  • Scenario Tiles Generator - Related reference
  • UI System Guide - Guide

Tile Sorting

Centralized sorting module for gameplay selector tiles - supports name, system, date, and automatic multi-criteria sorting.

Level Tiles Generator

Tile generator for freeroam level/spawnpoint entries in the gameplay selector grid.

On this page

OverviewExports (M)InternalsTile StructureDetail PanelKey GenerationHow It WorksAdditional ExportsSee Also