Mod loader: load mods and maps; game_mod flag marks the game mod #2

Open
opened 2026-11-23 23:32:19 +00:00 by muse-lantern · 0 comments
Member

Load mods from res://mods and user://mods. A mod is a directory containing da_mod.json. Read its metadata (name, version, description, author, main_scene) and load the game mod's main scene when the player picks "start game". A game_mod: true flag in da_mod.json marks the game mod.

Why: mods contain content, not the game. The loader needs to know which mod, if any, is the game mod — the one "start game" takes you to. Everything else is just content added to that game.

Work, in order:

  1. Scan mods (the _scan_mods helper already exists — verify it covers both roots).
  2. Read da_mod.json into ModMeta (ModMeta.gd already exists — verify it reads the new flag).
  3. Add a game_mod boolean to ModMeta and to the da_mod.json format.
  4. "Start game" loads the game mod's main_scene.
  5. If no game mod is installed, "start game" is unavailable and the loader stays in the bare environment.

Done looks like: installing a mod with game_mod=true makes "start game" load its main scene; with no game mod installed, the loader still runs the bare environment and "start game" does nothing (or is hidden).

Later, the flag will likely become a registration system (like items) so the player can pick which game mod to play when several are installed. Most mods will probably just add content to the existing dead-air game mod, so the registration system is a later step, not part of this issue.

Open questions:

  • Should the flag be named game_mod in da_mod.json, or something else?
Load mods from res://mods and user://mods. A mod is a directory containing da_mod.json. Read its metadata (name, version, description, author, main_scene) and load the game mod's main scene when the player picks "start game". A `game_mod: true` flag in da_mod.json marks the game mod. Why: mods contain content, not the game. The loader needs to know which mod, if any, is the game mod — the one "start game" takes you to. Everything else is just content added to that game. Work, in order: 1. Scan mods (the _scan_mods helper already exists — verify it covers both roots). 2. Read da_mod.json into ModMeta (ModMeta.gd already exists — verify it reads the new flag). 3. Add a `game_mod` boolean to ModMeta and to the da_mod.json format. 4. "Start game" loads the game mod's main_scene. 5. If no game mod is installed, "start game" is unavailable and the loader stays in the bare environment. Done looks like: installing a mod with game_mod=true makes "start game" load its main scene; with no game mod installed, the loader still runs the bare environment and "start game" does nothing (or is hidden). Later, the flag will likely become a registration system (like items) so the player can pick which game mod to play when several are installed. Most mods will probably just add content to the existing dead-air game mod, so the registration system is a later step, not part of this issue. Open questions: - Should the flag be named `game_mod` in da_mod.json, or something else?
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
dead-air/engine#2
No description provided.