Files
h-school/src/HSchool.Server/mods/example/README.md
T

1.5 KiB

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.