#22605·OpenRA

Campaign progression: campaign browser and Lua-driven mission selection

Author: penev92Created Sep 3, 2026Updated Sep 3, 2026
LabelsScripting

Part 5 of #22600, depends on #22601 and #22604. The user-facing campaign flow, end to end: pick a campaign from the main menu, watch the intro FMVs, choose a mission, play — and between missions, choose the next one without ever returning to the main menu.

Design

  • Main menu gets a Campaign button opening the campaign browser: a flat TS-style list of the mod's campaigns, initially declared in mod.yaml. (The fancy per-mod screen with artwork — TD's pulsing faction logos, D2k's intro chain — is backlog, layered on later as a "Start Campaign" / "Other Campaigns" split.)
  • The browser hands the selected campaign id to the shellmap's Lua, which plays intro FMVs if any, then opens the mission-selection screen (or launches straight into the first mission if there is no choice).
  • The mission-selection screen is a fullscreen panel over the current world — the shellmap at campaign start, the just-finished mission mid-campaign (same precedent as the encyclopedia/savegame-loading screens). Its structure (layout, marker style) is mod widget YAML + logic; Lua supplies the content: the available-missions list (computed by the campaign's script from the progress store), plus images/animations and per-region behaviors. First version is a plain list; clickmap/world-map visuals are backlog on the same API.
  • New Lua API surface: open the mission-selection screen with arguments, and launch an arbitrary map. (FMV playback already exists.)
  • UI→Lua calls use a named-global contract: the C# side fetches a well-known Lua global function fresh at call time and invokes it with plain values. (Passing Lua callback functions through the engine and back was prototyped and is a known dead end — Eluant disposes the function handle when the bridging call returns.)

Work items

  • Campaign list declaration in mod.yaml + campaign browser panel widget (flat list, Start/Back)
  • UI→Lua invocation mechanism (named-global contract) so the browser can hand the campaign id to the shellmap script
  • Lua API: open the mission-selection screen with an available-missions list and display arguments
  • Lua API: launch a selected map from script
  • Mission-selection panel chrome + logic (list-based first version)
  • Reference implementation in one mod: campaign script computing available missions from the store, shellmap wiring, at least two missions chained

Out of scope

Fancy campaign screens, clickmaps, campaign bundles, faction-specific shellmap backgrounds.