From 88b02ca502f8a5618b7096dffd42d4a2ee0c901e Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Tue, 1 Dec 2026 19:48:12 +0100 Subject: [PATCH] docs: decisions of 2026-12-01 --- docs/design.md | 21 +++++++++++++-------- docs/features.md | 23 ++++++++++------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/docs/design.md b/docs/design.md index 3391d9b..8cccf02 100644 --- a/docs/design.md +++ b/docs/design.md @@ -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-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. +- The ownership list drops its open-question marks: Castes' line keeps the slave interaction mode and the per-caste values, Zones' line reads "per-cell work and path rules", and Laws gives back the slave status a sentence took. + Changes on 2026-12-01, the five Blax plans checked against each other: - The ownership list is the same in all five design docs and has a Laws line. Castes' line names Laws' Maintain only and Release exception and says "colonists, slaves and prisoners", since Defaults writes animals' medical care; parts that wait on an open question name it. @@ -426,7 +431,7 @@ A 1.0 slot is handled in about ten places; the loadout slot alone is read in nin ### Prisoner and slave treatment -The slave interaction default is planned in `docs/features.md` (area 1, step 2) with no spec yet; which mod owns it is open question 2 there. +The slave interaction default is planned in `docs/features.md` (area 1, step 2) with no spec yet; Castes owns it, and Blax Slaves keeps its Recruit and Convert modes and what they do. #### Default prisoner interaction @@ -620,7 +625,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) are an open question in `docs/features.md`, area 5, and the sentence caste for Blax Laws (area 5, step 5) waits on Laws' open question 2. +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. ### Read-only API (version 1) @@ -721,17 +726,17 @@ 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" would put a convict into a sentence caste and back. Castes plans that as area 5, step 5 of `docs/features.md`, only if Fabian says yes to Laws' open question 2. +- 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. ### Ownership -The same list stands in all five Blax design docs. A part that waits on Fabian's answer names the open question. +The same list stands in all five Blax design docs. -- 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. +- 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 and per-caste values other Blax mods register, which those mods apply. +- 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 (Laws' open question 1). 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. It never sets policies, work priorities, allowed areas, zones or suppression. It keeps its state in one GameComponent. ### Shared conventions diff --git a/docs/features.md b/docs/features.md index 981b48c..879724b 100644 --- a/docs/features.md +++ b/docs/features.md @@ -14,7 +14,7 @@ Castes covers the per-pawn settings of humanlike colonists, slaves and prisoners It leaves: -- slave status, trade, suppression, rebellion, slave medicine and the slave interaction modes themselves to Blax Slaves (which mode a new slave starts on is open question 2); +- slave status, trade, suppression, rebellion, slave medicine and the slave interaction modes themselves, Recruit and Convert included, to Blax Slaves (which mode a new slave starts on is Castes', area 1, step 2); - beds, sleeping zones, drop spots and work rule areas to Blax Zones (Zones filters its sleeping zones by caste, Castes has no bed slot); - animals, mechs, storage, bills, buildings and forbid rules to Blax Defaults; - crimes, sentences and court to Blax Laws, which sets the Maintain only and Release modes on colonists it jailed (the shared ownership list carries that exception); @@ -35,7 +35,7 @@ Steps: - Hostility response, self-tend with a minimum Medicine skill, carried medicine with a warning when the colony runs short, and fire at will as the value each draft starts with (vanilla turns it back on at every draft). Needs nothing. 2. **Prisoner and slave treatment.** - Prisoner interaction: Designed, "Default prisoner interaction". The interaction mode a captured enemy gets (Reduce resistance, Enslave, Convert), a second mode for prisoners the first one does not fit (an unrecruitable prisoner in a Recruit caste goes to Enslave instead), plus the bloodfeed and hemogen farm toggles. Never written on a colonist you arrest or a slave you imprison, with or without Blax Laws: they keep the mode vanilla gives them (Maintain only for a colonist never held before). Needs: the captured and arrested reasons of the adult join paths (area 2, step 1). Enslave, Reduce will and Convert need Ideology; bloodfeed and hemogen farm need Biotech; Study and Interrogate need Anomaly. - - Slave interaction: New, open question 2. The mode a new slave starts on: Suppress, No interaction, and Blax Slaves' Recruit and Convert while Slaves is loaded. Vanilla puts every newly enslaved pawn on Suppress (RimWorld/Pawn_GuestTracker.cs:501-503); Castes writes the caste's mode one tick later, on join and assign only, never through the Follow rule. Stored as a defName and resolved with `GetNamedSilentFail`, so `BlaxSlaves_Recruit` and `BlaxSlaves_Convert` work only while Slaves is loaded. Imprison, Emancipate and Execute are never offered, since each acts on the slave once. Castes picks the default, Slaves owns the modes. Needs Ideology. Demand: Slaves' plan sends "policy defaults for new slaves" to Castes, and its Recruit and Convert modes are set by hand on each slave. + - Slave interaction: New. The mode a new slave starts on: Suppress, No interaction, and Blax Slaves' Recruit and Convert while Slaves is loaded. Vanilla puts every newly enslaved pawn on Suppress (RimWorld/Pawn_GuestTracker.cs:501-503); Castes writes the caste's mode one tick later, on join and assign only, never through the Follow rule. Stored as a defName and resolved with `GetNamedSilentFail`, so `BlaxSlaves_Recruit` and `BlaxSlaves_Convert` work only while Slaves is loaded. Imprison, Emancipate and Execute are never offered, since each acts on the slave once. Castes picks the default, Slaves owns the modes. Needs Ideology. Demand: Slaves' plan sends "policy defaults for new slaves" to Castes, and its Recruit and Convert modes are set by hand on each slave. 3. **DLC settings.** Designed, "DLC switches". Room and apparel requirements, psyfocus target and entropy limit (Royalty); hemogen packs and deathrest auto-wake (Biotech). Each row switches off with a "Needs " note without its DLC. 4. **Settings that change with the day and the year.** Both keep several values in one slot and give each member one of them by a rule (its shift, the cold on its map), so every check (the Follow rule, the "*" mark, Reset, "Apply to all members", the former-caste record) compares a member with its own value. - Shift schedules: up to three timetables per caste, members dealt out in turn, night owls first to the shift that sleeps through midday, "Rebalance" spreads them again. Designed, "Shift schedules". @@ -88,8 +88,8 @@ The sibling mods read castes and tell Castes why a pawn joined. Every step adds 1. **Read-only API (version 1).** Designed, "Read-only API (version 1)". `Version`, `Active`, `CasteIdOf`, `CasteLabels`. Waited on by Zones' sleeping zones by caste, Defaults' caste guard for animals and mechs, and Laws' caste checks. 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, open question 1. 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"). Which mod stores the value is the open question. -5. **Sentence caste for Blax Laws.** New, only if Fabian says yes to Laws' open question 2 ("Confinement for N days"). 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). +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). ## Order @@ -101,19 +101,16 @@ The sibling mods read castes and tell Castes why a pawn joined. Every step adds 6. Children (area 2, step 2). 7. Pre-picks (area 2, step 4), then PrePick (area 5, step 3). 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. The slave interaction part once open question 2 is answered. +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 (Fabian's answer and the first sibling feature that needs it), the sentence caste for Laws (Fabian's yes to Laws' open question 2, then Laws' 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 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). ## Left out Reasons are in `docs/design.md` "Cut": strict sync mode, a baby autofeed slot, creating missing vanilla policies, a bed or sleeping-zone slot (Zones), a trade-dialog picker owned by Castes (Slaves), colony-wide presets and emergency mode, Ideology roles, caste mood, precept or stat rules, appearance bundles, guest defaults, a rule engine for assignment, periodic re-sync. Animals and mechs are Blax Defaults'. -## Open questions for Fabian +## Decided 2026-12-01 -1. **Caste values for sibling features (area 5, step 4).** Slaves and Laws want values per caste, such as "blood donor", "indenture term" or "may serve in court". Where should they live? - - Castes stores them: a sibling registers a value, 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. Cost: a registration member in the API, other mods' keys in Castes' save (kept while that mod is missing, like the names of a DLC that is off), and Castes drawing a setting it does not own. - - The sibling stores them, keyed by the token-prefixed caste id, as Zones does for its sleeping zones (it keeps them while Castes is missing). No new API, but the value sits in the sibling's own window, a duplicated caste starts without it and templates do not carry it. - - Either way, 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)` would return the caste a queued join or a pre-pick will give. - - Recommendation: Castes stores them, built when the first sibling feature needs one. The player sets up a caste in one window, and duplicate and templates carry its values; the sibling still owns their meaning and applies them, so no mod writes the other's settings. The shared ownership line in all five docs already lists "per-caste values other Blax mods register, which those mods apply" under Castes, marked with this question; if the sibling stores them, that part leaves the line. -2. **Default slave interaction mode (area 1, step 2).** Castes or Blax Slaves? Recommendation: Castes. It sets every other default a new slave gets and plans the matching prisoner default, and Slaves' plan already sends policy defaults for new slaves to Castes. Slaves keeps its modes and what they do. If Slaves should own it instead, the default moves into Slaves' plan and leaves this one, and the shared ownership line moves it from Castes to Slaves. +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.