Built-in mods and the MODS menu¶
The MODS menu¶
MODS on the home menu (also a tab in Settings, from the pause menu too) lists every mod the game found:
| Row | Does |
|---|---|
| RELOAD MODS | Restarts the game in place and comes back to this page, so new folders in mods/, edited files and changed switches load without quitting. It reads APPLY CHANGES while a switch is pending. Title screen only, since it ends any run. |
| MOD CODE | Lets mods from mods/ and the Workshop run scripts. Off by default. |
| One switch per mod | ON or OFF. A change shows as ON AFTER RELOAD or OFF AFTER RELOAD until the mods reload. |
| Title SETTINGS | Opens a loaded mod's own settings (mod.json settings). |
| SKIPPED | A folder or Workshop item that could not load, with the reason. |
- Why a restart: mods load before anything else, and the game's catalogs read their rows when they first load, so a reload is LÖVE's own restart: a fresh start of the game's code without quitting the program, minus the studio splash and the title intro.
- Saved by mod id, in the save's
mods_enabled, so a switch follows the mod across folders and Workshop updates. - Defaults: mods you install start on; built-in mods start off. RESTORE THIS PAGE puts every switch back to its default.
- Off means not loaded: none of its rows, art or scripts. Progress toward its contracts is kept for when it is back on.
The three built-in mods¶
They ship in the game's own data/mods/ and load before mods/, so a mod
in mods/ can change their rows. Each shows a different side of the API;
read them as worked examples.
| Mod | Kind | Shows |
|---|---|---|
| Bounty Board | Code | enemy_death and enemy_gone events, game.emit for other mods, game.store, game.random, game.cash, game.say with live lines, game.count, drawing in the world and on the HUD, its own sprite and text, mod settings |
| Loopholes | Data | A gear weapon on the turret pattern with a part and a specialist card, two run modifiers |
| Sky Laser | Code | game.weapon with its own pattern, upgrade cards through w.stats, game.blast results, the weapon draw handler and d.light, a radio call, a counter and paint |
Bounty Board¶
From the second wanted star, one police unit near the car gets a price. Wreck it before the clock runs out to collect; the bonus grows with the wanted level. Ten bounties earn the BOUNTY GOLD paint.
- The simulation decides, the draw handlers read.
tickpicks the target withgame.randomand keeps it ins.bounty_board;draw_worldanddraw_hudonly read that table. - Events, not polling:
enemy_deathpays out when the marked unit is wrecked andenemy_gonecancels the bounty when it drives off. - Other mods can react: each claim publishes
bounty_board.claimedwithgame.emit, and the best bounty is kept withgame.store. - Live announcer lines:
game.say(s, 'bounty_board.posted', {line})fills in the unit and the price, with text from the mod'stext/en.jsonread throughgame.text. - Accessibility: the reticle stops turning with reduced motion, and the last seconds stop blinking with reduced flashes.
- Settings: how often bounties come, the marker and the panel.
Loopholes¶
JSON only. The Paper Shredder is a new row on the minigun's turret
pattern: a wide stream of shredded receipts. CROSS-CUT raises its fire
rate per rank and STEEL TEETH adds damage to every scrap. SHELL COMPANY and OFFSHORE
ACCOUNT join the setup page's modifiers.
Sky Laser¶
A weapon with a pattern of its own (game.weapon). The ORBITAL UPLINK gear
card locks on to the toughest enemies in range, charges while a reticle
closes in, then a beam from orbit blasts around each one. Starting NOS calls
a strike at once.
- Numbers are content, firing is code.
range,interval,damage,radiusandroundssit in itsweapons.jsonrow, so its three upgrade cards are plainupgradesentries (damage,rate,rounds) that reach the script throughw.stats. - State per run: pending strikes live in
w.state;firetimes and lands them, the weapon'sdrawhandler only reads them. - Drawing kit: rings, lines, circles and
d.light, which glows at night. The flash dims with reduced flashes. - A contract of its own:
game.blastreturns the enemies it destroyed, each feedsgame.count, and fifty earn the ION BLUE paint.
For game developers¶
Built-in mods are listed by folder name in BUILTIN in
game/game/content.lua, so the game never lists data/mods/ itself. Their
files must also be in scripts/release_manifest.json. Their scripts ship as
source, since mod scripts load as text, and run without MOD CODE: they are
the game's own code. game/tests/builtin_mods_test.lua loads all of them,
plays Bounty Board and drives the MODS page. RELOAD MODS is
game/game/mod_reload.lua: love.event.quit('restart') plus a marker file
that reopens the page.