docs: plans checked against the sibling plans

The full ownership list, the same in all five design docs, with a Laws
line. The open sibling doc changes from the plan review are done, and
the Castes button rename is planned in Castes' plan.
This commit is contained in:
Fabian @ Blax Software 2026-12-01 19:32:44 +01:00
parent ff492d5260
commit acba29ac1b
2 changed files with 20 additions and 11 deletions

View File

@ -4,6 +4,10 @@ Every new shelf starts at Preferred and pulls meals out of the freezer, every ne
Status: 1.0 and 1.1 (forbid rules) are on the Workshop, 1.1.0 since 2026-11-30. The other areas are designed, no code yet. [features.md](features.md) is the plan of record for scope and order and lists the features new in it. Checked against the RimWorld 1.7.5021 game code on 2026-11-29. RimWorld 1.7, package id `blax.defaults`. It keeps nothing in the save, so it can be added to or removed from a running colony at any time.
Changes on 2026-12-01, the five Blax plans checked against each other:
- "Works with the other Blax mods" carries the full ownership list, the same in all five design docs, with a Laws line; the Castes paragraph names Laws' prisoner mode exception. The two open sibling doc changes from the plan review are done, and the Castes button rename is planned in Castes' features.md.
Changes on 2026-12-01, after an independent review of the plan by area (every hook below checked against the shipped code and the 1.7.5021 game code):
- Storage: "your own stockpile types" and the idea "several named defaults per kind" become one feature, named setups. Each setup gets its own key, because the shipped stockpile hook keys a modded designator by its class and would give every saved type one template. Its step moves behind mechs and new maps in the order, and bills move up to second.
@ -698,13 +702,18 @@ Designed, no code yet.
## Works with the other Blax mods
- Package ids: `blax.slaves`, `blax.castes`, `blax.zones`, `blax.defaults`. No hard dependencies. Defaults lists no sibling in About.xml and no sibling lists Defaults, so the load order doesn't matter. Defaults offers no API in 1.x.
- Package ids: `blax.slaves`, `blax.castes`, `blax.zones`, `blax.defaults`, `blax.laws` (Laws is designed, not built). No hard dependencies. Defaults lists no sibling in About.xml and no sibling lists Defaults, so the load order doesn't matter. Defaults offers no API in 1.x.
- Detection: one Compat helper, `ModLister.GetActiveModWithIdentifier(id, ignorePostfix: true)`. Sibling APIs are bound by reflection (`AccessTools.TypeByName`, `AccessTools.Method`) into cached delegates at startup; a missing sibling or method is a silent no-op.
- Ownership line for every Blax design doc: "Defaults: starting settings of vanilla stockpiles and growing zones, storage buildings, production bills, workbenches, buildings, animals and mechs, the named areas a new map starts with, and what the game forbids when pawns go down, die or are stripped. It writes when something is made or joins, and through its opt-in forbid rules when a pawn goes down, dies or is stripped. It keeps nothing in the save."
- Ownership, the same list in all five Blax design docs; a part that waits on Fabian's answer names the open question:
- Castes: every per-pawn policy default of colonists, slaves and prisoners (apparel, food, drug, reading, medical care, schedule, work priorities, weapon loadout, allowed area, hostility, self-tend, carried medicine, fire at will, prisoner interaction except the Maintain only and Release modes Laws sets on colonists it jailed), and the planned ones: the cold-weather apparel policy, the Combat Extended loadout, the Royalty and Biotech switches (room and apparel requirements, psyfocus target, entropy limit, hemogen pack use, deathrest auto-wake), the slave interaction mode a new slave starts on (Castes' open question 2) and per-caste values other Blax mods register, which those mods apply (Castes' open question 1).
- Zones: sleeping spots, beds by zone, every friendly drop location and per-cell work rules (work rule areas), with path rules on those areas (Zones' open question 3); it never changes a pawn's work priorities or allowed area.
- Slaves: slave status (except the status Laws gives back to a slave it jailed, Laws' open question 1), the slave interaction modes (vanilla's plus Recruit and Convert), trade, prices, suppression, rebellion, slave medicine and the slave economy. Slaves routes its silver payouts through `ZonesApi.TryFindDropSpot`, with `DropCellFinder.TradeDropSpot` as fallback. Pawns are never routed into zones.
- Defaults: starting settings of vanilla stockpiles and growing zones, storage buildings, production bills, workbenches, buildings, animals and mechs, the named areas a new map starts with, and what the game forbids when pawns go down, die or are stripped. It writes when something is made or joins, and through its opt-in forbid rules when a pawn goes down, dies or is stripped. It keeps nothing in the save.
- Laws: the colony's lawbook (which acts are crimes, at which stage, how severe and how they are punished), cases, sentences, trials, judges, attorneys and law votes. It acts through vanilla arrest, capture, release and guilt plus its own non-lethal subdue job, and talks colonists and slaves out of a break, except slaves while Slaves' wardens calm breaks. For the colonists it jailed, and only for them, it writes the prisoner interaction mode (Maintain only after the arrest, Release when the sentence ends) and gives back what the sentence took: bed, grave, throne, deathrest casket, ideoligion role, mech work modes and the weapon the arrest dropped. It puts a slave it jailed back into slavery (Laws' open question 1). It never sets policies, work priorities, allowed areas, zones or suppression. It keeps its state in one GameComponent.
### Blax Castes: how Defaults defers
Castes owns every humanlike player pawn: colonists, slaves and prisoners, their apparel, food, drug and reading policies, medical care, schedule, work priorities, weapon loadout, allowed area, hostility, self-tend, carried medicine, fire at will and prisoner interaction. Defaults never sets any of these, and stays out of the way in these ways:
Castes owns every humanlike player pawn: colonists, slaves and prisoners, their apparel, food, drug and reading policies, medical care, schedule, work priorities, weapon loadout, allowed area, hostility, self-tend, carried medicine, fire at will and prisoner interaction (except the Maintain only and Release modes Blax Laws sets on colonists it jailed). Defaults never sets any of these, and stays out of the way in these ways:
- Pawn filter: the join funnel checks `RaceProps.Animal` or `IsColonyMech` first, so Defaults never writes to a humanlike pawn, with or without Castes. The forbid rules (1.1: `Pawn.Kill`, `Pawn_HealthTracker.MakeDowned` and `Pawn.Strip`) see any pawn, colonists and slaves included, but write only the forbidden flag on its corpse and on the things it drops or is stripped of, never a caste slot. Castes' join hooks filter the other way round on `RaceProps.Humanlike` (`JoinHooks.Watching` in blax-castes), so no pawn reaches both join funnels.
- Caste guard: when Castes' read-only API is active (`CastesApi` version 1, where `CasteIdOf` arrives), Defaults binds `CastesApi.CasteIdOf(Pawn)`, checks `Active`, and skips any animal or mech that has a caste. Today none can; the guard keeps Castes in charge if it ever adds animal or mech castes.
@ -731,12 +740,12 @@ Castes owns every humanlike player pawn: colonists, slaves and prisoners, their
### Blax Laws
Laws is designed on its branch `design/act-catalogue` and not accepted yet. Its package id would be `blax.laws`; Defaults would list it nowhere in About.xml.
Laws is designed, not built. Its package id is `blax.laws`; Defaults lists it nowhere in About.xml.
- Lawbook templates across saves (Laws' backlog) live in Laws' own file under the game's Config folder, with the write, read-back and backup rules of Defaults' file copied as code. Defaults' file never holds a lawbook, and neither mod reads the other's file.
- Lawbook templates across saves (Laws' Lawbook, step 2) live in Laws' own file under the game's Config folder, with the write, read-back and backup rules of Defaults' file copied as code. Defaults' file never holds a lawbook, and neither mod reads the other's file.
- Laws' subdue downs a pawn through `Pawn_HealthTracker.MakeDowned`, so with the colony rule on its weapon is a remembered weapon: it waits while the pawn lies where it fell, and the colony rule decides once the pawn is carried off. Laws never touches that weapon.
- An arrest drops the weapon and inventory inside `SetGuestStatus`, which the forbid rules don't see. Laws' "Release gives back what jail took" allows the weapon the arrest dropped again at the release. Neither mod hooks the other.
- When Laws' design is accepted, the ownership line and the Castes paragraph above take the Laws wording from Laws' "Sibling doc changes": Castes' prisoner interaction except the Maintain only and Release modes Laws sets on colonists it jailed.
- The ownership list and the Castes paragraph above carry the Laws wording from Laws' "Sibling doc changes": Castes' prisoner interaction except the Maintain only and Release modes Laws sets on colonists it jailed.
### Shared conventions
@ -749,8 +758,8 @@ Laws is designed on its branch `design/act-catalogue` and not accepted yet. Its
- Done (2026-11-29), Castes `docs/design.md`: the backlog item "Animal and mech castes" becomes "Animals and mechs: Blax Defaults (per-species join defaults)"; the cut line about Defaults' non-pawn defaults gets "now Blax Defaults"; "Not supported for now" points animals and mechs to Blax Defaults; the package ids and the ownership list gain `blax.defaults` and the Defaults sentence above.
- Done (2026-11-29), Castes `docs/design.md`: "Works with the other Blax mods" names Defaults as a `CastesApi` version 1 consumer, "Defaults 1.2 reads `Active` and `CasteIdOf` (API version 1, Castes 1.1) to skip any animal or mech that has a caste", and the API's risk notes say the contract spans four repos.
- Castes `README.md`: "Not supported yet: multiplayer, animal castes" becomes "Not supported yet: multiplayer. Animals and mechs: Blax Defaults."
- Castes UI labels, Scribe keys unchanged: the "Defaults" button above the Caste column becomes "On join" and the "Join defaults" window "Caste on join". Next to a mod called Blax Defaults, a "Defaults" button in Castes sends players to the wrong mod.
- Done in substance, Castes `README.md`: it reads "Not supported yet: multiplayer, animal castes (animals and mechs are Blax Defaults')".
- Planned (2026-12-01) in Castes `docs/features.md`, area 3, step 1: Castes UI labels, Scribe keys unchanged: the "Defaults" button above the Caste column becomes "On join" and the "Join defaults" window "Caste on join". Next to a mod called Blax Defaults, a "Defaults" button in Castes sends players to the wrong mod.
- Done (2026-11-29), Zones `docs/design.md`: the ownership line carries the Defaults sentence above, and the backlog carries "Make default for new delivery and sleeping zones, in Zones' own tabs, stored as names in Zones' own file (S)". The corpse and gear rules act only inside `Pawn.Kill` and `Pawn.DropAndForbidEverything` (since the forbid rework: `Pawn.Kill`, `Pawn_HealthTracker.MakeDowned` and `Pawn.Strip`), never on goods Zones delivers, so Zones' note that Defaults has no rule for arriving goods stays true.
- Done (2026-11-29), from the forbid rework: the ownership line in Castes `docs/design.md`, Zones `docs/design.md` and Slaves `docs/roadmap.md` takes the new wording above ("go down, die or are stripped").
- Done (2026-11-29), Castes `docs/design.md`: "Defaults 1.2 reads `Active` and `CasteIdOf`" becomes "Defaults 1.3", and its line on Defaults' forbid rules reads "see any pawn that goes down, dies or is stripped, colonists and slaves included, but write only the forbidden flag on the corpse and on the things it drops or is stripped of, never a caste slot".
@ -758,8 +767,8 @@ Laws is designed on its branch `design/act-catalogue` and not accepted yet. Its
- Done (2026-11-29), after Zones' work rule areas (its 1.6): Castes `docs/design.md`, Zones `docs/design.md`, Slaves `docs/roadmap.md` and this doc carry the same Zones sentence ("per-cell work rules (work rule areas); it never changes a pawn's work priorities or allowed area") and say "allowed area" for Castes' area slot. Slaves' package ids gain `blax.defaults`.
- Done (2026-12-01), from the plan by area, applied by the Castes and Zones plans on their `plan/features` branches: Castes `docs/design.md`, its "Blax Defaults" section, "Defaults 1.3 reads `Active` and `CasteIdOf`" becomes "Defaults' animal and mech defaults read `Active` and `CasteIdOf`". Zones `docs/design.md`, its Blax Defaults note, "`Designator_ZoneAdd_Growing` (its 1.4)" becomes "(its growing area)" and "Defaults' build scope (its 1.2)" becomes "Defaults' build scope (with graves, mortars and other storage)". References to shipped releases (1.0, the forbid rules' 1.1) stay.
- Open (2026-12-01), from the plan review, for Castes `docs/design.md`, Zones `docs/design.md`, Slaves `docs/roadmap.md` and Laws' design on `design/act-catalogue`: the Defaults sentence of the ownership line gains "the named areas a new map starts with" as above, and the Castes sentence reads "every humanlike player pawn's policy default (...)" instead of "every per-pawn policy default (...)", because Defaults writes animals' medical care.
- Open (2026-12-01), from the plan review, Castes `docs/design.md` on `plan/features`: its "Blax Defaults" section lists medical care with Defaults' animal defaults ("area, follow flags, training and medical care per species"), and its backlog line on Blax Defaults adds medical care to what the species rows cover ("follow, training, area, medical care and control group work modes").
- Done (2026-12-01, when the five plans were checked against each other), Castes `docs/design.md`, Zones `docs/design.md`, Slaves `docs/roadmap.md` and Laws `docs/design.md`: the Defaults sentence of the ownership line gains "the named areas a new map starts with" as above, and the Castes sentence reads "every per-pawn policy default of colonists, slaves and prisoners (...)" instead of "every per-pawn policy default (...)", because Defaults writes animals' medical care. All five docs now carry the same ownership list.
- Done (2026-12-01, same check), Castes `docs/design.md` on `plan/features`: its "Blax Defaults" section lists medical care with Defaults' animal defaults ("area, follow flags, training and medical care per species"), and its backlog line on Blax Defaults adds medical care to what the species rows cover ("follow, training, area, medical care and control group work modes").
## Backlog

View File

@ -22,7 +22,7 @@ Left to the other Blax mods:
- Blax Castes: every humanlike player pawn and its per-pawn settings (policies, medical care, schedule, work priorities, weapon loadout, allowed area, hostility, self-tend, carried medicine, fire at will, prisoner interaction), and caste templates across saves. Defaults never writes to a humanlike pawn. Castes' allowed area slot can create a missing area on demand; Defaults creates its named areas when a map is made, and each mod finds the other's by label.
- Blax Zones: delivery and sleeping zones, beds by zone, drop spots and work rule areas. "Make default" for its own zones lives in Zones, in its own file.
- Blax Slaves: slave status, trade, prices, suppression, slave medicine and the surgery bills it keeps through status changes.
- Blax Laws (designed on branch `design/act-catalogue`, not accepted yet): lawbook, cases, punishments and court. Its "lawbook templates shared across saves" stay in Laws: Laws keeps its own file under the game's Config folder and copies Defaults' write, read-back and backup rules. Defaults' file never holds a lawbook. Laws' arrests and subdue meet the forbid rules only through vanilla calls (design.md, "Blax Laws").
- Blax Laws (designed, not built): lawbook, cases, punishments and court. Its "lawbook templates shared across saves" stay in Laws: Laws keeps its own file under the game's Config folder and copies Defaults' write, read-back and backup rules. Defaults' file never holds a lawbook. Laws' arrests and subdue meet the forbid rules only through vanilla calls (design.md, "Blax Laws").
## Areas