How a mode works
A mode is one text file, in Megalith, Reclaimer's game mode language. It grew from Megalo, Halo: Reach's game type language, and still reads every Megalo source as written. The file ends in .rmeg; ReachVariantTool's .rvt reads the same. It holds everything the mode is:
- The mode header: a block at the top, in TOML, with the mode's name, the game type it plays, its rules and options, the settings hosts can change, its classes and more.
- The script: what happens during the game, such as what a kill does, a timer, a class's ability, or a HUD drawn for each player.
zone-control.rmeg, shortened
-- Zone Control: one hill, where the first player to spawn stands, and a
-- shotgun beside it.
--[=[ mode
name = "Zone Control"
[rules]
score_to_win = 30
kill_points = 0
[options]
"rounds.teams" = 0
"rounds.limit" = 1
"rounds.minutes" = 10
[logic.options]
points_per_second = { value = 1, min = 1, max = 10 }
]=]
alias points = script_option[0]
The file plays as it is, with nothing to compile: put it in Game Modes, choose Refresh, and it's on the Megalith card. There's no script editor in the game; use any text editor, such as Notepad, TextEdit or Visual Studio Code. The Reclaimer Kit edits maps and tags, not modes.
