diff options
| author | RK28A <243808451+RK28A@users.noreply.github.com> | 2026-11-25 12:23:54 +0000 |
|---|---|---|
| committer | RK28A <243808451+RK28A@users.noreply.github.com> | 2026-11-25 12:23:54 +0000 |
| commit | c5b09c21ec63a21d48fa2078bb2e7e8f4fa6bd93 (patch) | |
| tree | b10258f9afb47ea26ad8b1155e433f92c6d1a91f /docs/modding.md | |
| parent | 0d80bc5df7c873f40965f34f185cb96913786765 (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/modding.md')
| -rw-r--r-- | docs/modding.md | 3 |
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: | |||
| 35 | install, list, check, enable, disable, pack and remove mods. A package is a normal ZIP file (the `.leonidamod` | 35 | install, list, check, enable, disable, pack and remove mods. A package is a normal ZIP file (the `.leonidamod` |
| 36 | extension is only a name) with `mod.json` at its top level or inside one top-level folder. The installer refuses | 36 | extension is only a name) with `mod.json` at its top level or inside one top-level folder. The installer refuses |
| 37 | paths that climb out of the package, links and manifests the runtime would reject; it never goes online and never | 37 | paths that climb out of the package, links and manifests the runtime would reject; it never goes online and never |
| 38 | copies game data. | 38 | copies game data. `list` and `check` read each `mod.json` by the runtime's rules, the `camera` section and a |
| 39 | byte-order mark included, and show the camera a mod sets next to its swaps. | ||
| 39 | 40 | ||
| 40 | On Windows, double-click **`Mods.bat`** for the Tkinter window (on Linux and macOS, run **`./Mods.sh`**; it needs | 41 | On Windows, double-click **`Mods.bat`** for the Tkinter window (on Linux and macOS, run **`./Mods.sh`**; it needs |
| 41 | Tkinter, `python3-tk` on Debian and Ubuntu): choose the port folder, install a ZIP or folder, | 42 | Tkinter, `python3-tk` on Debian and Ubuntu): choose the port folder, install a ZIP or folder, |