docs: sentence castes for Blax Laws, decisions of 2026-12-03

This commit is contained in:
Fabian @ Blax Software 2026-12-03 17:49:48 +01:00
parent aaa12082c4
commit e38259fedc
2 changed files with 11 additions and 6 deletions

View File

@ -4,6 +4,11 @@ Every slave you buy needs its apparel, food, drug and reading policy set by hand
What the mod covers and in which order the work goes: `docs/features.md`. This file holds the specs.
Changes on 2026-12-03, Fabian's decisions on Blax Laws (Laws `docs/features.md`, "Decided 2026-12-03"):
- The sentence caste for Laws widens to castes marked "for sentences", with `BeginSentence`, `EndSentence` and `SentenceTicksLeft` in the next API version, starter sentence castes and a "Create rags outfit" button (`docs/features.md`, area 5, step 5, and "Blax Laws" below).
- The Laws ownership line gains lose own bedroom or role and the sentence castes.
Changes on 2026-12-01, Fabian's decisions (`docs/features.md`, "Decided 2026-12-01"):
- Castes owns the slave interaction mode a new slave starts on, stores the per-caste values sibling mods register (built when the first sibling feature needs one) and builds the sentence caste for Laws' confinement after the join API.
@ -625,7 +630,7 @@ Comes right after "Where and how they fight" (`docs/features.md`, area 4 and Ord
## The API for the other Blax mods
Each step adds members to `CastesApi` and raises its version; the contract is in "Works with the other Blax mods". Caste values for sibling features (version 4) and the sentence caste for Blax Laws (area 5, step 5) are planned in `docs/features.md`, area 5, with no spec yet.
Each step adds members to `CastesApi` and raises its version; the contract is in "Works with the other Blax mods". Caste values for sibling features (version 4) and the sentence castes for Blax Laws (area 5, step 5) are planned in `docs/features.md`, area 5, with no spec yet.
### Read-only API (version 1)
@ -726,7 +731,7 @@ Laws is designed, not built.
- Laws reads `Active` and `CasteIdOf` (API version 1, the read-only API) for its caste checks. It hints `blax.laws.jailed` from its `CapturedBy` prefix, and `blax.laws.released` from its `GenGuest.PrisonerRelease` prefix and, for a slave it jailed, right before the `SetGuestStatus` call that makes it a slave again (API version 2, the join API); Castes reads a hint inside those calls and drops it at the end of the tick.
- `blax.laws.jailed` uses the new-prisoner row like every arrest, and the former-caste record it leaves outlives `formerCasteDays`. `blax.laws.released` gives the old caste back whatever its age.
- Laws writes Maintain only on its own convicts two ticks after the capture, and Release when the sentence is served. Castes never writes a prisoner mode on an arrested colonist ("Default prisoner interaction"), so the two never write the same pawn; Laws' write stays as its own guard.
- Laws' "Confinement for N days" is a sentence that puts a convict into a sentence caste and back. Castes plans that as area 5, step 5 of `docs/features.md`, built after the join API.
- Laws' punishments of daily life are sentence castes: bread and water, hard labour, no recreation, dry, rags, confinement and any caste the player marks "for sentences", each picked per law row and held for N days. Castes plans them as area 5, step 5 of `docs/features.md`, built after the join API: several castes marked "for sentences", and `bool BeginSentence(Pawn, string casteId, int durationTicks)`, `bool EndSentence(Pawn)` and `int SentenceTicksLeft(Pawn)` in the next API version. `BeginSentence` writes the former-caste record the restore already handles; the end tick lives in Castes' save and is checked in the 2500-tick sweep, so a sentence ends even after Laws is removed; Laws' pardon and early release call `EndSentence`. Castes seeds starter sentence castes from vanilla's Paste and Simple food policies, the "no drugs" drug policy and a Work-only schedule, and adds a "Create rags outfit" button. Confinement also needs the allowed area slot (area 1). Without these members Laws shows "Needs Blax Castes" and writes no policy itself. Widened from one confinement caste by Laws' "Decided 2026-12-03", item 4.
### Ownership
@ -736,7 +741,7 @@ The same list stands in all five Blax design docs.
- Zones: sleeping spots, beds by zone, every friendly drop location and per-cell work and path rules (work rule areas); 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), 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. It never sets policies, work priorities, allowed areas, zones or suppression. It keeps its state in one GameComponent.
- 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. A sentence to lose the own bedroom or role unclaims that bed or role for its time and gives it back the same way; Laws never assigns a pawn another bed. Punishments of daily life go through a Castes sentence caste. It never sets policies, work priorities, allowed areas, zones or suppression. It keeps its state in one GameComponent.
### Shared conventions

View File

@ -89,7 +89,7 @@ The sibling mods read castes and tell Castes why a pawn joined. Every step adds
2. **Join API (version 2).** Designed, "Join API (version 2)". `HintJoinReason`, `NotifyJoined`. Waited on by Slaves' recruit and indenture features and Laws' "Castes keeps the caste". Ships after the adult join paths (area 2, step 1), together with the Blax Slaves reasons (area 2, step 3).
3. **PrePick (version 3).** Designed, "PrePick for the trade row (version 3)". Waited on by Slaves' trade-row caste picker. Needs the pre-pick store (area 2, step 4).
4. **Caste values for sibling features (version 4).** New. A sibling feature needs a value per caste (a checkbox or a choice) that the sibling reads for a pawn and applies itself. Asked for by Slaves' backlog (blood donor and indenture term per caste) and Laws' backlog ("may serve in court"). Castes stores the value: a sibling registers it, Castes keeps it per caste, shows it in the caste manager under the sibling's name, copies it on duplicate and exports it with templates, and keeps the keys of a sibling that is missing, like the names of a DLC that is off. The sibling owns its meaning and applies it. A value read when the pawn joins needs one more read member: Castes applies a join one tick after the status change, so while Slaves decides an indenture inside the trade (`Pawn.PreTraded`), `CasteIdOf` still returns the old caste or none; `PendingCasteIdOf(Pawn)` returns the caste a queued join or a pre-pick will give. Built when the first sibling feature needs one.
5. **Sentence caste for Blax Laws.** New, for Laws' "Confinement for N days", a sentence. Laws puts a convict into a caste the player picks for sentences, with that caste's allowed area and work priorities, and returns it to its old caste with `blax.laws.released` when the sentence ends. The convict's status doesn't change, so no join hook sees it; the spec decides whether a third Laws reason sent through `NotifyJoined`, with its own row and a former-caste record, is enough, or whether a new member is needed. Needs the join API (step 2).
5. **Sentence castes for Blax Laws.** New, for Laws' sentence castes, the punishments of daily life. The player marks any number of castes "for sentences"; Laws puts a convict into the one its law row names for N days and back to its old caste when the sentence ends. The next API version adds `bool BeginSentence(Pawn, string casteId, int durationTicks)`, `bool EndSentence(Pawn)` and `int SentenceTicksLeft(Pawn)`. `BeginSentence` writes the former-caste record the restore already handles, and the end tick lives in Castes' save and is checked in the 2500-tick sweep, so a sentence ends even after Laws is removed; Laws' pardon and early release call `EndSentence`. The convict's status doesn't change, so no join hook sees it, and a `NotifyJoined` reason row maps to one caste and carries no end tick, so it can't do this. Castes seeds starter sentence castes: bread and water (vanilla's Paste or Simple food policy), hard labour, no recreation (a Work-only schedule), dry (the "no drugs" drug policy), rags and confinement (the caste's allowed area and work priorities). A "Create rags outfit" button makes the apparel policy the rags caste uses. Confinement also needs the allowed area slot (area 1). A pawn holds one caste, so stacked daily-life punishments need a combined caste. Needs the join API (step 2).
## Order
@ -103,7 +103,7 @@ The sibling mods read castes and tell Castes why a pawn joined. Every step adds
8. Seeing castes (area 3, step 2).
9. Prisoner and slave treatment (area 1, step 2), after the adult join paths, whose arrested reason keeps prisoner modes off your own arrested colonists and imprisoned slaves.
10. DLC settings, then settings that change with the day and the year (area 1, steps 3 and 4).
11. Waiting on a trigger: Combat Extended loadout (a CE 1.7 build), Blax Laws' join reasons (the Laws design accepted), caste values for sibling features (the first sibling feature that needs one), the sentence caste for Laws (after the join API, when Laws builds its confinement step), colony bar groups (demand), multiplayer (a 1.7 build of the Multiplayer mod; the groundwork is in place).
11. Waiting on a trigger: Combat Extended loadout (a CE 1.7 build), Blax Laws' join reasons (the Laws design accepted), caste values for sibling features (the first sibling feature that needs one), the sentence castes for Laws (after the join API, when Laws builds its sentence castes step), colony bar groups (demand), multiplayer (a 1.7 build of the Multiplayer mod; the groundwork is in place).
## Left out
@ -113,4 +113,4 @@ Reasons are in `docs/design.md` "Cut": strict sync mode, a baby autofeed slot, c
1. **Caste values for sibling features (area 5, step 4).** Castes stores the per-caste values sibling mods register (blood donor, indenture term, may serve in court), built when the first sibling feature needs one, because the player then sets up a caste in one window and duplicate and templates carry its values, while the sibling still owns their meaning and applies them.
2. **Default slave interaction mode (area 1, step 2).** Castes owns the mode a new slave starts on, because it sets every other default a new slave gets; Blax Slaves keeps its Recruit and Convert modes and what they do.
3. **Sentence caste for Blax Laws (area 5, step 5).** Laws' confinement is a sentence that puts the convict into a sentence caste for its time, so Castes builds this step for it after the join API.
3. **Sentence caste for Blax Laws (area 5, step 5).** Laws' confinement is a sentence that puts the convict into a sentence caste for its time, so Castes builds this step for it after the join API. Widened by Laws' "Decided 2026-12-03" (Blax Laws `docs/features.md`, item 4): several castes marked "for sentences" instead of one confinement caste, with `BeginSentence`, `EndSentence` and `SentenceTicksLeft`, because Laws' punishments of daily life (bread and water, hard labour, no recreation, dry, rags, confinement) all need policies, schedules or areas that are Castes', and Laws writes none of them itself.