upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRK28A <243808451+RK28A@users.noreply.github.com>2026-11-25 12:23:54 +0000
committerRK28A <243808451+RK28A@users.noreply.github.com>2026-11-25 12:23:54 +0000
commitc5b09c21ec63a21d48fa2078bb2e7e8f4fa6bd93 (patch)
treeb10258f9afb47ea26ad8b1155e433f92c6d1a91f /docs
parent0d80bc5df7c873f40965f34f185cb96913786765 (diff)
leonida_mods: read mod.json as the runtime does, camera section and byte-order mark included
The manager checks a manifest with its own copy of the rules in runtime/src/mods.h, and the copy had fallen behind in three places. The "camera" section was not read at all. `list` said of mods/first_person, which ships in this repository, "no archetype_swaps; this mod currently changes nothing", and `check` passed a section the runtime skips the mod for: an unknown view_mode, a first_person_value that is not a whole number 0-255, contexts that are not whole numbers. A UTF-8 byte-order mark in front of mod.json was reported as invalid JSON, although the runtime skips it and docs/modding.md says it is accepted. Notepad's "UTF-8 with BOM" and Windows PowerShell 5.1's -Encoding utf8 write one. `enable`, `disable` and `install` failed on it too. A UTF-16 file is now named as the runtime names it. "archetype_swaps": null passed as a mod without swaps; the runtime refuses it. `list` and `list --json` now show the camera a mod sets, and which mod's camera wins when several enabled mods have one.
Diffstat (limited to 'docs')
-rw-r--r--docs/modding.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/modding.md b/docs/modding.md
index 41ee5daed..102c18f39 100644
--- a/docs/modding.md
+++ b/docs/modding.md
@@ -35,7 +35,8 @@ At start the runtime prints what it loaded, for example:
35install, list, check, enable, disable, pack and remove mods. A package is a normal ZIP file (the `.leonidamod` 35install, list, check, enable, disable, pack and remove mods. A package is a normal ZIP file (the `.leonidamod`
36extension is only a name) with `mod.json` at its top level or inside one top-level folder. The installer refuses 36extension is only a name) with `mod.json` at its top level or inside one top-level folder. The installer refuses
37paths that climb out of the package, links and manifests the runtime would reject; it never goes online and never 37paths that climb out of the package, links and manifests the runtime would reject; it never goes online and never
38copies game data. 38copies game data. `list` and `check` read each `mod.json` by the runtime's rules, the `camera` section and a
39byte-order mark included, and show the camera a mod sets next to its swaps.
39 40
40On Windows, double-click **`Mods.bat`** for the Tkinter window (on Linux and macOS, run **`./Mods.sh`**; it needs 41On Windows, double-click **`Mods.bat`** for the Tkinter window (on Linux and macOS, run **`./Mods.sh`**; it needs
41Tkinter, `python3-tk` on Debian and Ubuntu): choose the port folder, install a ZIP or folder, 42Tkinter, `python3-tk` on Debian and Ubuntu): choose the port folder, install a ZIP or folder,