Ship a disk example pack so last-wins, patches and create-with-a-mod are tested for real.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-20 01:06:12 +03:00
co-authored by Cursor
parent edd3d35c79
commit 505b1429ab
20 changed files with 405 additions and 14 deletions
+36
View File
@@ -0,0 +1,36 @@
# Example pack
A tiny fixture, not content. It sits next to `core` and is **off until the player ticks it**.
Vanilla play does not change without that tick.
## Layout
```
example/
pack.jsonc # version + requires: ["core"]
localizations/{ru,en}.jsonc
defs/traits/traits.jsonc # two traits
defs/namesets/example.jsonc
defs/rooms/store.jsonc # one placeable room
defs/things/chair.jsonc # last-wins: same defName as core
patches/principals-office.jsonc
README.md # this file
```
The pack name is the `example` key in the locale files, not a field in `pack.jsonc`.
## How to add something
1. New type: a JSONC file under `defs/<kind>/`. The folder chooses the kind (`traits`, `rooms`, …);
the object needs a `defName`.
2. Label: the same `defName` (or the pack id) in both locale files. Missing keys load, but the UI
shows the raw id and the loader warns.
3. Edit a core type without copying it: a file in `patches/` with `target` and `add` / `replace` /
`remove`. Patches run after inheritance, in pack order.
4. Same `defName` as `core` (or an earlier pack): the later file wins and the log warns. That is
what `defs/things/chair.jsonc` is for — a sample of last-wins, not a better chair.
5. Default map: only `maps/default.jsonc` replaces the layout, last file wins. This pack does not
ship one, so a school with the pack still uses core's yard.
There is no `maps/` folder here on purpose. A layout that uses `ExampleStore` is a create-dialog
map, not a second default school.