From 0ab4c251956cd9863d4135f6811c0bb4595f6552 Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Thu, 3 Dec 2026 17:49:48 +0100 Subject: [PATCH] docs: plan the court place and the punishment catalogue, decisions of 2026-12-03 --- docs/design.md | 344 +++++++++++++++++++++++++++++++++++++++++------ docs/features.md | 96 +++++++++---- 2 files changed, 371 insertions(+), 69 deletions(-) diff --git a/docs/design.md b/docs/design.md index 582bdb0..7a6a7eb 100644 --- a/docs/design.md +++ b/docs/design.md @@ -4,6 +4,17 @@ Write a lawbook and the colony enforces it. Add "Drug binge, wake-up, planning, Status: the first release, 1.0.0, is built (`CHANGELOG.md`); the rest is design. Checked against the RimWorld 1.7.5021 game code on 2026-11-30; the act catalogue (2026-12-01) was checked against the 1.7.5021 reference assemblies, which have every signature and no method bodies, so its behaviour claims are listed under "To verify" until the decompiled code confirms them. RimWorld 1.7, package id `blax.laws`. From the first release a plain unsubscribe leaves a save that loads: jailed colonists stay vanilla prisoners and the log shows 2 errors. +Changes on 2026-12-03, Fabian's request (a room or table as court; many punishments, possibly in named groups, with "Group beating", "Execution corps", "Excommunicate" and "Worse forced food policy" as examples from a full list; jail or any punishment should change the colonist, preferably for the better). Fabian's decisions are in `docs/features.md`, "Decided 2026-12-03": + +- Court place (Court, step 2): a "Court place" switch on any building the player owns and a picker in the Laws tab, one per map, kept as a reference in the component, its room read when used. Courtrooms moved from Court step 4 to step 2. +- Punishment catalogue (Enforcement, step 4): a picker with groups, at most three options per entry, alongside entries and one visible "Instead" entry per row; new entries Shunned, Group beating, Execution corps, Excommunicate and Shaken faith; Apology and Public execution New. `PunishmentDef` and `Law` gain fields with defaults, so 1.0.0 saves load unchanged. +- Punishments in public (Enforcement, step 5): reprimand, beating, execution corps and apology at the court place, a crowd, witness thoughts and deterrence. +- Lose own bedroom and lose role (Sentences, step 1) on the give-back's snapshot. A pardon ends every timed punishment on a case and runs the give-back, a role lost "for good" included (Decided 2026-12-03, item 7). Sentence castes (Sentences, step 2) replace the single confinement caste, with new Castes members (Decided 2026-12-03, item 4). +- Reform (Repeat offenders, step 1): a mood thought, a stat part and a break-weight postfix for a while, and rarely one vanilla trait step away from the vice tied to the act. +- Tone: a capped group beating and vanilla gunfire are planned in, behind "Offer harsh punishments", which is on by default (Decided 2026-12-03, item 1); torture, maiming and torture furniture stay cut. Named punishments are New in Lawbook step 2. +- Fixed: `HarmedMe` is given at Verse/Pawn_HealthTracker.cs:383, not 379-382. +- Fabian accepted all nine recommendations on 2026-12-03 (`docs/features.md`, "Decided 2026-12-03"); the sibling doc changes are done on the siblings' main branches. + Changes on 2026-12-01, Fabian's decisions (`docs/features.md`, "Decided 2026-12-01"): - Jail for slaves gives back slave status at the end of the sentence. Indentured slaves wait for the member Blax Slaves ships with its indentured servitude, which keeps the term running through a Laws sentence. @@ -70,15 +81,15 @@ What the mod covers, by area. Which area and step comes first, and why: `docs/fe | Area | What players get | Needs | Replaces | |---|---|---|---| -| Lawbook | An empty Laws tab. Add a law as Action, Stage, Severity, Punishment and Days, or press "Starter lawbook". The Action comes from a searchable catalogue built from the game's defs. A case log. Later: lawbook templates across saves, laws for one group of pawns | None (castes: Blax Castes) | Rimworld Law and Order (419, 1.6 only, needs Ideology) | +| Lawbook | An empty Laws tab. Add a law as Action, Stage, Severity, Punishment and Days, or press "Starter lawbook". The Action comes from a searchable catalogue built from the game's defs. A case log. Later: lawbook templates across saves, laws for one group of pawns, punishments saved under your own name | None (castes: Blax Castes) | Rimworld Law and Order (419, 1.6 only, needs Ideology) | | Crimes | Every mental break, everything eaten or used, every social interaction, every recorded act and record, every bill, plus fire setting, corpse display, social fights, assault, harming prisoners or slaves, manslaughter, murder, slaughterers and drugs against the policy, DLC and modded content included. Later: prison breaks by Laws' own convicts and slave rebellions, crimes against the faith | None (slaves, most recorded acts, slave rebellion, faith: Ideology) | Law and Order's crimes, its sabotage crime partly. Covers "arrest my own pawn for assault" and "reprimand my own pawn" asked on Prisoner Sentencing (1.3k) and "colonists commit small crimes and get caught" asked on RimCourt (8.8k) | -| Enforcement and punishments | Warn, guilty for N days, subdue (a capped beating that stops a break and never kills), jail, subdue then jail, reprimand, banish and execute after confirmation. Later: talk down, decide myself, Slaves' wardens first for slaves, subdue a pawn that fights back | None (children never beaten: Biotech) | Arresting your own colonist mid-break by hand, which Arrest and Release (4.6k, no 1.7) exists for | -| Sentences | Sentences served on Maintain only and released by a warden. Release gives back the bed, grave, throne, deathrest casket, ideoligion role, mech work modes and the dropped weapon. Pardon, early release, add days. Later, with the sibling mods: Blax Castes keeps the caste, jail for slaves, confinement through Blax Castes | None (role: Ideology; throne: Royalty; casket, mechs: Biotech; slaves: Ideology) | Custom Guilt Duration for colonists (3.4k, no 1.7), Guilty! (302, 1.6) | -| Repeat offenders | A criminal record per pawn, escalating punishments for repeat offences, probation. New, not specced | None | None; parole like Prison Expanded's (3.3k) for colonists | -| Court | "Trial" as a punishment through Ideology's trial. Court sessions on the core game: an appointed judge, a prosecutor and spectators at a place you pick, a verdict that weighs evidence against Social skill, the sentence from the lawbook, "Jail, then trial", an acting judge, a court hour, a removal button. Attorneys, witnesses and a guilty plea. Trials over 1 to 3 days, courtrooms, appeals | None (Ideology's trial: Ideology) | The vanilla trial as the only court (Ideology), Law and Order's trials | +| Enforcement and punishments | Warn, guilty for N days, subdue (a capped beating that stops a break and never kills), jail, subdue then jail, reprimand, banish and execute after confirmation. Later: talk down, decide myself, Slaves' wardens first for slaves, subdue a pawn that fights back, a full punishment catalogue in a picker with options, alongside entries and an "Instead" per row: shunned, group beating, execution corps, excommunicate, shaken faith, apology, public execution, each in private or at the court place before a crowd | None (children never beaten: Biotech; excommunicate, shaken faith, public execution: Ideology) | Beat Your Prisoners (18.2k) for colonists, Execution Mod's (2.6k, no 1.7) public executions and its years of firing-squad requests | +| Sentences | Sentences served on Maintain only and released by a warden. Release gives back the bed, grave, throne, deathrest casket, ideoligion role, mech work modes and the dropped weapon. Pardon, early release, add days. Lose own bedroom, lose role. Later, with the sibling mods: Blax Castes keeps the caste, jail for slaves, sentence castes through Blax Castes (bread and water, hard labour, no recreation, dry, rags, confinement) | None (role: Ideology; throne: Royalty; casket, mechs: Biotech; slaves: Ideology; sentence castes: Blax Castes) | Custom Guilt Duration for colonists (3.4k, no 1.7), Guilty! (302, 1.6) | +| Repeat offenders | A criminal record per pawn, reform (a better mood, a steadier mind and now and then one vice less after a served punishment), escalating punishments for repeat offences, probation | None (traits from genes are skipped: Biotech) | None; parole like Prison Expanded's (3.3k) for colonists; the rehabilitation Law and Order's players ask for | +| Court | "Trial" as a punishment through Ideology's trial. A court place set on any table, spot or throne, its room outlined. Court sessions on the core game: an appointed judge, a prosecutor and spectators at the court place, a verdict that weighs evidence against Social skill, the sentence from the lawbook, "Jail, then trial", an acting judge, a court hour, courtrooms, a removal button. Attorneys, witnesses and a guilty plea. Trials over 1 to 3 days, appeals | None (Ideology's trial: Ideology) | The vanilla trial as the only court (Ideology), Law and Order's trials | | Colony votes | A voting core, law votes with back and veto, pardon petitions, an elected judge with terms, by-elections and recalls (or the leader or moral guide with Ideology), a jury | None (leader as judge, precept stances: Ideology) | None; overlaps Rimocracy (6.3k), which elects leaders and votes on its decisions | -Subscriber counts are current subscribers from the Steam Web API (GetPublishedFileDetails), read on 2026-11-30; "no 1.7" means the item has no 1.7 tag. Needs: "None" means the area runs on the core game, and a DLC in brackets marks the parts that switch off without it (see "DLC support"). Effort marks on features (S = 0.5 days, M = 2, L = 5) are information only; they decide nothing about grouping. +Subscriber counts are current subscribers from the Steam Web API (GetPublishedFileDetails), read on 2026-11-30; "no 1.7" means the item has no 1.7 tag. Needs: "None" means the area runs on the core game, and a DLC in brackets marks the parts that switch off without it (see "DLC support"). Effort marks on features (S, M, L) compare sizes only; they decide nothing about grouping. ## Defaults I picked @@ -92,6 +103,14 @@ Change if you disagree. - Stages: "Planning" (the break has started, nothing done yet) and "Did it". Only break entries have Planning, since the game decides the break type at the moment the break starts and never earlier. A break has "Did it" only when the link table names its act (see "Act catalogue and detection"); every other entry is "Did it" only. No guessing from mood or traits. - Severity is Minor, Moderate, Serious or Grave. It sets the default days (1, 3, 5, 10), orders the case log and weighs in court. Days go from 1 to 50, so a sentence plus the release walk stays inside Blax Castes' default memory of the old caste (60 days). - Punishments: the first release has Warn, Guilty for N days, Subdue, Jail for N days and Subdue then jail; Reprimand, Banish and Execute come in the next release, Trial and "Jail, then trial" with the court. Which entry and stage offers which: the table in "Lawbook tab". Subdue acts only while the offender is still in its break; after the break a Subdue row warns and a Subdue then jail row jails. +- From Enforcement step 4 the Punishment cell opens a picker over the whole catalogue. A row's "Instead" entry is Warn, "Offer harsh punishments" (group beating, execution corps) is on (Decided 2026-12-03, item 1), and every public entry starts "in private". +- Group beating's "How many" is "everyone able", at most 4 beaters at once, because Fabian wrote "each colonist may beat" (Decided 2026-12-03, item 9). The beating goes on until the convict is down, not truly unconscious (Decided 2026-12-03, item 8). +- Pardon ends every timed punishment on the case and runs the give-back, a role taken "for good" included (Decided 2026-12-03, item 7). +- No court place until you set one. The convene dialog and "Court on its own" fall back to the last place used. +- "Reform" is set to "Temporary effects and traits" (Decided 2026-12-03, item 5); "Temporary effects only" and "Off" are the other choices. +- Execution corps: a convict struck but alive walks free and is tended, because the volley was the sentence and Fabian said "if they miss, he may be freed". "A warden finishes it" is a row option. A convict every shot missed always walks free. The squad defaults to 1 shooter at 8 cells, so walking free is a real chance, not a rare one. +- Kind pawns are never picked as beaters or shooters, rather than picked with a mood cost; kin, spouses and lovers of the convict are never picked either. +- Spectators of a public punishment are deterred: for 10 days the break the convict was punished for is half as likely for them, through the same postfix as reform, read only when a break is rolled. It is the deterrence players asked Law and Order for and gives the court place a reason to be used. - Breaks hostile to the colony (the live state's `ForceHostileTo(Faction.OfPlayer)` is true: berserk and berserk warcall in vanilla, Verse.AI/MentalState_Berserk.cs:12-15) offer Warn, Guilty and Jail, never Subdue: the pawn fights back, and vanilla refuses to arrest it (Verse.AI/GenAI.cs:83). Its Jail waits until the break ends or you down it, then arrests or captures it; guilt makes both certain (Verse.AI/GenAI.cs:59-66). Every other break, the aggressive ones included (tantrums, murderous and sadistic rage, slaughterer: `IsAggro` but arrestable and never aimed at the enforcer), offers the full break list. "Subdue a pawn that fights back" (Enforcement, step 3) adds a subdue for hostile breaks that the player starts. - One case per incident. A binge is one case from its start to its end; it moves from planning to did it, and each row fires once per case. A dose count and notes ("on a table", "dug up from a grave") go into the case. - One act, one case. An act that is the did-it of an open break case (a dose during the binge) belongs to that case, and no other row opens a second case for it. When the act also matches a row of its own (a murder during a murderous rage, a dose under "Ate: wake-up"), the case carries out the row with the higher severity, the break's row on a tie, so a "Murder: jail 10 days, Grave" row still applies to the most common colony murder. Outside a break each category files its own case, so "Ate: wake-up" and "Recorded acts: ingested a drug" (Ideology) both catch a dose; the editor shows an overlap hint on rows of different categories that can catch the same act. @@ -127,6 +146,10 @@ All state lives in one `GameComponent_BlaxLaws`. Laws are colony policy across e - `List laws` (deep) and `nextLawId`. A `Law` holds only names and numbers: id, act key (category plus defName or group id, such as `Ate/WakeUp`, `Ate/@humanMeat`, `Break/FireStartingSpree`, `Special/SetFire`), the entry's label and source mod as they read when the row was written, option (a chemical defName or a drug group, binges only), stage and severity as enum names, punishment defName, days, enabled. - `List cases` (deep) and `nextCaseId`. A `Case` holds the offender (pawn reference plus name and ThingID), the victim (same), the law's act key and the defName that matched it (which drug, which recipe), mental state defName for planning cases, stage reached, count, note flags, open tick, status (Open, Enforcing, Jailed, Closed), outcome key, enforcer reference (one enforcement at a time), which stages' punishments ran, the last act tick (shown in the log; the cooldown counts from the open tick), and for jail the capture tick, whether the Maintain only write is done, the release tick, the bed the pawn owned before the arrest job and whether "Arrest now" lifted the hold. - A random int token for ids handed to other mods later, as Castes does. + - From the 2026-12-03 parts, each a new Scribe field with a default, so a save written before them loads unchanged: + - On `Law`: `punishmentOptions` (one string, `key=value;...`, empty means the entry's defaults), `alongside` (a list of PunishmentDef defNames), `instead` (a PunishmentDef defName, default `Warn`) and `where` (`Private` or `CourtPlace`, default `Private`). From Lawbook step 2 `punishment` may also hold `Named/`. + - In the component: the court place per map as `Scribe_References` on the building (see "Court place"), the punishment runs that wait for the court hour, and the reform state: per pawn the expiry ticks of "Paid my debt", the stat part and the break-weight effect, the break def it halves, and the tick of the last trait step. + - On `Case`: the participants of a group punishment (references plus names), the squad result (struck, spared), the reform roll and its outcome, the snapshot fields of "Lose own bedroom and lose role" (shared with the give-back) and the end tick of a timed status punishment. - Pawn references: Castes' pattern. `Scribe_References` with `logNullErrors` off; on save and after load, references to Discarded or destroyed pawns become null and the case keeps the name. Closed cases older than the retention setting (60 days) are pruned on save. - Not saved: the watched-act flags and sets, the act catalogue and the enforcement queue (all rebuilt), the instance cache (a weak reference, as in Castes). - `Game.FillComponents` adds the component to a new game and after loading (Verse/Game.cs:345, 443-446, 472-489), so a save made without Laws loads with an empty book. @@ -134,7 +157,7 @@ All state lives in one `GameComponent_BlaxLaws`. Laws are colony policy across e ### The act catalogue is built from the game's defs, saved as names -- Laws defines no crime list of its own. `ActCategoryDef` (our own Def type, seven of them: Break, Ate, Used, Interaction, RecordedAct, Record, Bill) names an `ActCategoryWorker` that reads the loaded defs once, after def loading, and returns the category's entries: one per def plus its group entries. `ActDef` (our own Def type) is a special act with its own hook and `ActWorker`: SetFire, DisplayedCorpse and StartedSocialFight in the first release, the violent acts and the slaughterer's kill with "Violence" and "Slaughterers", prison break and slave rebellion with the uprisings. `BreakLinkDef` (our own Def type) names a mental state class and the act that counts as its "did it" (see "Act catalogue and detection"). `PunishmentDef` with label, the stages and entry kinds it fits, and a `PunishmentWorker`. The first release ships them in `Defs/BlaxLaws_Categories.xml`, `BlaxLaws_Acts.xml`, `BlaxLaws_BreakLinks.xml` and `BlaxLaws_Punishments.xml`. Another mod can add a `BreakLinkDef` for its own break class with no code. +- Laws defines no crime list of its own. `ActCategoryDef` (our own Def type, seven of them: Break, Ate, Used, Interaction, RecordedAct, Record, Bill) names an `ActCategoryWorker` that reads the loaded defs once, after def loading, and returns the category's entries: one per def plus its group entries. `ActDef` (our own Def type) is a special act with its own hook and `ActWorker`: SetFire, DisplayedCorpse and StartedSocialFight in the first release, the violent acts and the slaughterer's kill with "Violence" and "Slaughterers", prison break and slave rebellion with the uprisings. `BreakLinkDef` (our own Def type) names a mental state class and the act that counts as its "did it" (see "Act catalogue and detection"). `PunishmentDef` with label, the stages and entry kinds it fits, and a `PunishmentWorker`; from Enforcement step 4 it also names its picker `group`, what it `needs` (a DLC or a sibling), whether it is `harsh`, whether it always asks to `confirm`, whether it `canBePublic`, its `harshness` (1 to 4, set against Minor to Grave), its `reformBase` odds and its options (at most three, each a number range or a short list). The first release ships them in `Defs/BlaxLaws_Categories.xml`, `BlaxLaws_Acts.xml`, `BlaxLaws_BreakLinks.xml` and `BlaxLaws_Punishments.xml`. Another mod can add a `BreakLinkDef` for its own break class with no code. - `ActCatalogue` holds the entries: key, label, icon, source mod (`def.modContentPack`, shown as "Core", the DLC's name or the mod's name), category, the stages and punishments the entry offers. It is built once per game start (a few thousand entries with a large mod list; the picker searches it, nothing else walks it) and never saved. - The save names entries only as strings: the act key, resolved through the catalogue. A row whose entry is missing (a DLC drug without its DLC, a removed mod's interaction) stays in the book with its saved label and mod, shows "Needs " or "Missing: " and isn't enforced. It works again when the mod comes back. - The lawbook UI reads the stage list from the entry, so an entry without a planning stage never offers one. @@ -158,6 +181,12 @@ All state lives in one `GameComponent_BlaxLaws`. Laws are colony policy across e - R. `Pawn_RecordsTracker.Increment(RecordDef)` and `AddTo(RecordDef, float)`. Record category; the offender is the tracker's `pawn`. `Time` records are not in the catalogue: they count up on their own every 80 ticks (`RecordsTickInterval`), and if that runs through `AddTo`, the set lookup drops them. Both methods are short; if the decompiled code shows a body small enough for the JIT to inline (see "To verify"), the record category polls instead: every 250 ticks it compares the watched records of free colonists with the last values, unsaved, and loses only the player-order exemption. - B. `RecordsUtility.Notify_BillDone(Pawn billDoer, List products)` (RimWorld/RecordsUtility.cs:52), static, two nested loops, not inlinable. Bill category; the offender is `billDoer`, the recipe `billDoer.CurJob?.RecipeDef` (a null files nothing). `Toils_Recipe.FinishRecipeAndStartStoringProduct` calls it right after `bill.Notify_IterationCompleted` for every bill type, surgery and Biotech's mech gestators included, always with the pawn that finished the bill (Verse.AI/Toils_Recipe.cs:197-200), and nothing else calls `Notify_IterationCompleted`. That method itself isn't patched: `Bill`'s version is empty (RimWorld/Bill.cs:278-280) and `Bill_Medical` calls it as a non-virtual base call the JIT may inline (RimWorld/Bill_Medical.cs:129). - Two more hooks serve the jail, not detection (see "Enforcement runs a tick later"): K on `Pawn_GuestTracker.CapturedBy` and L on `GenGuest.PrisonerRelease`. +- Hooks of the 2026-12-03 parts, each behind its own static flag, so they cost one field read while no court place, punishment run or reform effect exists: + - P. `Building.GetGizmos` (Verse/Building.cs:401), postfix wrapping the iterator: the "Court place" switch ("Court place"). + - T. `PawnDiedOrDownedThoughtsUtility.GetThoughts` (RimWorld/PawnDiedOrDownedThoughtsUtility.cs:73), postfix: strips the death thoughts for a convict the execution corps killed ("Execution corps"). + - W. `MentalBreakWorker.CommonalityFor` (Verse.AI/MentalBreakWorker.cs:11), postfix: halves the weight of a punished or witnessed break ("Reform", "Punishments in public"). + - V. `RestUtility.IsValidBedFor` (RimWorld/RestUtility.cs:160), postfix: refuses a bedroom bed to a convict who lost its bedroom ("Lose own bedroom and lose role"). + - A `StatPart` added to `StatDefOf.MentalBreakThreshold.parts` at startup (RimWorld/StatDef.cs:140; RimWorld/StatPart.cs:7-16; RimWorld/StatDefOf.cs:52), never saved ("Reform"). - Not patched: `MentalState_CorpseObsession.Notify_CorpseHauled` (one store, :47-50), `Pawn_GuiltTracker.Notify_Guilty` (one store, RimWorld/Pawn_GuiltTracker.cs:46-49), `MentalStateHandler.ClearMentalStateDirect` and `MentalState.RecoverFromState`. A break that ends with nothing done is found by the 250-tick sweep over open planning cases instead, which needs no hook. ### Enforcement runs a tick later @@ -187,6 +216,8 @@ All state lives in one `GameComponent_BlaxLaws`. Laws are colony policy across e - Bulk changes ask first and name the count: deleting a law with open cases, the removal button (court sessions). - Every hook body in try/catch with a one-time log; a Laws error never breaks an ingestion, an interaction or a save. - Never prefix a method of a few lines that the JIT may inline. +- A punishment that holds a convict or gathers pawns calls itself off on danger (the rule in "Enforcement runs a tick later"), a break, a drafted or downed participant, a held convict whose vanilla wait job ended, or a court place that fails its `Spawned`, `Faction` or `Destroyed` check while a public run uses it (checked in the lord toil's update): the case stays open, the sweep retries, and nothing of Laws stays on any pawn. Every vanilla wait job Laws starts to hold a convict or a squad (`Wait_MaintainPosture`, `Wait`) has `expiryInterval` 600 with `checkOverrideOnExpire` (Verse.AI/Job.cs:33, 35) and is issued again while the run is live, because `JobDriver_Wait`'s toil never completes on its own (Verse.AI/JobDriver_Wait.cs:54) and a forced job is not re-thought on damage (Verse.AI/Pawn_JobTracker.cs:982). A wait job saved mid-run then ends by itself within 600 ticks after a plain unsubscribe, and with Laws loaded the component's `LoadedGame` (Verse/GameComponent.cs:31) ends the wait jobs of the pawns named in a run the load called off. Children, and with Biotech convicts carrying `HediffDefOf.PregnantHuman` (RimWorld/HediffDefOf.cs:123), are never beaten or shot; quest lodgers and quest helpers (RimWorld/QuestUtility.cs:524, 533) are never convicts of a body, status or death punishment, and slaves, children, pacifists and pawns in a break never take part; the row's "Instead" entry runs for a convict the main one can't take. +- Every punishment's cost is shown before it runs: the picker lists the mood the convict loses and the reform odds, and every dialog of a lethal punishment shows its odds and the colony's thought. - A setting written into defs at startup says "restart required"; the Laws tab toggle writes `MainButtonDef.buttonVisible` live, because the bar counts that field for its width (RimWorld/MainButtonsRoot.cs:15-27) but draws by `Worker.Visible` (:65-81). ### DLC support @@ -216,6 +247,17 @@ Every Blax mod works with any DLC combination, core only included (rule of 2026- | Reprimand, banish, execute | Enforcement 1 | None | Works | | Slaves' wardens first | Enforcement 2 | Ideology, Blax Slaves | No slaves; without Slaves' feature Laws subdues slaves itself | | Subdue a pawn that fights back | Enforcement 3 | None | Works | +| Punishment picker, options, alongside entries, "Instead" | Enforcement 4 | None | Works; entries that need a DLC or a sibling show disabled with "Needs " or "Needs Blax Castes" | +| Shunned, group beating, execution corps, apology | Enforcement 4 | None | Works. Children and pregnant convicts are never beaten or shot (Biotech) | +| Masochist and pain-idealizing convicts take "Instead" | Enforcement 4 | None (the precept: Ideology) | The Masochist check works; the precept check is skipped | +| Excommunicate, shaken faith | Enforcement 4 | Ideology | "Needs Ideology"; Excommunicate's "Instead" is Shunned. In a classic ideoligion certainty doesn't move, so Excommunicate shuns and strips the role only and Shaken faith shows "Needs a non-classic ideoligion" | +| Public execution | Enforcement 4 | Ideology, the Execution ritual in the colony's ideoligion | "Needs Ideology" | +| Punishments in public, witness thoughts and deterrence | Enforcement 5 | None | Works. A Kind or Bloodlust spectator's variant is core | +| Lose own bedroom | Sentences 1 | None | Works. A titled pawn also gets Royalty's bedroom thought (RimWorld/ThoughtWorker_NoPersonalBedroom.cs:13) | +| Lose role | Sentences 1 | Ideology | "Needs Ideology" | +| Sentence castes | Sentences 2 | Blax Castes with its sentence members | "Needs Blax Castes"; Laws writes no policy | +| Reform: thoughts, stat part, break weight | Repeat offenders 1 | None | Works | +| Reform: trait steps | Repeat offenders 1 | None | Works. Gene and suppressed traits are skipped (Biotech) | | Release gives back bed, grave; pardon | Sentences 1 | None | Works | | Release gives back throne | Sentences 1 | Royalty | Skipped | | Release gives back deathrest casket, mech modes | Sentences 1 | Biotech | Skipped | @@ -224,8 +266,10 @@ Every Blax mod works with any DLC combination, core only included (rule of 2026- | Hold for mechanitors, while the give-back is off | Sentences 1 | Biotech | No mechanitors | | Jail for slaves | Sentences 2 | Ideology | No slaves | | Trial through the vanilla trial | Court 1 | Ideology | "Trial" shows disabled with "Needs Ideology" until court sessions make it core | +| Court place on a table, party spot or campfire | Court 2 | None | Works. A throne needs Royalty, a lectern or ritual spot Ideology, since those buildings exist only then | | Court sessions, "Jail, then trial", court hour, removal button | Court 2 | None | Works. A throne as court place needs Royalty, a lectern or ritual spot Ideology | -| Attorneys, multi-day trials, courtrooms | Court 3, Court 4 | None | Works | +| Courtrooms | Court 2 | None | Works | +| Attorneys, multi-day trials | Court 3, Court 4 | None | Works | | Elected judge | Colony votes 2 | None | Works | | Leader or moral guide as judge | Colony votes 2 | Ideology | Option disabled with "Needs Ideology"; a saved choice falls back to elected | | Law votes | Colony votes 1 | None | Works without the precept term | @@ -254,7 +298,7 @@ The specs, grouped by area as in `docs/features.md`, which gives the order and t | The same, with its Violence link | Did it | Warn, Reprimand, Guilty, Jail, Banish, Execute, Trial, Jail then trial. Jail waits as above | | Every entry outside the breaks: ate, used, interactions, recorded acts, records, bills, special acts | Did it | Warn, Reprimand, Guilty, Jail, Banish, Execute, Trial, Jail then trial | - Each punishment shows up once its feature is built: Reprimand, Banish and Execute in the release after the first, Trial with Court step 1, "Jail, then trial" with Court step 2. A berserk state is told apart by its class in the catalogue (`MentalState_Berserk`, `MentalState_BerserkWarcall` and their subclasses, plus an XML list for modded classes), and enforcement re-checks `ForceHostileTo(Faction.OfPlayer)` on the live state, which wins over the catalogue. + Each punishment shows up once its feature is built: Reprimand, Banish and Execute in the release after the first, Trial with Court step 1, "Jail, then trial" with Court step 2. From Enforcement step 4 the Punishment cell opens the punishment picker instead of a dropdown, and the table above is read from each `PunishmentDef`'s `fits` (see "Punishment catalogue and picker"). A berserk state is told apart by its class in the catalogue (`MentalState_Berserk`, `MentalState_BerserkWarcall` and their subclasses, plus an XML list for modded classes), and enforcement re-checks `ForceHostileTo(Faction.OfPlayer)` on the live state, which wins over the catalogue. - Changing Severity resets Days to the new default only while Days still equals the old default. Changing Action or Stage resets a punishment that no longer fits to Warn. - Action, Option and Stage are the row's key. A duplicate is refused and the list jumps to the existing row. @@ -276,7 +320,7 @@ The specs, grouped by area as in `docs/features.md`, which gives the order and t ### Lawbook, step 2: the book across saves and groups -Not specced yet: lawbook templates and "Applies to" (see `docs/features.md`). "Applies to" needs no field reserved now: a Law saved without it loads as "everyone", and keys that are unique on Action, Option and Stage stay unique with a fourth part. +Not specced yet: lawbook templates, "Applies to" and named punishments (see `docs/features.md`). "Applies to" needs no field reserved now: a Law saved without it loads as "everyone", and keys that are unique on Action, Option and Stage stay unique with a fourth part. Named punishments need none either: a preset is a name, a `PunishmentDef` defName, an options string and an alongside list in the component (`List`, `nextNamedId`), and a row saves `Named/` in its existing `punishment` field. A named punishment never becomes a Def: a Def type for presets would be one more def a template or a save could name after an unsubscribe. ### Crimes, step 1: every act the game records @@ -442,7 +486,7 @@ Not specced yet: "anything the colony's ideoligion forbids" and "left the colony - `JobDriver_Subdue`: fail on the target despawned, dead, or no longer in the break its case recorded. One toil, `Toils_Combat.FollowAndMeleeAttack(TargetIndex.A, hit)` (Verse.AI/Toils_Combat.cs:115-178), which follows the target, calls `hit` while adjacent and ends when the target is downed (:165-167) or unreachable (:132-134). The toil runs as a `tickIntervalAction` (:123), which `Thing.DoTick` calls every 1 to 15 ticks depending on how often the camera updates the pawn (Verse/Thing.cs:726-735, bounds :604-606), so counting calls would make the beating up to 15 times slower off screen. The driver keeps a `lastHitTick` field instead (the job is never saved, so the field needs no save) and hits when `Find.TickManager.TicksGame - lastHitTick >= 90`. - The hit: a random body part of the target that isn't missing, has depth Outside, isn't solid, isn't in the head group (torso, shoulders, arms, legs) and doesn't carry or sit below an added part (`hediffSet.PartOrAnyAncestorHasDirectlyAddedParts`, Verse/HediffSet.cs:1225): an injury there gives no pain (Verse/Hediff_Injury.cs:132-135) and only damages the implant. Damage 4 to 8, divided by every factor vanilla multiplies in on the way to the injury: the race's damage multiplier (Verse/Thing.cs:1487-1497, which rounds the amount), the genes' and hediffs' damage factors (Verse/Pawn.cs:1919-1927) and `IncomingDamageFactor`, which applies even with armour ignored (Verse/DamageWorker_AddInjury.cs:164-167; Tough is 0.5, Core Defs/TraitDefs/Traits_Singular.xml:532), so the injury itself is 4 to 8. A factor of 0 ends the job as below. The injury is capped so the part keeps at least half its HP, counted unrounded (`GetPartHealth` rounds to a whole point, Verse/HediffSet.cs:581-605), and so the pawn's injuries, old scars included, stay at nine tenths of the sum vanilla kills at (150 times the health scale, Verse/Pawn_HealthTracker.cs:73, 705-719): the part caps alone add up to about 235 on a human. Nine tenths leaves room for a pawn whose pain is halved (Biotech's reduced pain gene) to go down, at about 128 points. A rounding or another mod's factor that still overshoots a cap is healed back on the hit's bruise (`Hediff_Injury.Heal`, Verse/Hediff_Injury.cs:201-212). `new DamageInfo(DamageDefOf.Blunt, amount, 0, -1, enforcer, part, null, SourceCategory.ThingOrUnknown, target, instigatorGuilty: false)` (Verse/DamageInfo.cs:144), with `SetAllowDamagePropagation(false)` (:260) and `SetIgnoreArmor(true)` (:214) so power armour doesn't make it endless, then `TakeDamage`. Then `enforcer.Drawer.Notify_MeleeAttackOn(target)` (Verse/Pawn_DrawTracker.cs:128), a punch sound and Melee XP. - Blunt on a non-solid part makes a Bruise: no bleeding, pain 0.0125 per point (Core Defs/HediffDefs/Hediffs_Local_Injuries.xml:383-400). A pawn goes down when pain reaches its pain shock threshold (Verse/Pawn_HealthTracker.cs:101), 0.8 for a normal adult, so about 64 points or 11 hits. - - `instigatorGuilty: false` skips vanilla's guilt for harming a player pawn (Verse/Pawn_HealthTracker.cs:321-329). Calling `TakeDamage` directly sets no `meleeThreat`, which a vanilla melee verb would (RimWorld/Verb_MeleeAttack.cs:33-37), so the target doesn't turn on the enforcer. The target does get `HarmedMe` toward the enforcer (Verse/Pawn_HealthTracker.cs:379-382). + - `instigatorGuilty: false` skips vanilla's guilt for harming a player pawn (Verse/Pawn_HealthTracker.cs:321-329). Calling `TakeDamage` directly sets no `meleeThreat`, which a vanilla melee verb would (RimWorld/Verb_MeleeAttack.cs:33-37), so the target doesn't turn on the enforcer. The target does get `HarmedMe` toward the enforcer (Verse/Pawn_HealthTracker.cs:383). - Going down runs `RecoverFromState` (Verse/Pawn_HealthTracker.cs:850-853), which gives the break's `moodRecoveryThought`, Catharsis for the six watched breaks (MentalStates_Mood.xml:76, 103, 413, 539), when the break was mood-caused (Verse.AI/MentalState.cs:92-95). The driver reads that thought def before the hit and, if the hit downed the pawn, removes the memory gained this tick. - The job ends with a message once three hits in a row haven't raised `hediffSet.PainTotal` (Verse/HediffSet.cs:57, which multiplies in pain factors at :1351-1353): go-juice, painkillers, every reachable part at its cap, or the pawn at the total cap (a normal adult goes down at about 64 points, one with halved pain at about 128). A hard ceiling of 40 hits backs that up. A "subdue then jail" row arrests instead, which works on a pawn in any break that isn't hostile to the arrester (Verse.AI/GenAI.cs:73-103, the check at :83). - Aggressive breaks that aren't hostile (tantrums, murderous and sadistic rage, slaughterer) can be subdued: their state targets things, a named victim, prisoners or animals, never the enforcer, and the direct `TakeDamage` gives them no melee threat to answer. The enforcer pick skips the victim a murderous rage names (`MentalState_MurderousRage.target`). @@ -464,7 +508,7 @@ Not specced yet: "anything the colony's ideoligion forbids" and "left the colony - Save while the job runs: the .rws contains no "BlaxLaws_Subdue"; after the reload the enforcer runs another job and the sweep starts a new subdue within 250 ticks. Start `Vomit` with `resumeCurJobAfterwards` on the enforcer mid-subdue, then save: the .rws contains no "BlaxLaws_Subdue" and the enforcer's queue holds no subdue job. - A "subdue then jail" row ends with the pawn a prisoner, never in a medical bed, with a doctor free to rescue. - A forced tantrum and a forced murderous rage with subdue rows: both go down, the enforcer is never attacked and never the rage's named victim. -- **Risks:** Tone: Blax Slaves cut torture and flogging as beyond vanilla's tone. Subdue is a short fistfight to stop a break, closer to vanilla's social fight than to flogging, and the description says so. An enforcer weaker than the offender still wins, since the target never strikes back; accepted for plain subdue. A berserk pawn does strike back, with its weapon; that is why only the player can start a subdue on it ("Subdue a pawn that fights back"). +- **Risks:** Tone: Blax Slaves cut torture and flogging as beyond vanilla's tone. Subdue is a short fistfight to stop a break, closer to vanilla's social fight than to flogging, and the description says so. An enforcer weaker than the offender still wins, since the target never strikes back; accepted for plain subdue. A berserk pawn does strike back, with its weapon; that is why only the player can start a subdue on it ("Subdue a pawn that fights back"). The group beating (Enforcement, step 4) reuses these hits after the break, as a punishment, behind "Offer harsh punishments"; see its Risks. #### Reprimand @@ -513,6 +557,117 @@ New: the outline below; the full spec comes before the step is built. - **Effort:** S. - **Tests:** A forced berserk with a subdue choice: nobody is sent until the button is pressed; after it, the named pawn subdues it; a raid on the map still blocks the button's job. +### Enforcement and punishments, step 4: the punishment catalogue + +Needs step 1's subdue, banish and execute; Excommunicate also needs Sentences step 1's give-back for the role. Fabian's examples of 2026-12-03 map to entries: "Group beating" is Group beating, "Execution corps" is Execution corps, "Excommunicate" is Excommunicate (Shunned on the core game), "Worse forced food policy" is the Bread and water sentence caste (Sentences, step 2). Not specced yet: Apology and Public execution (see `docs/features.md`). Apology needs a situational social thought "Apologized to me" read from the case, offsetting the -15 of `HarmedMe`; Public execution starts the ideoligion's Execution ritual, whose prisoner role takes any `IsPrisonerOfColony` pawn (RimWorld/RitualRolePrisoner.cs:7-21; Ideology Defs/Rituals/Ritual_Behaviors.xml:1781), and its spec checks how a ritual is started from code (see "To verify"). + +#### Punishment catalogue and picker + +- **Players get:** The Punishment cell opens a picker instead of a dropdown: a search field and collapsible groups, Words and mood (Warn, Reprimand, Shunned, Apology), Body (Subdue, Subdue then jail, Group beating, Talk down), Freedom and daily life (Guilty, Jail, Jail then trial, the sentence castes), Status and faith (Lose own bedroom, Lose role, Shaken faith, Excommunicate), Removal (Banish), Death (Execute, Execution corps, Public execution), Court (Trial, Decide myself). Every entry shows what happens, the mood the convict loses, the reform odds for a first offender with a matching vice, and its "Needs" line; the Execution corps row also shows the walk-free chance for its squad and distance. The reason line of "Instead" names why it runs (a child, pregnant, a Masochist, a quest lodger, a missing DLC, sibling or court place). Entries that don't fit the stage, need a missing DLC or sibling, or need "Offer harsh punishments", stay in the list, disabled with the reason. Beside Days a gear button opens the entry's options, at most three, each a number or a short list (who beats, squad size, survivor rule, which sentence caste, where). Below the options: ticks for the alongside entries (Reprimand, Guilty, Shunned, Shaken faith, Lose own bedroom), so "Jail 5 days, also reprimand and guilty" is one row, and the "Instead" entry, Warn by default, which runs for a convict the main entry can't take. The case log names which ran and why. +- **How:** + - `Dialog_PickPunishment : Window`, built like `Dialog_PickAct`: a `QuickSearchWidget` and the groups in a scroll view. It lists every `PunishmentDef` from `Lawbook.PunishmentsFor(entry, stage)` plus the ones that don't fit, each as a `RowChoice` whose `reason` disables it (LawbookUi.PunishmentChoices already draws that), and returns a defName. + - The options window reads the def's option list and writes `Law.punishmentOptions`; an unknown or missing key reads as the default, so a renamed option never breaks a row. `Law.alongside` takes only defs with `runsAlongside`; `Law.instead` only defs that need no DLC, no sibling and no court place, so it never needs a fallback of its own. When "Instead" can't run either, the case is warned. + - When "Instead" runs: a child under a body or death entry; with Biotech, a convict carrying `HediffDefOf.PregnantHuman` (RimWorld/HediffDefOf.cs:123) under a body or death entry, since a beating to nine tenths of the lethal sum passes `Hediff_Pregnant.IsSeverelyWounded` (injury severity above 38 x `baseHealthScale`, Verse/Hediff_Pregnant.cs:34-55) and that brings a miscarriage with a 2-day MTB (:109); a Masochist (`DefDatabase.GetNamedSilentFail("Masochist")`, Core Defs/TraitDefs/Traits_Singular.xml:185; `TraitDefOf` has no field for it) or, with Ideology, a pawn whose ideoligion holds `Pain_Idealized` (Ideology Defs/PreceptDefs/Precepts_Pain.xml:15-37, read through `Ideo.HasPrecept`, RimWorld/Ideo.cs:1307) under a beating, since pain gives it mood (Core Defs/ThoughtDefs/Thoughts_Situation_Traits.xml:5-30); a quest lodger or helper (RimWorld/QuestUtility.cs:524, 533) under any body, status or death entry; a missing DLC or sibling; a public entry with no court place. The hard-coded fallbacks of step 1 (a child's subdue becomes jail or warn) stay as they are for Subdue, the one entry the first release ships with them. + - "Offer harsh punishments" (setting, on): off, it disables Group beating and Execution corps in the picker; rows that already use them keep them, show a warning icon, and run "Instead". + - Severity still sets the default days, the reprimand stage and the court weight. `harshness` on each def (Warn 1, Talk down 1, Apology 1, Reprimand 1, Guilty 2, Jail and sentence castes 2, Shunned 2, Shaken faith 2, Lose own bedroom 2, Subdue 2, Subdue then jail 2, Group beating 3, Lose role 3, Excommunicate 3, Banish 4, Execute 4, Execution corps 4, Public execution 4; Trial, Jail then trial and Decide myself take the harshness of the punishment they end in) is set against the row's severity (Minor 1 to Grave 4) for reform; the picker shows "harsher than the act" when it is above. + - Rows saved before this step have no options, no alongside, `instead` Warn and `where` Private, which is exactly what they did. +- **Settings:** "Offer harsh punishments" (on). +- **Save and removal:** Names and numbers on `Law`. After removal the rows go with the component. +- **Overlaps:** Prisoner Sentencing (1.3k) offers a pickable list for prisoners; Laws offers one for colonists. Beat Your Prisoners (18.2k) and More Executions (1.2k) add their own; More Executions' methods apply to Laws' executions like any other. +- **Replaces:** The 150 px dropdown of step 1. +- **Effort:** M for the picker and options, S for alongside and "Instead". +- **Tests:** A 1.0.0 row loads with Warn as "Instead", no alongside entries and Private. Ticking Reprimand and Guilty beside Jail runs all three on one case. A Group beating row on a child runs "Instead"; on a Masochist the same; on a quest lodger the same; with Biotech, on a pregnant convict the same, and so does an Execution corps row. With "Offer harsh punishments" off the picker shows Group beating disabled with the reason, and an existing row warns and runs "Instead". In a `-NoDlc` run Excommunicate shows "Needs Ideology" and its row runs Shunned. An unknown option key reads as the default and logs nothing. +- **Risks:** About 25 entries; the picker draws only visible rows, as the act picker does. A row's alongside list can make one case run four punishments; the case log lists each. + +#### Shunned + +- **Players get:** For the row's days every colonist thinks less of the convict ("Shunned", -20 opinion) and the convict feels it ("Shunned by the colony", -6 mood). It is the core-game form of excommunication and runs alongside any main entry. A pardon ends it at once (see "Pardon, early release and longer sentences"). +- **How:** Two situational ThoughtDefs of our own. The social one's worker overrides `CurrentSocialStateInternal(p, other)` (RimWorld/ThoughtWorker.cs:53) and is active when `other` is in the component's `HashSet` of shunned pawns and `p` is a free colonist other than the convict; vanilla checks every situational social def per pawn pair (RimWorld/ThoughtUtility.cs:11-18), so the worker reads one static bool first and costs one field read per pair while nobody is shunned. The mood one reads the same set. The end tick lives in the case; the 2500-tick sweep removes the pawn from the set. +- **Settings:** None beyond the row. +- **Save and removal:** Situational thoughts aren't saved (RimWorld/ThoughtHandler.cs:30-33). After removal both thoughts are simply gone. +- **Overlaps:** None. +- **Replaces:** Nothing. +- **Effort:** S. +- **Tests:** A 3-day Shunned row: every colonist's opinion of the convict drops by 20 and the convict has the mood thought; both end after 3 days, survive phase 2 with the same time left, and the .rws holds no "BlaxLaws" thought. Performance run with 60 colonists and nobody shunned: no measurable cost. + +#### Group beating + +- **Players get:** Fabian's "Group beating". A held convict is beaten in turns by its beaters until it goes down in pain: bruises on torso and limbs, never the head, never a bionic part, never a scar, never death. A message names the beaters; they walk up and punch, with the melee animation and the punch sound. The convict lies "beaten down" (Decided 2026-12-03, item 8; not "unconscious": pain takes at most 0.4 off Consciousness, RimWorld/PawnCapacityWorker_Consciousness.cs:12, and a pawn is unconscious below 0.3, Verse/PawnCapacitiesHandler.cs:25-33), doctors tend it, and its Social tab shows "harmed me" -15 toward each beater for 10 days. Options: who beats (wardens, the default; anyone able; the victim first, then volunteers), how many (2, 3 or 4, or "everyone able", Fabian's "each colonist may beat": every colonist on the map who may beat takes one turn in order, at most 4 at once, until the convict goes down, with the same caps; the default is "everyone able", Decided 2026-12-03, item 9) and, from step 5, where. Harsh. +- **How:** + - Held convict: a jailed convict is beaten in its cell; a convict still in its break is beaten under Subdue's break rule; a free convict out of its break gets the vanilla `JobDefOf.Wait_MaintainPosture` job (RimWorld/JobDefOf.cs:18), started like Laws' other jobs with a 600-tick expiry and issued again while the beating runs (see "Rules every feature follows"), and ended when the beating ends. Without that the convict walks off: damage re-thinks only jobs that aren't player-forced (Verse.AI/Pawn_JobTracker.cs:982-988). + - Beaters: the enforcer pick of "Enforcement runs a tick later" plus violence (`WorkTagIsDisabled(WorkTags.Violent)`, Verse/Pawn.cs:4553), never Kind (`TraitDefOf.Kind`, RimWorld/TraitDefOf.cs:20), never the convict's family by blood (`relations.FamilyByBlood`, RimWorld/Pawn_RelationsTracker.cs:102), spouse or lover. Bloodlust and Psychopath pawns (RimWorld/TraitDefOf.cs:38, 16) come first among volunteers. "The victim first" reads the case's victim. At most 4 at once, since each needs an adjacent cell (`FollowAndMeleeAttack` hits only when `CanReachImmediate`, Verse.AI/Toils_Combat.cs:115-170). + - The job: the existing `BlaxLaws_Subdue` JobDef and `JobDriver_Subdue`, with the case's participant list in place of its single enforcer and a "held" variant whose fail condition is the convict leaving its hold, not its break. It stays non-suspendable and hidden from the save ("The subdue job never enters a save"). Hits are `SubdueHits` unchanged, so the caps (half the HP per part, nine tenths of the lethal sum, Verse/Pawn_HealthTracker.cs:73) read the convict's live injuries and hold for any number of beaters. Bruise has no scar, bleed or infection comp (Core Defs/HediffDefs/Hediffs_Local_Injuries.xml:383-400). The first hit that downs the convict (`ShouldBeDowned`, Verse/Pawn_HealthTracker.cs:642-648) ends every beater's job; the "no pain" ending (three painless hits in a row, 40 hits) counts hits per case, not per beater. + - Each hit gives the convict vanilla `HarmedMe` toward that beater (Verse/Pawn_HealthTracker.cs:383; -15 opinion, 10 days, one per other pawn, Core Defs/ThoughtDefs/Thoughts_Memory_Social.xml:195-207). That is the punishment's social price, named in the picker. A social fight (RimWorld/Pawn_InteractionsTracker.cs:373-381) or a vanilla melee verb isn't used: the convict would hit back (RimWorld/Verb_MeleeAttack.cs:34-38) and fists can hit the head. + - No Ideology precept judges a beating and no HistoryEventDef is added (it would be saved in a `DefMap`). +- **Settings:** "Offer harsh punishments". +- **Save and removal:** Nothing saved on any pawn; the participant list in the case. The wait job is vanilla. +- **Overlaps:** Beat Your Prisoners (Continued) (2902220334, 18.2k) beats prisoners with its own work type; Laws beats colonists with no work type. War Crimes Expanded 2's torture stays theirs. +- **Replaces:** Nothing. +- **Effort:** S for the participant list and the held variant, S for the pick and options. +- **Tests:** A did-it case with a 3-beater group beating on a free colonist: three beaters, the convict on `Wait_MaintainPosture` until down, only Bruise injuries, every part at half HP or more, injuries at nine tenths of the lethal sum or less, `HarmedMe` toward each beater, no beater guilty, the convict's `meleeThreat` null. A Kind colonist and the convict's spouse are never picked. The same in a cell for a jailed convict. "Everyone able" with 7 eligible colonists: each takes a turn, never more than 4 adjacent at once. Save mid-beating: the .rws holds no "BlaxLaws_Subdue"; after the load, with Laws loaded and without it, the convict takes a normal job within 600 ticks. A go-juice convict ends with one message after three painless hits. A raid calls it off; the case waits. +- **Risks:** Tone: this lifts "no flogging" for one capped entry (Decided 2026-12-03, item 1); it reuses Subdue's caps and sits behind "Offer harsh punishments". Several beaters can sour the convict on several wardens at once, which can feed a social fight; the picker says so. Heavily bionic or painless convicts may never go down and get the "no pain" ending. + +#### Execution corps + +- **Players get:** Fabian's "Execution corps". Always confirmed in a dialog that names the squad, the distance and the chance that every shot misses. The convict walks to a wall, the squad of 1 to 6 colonists with their own guns takes its marks, aims (the warm-up lines show) and starts one volley; once the convict goes down, a shooter still aiming holds fire. Dead: the colony gets the same -2 "justified execution" as a cut execution (Decided 2026-12-03, item 2). Every shot missed: the convict walks free, pardoned, with "Spared by the squad" and the best reform odds. Struck but alive: by default free and tended too ("Defaults I picked"); the row option "A warden finishes it" sets vanilla's execution instead. The dialog says that a struck survivor may still die of its wounds, and that such a death counts as the execution. Options: squad size (1 to 6, default 1, Fabian's "shoot 1 time"), distance (5 to 10 cells, default 8), struck survivor (walks free / a warden finishes it). The defaults keep walking free a real chance; the picker row and the dialog show the figure for the row's squad and distance. Harsh. +- **How:** + - Placing: a standable cell next to a building whose `def.Fillage` is Full (Verse/ThingDef.cs:607), with standable cells for the squad at the set distance from which `Verb.CanHitTargetFrom` (Verse/Verb.cs:717) holds, since `Stance_Warmup` drops a shooter's aim without it (Verse/Stance_Warmup.cs:199-203): the wall nearest the court place when the row's "where" is the court place (step 5), else the wall nearest the convict. A prison cell is usually too small for a squad at 5 cells or more, so a jailed convict is brought out of its cell by a warden to the wall nearest its cell that passes the check (vanilla `DeliverToCell`, the job `JobGiver_DeliverPawnToCell` gives, RimWorld/JobGiver_DeliverPawnToCell.cs:35; see "To verify"). When no wall within reach passes, the confirm dialog refuses with "No room to stand the squad". A free convict walks there itself (forced vanilla `Goto`, then `Wait_MaintainPosture`, RimWorld/JobDefOf.cs:10, 18); shooters stand in a row at the distance on vanilla `Wait` (:14). Every wait job has the 600-tick expiry of "Rules every feature follows". A private run needs no lord; Laws drives it from the component's tick while it runs and never saves it, so a load mid-run calls it off, the component's `LoadedGame` ends the saved wait jobs of the convict and the squad, and the case waits for a new confirm. + - The wall gives the convict no cover, since cover only counts within 65 degrees of the shooter's direction (Verse/CoverUtility.cs:48-100), and it stops the misses that fly through it (Verse/Projectile.cs:355-361). A wild miss gets a new destination in a random direction around the convict, only forward of the shooter (Verse/ShootLine.cs:25-40, from Verse/Verb_LaunchProjectile.cs:155), so it can land beside or short of the convict and damage a building or item there, never a pawn (`preventFriendlyFire` and no `NonTargetPawns`, below). The placing rule prefers a wall with open ground on both sides. + - Shooters: free adult colonists able to do violence, never Kind, never kin, spouse or lover of the convict, holding a ranged weapon whose verb (`equipment.Primary`, Verse/Pawn_EquipmentTracker.cs:16; `CompEquippable.PrimaryVerb`, Verse/CompEquippable.cs:15) has `ForcedMissRadius` of 0.5 or less and doesn't `CausesExplosion` (Verse/VerbProperties.cs:284, 300). A burst weapon counts as `BurstShotCount` shots (Verse/Verb.cs:243) in the odds. + - The volley: Laws starts every shooter's cast in the same tick, each with `verb.TryStartCastOn(convict, surpriseAttack: false, canHitNonTargetPawns: false, preventFriendlyFire: true)` (Verse/Verb.cs:319). The shots still don't land together: each shooter warms up for `WarmupTime` x `AimingDelayFactor` (Verse/Verb.cs:349-357), which differs by weapon and pawn, and once the convict is downed, `Stance_Warmup` cancels every warm-up that started while it stood (Verse/Stance_Warmup.cs:194-197), so those shooters hold fire. The run ends when every shooter has fired or been cancelled. With that flag every branch of `Verb_LaunchProjectile.TryCastShot` drops `NonTargetPawns` (Verse/Verb_LaunchProjectile.cs:140-142, 159, 171, 179), so no spectator can be hit (Verse/Projectile.cs:449-495). `AttackStatic` and `Pawn.TryStartAttack` aren't used: they force `canHitNonTargetPawns` true (Verse/Pawn.cs:2970-2983). The direct cast skips two vanilla checks, so Laws runs both itself: the Violent work tag, and with Ideology `new HistoryEvent(HistoryEventDefOf.ExecutedColonist, shooter.Named(HistoryEventArgsNames.Doer)).Notify_PawnAboutToDo_Job()` (RimWorld/IdeoUtility.cs:109), as `WorkGiver_ExecuteGuiltyColonist` does (:43); a refusing shooter is left out. + - Guilt of the shooters: a bullet from an undrafted shooter carries `instigatorGuilty` (RimWorld/Bullet.cs:22-23), and a hit on a pawn whose home faction is the player's makes the shooter guilty (Verse/Pawn_HealthTracker.cs:321-329). The shooters stand undrafted on `Wait`, so before the volley Laws stores each shooter's `IsGuilty` and `TicksUntilInnocent` (RimWorld/Pawn_GuiltTracker.cs:15, 31), and after the run ends it writes them back with `Notify_Guilty(ticks)` (:46), `Notify_Guilty(0)` for one who wasn't guilty. No shooter carries guilt from the volley. + - Guilt of the convict: Laws calls `convict.guilt.Notify_Guilty()` (RimWorld/Pawn_GuiltTracker.cs:46) when the volley starts, so a convict whose guilty days ran out in jail or while the volley waited for the court hour is still guilty at death; "Walks free" clears it again. + - Odds: p per shot is `ShotReport.HitReportFor(shooter, verb, convict).TotalEstimatedHitChance` (Verse/ShotReport.cs:78, 82); the chance of walking free is the product of (1 - p) over every shot. That holds although shooters hold fire after a downing hit, because a full miss means nobody downed the convict, so every shot was taken. The picker row and the confirm dialog show an estimate, and the "Fire" step, once everyone stands at its mark, shows the exact figure from their real cells. The distance stays 5 cells or more. + - A convict wearing a shield belt (`CompShield`, RimWorld/CompShield.cs:9): the dialog won't start and says to take it off. Laws never takes apparel itself. + - Hit or miss: after every shooter has fired or been cancelled and the last projectile has landed, Laws compares `mindState.lastRangedHarmTick` (Verse.AI/Pawn_MindState.cs:133) with the volley's start tick. A downed convict counts as struck. + - Dead: a bullet is no execution, since only ExecutionCut has `execution` true (Core Defs/DamageDefs/Damages_Medical.xml:19-23), so vanilla would give `WitnessedDeathAlly` -5, `KnowColonistDied` -3 and killed-my-relation thoughts aimed at one shooter (RimWorld/PawnDiedOrDownedThoughtsUtility.cs:161-216, 274-300). Hook T, a postfix on `GetThoughts` (:73), strips `WitnessedDeathAlly`, `WitnessedDeathNonAlly` and `KnowColonistDied` from both output lists and turns the relation thoughts aimed at the shooter into the plain death ones, only for a victim in the component's `HashSet` of squad victims; it returns after one bool read while the set is empty. Then Laws calls `ThoughtUtility.GiveThoughtsForPawnExecuted(victim, squadLeader, PawnExecutionKind.GenericBrutal)` (RimWorld/ThoughtUtility.cs:21), which gives stage 0 only while the victim `IsGuilty` (:28-41), hence the guilt set at the volley's start. + - A struck survivor stays in the squad-victim set until its `hediffSet.BleedRateTotal` (Verse/HediffSet.cs:69) is 0 or for 2 days, whichever comes first. A death in that window is the volley's death: hook T strips the death thoughts as during the run, and on the next tick Laws sets guilt on the dead convict again and calls `GiveThoughtsForPawnExecuted` as above. + - Walks free: Pardon, `Notify_Guilty(0)` and `awaitingExecution = false` (RimWorld/Pawn_GuiltTracker.cs:9, 46-49); a jailed convict gets Release. The case closes as "Spared". "Spared by the squad" is a situational thought (+10 for 10 days) read from the case. A struck survivor keeps vanilla `HarmedMe` toward each shooter who hit. + - "A warden finishes it": `awaitingExecution` for a free convict, which `WorkGiver_ExecuteGuiltyColonist` carries out with the cut (RimWorld/WorkGiver_ExecuteGuiltyColonist.cs:31-48; RimWorld/JobDriver_ExecuteGuiltyColonist.cs:16-30), or the vanilla Execution mode for a jailed one. + - Abort: danger, a break, a dropped wait job or a shooter drafted before the volley ends the run; the case stays open and nothing stays on any pawn. +- **Settings:** "Offer harsh punishments". +- **Save and removal:** The run isn't saved; the case records the result. Projectiles, wounds and thoughts are vanilla. +- **Overlaps:** Execution Mod (2186151886, 2.6k, 1.1 and 1.2 only) had public executions and years of unanswered firing-squad requests. More Executions (3819037971) has the electric chair, guillotine and gallows with art; the execution corps uses the colonists' own guns and no building. +- **Replaces:** Nothing. +- **Effort:** M. +- **Tests:** With a test seed: a 4-shooter volley at 6 cells, the shown odds match the product of the hit reports. No shooter is guilty after a volley that hits, and a shooter guilty before keeps its old time left. With shooters of different warm-ups, the first downing hit cancels the others and the run still ends with one result. A convict jailed past its guilt, shot dead, gives `KnowColonistExecuted` stage 0. A struck survivor that bleeds out within 2 days gives the execution thoughts, not `WitnessedDeathAlly`. A jailed convict in a 3 by 3 cell is brought out to a wall with room for the squad; with no such wall the dialog refuses. Save mid-volley: after the load, with Laws loaded and without it, the convict and the shooters take normal jobs within 600 ticks. Spectators standing beside the line of fire are never hit over 50 seeded volleys. A dead guilty convict gives every colonist `KnowColonistExecuted` stage 0 and no `WitnessedDeathAlly` or `KnowColonistDied`; its spouse keeps its grief. A forced full miss leaves the convict free, not guilty, with "Spared by the squad". A forced hit that leaves it alive frees it by default and sets `awaitingExecution` with the option. A pacifist with a rifle is never in the squad. A shield belt blocks the dialog. A raid mid-run calls it off. +- **Risks:** A jailed convict is a prisoner, so `TryGiveThoughts` also records the prisoner-death events before `GetThoughts` (RimWorld/PawnDiedOrDownedThoughtsUtility.cs:17-63), and Ideology precepts react to an executed prisoner, not a colonist (see "To verify"). A miss that frees is a gamble, not justice: it is always confirmed, never automatic, and the odds are shown. Misses damage the wall, and wild misses beside or short of the convict can damage furniture and items standing there. + +#### Excommunicate and shaken faith + +- **Players get:** Fabian's "Excommunicate", with Ideology: the convict is shunned (see "Shunned"), stripped of its ideoligion role for the row's days or for good (option), and its certainty drops by 20, 40 or 60 points (option, default 60), shown as the floating "Certainty 80% -> 20%" text. It keeps its ideoligion, its spouse and its bed. Certainty grows back with mood on its own, and a converter has an easy time with the convict meanwhile. "Shaken faith" is the certainty cut alone (20, 40 or 60), as a main or alongside entry. A pardon ends the shunning and gives the role back if nobody holds it, "for good" included; the certainty cut isn't given back and grows back with mood. Without Ideology both show "Needs Ideology", and Excommunicate's "Instead" is Shunned. +- **How:** + - Certainty: `pawn.ideo.OffsetCertainty(-x)` (RimWorld/Pawn_IdeoTracker.cs:360), behind `ModsConfig.IdeologyActive`, since the method's `ModLister.CheckIdeology` (:362) is an install check. It does nothing in a classic ideoligion (:362), so there the entry only shuns and strips the role, and Shaken faith shows disabled. A certainty of 0 or less is re-rolled at random on load (:413-416), so if the result is below 1%, Laws calls `Reassure` (:355) by the difference. Certainty rises with mood by itself (`ConversionTuning.CertaintyPerDayByMoodCurve`, RimWorld/ConversionTuning.cs:37-42). + - Role: the role give-back of "Lose own bedroom and lose role". + - `SetIdeo` is never called: it records `ChangedIdeo`, can unclaim the bed and removes spouses and bonds, and switching back undoes none of it (RimWorld/Pawn_IdeoTracker.cs:183-241). +- **Settings:** None beyond the row. +- **Save and removal:** Certainty is vanilla; the role snapshot is in the case. After removal a role held back for the row's days stays lost; the player assigns it again by hand. +- **Overlaps:** None. +- **Replaces:** Nothing. +- **Effort:** S. +- **Tests:** With Ideology: a 60-point cut on a pawn at 80% leaves 20%; on a pawn at 30% leaves 1% or more, and after phase 2 the same value, not a re-roll. A classic-mode run leaves certainty untouched and the role stripped. A `-NoDlc` run shows "Needs Ideology" and runs Shunned. + +### Enforcement and punishments, step 5: punishments in public + +Needs step 4 and Court step 2's court place and session lord. + +#### Punishments in public + +- **Players get:** Reprimand, Group beating and Execution corps gain "Where: in private / at the court place"; Apology gains it once Apology is built. At the court place the case waits for the court hour (the "Court hour" setting now times these too) or for "Carry out now" in the Cases tab. The convict is brought to the place, the punishers walk up, and free colonists gather and watch, seated in chairs facing the table or standing behind them. A reprimand becomes a public reprimand: the judge, or else the leader, speaks in bubbles for about an hour and the convict's thought is one stage harsher. A "Call off" button sits on the court place and on the case in the Cases tab while it runs. Spectators get "Saw justice done" for a day (+2; a Kind spectator at a beating or a shooting -4; a Bloodlust spectator +4), and for 10 days the break the convict was punished for is half as likely for them. +- **How:** + - `LordJob_BlaxPunishment`, a sibling of `LordJob_BlaxCourtSession` on `LordJob_Joinable_Gathering` (RimWorld/LordJob_Joinable_Gathering.cs:7; its abstract `CreateGatheringToil`, :38, is filled with Laws' own toil). Core duties only: for a jailed convict a warden gets DeliverPawnToCell (Core Defs/DutyDefs/Duties_Rituals.xml:55) with `focus` the convict's cell and `focusSecond` the convict, and carries or leads it there (`JobGiver_DeliverPawnToCell` reads the pawn from the holder's `focusSecond` and gives the holder a `DeliverToCell` job, RimWorld/JobGiver_DeliverPawnToCell.cs:20-36); a free convict gets ArriveToCell itself (:5), as the punishers and the speaker do; Spectate around the place for the crowd (Core Defs/DutyDefs/Duties_Gatherings.xml:55), with `PawnDuty.spectateRect` set to the place's `OccupiedRect()` (Verse.AI/PawnDuty.cs:21-25), as `LordToil_Speech` does (RimWorld/LordToil_Speech.cs:20-24), so `SpectatorCellFinder` uses the chairs facing it (RimWorld/SpectatorCellFinder.cs:18, 147), and SpectateCircle (Duties_Gatherings.xml:67) for a beating. `DutyDefOf` has `Spectate` (RimWorld/DutyDefOf.cs:126) but no ArriveToCell, DeliverPawnToCell or SpectateCircle, so Laws reaches those core defs through its own `[DefOf]` class. Laws adds no DutyDef, as for court sessions. + - The violence inside runs from the lord toil: the group beating's jobs and the execution corps' volley, as in private, with the wall nearest the place. That state is never saved, so on load (the LordJob's `ExposeData` in `PostLoadInit`, or its first `LordJobTick`) a `LordJob_BlaxPunishment` whose toil is past the gathering stage ends its lord: the case stays open, and an execution corps needs a new confirm, so a load never fires a second volley. A lord still gathering keeps running. + - The lord takes the court place with `Lord.AddBuilding` (Verse.AI.Group/Lord.cs:455), so `Building.GetGizmos` finds it through `GetLord` (Verse.AI.Group/LordUtility.cs:18; Verse/Building.cs:441-449). The toil's update re-checks the place's `Spawned`, `Faction` and `Destroyed` and ends the lord when one fails (the call-off rule in "Rules every feature follows"); the case waits. + - One gathering at a time: a waiting public punishment checks `GatheringsUtility.AnyLordJobPreventsNewGatherings` (RimWorld/GatheringsUtility.cs:123) and waits for the next court hour while a party, ritual or session runs. Speech bubbles through `MoteMaker.MakeInteractionBubble` (RimWorld/MoteMaker.cs:181), as for court sessions. + - "Call off" comes from the toil's `GetBuildingGizmos` (Verse.AI.Group/LordToil.cs:84), which vanilla calls from `Building.GetGizmos` for a building its lord owns, so no patch, and from a button on the case in the Cases tab, which needs no building. + - Witness effects: spectators the lord held at the end go into a component list with an end tick. "Saw justice done" is a situational thought reading it. Deterrence is hook W: the postfix on `CommonalityFor` multiplies by 0.5 when the pawn is in the witness list for that break def; it runs only when a break is rolled (Verse.AI/MentalBreaker.cs:311-328) and reads one bool while the list is empty. +- **Settings:** "Court hour" (shared with "Court on its own"). +- **Save and removal:** A running public punishment is a vanilla lord with our LordJob class, like a session, so the removal button ends it ("Remove Blax Laws from a game"). Witness lists and thoughts vanish after removal. +- **Overlaps:** Party and ritual mods block a public punishment while their gathering runs. Ideology's execution, duel and mutilation rituals stage punishments the same way. +- **Replaces:** Nothing. +- **Effort:** M for the lord, S for the witness effects. +- **Tests:** A public reprimand in a `-NoDlc` run at a table: the convict reaches the place, at least three spectators sit or stand around it, the convict's thought is one stage harsher, and every spectator has "Saw justice done". A Kind spectator at a beating has -4. A witness's weight for the punished break is half for 10 days, then whole. A party running at the court hour makes it wait for the next day. A drafted punisher calls it off. Deconstructing the table mid-reprimand ends the lord and the case waits. A save in a public beating's violence toil: after the load the lord has ended and the case waits. Phase 3 with a public punishment running and the removal button pressed: no Laws error and no lord left with our job. + ### Sentences, step 1: serve and come back #### Jail for N days @@ -560,17 +715,32 @@ New: the outline below; the full spec comes before the step is built. #### Pardon, early release and longer sentences -- **Players get:** On a jailed case: "Release now", "Add days" and "Pardon" (ends guilt, releases, closes the case as pardoned). On an open case: "Pardon". A pardon never needs a warden's walk when the pawn isn't jailed. -- **How:** Release uses the same Release mode as a served sentence. Pardon is `Notify_Guilty(0)` and `awaitingExecution = false` (RimWorld/Pawn_GuiltTracker.cs:9, 46-49). "Add days" stops at 50 days in total while Castes' API version 2 isn't bound, so the pawn stays inside Castes' 60-day memory of its old caste; with version 2 the `blax.laws.jailed` hint keeps that memory however long the sentence runs. -- **Save and removal:** Only the case's fields change. +- **Players get:** On a jailed case: "Release now", "Add days" and "Pardon". On any other open case: "Pardon". On a closed case whose role was taken "for good": "Pardon", until "Keep closed cases" prunes the case. "Release now" ends only the confinement, jail or a sentence caste; the case's other timed punishments run on. "Pardon" is the way out of everything: it ends guilt and every timed punishment on the case at once (jail, Guilty, Shunned, Lose own bedroom, Lose role, a role taken "for good" included, Excommunicate's shunning and role, and a sentence caste), runs the give-back, so the bed and role come back if nobody else holds them, and closes the case as pardoned. Certainty lost to Excommunicate or Shaken faith isn't given back; it grows back with mood. A pardon gives no reform roll, since nothing was served. A pardon never needs a warden's walk when the pawn isn't jailed. Decided 2026-12-03, item 7. +- **How:** Release uses the same Release mode as a served sentence. Pardon is `Notify_Guilty(0)` and `awaitingExecution = false` (RimWorld/Pawn_GuiltTracker.cs:9, 46-49), then, in the same tick, it sets every end tick on the case to now, removes the pawn from the component's shunned and bedroom-loser sets, calls Castes' `EndSentence` for a sentence caste (once Castes' sentence members are bound), and runs the give-back of "Release gives back what jail took" on the case's snapshot, the role included even with "For good". A pardoned jailed convict is released as for "Release now". "Add days" stops at 50 days in total while Castes' API version 2 isn't bound, so the pawn stays inside Castes' 60-day memory of its old caste; with version 2 the `blax.laws.jailed` hint keeps that memory however long the sentence runs. +- **Save and removal:** Only the case's fields change. A case closed with a role taken "for good" keeps its snapshot until it is pruned; after that, or after removal, only a manual reassign gives the role back. - **Overlaps:** None. - **Replaces:** Nothing. - **Effort:** S. -- **Tests:** "Release now" releases within a warden's trip; "Add days" moves the release tick and, without Castes' API version 2, stops at 50 days in total; "Pardon" leaves `IsGuilty` false and the case closed. +- **Tests:** "Release now" releases within a warden's trip and leaves a Shunned alongside entry running; "Add days" moves the release tick and, without Castes' API version 2, stops at 50 days in total; "Pardon" leaves `IsGuilty` false and the case closed. "Pardon" on a case with jail, Shunned and Lose own bedroom ends all three in one tick and gives the bed back if free. "Pardon" on a closed case with "Lose role, for good" gives the role back if free, and does nothing to it if someone holds it. + +#### Lose own bedroom and lose role + +- **Players get:** Two status punishments for N days, as a main entry or alongside another one. "Lose own bedroom": the convict gives up its bed and may own no bed in a room of its own until the days are served; it sleeps in a barracks bed or wherever vanilla puts it, and gets vanilla's "slept in barracks" (-4 to -7, Core Defs/ThoughtDefs/Thoughts_Memory_RoomStats.xml:158-175) each morning. "Lose role" (Ideology): the convict loses its ideoligion role with vanilla's "role lost" thought, and the role comes back at the end if nobody holds it; with "For good" it comes back only through a pardon. A pardon ends both early. Both give back through the release give-back, so a bed or role someone took meanwhile stays theirs and the message names it. A partner who shared the bed keeps it. +- **How:** + - Bedroom: Laws stores `ownership.OwnedBed` (RimWorld/Pawn_Ownership.cs:12) in the case's give-back snapshot and calls `UnclaimBed` (:157). Laws never claims a barracks bed for the convict: `ClaimBedIfNonMedical` (:125) would evict the last owner of a full bed (:139-142), and beds by zone are Zones'. To keep the convict from claiming a bedroom bed, its own included, hook V, a postfix on `RestUtility.IsValidBedFor` (RimWorld/RestUtility.cs:160), sets the result false when the sleeper is in the component's `HashSet` of bedroom losers and the bed's room has the role `RoomRoleDefOf.Bedroom` (RimWorld/RoomRoleDefOf.cs:10); it reads one bool while the set is empty. It leaves the result alone for a sleeper that is `Downed` or for which `HealthAIUtility.ShouldSeekMedicalRest` (RimWorld/HealthAIUtility.cs:23) is true, so a convict downed by a group beating or struck by the squad can be rescued to the only free bed even in a bedroom. At the end Laws reclaims the stored bed with `ClaimBedIfNonMedical` only when nobody owns it. + - Role: `Precept_RoleSingle.Unassign(p, true)` (RimWorld/Precept_RoleSingle.cs:140) or `Precept_RoleMulti.Unassign(p, true)` (RimWorld/Precept_RoleMulti.cs:87), which add vanilla `IdeoRoleLost`. The role goes into the same snapshot jail uses, and at the end `Assign(p, false)` (RimWorld/Precept_RoleSingle.cs:73) if it is still free. Behind `ModsConfig.IdeologyActive`. + - Jail plus either: the snapshot is taken once; the release gives back only what the status punishment doesn't still hold back. +- **Settings:** None beyond the row. +- **Save and removal:** The snapshot and end tick live in the case. After removal the bed and role stay with whoever has them; the convict picks a free bed again by vanilla's rule. +- **Overlaps:** Blax Zones' sleeping zones by caste may give a sentence caste a barracks zone; the two compose. +- **Replaces:** Nothing. +- **Effort:** S plus S. +- **Tests:** A 3-day "Lose own bedroom": the convict owns no bed in a bedroom for 3 days, also after phase 2, sleeps in a barracks bed, and owns its old bed again at the end; if another colonist claimed it meanwhile, it stays theirs. "Lose role" with Ideology: the role is empty or someone else's, and comes back at the end if free; "For good" doesn't give it back at the end, and a pardon does if it is free. In a `-NoDlc` run "Lose role" shows "Needs Ideology". A downed bedroom loser is carried to a bedroom bed when no other bed is free. +- **Risks:** The player can reassign beds by hand during the sentence; the postfix only stops the convict from choosing a bedroom bed, and a forced player assignment stays the player's call. ### Sentences, step 2: with the sibling mods -Each part waits for its sibling. Confinement for N days is New in `docs/features.md`, not specced: a sentence that puts the convict into a sentence caste for its time, through the timed caste assignment Castes builds as its area 5, step 5, after its join API. Indenture as a sentence is an idea there. +Each part waits for its sibling. Sentence castes are New in `docs/features.md`, not specced: each daily-life punishment (bread and water, hard labour, no recreation, dry, rags, confinement, and any caste the player marks for sentences) is a Castes caste the convict holds for the row's days, through the sentence members Castes adds as its area 5, step 5, after its join API (Decided 2026-12-03, item 4). What the spec builds on: vanilla seeds Simple and Paste food policies (RimWorld/FoodRestrictionDatabase.cs:101-123), and a warden respects a prisoner's food policy, so bread and water works in jail (RimWorld/Pawn_FoodRestrictionTracker.cs:34-74); Work hours block joy (Core Defs/Misc/TimeAssignmentDefs/TimeAssignments.xml:10-16), but a prisoner's timetable reads Anything (RimWorld/Pawn_TimetableTracker.cs:12-22), so the schedule entries do nothing in jail and the picker says so; vanilla's no-drugs policy keeps every addiction drug allowed (Core Defs/DrugPolicyDefs/DrugPolicyDefs.xml:19-22; RimWorld/DrugPolicy.cs:66-75); a rags outfit caps hit points and quality (Verse/ThingFilter.cs:182, 220), and a convict with no stored rags goes naked (RimWorld/JobGiver_OptimizeApparel.cs:133). One caste per pawn, so stacked daily-life punishments need a combined caste. Indenture as a sentence is an idea there. #### Castes keeps the caste @@ -595,9 +765,43 @@ Each part waits for its sibling. Confinement for N days is New in `docs/features - **Tests:** A slave jailed for 1 day is a slave of the colony again afterwards, never leaves the map, and no `EnslavedPrisoner` event was recorded. With Slaves in `-Compat` once it ships indentured servitude, an indentured slave with a jail row is jailed through the term member and afterwards is a slave with the same term end; with the member left unbound by a test switch, it is subdued or warned, never jailed. Skipped without Ideology. - **Risks:** This writes slave status, which Blax Slaves owns. It only puts back the status the sentence took; Fabian allowed it on 2026-12-01, together with the term member. -### Repeat offenders +### Repeat offenders, step 1: the record and reform -Not specced yet: the criminal record and probation (step 1), escalation (step 2) (see `docs/features.md`). Step 1 needs the first release's cases, probation also "Pardon, early release and longer sentences". The record keeps convictions after "Keep closed cases" prunes them (7 to 360 days), so the court's repeat term reads the record, never closed cases. +Not specced yet: the criminal record and probation (step 1), escalation (step 2) (see `docs/features.md`). Step 1 needs the first release's cases, probation also "Pardon, early release and longer sentences". The record keeps convictions after "Keep closed cases" prunes them (7 to 360 days), so the court's repeat term reads the record, never closed cases. Reform reads the record's count and keeps the tick of the last trait step in it; escalation (step 2) reads a reformed mark there and softens by one step, and a relapse within 60 days cancels that. + +#### Reform + +- **Players get:** Fabian's third ask. Every punishment that leaves the convict in the colony can change it, lightest first: + 1. "Paid my debt", +4 mood for 6 days after a served punishment, which offsets vanilla's "was imprisoned" (-6 for 12 days, RimWorld/GenGuest.cs:8-12). After a survived execution corps it is "Spared by the squad", +10 for 10 days. When the punishment's harshness is above the act's severity it becomes "Resents my sentence", -4 for 6 days, plus a social "Sentenced me" (-10) toward the judge or enforcer, and no trait roll. + 2. "Fresh start": the mental break threshold is 3 points lower for 15 days, shown as "Served a sentence" in the stat's explanation; and for 30 days the break it was punished for is half as likely, shown on the case and the record. + 3. Rarely, one vanilla trait step away from the vice tied to the act, with a positive letter ("Ana is no longer a pyromaniac") and a line in the record: + + | Punished act | Trait step | + |---|---| + | A drug binge, a drug against the policy, an Ate drug entry | Drug desire: chemical fascination to chemical interest, interest to none (Core Defs/TraitDefs/Traits_Spectrum.xml:37-64); never to teetotaler. At none the chemical need switches off (RimWorld/Need_Chemical_Any.cs:159-169) | + | Fire-starting spree, set a fire | Pyromaniac removed (Core Defs/TraitDefs/Traits_Singular.xml:333-358) | + | Insult, slight, insulting spree | Abrasive removed (Traits_Singular.xml:108-124; x2.3 negative interactions, RimWorld/NegativeInteractionUtility.cs:39-42) | + | Social fight, assault, tantrum, murderous or sadistic rage | Bloodlust removed (Traits_Singular.xml:16-33) | + | Food binge | Gourmand removed (Traits_Singular.xml:565-579; its only allowed break is the food binge) | + | Any other break, second conviction or later | Nerves: volatile to nervous, nervous to none (Traits_Spectrum.xml:94-140); never above none | + + The picker and the case show the odds. Setting "Reform": "Temporary effects and traits" (default), "Temporary effects only" (layers 1 and 2), "Off". +- **How:** + - When: one roll as a punishment ends with the convict in the colony: hook L's postfix for jail, the 2500-tick sweep at a timed punishment's end tick (guilty, shunned, lose bedroom or role, excommunicate, sentence castes; an excommunication with the role taken "for good" rolls when its shunning ends), the cut itself for Shaken faith, the end of a beating or a volley, the verdict for a court case. Warn, Talk down, Banish, Execute, Public execution and a pardon give no trait roll; a struck convict a warden finishes gives none either. + - Odds: P = base x fit x judge x record x mood, capped at 35%. Base from `reformBase`: Reprimand 3%, Guilty and Shunned 4%, public reprimand 5%, Subdue and Group beating 6%, Apology 8%, Lose role 3%, Shaken faith 3%, Excommunicate 5%, Jail 2% per day served up to 20%, a sentence caste 1% per day up to 15%, Lose own bedroom 1% per day up to 10%, spared by the squad (every shot missed) 30%, a struck survivor who walks free 15%. Trial, Jail then trial and Decide myself take the base of the punishment they end in; an acquittal gives no roll. When a row runs several entries at once (a main entry and its alongside entries), the highest base counts, and the case still rolls once. Fit: 1 if the act maps to a trait the pawn has, otherwise 0. Judge, at a court verdict only: 0.75 + 0.5 x the judge's negotiation ability, clamped to 0.75 to 1.5. Record: 1.0 for the first conviction, 0.7 for the second, 0.4 from the third. Mood: x0.5 when the pawn ends below its minor break threshold. At most one trait step per pawn per 30 days and one per punishment. + - Thoughts: situational ThoughtDefs of our own reading expiry ticks from the component, as Reprimand. Not saved (RimWorld/ThoughtHandler.cs:30-33), refreshed every 100 ticks (RimWorld/SituationalThoughtHandler.cs:23, 34). "Sentenced me" is a social worker with the early-out set of pawns that have case history, as for attorneys. + - Stat part: a `StatPart` subclass added to `StatDefOf.MentalBreakThreshold.parts` at startup (RimWorld/StatDef.cs:140; RimWorld/StatPart.cs:7-16; RimWorld/StatDefOf.cs:52); the stat has no parts in XML (Core Defs/Stats/Stats_Pawns_General.xml:62-77). `TransformValue` reads one static bool, then a `Dictionary` of expiry ticks, and catches its own exceptions, since a throw would break every break-threshold read. The three thresholds read the stat through a 5-tick cache (Verse.AI/MentalBreaker.cs:40-44). + - Break weight: hook W multiplies `CommonalityFor` by 0.5 for the pawn's punished break def until the expiry. `MentalBreakWorker_BingingDrug` calls base (Verse.AI/MentalBreakWorker_BingingDrug.cs:8-10), so binges are covered; `MentalBreakWorker_WildDecree` doesn't (Verse.AI/MentalBreakWorker_WildDecree.cs:19-25), and no law needs it. + - Trait step: `TraitSet.RemoveTrait` (RimWorld/TraitSet.cs:325), then for a degree step `GainTrait(new Trait(def, degree))` (:258), since `Trait.degree` has no setter. Defs through `TraitDefOf` (DrugDesire, Pyromaniac, Abrasive, Bloodlust: RimWorld/TraitDefOf.cs:12, 40, 10, 38) and `DefDatabase.GetNamedSilentFail` for Nerves and Gourmand, which `TraitDefOf` lacks. Guards: skip a trait with `sourceGene` set (RimWorld/Trait.cs:13; removing it deletes the gene, RimWorld/TraitSet.cs:341-344), a `Suppressed` one (Trait.cs:40) and a `ScenForced` one (:38); check `BackstoryDef.DisallowsTrait` (RimWorld/BackstoryDef.cs:249) for the new degree; touch only the vanilla defs above. Psychopath, Kind, NaturalMood and Industriousness are never touched, and no good trait is ever added. + - The letter is a vanilla standard letter with `LetterDefOf.PositiveEvent` (RimWorld/LetterDefOf.cs:16), no Letter class of ours, plus `MoteMaker.ThrowText` over the pawn (RimWorld/MoteMaker.cs:43). + - Removing Pyromaniac re-enables Firefighting at priority 0 (RimWorld/Pawn_WorkSettings.cs:195-205); setting that priority stays Castes' or the player's, and the letter says so. +- **Settings:** "Reform" (Temporary effects and traits / Temporary effects only / Off). +- **Save and removal:** Expiry ticks and the last trait-step tick in the component. After removal the thoughts, stat line and break weight are gone; a trait step stays, as vanilla traits are the pawn's history and load without Laws. +- **Overlaps:** Rimworld Law and Order's players asked for served sentences to make reoffending less likely; Uncle Boris' Brainwash Chair changes prisoner traits on a chair. Trait mods' own traits are never touched. +- **Replaces:** Nothing. +- **Effort:** S for the thoughts, S for the stat part and break weight, S for the trait step. +- **Tests:** A served 5-day jail for a drug binge on a pawn with drug desire 2: "Paid my debt" for 6 days, the threshold 0.03 lower for 15 days, the binge weight halved for 30 days, and with a forced roll drug desire 1 and one letter. A second forced roll within 30 days changes nothing. A gene-sourced Kind or a suppressed pyromaniac is never touched (skipped: needs Biotech). "Temporary effects only" never changes a trait. A punishment harsher than the act gives "Resents my sentence" and no roll. Phase 2 keeps the remaining times; phase 3 after removal leaves the changed trait and no Laws thought. Performance run with 60 colonists and no effect active: no measurable cost. +- **Risks:** Vanilla never changes an adult's traits in play outside genes, creepjoiners and children's growth moments (RimWorld/ChoiceLetter_GrowthMoment.cs:189; RimWorld/CreepJoinerUtility.cs:110-122), so trait steps stay rare, capped and announced. Long or harsh punishments cost mood, and breaks are the main source of crimes; the picker shows the cost and the starter days stay short. ### Court, step 1: Ideology's trial as a punishment @@ -613,6 +817,33 @@ Not specced yet: the criminal record and probation (step 1), escalation (step 2) ### Court, step 2: court sessions on the core game +#### Court place + +- **Players get:** Fabian's first ask of 2026-12-03. Select a building you own (any table, party spot, campfire, a throne with Royalty, a lectern or ritual spot with Ideology, or other furniture) and switch on "Court place". One place per map; switching it on elsewhere moves it. With the mouse over the switch the court room is outlined, the way the room stats button outlines a room. The Laws tab shows the place, its room's impressiveness against the courtroom setting, "Not a proper room" for an outdoor or open space, and a "Pick court place" button that lets you click a building on the map. The convene dialog starts at the place, "Court on its own" uses it, and public punishments (Enforcement, step 5) gather their crowd around it. Uninstalling the table into a crate and placing it again moves the court with it; deconstructing it or losing it clears the place, and the tab says "No court place". +- **How:** + - Hook P, a postfix on `Building.GetGizmos` (Verse/Building.cs:401) that wraps the iterator (`ref IEnumerable __result`) and catches its own exceptions, since a throw inside an enumerator wrapper breaks the whole gizmo bar. It covers every building: the overrides of `ThingWithComps` and `Building_Throne` yield base first (Verse/ThingWithComps.cs:536; RimWorld/Building_Throne.cs:79-89). Gizmos are rebuilt every frame for every selected object (Verse/GizmoGridDrawer.cs:54-100), so it returns at once unless a law exists, the building's `Faction` is the player's, the def isn't impassable (thrones excepted) and `Find.Selector.SingleSelectedObject == this` (RimWorld/Selector.cs:74), the gate vanilla's room stats button uses (Verse/Building.cs:407). A box-select of 200 walls costs nothing. + - The Laws tab button: `Find.Targeter.BeginTargeting(TargetingParameters, Action, ...)` (RimWorld/Targeter.cs:93) with `canTargetBuildings` and a validator for the player's buildings (RimWorld/TargetingParameters.cs:17, 35). The convene dialog's place picker writes the same stored value. + - The room is read when used, never stored: `Room.ID` comes from a static counter and changes on every region rebuild (Verse/Room.cs:43, 594-600). For a passable building `Thing.GetRoom()` (Verse/RegionAndRoomQuery.cs:53); for impassable furniture vanilla's rule `Gizmo_RoomStats.GetRoomToShowStatsFor(Building)` (Verse/Gizmo_RoomStats.cs:89). Hovering the switch calls `Room.DrawFieldEdges()` (Verse/Room.cs:836). "Not a proper room" when `Room.ProperRoom` (:536) is false. A room of at most 100 cells, not outdoors, is a whole gathering area as vanilla counts it (RimWorld/GatheringsUtility.cs:347). + - Save: one `Scribe_References` per map in the component. It saves as "Thing_" + ThingID (Verse/Thing.cs:798), so the place is still kept by ThingID as before, and a destroyed thing saves as null (Verse/Scribe_References.cs:60-68). A minified place keeps its instance and ID inside the crate (RimWorld/MinifyUtility.cs:15, 23). Between saves every use re-checks `Spawned`, `Map`, `Faction == Faction.OfPlayer` and `Destroyed` (Verse/Thing.cs:180-200); a failed check reads as no place. No Destroy or DeSpawn hook is needed. + - No ThingDef, designator or DesignationDef: any of them would stay on the map after a plain unsubscribe. A court place is a building reference, never a zone (Blax Zones) or an allowed area (Blax Castes). +- **Settings:** None; the switch is the setting. +- **Save and removal:** One reference per map in the component. After removal the building is just a table. +- **Overlaps:** RimCourt's seat spot is its own building; both can stand in one room. +- **Replaces:** Picking the place in the convene dialog every time. +- **Effort:** S plus S for the tab picker and the outline. +- **Tests:** Switching on "Court place" on a table stores it; on a second table moves it. Uninstall the table and place it elsewhere: the place follows it. Deconstruct it: the tab reads "No court place" at once and the save holds no reference. A claimed or destroyed place makes "Court on its own" wait with the reason. 200 selected walls: the postfix adds no gizmo and costs under a tenth of a millisecond per frame. A `-NoDlc` run offers tables and party spots; thrones and lecterns appear only with their DLC. + +#### Courtrooms + +- **Players get:** A verdict given in an impressive room costs the convict less mood: when the room around the court place reaches the courtroom impressiveness (setting), the convict gets the milder thought. The room keeps its own role, dining room, rec room or throne room. The Laws tab shows the court room's impressiveness against the setting. Moved here from Court step 4: it only reads the court place's room at the verdict. +- **How:** At the verdict, `room.GetStat(RoomStatDefOf.Impressiveness)` (Verse/Room.cs:823) of the court place's room, read as "Court place" says. No `RoomRoleDef`: a room has exactly one role, the highest score of all role workers (Verse/Room.cs:872). A courtroom role that scores higher would take over the dining room, the rec room or the throne room, which scores 10000 (RimWorld/RoomRoleWorker_ThroneRoom.cs:17-30) and which a noble's throne room requirement needs (Royalty); one that scores lower would never show. +- **Settings:** "Courtroom impressiveness". +- **Save and removal:** Nothing saved and no def to remove. +- **Overlaps:** RimCourt's seat spot is a different building. +- **Replaces:** Nothing. +- **Effort:** S, plus S tests. +- **Tests:** A verdict at a place in a room above the setting gives the milder thought, below it the normal one; a throne room used as court place keeps its throne room role. + #### Cases go to trial - **Players get:** "Trial" works on the core game. A case with a trial row waits in the Cases tab with "Convene court" and a gizmo on the accused, or convenes itself at the court hour when you switch that on (see "Court on its own"). With Ideology, the vanilla trial still closes the case (see "Trial through Ideology's ritual"). @@ -638,7 +869,7 @@ Not specced yet: the criminal record and probation (step 1), escalation (step 2) - **Players get:** The familiar ritual-style window: role slots for judge, prosecutor, accused and spectators, a place picker (party spot, any table; from Royalty a throne; from Ideology a ritual spot or lectern), and every verdict factor with the expected conviction chance. - **How:** `Dialog_ConveneCourt : Window` of our own, with its header, the place picker, the factor list with the chance and the button row, laid out like vanilla's ritual window. It reuses only `PawnRoleSelectionWidgetBase` (RimWorld/PawnRoleSelectionWidgetBase.cs:13) for the role slots; its constructor has no DLC check (:101). `Dialog_BeginLordJob` isn't used: its constructor sets the participants drawer, `closeOnClickedOutside`, `absorbInputAroundWindow` and `forcePause` only inside `if (ModLister.CheckAnyExpansion("Ritual"))` (RimWorld/Dialog_BeginLordJob.cs:134-143). That check asks which DLCs are installed, not which are active (Verse/ModLister.cs:283-286, 426-428), and logs an error when none is (:347-353), so a player who owns no DLC would get a logged error and a court dialog without its role column. A half-day spike confirms the dialog in a core-only game before the rest is built. -- **Save and removal:** The last place is stored by ThingID. +- **Save and removal:** The place picker starts at the court place ("Court place") and writes it; before one is set, the last place is stored by ThingID. - **Overlaps:** None. - **Replaces:** Nothing. - **Effort:** M. @@ -646,9 +877,9 @@ Not specced yet: the criminal record and probation (step 1), escalation (step 2) #### Court on its own -- **Players get:** "Convene court on its own" (off) and "Court hour" (10). When on, a waiting case convenes at the next court hour at the last place you used, with the judge (or the acting judge, see "Cases go to trial") and the default prosecutor, when the judge and the accused are free (not drafted, downed, in a break or in another gathering) and no hostiles threaten the map. A case with no uninvolved judge waits, and the Cases tab says why. Otherwise it tries again the next day. A message names the case; no click needed. With it off, the court sits only when you press "Convene court". +- **Players get:** "Convene court on its own" (off) and "Court hour" (10). When on, a waiting case convenes at the next court hour at the court place (or, before one is set, the last place you used), with the judge (or the acting judge, see "Cases go to trial") and the default prosecutor, when the judge and the accused are free (not drafted, downed, in a break or in another gathering) and no hostiles threaten the map. A case with no uninvolved judge waits, and the Cases tab says why. Otherwise it tries again the next day. A message names the case; no click needed. With it off, the court sits only when you press "Convene court". - **How:** Every 2500 ticks the component compares `GenLocalDate.HourOfDay(map)` (RimWorld/GenLocalDate.cs:16) with the court hour and starts the same lord job as the dialog, one case at a time, oldest and gravest first. Court days reuse this scheduler. -- **Settings:** "Convene court on its own" (off), "Court hour" (10, 0 to 23). +- **Settings:** "Convene court on its own" (off), "Court hour" (10, 0 to 23). From Enforcement step 5 the court hour also times public punishments, whether or not "Convene court on its own" is on. - **Save and removal:** Settings only; the last place is already in the component. - **Overlaps:** None. - **Replaces:** One "Convene court" click per case in a large colony. @@ -658,7 +889,7 @@ Not specced yet: the criminal record and probation (step 1), escalation (step 2) #### Court session - **Players get:** The roles walk to the place, spectators gather, the judge and the speakers trade arguments in speech bubbles for about two in-game hours, and a letter gives the verdict and the sentence. A warden brings a jailed accused and takes it back afterwards. Danger, a drafted or downed role pawn, or a missing judge calls the session off; the case stays open. -- **How:** `LordJob_BlaxCourtSession : LordJob_Joinable_Gathering` (RimWorld/LordJob_Joinable_Gathering.cs:7, call-off at :40), toils after the marriage ceremony pattern (RimWorld/LordJob_Joinable_MarriageCeremony.cs:7). Core duties only: ArriveToCell for the judge and the speakers, which walks to the cell and stands there with `JobGiver_Idle` (Core Defs/DutyDefs/Duties_Rituals.xml:5-22), DeliverPawnToCell for a jailed accused (:55) and Spectate for the crowd (Core Defs/DutyDefs/Duties_Gatherings.xml:55). Core's GiveSpeech duty (:139) isn't used: its only job giver, `JobGiver_GiveSpeech`, returns no job unless the duty's focus is a `Building_Throne` assigned to the speaker (RimWorld/JobGiver_GiveSpeech.cs:19-22), so at a party spot or a table the judge and the attorneys would reach their cell, get no job and walk off to work. The lord toil's tick plays the speech bubbles through `MoteMaker.MakeInteractionBubble` (RimWorld/MoteMaker.cs:181), not `TryInteractWith`, which writes a play log entry holding the InteractionDef (RimWorld/Pawn_InteractionsTracker.cs:249), and the speech sound. Laws adds no DutyDef: a duty is saved in `mindState.duty` while a session runs, so an own one would be one more def for the removal button to clear. One gathering at a time, as vanilla allows. +- **How:** `LordJob_BlaxCourtSession : LordJob_Joinable_Gathering` (RimWorld/LordJob_Joinable_Gathering.cs:7, call-off at :40), toils after the marriage ceremony pattern (RimWorld/LordJob_Joinable_MarriageCeremony.cs:7). Core duties only: ArriveToCell for the judge and the speakers, which walks to the cell and stands there with `JobGiver_Idle` (Core Defs/DutyDefs/Duties_Rituals.xml:5-22), DeliverPawnToCell for the warden who brings a jailed accused, with `focusSecond` the accused (:55; RimWorld/JobGiver_DeliverPawnToCell.cs:20-36) and Spectate for the crowd (Core Defs/DutyDefs/Duties_Gatherings.xml:55). Core's GiveSpeech duty (:139) isn't used: its only job giver, `JobGiver_GiveSpeech`, returns no job unless the duty's focus is a `Building_Throne` assigned to the speaker (RimWorld/JobGiver_GiveSpeech.cs:19-22), so at a party spot or a table the judge and the attorneys would reach their cell, get no job and walk off to work. The lord toil's tick plays the speech bubbles through `MoteMaker.MakeInteractionBubble` (RimWorld/MoteMaker.cs:181), not `TryInteractWith`, which writes a play log entry holding the InteractionDef (RimWorld/Pawn_InteractionsTracker.cs:249), and the speech sound. Laws adds no DutyDef: a duty is saved in `mindState.duty` while a session runs, so an own one would be one more def for the removal button to clear. One gathering at a time, as vanilla allows. - **Save and removal:** A running session is a vanilla lord with our LordJob class and vanilla duties; see the removal button. - **Overlaps:** Party and ritual mods block a session while their gathering runs, and the other way round. - **Replaces:** Nothing. @@ -677,8 +908,8 @@ Not specced yet: the criminal record and probation (step 1), escalation (step 2) #### Remove Blax Laws from a game -- **Players get:** "Remove Blax Laws from this game" in the mod settings. It names the counts, ends running court sessions and subdue jobs, asks whether to release the colonists Laws jailed, removes the component and ends with "Save now, then disable the mod". -- **How:** A running session leaves a lord whose LordJob class is missing after a plain unsubscribe: it loads with a null job, `PostLoadInit` throws on it (Verse.AI.Group/Lord.cs:246), and `LordTick` throws on every tick after (:610), each one logged (Verse.AI.Group/LordManager.cs:48-60). The button ends sessions first. It runs from the UI, never inside `GameComponentTick`, which loops by index (Verse/GameComponentUtility.cs:24-37). `Game.FillComponents` only runs on new games and loads (Verse/Game.cs:345, 446), so a removed component stays gone until the next load. +- **Players get:** "Remove Blax Laws from this game" in the mod settings. It names the counts, ends running court sessions, public punishments, execution corps runs and subdue jobs, ends held convicts' wait jobs, asks whether to release the colonists Laws jailed, removes the component and ends with "Save now, then disable the mod". +- **How:** A running session leaves a lord whose LordJob class is missing after a plain unsubscribe: it loads with a null job, `PostLoadInit` throws on it (Verse.AI.Group/Lord.cs:246), and `LordTick` throws on every tick after (:610), each one logged (Verse.AI.Group/LordManager.cs:48-60). The button ends sessions and public punishments (`LordJob_BlaxPunishment`) first. It runs from the UI, never inside `GameComponentTick`, which loops by index (Verse/GameComponentUtility.cs:24-37). `Game.FillComponents` only runs on new games and loads (Verse/Game.cs:345, 446), so a removed component stays gone until the next load. - **Save and removal:** This is the removal. - **Overlaps:** None. - **Replaces:** Nothing. @@ -701,7 +932,7 @@ Not specced yet: witnesses and the guilty plea (see `docs/features.md`). ### Court, step 4: long trials -Not specced yet: appeals (see `docs/features.md`). +Not specced yet: appeals (see `docs/features.md`). Courtrooms moved to Court step 2. #### Court days @@ -713,17 +944,6 @@ Not specced yet: appeals (see `docs/features.md`). - **Effort:** M for days and the tally, S for absences. - **Tests:** A grave case runs 3 days; the verdict uses the mean; an escape during custody closes the case as escaped. -#### Courtrooms - -- **Players get:** A verdict given in an impressive room costs the convict less mood: when the room around the court place reaches the courtroom impressiveness (setting), the convict gets the milder thought. The room keeps its own role, dining room, rec room or throne room. -- **How:** At the verdict, `room.GetStat(RoomStatDefOf.Impressiveness)` (Verse/Room.cs:823) of the room that holds the court place. No `RoomRoleDef`: a room has exactly one role, the highest score of all role workers (Verse/Room.cs:872). A courtroom role that scores higher would take over the dining room, the rec room or the throne room, which scores 10000 (RimWorld/RoomRoleWorker_ThroneRoom.cs:17-30) and which a noble's throne room requirement needs (Royalty); one that scores lower would never show. -- **Settings:** "Courtroom impressiveness". -- **Save and removal:** Nothing saved and no def to remove. -- **Overlaps:** RimCourt's seat spot is a different building. -- **Replaces:** Nothing. -- **Effort:** S, plus S tests. -- **Tests:** A verdict at a place in a room above the setting gives the milder thought, below it the normal one; a throne room used as court place keeps its throne room role. - ### Colony votes, step 1: the voting core and law votes Needs the first release only: law votes count acts through the first release's hooks in tally-only mode and use nothing from the court. @@ -805,6 +1025,13 @@ Not specced yet: the jury (see `docs/features.md`). Needs court sessions and the - All 8 DLC combinations; the slave rebellion test skips without Ideology. The new acts join the tally-only mode of law votes, checked with one forced act each. Effort S. +#### Fabian's punishments of 2026-12-03 (Enforcement steps 4 and 5, Sentences step 1, Repeat offenders step 1, the court place) + +- Phase 2 saves while a group beating, an execution corps run, a public punishment, a shunning, a lost bedroom and a reform effect are active: after the load the beating and the run are called off with the case open, a public lord caught in its violence toil has ended with the case waiting (a public lord still gathering keeps running), the convict and the shooters take normal jobs within 600 ticks, with Laws loaded and without it, and the others keep their remaining time. Phase 3 still expects exactly 2 errors, and no pawn holds a Laws job, duty, thought or hediff. +- All 8 DLC combinations: Excommunicate, Shaken faith, Lose role, Public execution and the pain precept check skip without Ideology; gene and suppressed trait guards without Biotech; thrones as court place without Royalty. +- Performance: the 60-colonist run with a court place set, nobody shunned, no reform effect and no punishment running adds nothing measurable over the first release's figure; a second run with 10 shunned pawns and 10 reform effects stays under 2%. +- `-Compat`: Blax Castes, once its sentence members exist, for the sentence castes; Beat Your Prisoners (Continued) beside a group beating; More Executions beside an execution corps. Effort S plus S. + ## Works with the other Blax mods - Package ids: `blax.slaves`, `blax.castes`, `blax.zones`, `blax.defaults`, `blax.laws`. No hard dependencies. Laws' About.xml lists `brrainz.harmony`, `blax.castes` and `blax.slaves` in loadAfter, because it binds `CastesApi` and `SlavesApi`. Load order becomes Castes, Zones, Slaves, Laws. No sibling lists `blax.laws`, so there is no loadAfter cycle. Defaults lists no sibling and no sibling lists Defaults. @@ -814,7 +1041,7 @@ Not specced yet: the jury (see `docs/features.md`). Needs court sessions and the - 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. ### Blax Castes @@ -822,6 +1049,8 @@ Not specced yet: the jury (see `docs/features.md`). Needs court sessions and the - The one write into Castes' area: the Maintain only and Release modes for pawns Laws jailed, in every version of both mods. With Castes' join API (API version 2), Laws' "Castes keeps the caste" sends `blax.laws.jailed` from hook K and `blax.laws.released` from hook L through `HintJoinReason`; Castes' prisoner caste then sets no mode on the hinted pawn, and Laws still writes Maintain only two ticks after the capture. - Laws never writes a policy, a schedule, medical care or a work priority. Jail keeps priorities because prisoners have no disabled work types; with Prison Labor's "Force to work" on, that mod disables the work types it bars prisoners from (see "Jail for N days", Overlaps), and the `-Compat` run checks that nothing else changes. - "Confinement for N days" (Sentences, step 2, New) is a sentence: Laws asks Castes to put a convict into a caste the player picks for sentences and back through `blax.laws.released`. That needs a timed caste assignment in Castes' join API. Castes builds it as "Sentence caste for Blax Laws" (its area 5, step 5) after its join API, and its spec decides whether a third Laws reason sent through `NotifyJoined` is enough. +- From 2026-12-03 confinement is one of the sentence castes (Sentences, step 2, New): bread and water, hard labour, no recreation, dry, rags, confinement and any caste the player marks "for sentences", each picked per row (Decided 2026-12-03, item 4, which widens Decided 2026-12-01, item 2). Castes' area 5, step 5 allows several castes marked "for sentences" and adds `bool BeginSentence(Pawn, string casteId, int durationTicks)`, `bool EndSentence(Pawn)` and `int SentenceTicksLeft(Pawn)` in its next API version. `BeginSentence` writes the former-caste record Castes' restore already handles, and the end tick lives in Castes' save and is checked in its 2500-tick sweep, so a sentence ends even after Laws is unsubscribed; pardon and early release call `EndSentence`. A `NotifyJoined` reason row maps to one caste and carries no end tick, so it can't do this. Castes seeds starter sentence castes from vanilla's Paste and Simple food policies, the "no drugs" drug policy and a Work-only schedule, and add a "Create rags outfit" button. Confinement also waits on Castes' allowed area slot (its area 1). Without these members the entries show "Needs Blax Castes"; Laws has no fallback that stores and writes policies itself. +- Removing Pyromaniac through reform re-enables Firefighting at priority 0; Laws sets no priority, and Castes' caste priorities or the player decide. - Castes' read-only API (version 1) lists Laws' caste checks as waiting on it: that is "Applies to" (Lawbook, step 2), which reads `CastesApi.CasteIdOf`. ### Blax Slaves @@ -830,11 +1059,13 @@ Not specced yet: the jury (see `docs/features.md`). Needs court sessions and the - Slaves' "Wardens calm breakdowns" calms slaves out of breaks that aren't `IsAggro` and aren't the rebellion. While `SlavesApi.CalmsBreaks` says that feature is on, Laws neither subdues nor talks down a slave in such a break and lets Slaves' wardens talk it down ("Slaves' wardens first"). - "Jail for slaves" puts a jailed slave back into slavery at the end, without vanilla's enslave event. It restores the status the sentence took; it's still a write to slave status, which Fabian allowed on 2026-12-01. It never jails a slave while `SlavesApi.TermDaysLeft` says an indentured term runs, since Slaves ends the term at an arrest, until the member that keeps the term through a Laws sentence is bound; Slaves ships it with its indentured servitude. - Suppression is never touched. A re-enslaved slave starts with the suppression vanilla gives a new slave. +- Slaves are never beaters or shooters. A slave can be the convict of every 2026-12-03 entry; the group beating is the same capped bruising as Subdue, never flogging with a tool, and fear stays Slaves' suppression. ### Blax Zones - Jail uses any vanilla prisoner bed. Zones' people sleeping zones for prisoners are made of real beds, so arrests find them with no Laws code. -- A court place and a courtroom are stored by ThingID in Laws' component, never as a zone. +- A court place is a building reference in Laws' component, saved by ThingID through `Scribe_References`, never a zone; its room is read when used. +- "Lose own bedroom" unclaims the bed and keeps the convict out of bedroom beds; it never assigns a bed. Where the convict sleeps is vanilla's choice or Zones' "Sleeping zones by caste" for a sentence caste. ### Blax Defaults @@ -857,6 +1088,14 @@ Status on 2026-12-01, when the five plans were checked against each other: every - Slaves `docs/roadmap.md` and `docs/features.md`: an indentured term keeps running through a Laws sentence when Laws hints the arrest (a `SlavesApi` call naming the pawn from hook K's prefix, right before the capture, shipping with Slaves' indentured servitude); until that exists, Laws doesn't jail indentured slaves. Decided 2026-12-01. - Castes `docs/features.md`: area 5, step 5, "Sentence caste for Blax Laws", ended by `blax.laws.released`, built after the join API. Decided 2026-12-01. +Status on 2026-12-03, after Fabian accepted all nine recommendations ("Decided 2026-12-03" in `docs/features.md`): every entry below is done on the siblings' main branches. + +- All five docs: the Laws ownership line gains "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." Done in Castes `docs/design.md`, Slaves `docs/roadmap.md`, Zones `docs/design.md` and Defaults `docs/design.md`, each in its ownership list. +- Castes `docs/features.md`: area 5, step 5 is now "Sentence castes for Blax Laws": castes marked "for sentences", `BeginSentence`, `EndSentence` and `SentenceTicksLeft` in the next API version, starter sentence castes (bread and water, hard labour, no recreation, dry, rags, confinement) and a "Create rags outfit" button. Its "Decided 2026-12-01" item 3 notes that Laws' "Decided 2026-12-03" item 4 widens it, and its "Order" names the sentence castes. Castes `docs/design.md`: a "Changes on 2026-12-03" note, and its "Blax Laws" section describes the sentence castes and the new members. +- Slaves `docs/roadmap.md`: the Cut line on flogging also notes that Laws' group beating is a capped beating of convicts with fists behind "Offer harsh punishments", and that slaves never beat; a "Changes on 2026-12-03" note. +- Zones `docs/design.md`: "Works with the other Blax mods" notes that the court place is a building reference in Laws' component, and that "Lose own bedroom" unclaims beds and never assigns one; a "Changes on 2026-12-03" note. +- Defaults `docs/design.md`: the ownership line only. + ## To verify against the decompiled code The act catalogue was checked on 2026-12-01 against the 1.7.5021 reference assemblies (RimRef, `Krafs.Rimworld.Ref` 1.7.5021-unstable): every type, field and signature it names exists there (a probe that calls each of them compiles against RimRef with no error), method bodies don't. Before the first release is built, check these in the decompiled 1.7 code and fix the design where it differs: @@ -869,6 +1108,18 @@ The act catalogue was checked on 2026-12-01 against the 1.7.5021 reference assem - The insect meat group: how insect meat is told apart (the meat's source race flesh type is the likely field). - The picker with a large mod list: catalogue size and draw cost. +For the 2026-12-03 parts every member named was found in the decompiled 1.7 code at the cited line; these behaviours need a spike or a test before their step is built: + +- `LordJob_Joinable_Gathering.CreateGatheringToil` (RimWorld/LordJob_Joinable_Gathering.cs:38) takes a `GatheringDef`: whether the base class runs with no GatheringDef, or the court session and public punishment lords should derive from `LordJob_VoluntarilyJoinable` (RimWorld/LordJob_VoluntarilyJoinable.cs:6) instead. Court sessions share the answer. +- Execution corps: that `ShotReport.HitReportFor` from the shooters' real cells matches the observed hit rate over seeded volleys; how far an estimate before the squad reaches its marks is off; that `lastRangedHarmTick` is set when armour turns a hit into 0 damage; how the end of the volley is detected when some warm-ups are cancelled by the downing (`Stance_Warmup` back to `Stance_Mobile`, Verse/Stance_Warmup.cs:194-197); that a warden's `DeliverToCell` job brings a jailed convict out of its cell to the wall without the prisoner counting as escaping. +- `LordJob_BlaxPunishment` owning the court place through `Lord.AddBuilding` (Verse.AI.Group/Lord.cs:455): what owning it changes, for example `Lord.Notify_BuildingLost` (:746) when the place is destroyed mid-run, and that the lord cleanup releases it. +- The `GetThoughts` postfix: that a bullet death of a marked victim reaches `GetThoughts` through `TryGiveThoughts` (RimWorld/PawnDiedOrDownedThoughtsUtility.cs:17-63) with every death thought in its two output lists, and which prisoner-death history events a jailed convict's shooting records before it, and how Ideology's execution precepts answer them. +- A full-fill wall cell for the convict: `def.Fillage == FillCategory.Full` (Verse/ThingDef.cs:607) on the cell behind it, and a standable cell in front with a clear line of fire at the set distance. +- Starting the ideoligion's Execution ritual from a case (Public execution): which `Precept_Ritual` and obligation the colony needs and how vanilla starts it outside the ritual gizmo. +- `RestUtility.IsValidBedFor` (RimWorld/RestUtility.cs:160): how often it runs per bed search in a large colony, and that refusing bedroom beds there also covers a pawn's own previously owned bed. +- `Pawn_IdeoTracker.OffsetCertainty` (:360): that `Reassure` (:355) after it lifts a certainty clamped to 0 back above 0 before any save. +- `JobDriver_Subdue` with several participants: that two beaters adjacent at once don't block each other's `CanReachImmediate` and that the downing hit ends every participant's job in the same tick. + ## Backlog Promoted to `docs/features.md` on 2026-12-01 as New features: lawbook templates; the group "anything the offender's ideoligion forbids" and apostasy (single events such as adultery as `GotLovin_NonSpouse` are catalogue entries already); witnesses as a role and as evidence (free colonists with line of sight to the act, recorded in a new Case field at filing); the guilty plea; appeals and retrial under a new judge; a jury from the spectators; pardon petitions from a convict's friends. The rest waits for demand: @@ -882,10 +1133,10 @@ Promoted to `docs/features.md` on 2026-12-01 as New features: lawbook templates; - Theft: vanilla colonists never steal; a "took forbidden goods during a break" flag in the `Thing.Ingested` prefix. - A judge's bench with art (needs a removal story for a missing ThingDef). A titled noble presides (Royalty). Trial by duel (Ideology's duel lord job). - Trials for guests and enemy prisoners, next to Prisoner Sentencing and Prison Expanded. -- RimCourt bridge: its pillory and lash as punishments while RimCourt is active. - A Castes right "may serve in court", as a per-caste value Castes stores for sibling mods (CastesApi version 4, built when the first sibling feature needs one). - Votes on punishments ("beating is cruel"); campaigning through vanilla deep talks; Royalty vote weight. - Confessions and interrogation, next to Prisoner Interrogation Ritual (3696342867, 1.3k). +- From 2026-12-03: an Ideology certainty gain when a sentence matches what the convict's ideoligion approves of (`Pawn_IdeoTracker.Reassure`, RimWorld/Pawn_IdeoTracker.cs:355); Social XP for a convict who defended itself in court; the beater's and shooter's own mood (Bloodlust pleased, Kind upset) as situational thoughts, if players ask; choosing where each spectator stands. - Indenture as a sentence through Blax Slaves' indentured servitude (an idea in `docs/features.md` since the plan review): a slave loses Warden, Hunting, Art and Research for good and any ideoligion role, so it needs a give-back plan and a SlavesApi call first. ## Cut @@ -904,7 +1155,18 @@ Promoted to `docs/features.md` on 2026-12-01 as New features: lawbook templates; - Subdue with vanilla melee (`AttackMelee` or the social fight job): the weapon or fists hit the head, the undrafted enforcer turns guilty and the target fights back. - Fines: colonists own no silver, so a fine only burns colony silver. - Work bans: disabling work types zeroes priorities for good (RimWorld/Pawn_WorkSettings.cs:195-205), and Castes owns priorities. -- Torture and flogging: beyond vanilla's tone; War Crimes Expanded 2 has torture for those who want it. +- Torture, maiming, flogging with whips or weapons, sacrifice and ripscanning as punishments, and torture furniture (pillory, stocks, gallows): beyond vanilla's tone, and the furniture needs art; War Crimes Expanded 2 has torture and More Executions has gallows for those who want them. A RimCourt bridge for its pillory and lash, for the same reason. The group beating (Enforcement, step 4) is planned in (Decided 2026-12-03, item 1), because it reuses Subdue's caps (bruises that heal, never the head, never death) and sits behind "Offer harsh punishments". +- Group beating through vanilla melee or a forced social fight: the convict fights back (RimWorld/Verb_MeleeAttack.cs:34-38; RimWorld/Pawn_InteractionsTracker.cs:373-400), fists hit the head, and cuts can scar. "Until unconscious" through anaesthetic: a fake, and odd in tone; the label is "beaten down" (Decided 2026-12-03, item 8). +- The execution corps through `AttackStatic` or `Pawn.TryStartAttack`: both force `canHitNonTargetPawns` true (Verse/Pawn.cs:2970-2983), so a stray bullet could hit a spectator. A "fire again" option after a full miss: it breaks the one-volley rule. +- Excommunication through `SetIdeo`: it records `ChangedIdeo`, can unclaim the bed, removes spouses and bonds, and switching back undoes none of it (RimWorld/Pawn_IdeoTracker.cs:183-241). +- Taking royal titles (`ReduceTitle`, RimWorld/Pawn_RoyaltyTracker.cs:554-591, which drops permits and honor for good) or honor as a fine: the Empire grants them, and a colony court has no say. +- A court ThingDef, a designator or a DesignationDef for the court place: each would stay on the map after a plain unsubscribe. Storing a Room or `Room.ID`: IDs change on every region rebuild (Verse/Room.cs:43, 594-600). +- DutyDefs of our own for public punishments: a duty is saved in `mindState.duty` while the lord runs. +- A HistoryEventDef for beatings: saved in a `DefMap`. +- Laws writing food, drug or apparel policies, schedules, work priorities or allowed areas when Castes is missing, as a fallback for the sentence castes: it breaks the shared ownership list, fights Castes' own rules when both are loaded, and leaves references to deleted policies. +- Claiming a barracks bed for a convict who lost its bedroom: `ClaimBedIfNonMedical` evicts the last owner of a full bed (RimWorld/Pawn_Ownership.cs:139-142), and beds by zone are Zones'. +- Reform that adds good traits, or touches Psychopath, Kind, NaturalMood or Industriousness: it reads as brainwashing, and Kind conflicts with Abrasive and Psychopath (Core Defs/TraitDefs/Traits_Singular.xml:36-52). Reform only removes or softens a vice tied to the act. A Laws hediff or memory thought for "reformed": our defs in vanilla save lists. +- A punishment preset Def type: named punishments live in the component as names and numbers (Lawbook, step 2). - Patching `JobDriver_ReleasePrisoner`: releases go through the vanilla interaction mode. - Using the guilt timer as the sentence: other mods change guilt length; the case keeps its own release tick. - Patching tiny methods: `Notify_CorpseHauled`, `Pawn_GuiltTracker.Notify_Guilty`, `ExecutionUtility.DoExecutionByCut` (a one-line wrapper; "Slaughterers" patches the private `ExecutionInt`), the empty `MentalState.Notify_AttackedTarget`. diff --git a/docs/features.md b/docs/features.md index f31764b..d630ad4 100644 --- a/docs/features.md +++ b/docs/features.md @@ -1,8 +1,8 @@ # Blax Laws feature plan -Write the colony's lawbook from every act the game knows, and the colony enforces it: a warden stops a binge before the first dose, a murderer sits out its sentence and walks back to its own bed and role, and a colonist who keeps doing it gets more each time. Grave cases go to a court with a judge the colony elects, attorneys who argue with Social, witnesses and a jury, and the colony votes on the laws themselves. Laws only watches what the game already does: no new crime events, no new mental breaks. +Write the colony's lawbook from every act the game knows, and the colony enforces it: a warden stops a binge before the first dose, a murderer sits out its sentence and walks back to its own bed and role, and a colonist who keeps doing it gets more each time. Each law picks its punishment from a full catalogue, from a reprimand or bread and water to a group beating or an execution corps, carried out in private or at a court place you set on any table, throne or spot. A served punishment can leave the colonist better than before: steadier for a while, and now and then rid of the vice it was punished for. Grave cases go to a court with a judge the colony elects, attorneys who argue with Social, witnesses and a jury, and the colony votes on the laws themselves. Laws only watches what the game already does: no new crime events, no new mental breaks. -Status: item 1 of "Order" is built as release 1.0.0 (`CHANGELOG.md`); the rest is design. Planned 2026-12-01 and reviewed against the decompiled game the same day. This file is the plan of record for what the mod covers and in which order the parts come. `docs/design.md` holds the spec of every designed feature. +Status: item 1 of "Order" is built as release 1.0.0 (`CHANGELOG.md`); the rest is design. Planned 2026-12-01 and reviewed against the decompiled game the same day. Fabian's request of 2026-12-03 (a room or table as court, a full list of punishments with his four examples among them, punishments that change a colonist's character) is planned in areas 1 and 3 to 6; his decisions on it are under "Decided 2026-12-03". This file is the plan of record for what the mod covers and in which order the parts come. `docs/design.md` holds the spec of every designed feature. ## How this plan is cut @@ -10,17 +10,18 @@ Status: item 1 of "Order" is built as release 1.0.0 (`CHANGELOG.md`); the rest i - An area has steps only where a part needs another part built first, a sibling mod's feature or a decision from Fabian. Each step is usable on its own. - Which parts ship first is decided in "Order", not by the areas: a release can take part of a step. - Status per feature: **Designed** (spec in `design.md`, linked), **New** (added by this plan; its spec is written before its step is built), **Idea** (waits for player demand). -- Every feature works with any DLC combination (a DLC part switches off and says "Needs "), has its own toggle, keeps the save loadable after a plain unsubscribe, stays inside vanilla's tone (no torture, no flogging) and needs no new art unless it says so. +- Every feature works with any DLC combination (a DLC part switches off and says "Needs "), has its own toggle, keeps the save loadable after a plain unsubscribe and needs no new art unless it says so. +- Vanilla's tone. Allowed: vanilla executions, public punishments with a watching crowd, and losses of status that come back (a bedroom, a role, faith), punishments of the body that leave only bruises that heal (a capped beating) and vanilla gunfire ("Decided 2026-12-03" item 1). Every punishment that can kill is confirmed in a dialog that shows its odds and its cost, and the harsh ones (group beating, execution corps) sit behind "Offer harsh punishments". Out: torture, maiming, scars or lost parts, torture furniture (pillory, stocks, gallows), which would also need art, and fines. ## Scope -Laws covers which acts are crimes, how they are seen, how the colony stops and punishes them, sentences and what comes back after them, repeat offenders, trials, the judge and votes on the laws. It covers free colonists and colony slaves; prisoners only when they are Laws' own convicts and break out. +Laws covers which acts are crimes, how they are seen, how the colony stops and punishes them, sentences and what comes back after them, repeat offenders and how a punishment changes them, trials, the court place, the judge and votes on the laws. It covers free colonists and colony slaves; prisoners only when they are Laws' own convicts and break out. It leaves to the sibling mods: -- Blax Castes: policies, schedules, work priorities, allowed areas and prisoner interaction defaults. Laws writes only Maintain only and Release, and only on colonists it jailed. A confinement sentence asks Castes for a timed caste (Castes' area 5, step 5). -- Blax Slaves: slave status, suppression, rebellion and the slave economy. Laws records a rebellion as an act, leaves slaves in a non-violent break to Slaves' wardens while "Wardens calm breakdowns" is on (`SlavesApi.CalmsBreaks`), and gives back the slave status a sentence took. -- Blax Zones: beds by zone, drop spots and work rule areas. Arrests use any prisoner bed, zone beds included. +- Blax Castes: policies, schedules, work priorities, allowed areas and prisoner interaction defaults. Laws writes only Maintain only and Release, and only on colonists it jailed. Punishments of daily life (bread and water, hard labour, no recreation, dry, rags, confinement) ask Castes for a timed sentence caste the row names (Castes' area 5, step 5); without Castes they show "Needs Blax Castes" and Laws writes nothing. +- Blax Slaves: slave status, suppression, rebellion and the slave economy. Laws records a rebellion as an act, leaves slaves in a non-violent break to Slaves' wardens while "Wardens calm breakdowns" is on (`SlavesApi.CalmsBreaks`), and gives back the slave status a sentence took. Slaves are never beaters or shooters. +- Blax Zones: beds by zone, drop spots and work rule areas. Arrests use any prisoner bed, zone beds included. The court place is a building Laws remembers, never a zone, and "Lose own bedroom" only unclaims the bed and keeps the convict out of bedrooms; where it sleeps instead is vanilla's or Zones' choice. - Blax Defaults: what stays forbidden when pawns go down, die or are stripped. Laws only allows again the weapon its own arrest dropped. Sentencing guests and enemy prisoners, and punishing them when they break out, stays with Prisoner Sentencing and Prison Expanded. @@ -37,10 +38,11 @@ Step 1, the book: - **Case log.** Who, what, stage, punishment and status, newest first, with "Arrest now" for cases that wait. Designed: [Lawbook tab](design.md#lawbook-tab). - **Missing entries wait.** A row whose DLC or mod is gone shows "Needs " or "Missing: " and works again when it returns. Designed. -Step 2, the book across saves and groups (needs step 1; castes need Castes' read-only API): +Step 2, the book across saves and groups (needs step 1; castes need Castes' read-only API; named punishments need Enforcement step 4): -- **Lawbook templates.** Save the book to a file and load it in another colony, with Blax Defaults' write, read-back and backup rules. The file carries a version number, so a column added later (escalation, "Applies to") loads into an older template with its default. New, from the Backlog. Demand: the same wish for policies and settings carried Export Agency (16.3k) and Save My Settings (3.8k), which Castes' templates answer. +- **Lawbook templates.** Save the book to a file and load it in another colony, with Blax Defaults' write, read-back and backup rules. The file carries a version number, so a column added later (escalation, "Applies to", punishment options) loads into an older template with its default. New, from the Backlog. Demand: the same wish for policies and settings carried Export Agency (16.3k) and Save My Settings (3.8k), which Castes' templates answer. - **Applies to.** A row names whom it covers: everyone (default), free colonists, slaves, children, or a caste through `CastesApi.CasteIdOf`; a per-pawn exemption list ("above the law") sits in the component. On the same act a narrower group wins over a wider one. Rows saved before this step load as "everyone" and keep their keys unique, so no saved book changes. New. Demand: Castes' read-only API (version 1) already lists Laws' caste checks as waiting on it. +- **Named punishments.** Save a catalogue entry with its options and its alongside entries under a name of your own ("Clan beating": group beating, anyone able, at the court place, plus guilty), and pick it in any row, verdict or "Decide myself". Templates carry the named punishments their rows use; deleting one that rows or open cases use asks first and names the count. New. Fabian, 2026-12-03, asked for groups he can name and called customizable groups maybe too complex; the catalogue with options and alongside entries covers his four examples first, so named punishments come later, in this step beside templates ("Decided 2026-12-03" item 6). Ideas: rows that tick several entries, like a bill's ingredient filter; a per-row "player orders count too" switch. @@ -83,7 +85,7 @@ Step 1: - **Reprimand.** -4 to -16 mood by severity for 3 days. Designed: [Reprimand](design.md#reprimand). - **Banish and execute.** Always confirmed in a dialog, never automatic. Designed: [Banish and execute](design.md#banish-and-execute). - **Talk down.** A planning punishment for breaks that aren't hostile: the enforcer walks over, and a Social roll against the offender's mood ends the break through `RecoverFromState`, with the catharsis setting applied. The spec decides what a failed try leads to. Laws owns calming colonists. Slaves follow the subdue rule: while Slaves' wardens calm breaks (step 2), Laws leaves the breaks they take to them, and otherwise talks slaves down like colonists. New. Demand: Snap Out! (1319782555, 636k, no 1.7) talks pawns out of breaks and has no 1.7 build. -- **Decide myself.** A punishment that leaves the case waiting in the Cases tab with Warn, Guilty N days, Jail N days and Pardon buttons and an alert while it waits; any open or warned case also gets a "Sentence" button. New. Demand: Prisoner Sentencing (1.3k) and RimCourt (8.8k) are built on the player choosing per case. +- **Decide myself.** A punishment that leaves the case waiting in the Cases tab with Warn, Guilty N days, Jail N days and Pardon buttons and an alert while it waits; any open or warned case also gets a "Sentence" button. From step 4 on the buttons list every catalogue entry that fits. New. Demand: Prisoner Sentencing (1.3k) and RimCourt (8.8k) are built on the player choosing per case. Step 2, with the sibling mods (needs Slaves' "Wardens calm breakdowns"): @@ -93,6 +95,20 @@ Step 3, subdue a pawn that fights back (needs step 1's subdue proven in play): - **Subdue with a fighter you pick.** For a break hostile to the colony (berserk), never automatic: the case shows the best candidate by Melee, weapon and health, and "Subdue with " sends that pawn. The danger rule leaves this one offender out. New: [Subdue a pawn that fights back](design.md#subdue-a-pawn-that-fights-back) holds the outline. +Step 4, the punishment catalogue (needs step 1's subdue, banish and execute; Excommunicate also Sentences step 1's give-back): + +- **Punishment picker.** The Punishment cell opens a searchable picker with groups (Words and mood, Body, Freedom and daily life, Status and faith, Removal, Death, Court), built like the act picker. Entries that don't fit the stage, or need a DLC, a sibling or "Offer harsh punishments", stay listed and disabled with their reason. Each entry has at most three options, set beside Days. A row can tick alongside entries (Reprimand, Guilty, Shunned, Shaken faith, Lose own bedroom) next to its main one, and names one "Instead" entry, Warn by default, for a convict the main one can't take: a child under a beating, a pregnant convict under a beating or a shooting (Biotech), a Masochist, a missing DLC, sibling or court place. Rows saved before this step load unchanged. Designed: [Punishment catalogue and picker](design.md#punishment-catalogue-and-picker). +- **Shunned.** For N days every colonist thinks less of the convict (-20 opinion) and the convict feels it (-6 mood). The core-game form of excommunication. Designed: [Shunned](design.md#shunned). +- **Group beating.** Fabian's example: colonists beat a held convict in turns until it goes down (it lies "beaten down"; pain alone can't knock a pawn unconscious, "Decided 2026-12-03" item 8), with Subdue's caps, so only bruises that heal. "How many" is 2, 3 or 4, or "everyone able", which is his version and the default: every colonist who may beat takes a turn, at most 4 at once ("Decided 2026-12-03" item 9). Kind pawns, kin, slaves and children never beat (a default in `design.md`, "Defaults I picked"); the convict remembers each beater (-15 opinion for 10 days). Harsh ("Decided 2026-12-03" item 1). Designed: [Group beating](design.md#group-beating). +- **Execution corps.** Fabian's example: the convict stands against a wall, a squad of 1 (default) to 6 starts one volley with real aim, and a convict alive after it walks free (a default in `design.md`, "Defaults I picked"). Once the convict goes down, shooters still aiming hold fire. The picker row and the dialog show the chance that every shot misses. Death costs the colony the same -2 as a cut execution ("Decided 2026-12-03" item 2). Harsh, always confirmed. Designed: [Execution corps](design.md#execution-corps). +- **Excommunicate and shaken faith.** Fabian's example: shunned, stripped of its ideoligion role for N days or for good, and its certainty cut, floored at 1%; the ideoligion itself never changes ("Decided 2026-12-03" item 3). "Shaken faith" is the certainty cut alone, as a main or alongside entry. Without Ideology both show "Needs Ideology" and Excommunicate's "Instead" is Shunned. Designed: [Excommunicate and shaken faith](design.md#excommunicate-and-shaken-faith). +- **Apology.** The convict walks to its victim and apologises; the victim's opinion of it rises, offsetting the "harmed me" a beating left. Needs a case with a victim. New. +- **Public execution.** For a jailed convict, the case offers the ideoligion's own Execution ritual, whose prisoner role any prisoner of the colony fills; Laws closes the case on the death. New. Needs Ideology and the ritual in the colony's ideoligion. + +Step 5, punishments in public (needs step 4 and Court step 2's court place and lord): + +- **Punishments in public.** Reprimand, group beating and the execution corps get "Where: in private or at the court place", and apology gains it once apology is built. At the court place they wait for the court hour (or "Carry out now"), the convict is brought there, the crowd watches, and a reprimand becomes a public reprimand one stage harsher. Spectators get "Saw justice done" (Kind ones are upset at a beating or a shooting, Bloodlust ones pleased), and for 10 days the break the convict was punished for is half as likely for them. Designed: [Punishments in public](design.md#punishments-in-public). + ## 4. Sentences A sentence ends and the colonist comes back whole. Jail must not cost a long colony its bedrooms, roles and mechs. @@ -101,28 +117,30 @@ Step 1, serve and come back: - **Serving the sentence.** Maintain only, so no prison mod recruits or enslaves the convict; a warden releases it when the time is served, with a fallback; another mod's early release closes the sentence instead of fighting it. Until the give-back ships, role holders and mechanitors wait with "Arrest now", because the arrest takes the role and shuts the mechs down. Designed: [Jail for N days](design.md#jail-for-n-days). - **Release gives back what jail took.** Bed, grave, throne, deathrest casket, ideoligion role, mech work modes and the weapon the arrest dropped. With it, role holders and mechanitors need no hold. Designed: [Release gives back what jail took](design.md#release-gives-back-what-jail-took). -- **Pardon, early release, add days.** Designed: [Pardon, early release and longer sentences](design.md#pardon-early-release-and-longer-sentences). +- **Pardon, early release, add days.** "Release now" ends only the jail or sentence caste time. A pardon ends every timed punishment on the case (shunned, lost bedroom, lost role, a role lost for good included, excommunication, a sentence caste) and gives back the bed and role if nobody else holds them; lost certainty grows back on its own ("Decided 2026-12-03" item 7). Designed: [Pardon, early release and longer sentences](design.md#pardon-early-release-and-longer-sentences). +- **Lose own bedroom and lose role.** Two status sentences on the give-back's snapshot: for N days the convict owns no bed in a bedroom and sleeps in barracks or wherever vanilla puts it, or holds no ideoligion role (Ideology); at the end the give-back returns what is still free. Laws never assigns another bed. Designed: [Lose own bedroom and lose role](design.md#lose-own-bedroom-and-lose-role). Step 2, with the sibling mods (each part waits for its sibling): - **Castes keeps the caste.** A convict returns to its own caste whatever the sentence length. Designed: [Castes keeps the caste](design.md#castes-keeps-the-caste). Needs Castes' join API (API version 2). - **Jail for slaves.** A jailed slave is a slave again when the sentence ends. While an indentured term runs (`SlavesApi.TermDaysLeft`), Laws doesn't jail and falls back to subdue or warn, until Slaves ships the member that keeps the term through a Laws sentence with its indentured servitude; with that member bound, Laws calls it right before the capture and jails as for any slave. Designed: [Jail for slaves](design.md#jail-for-slaves). Needs Ideology. -- **Confinement for N days.** A sentence: Laws asks Castes to put the convict into a caste the player picks for sentences, with that caste's allowed area and work priorities, for the sentence's time, and the `blax.laws.released` reason returns it to its old caste. No bed, role or mech is lost. New. Built after Castes' join API, with the sentence caste Castes builds for it (its area 5, step 5). +- **Sentence castes.** Punishments of daily life, each a Castes caste marked "for sentences" that the convict holds for N days: bread and water (Fabian's "worse forced food policy": vanilla's paste or simple food policy, which also works in jail), hard labour, no recreation, dry, rags, confinement (the caste's allowed area and work priorities), and any caste the player marks for sentences, by name. The end tick lives in Castes' save, so a sentence ends even after Laws is removed, and the `blax.laws.released` reason returns the convict to its old caste. No bed, role or mech is lost. Without Blax Castes there is no food punishment at all: Laws writes no policies itself, so bread and water, like every sentence caste, shows "Needs Blax Castes". New. Built after Castes' join API, with the sentence members Castes builds for it (its area 5, step 5; "Decided 2026-12-03" item 4). Ideas: a life sentence until pardoned, as Prisoner Sentencing offers for prisoners. Indenture as a sentence through Blax Slaves' indentured servitude, once that exists and a player asks: a slave has Warden, Hunting, Art and Research disabled and their priorities zeroed for good (Core Defs/WorkTypeDefs/WorkTypes.xml:85, 140, 280, 355; RimWorld/Pawn_WorkSettings.cs:195-205) and loses any ideoligion role (RimWorld/Precept_Role.cs:582-585), so it needs a plan for who gives those back, and a SlavesApi call to start a term. ## 5. Repeat offenders -Closed cases are pruned after the "Keep closed cases" setting (60 days by default) and every offence is judged as the first, so a colonist who binges every season gets five days each time. New in this plan as a whole. +Closed cases are pruned after the "Keep closed cases" setting (60 days by default) and every offence is judged as the first, so a colonist who binges every season gets five days each time, and no punishment leaves the colonist any different. New in this plan; reform is Designed. -Step 1, the record (needs the first release's cases; probation also Sentences' early release): +Step 1, the record and reform (needs the first release's cases; probation also Sentences' early release): - **Criminal record.** Convictions per pawn and law, kept after old cases are pruned, shown in the Cases tab and on the pawn. New. The court's repeat-conviction term reads only the record, so the record comes before court sessions. - **Probation.** Release early on probation; a new case during probation brings back the remaining days. New. Demand: Prison Expanded (3.3k, 1.7) offers parole for prisoners, and nothing offers it for colonists. +- **Reform.** Fabian's third ask: every punishment that leaves the convict in the colony can change it, for the better first. A served punishment gives "Paid my debt" (+4 mood for 6 days), a lower break threshold for 15 days and, for 30 days, half the chance of the break it was punished for. Now and then (at most 35%, once per 30 days, odds shown in the picker) it loses or softens the vice tied to the act: drug desire, pyromaniac, abrasive, bloodlust, gourmand, nerves. A punishment harsher than the act gives resentment instead. Only a colonist with the matching vice can lose it; everyone else gets the timed effects only. Trait reform is on by default ("Decided 2026-12-03" item 5). Only vanilla traits change; the rest is gone after an unsubscribe. Designed: [Reform](design.md#reform). Step 2, escalation (needs the record): -- **Escalation.** A row names what a repeat offence within N days gets: first a warning, then 5 days, then 10. New. No player request found; it brings the court's repeat rule to colonies that never convene a court. +- **Escalation.** A row names what a repeat offence within N days gets: first a warning, then 5 days, then 10. A reformed pawn's record softens it by one step; a relapse within 60 days cancels that. New. No player request found; it brings the court's repeat rule to colonies that never convene a court. ## 6. Court @@ -134,10 +152,12 @@ Step 1, Ideology's trial as a punishment: Step 2, court sessions on the core game: +- **Court place.** Fabian's first ask: select any table, party spot, campfire, throne, lectern or ritual spot you own and switch on "Court place", or pick it in the Laws tab. One per map. Its room is the court room: hovering the switch outlines it, and the Laws tab shows its impressiveness. Sessions, "Court on its own" and public punishments use it; nothing is saved on the building. Designed: [Court place](design.md#court-place). - **Court sessions.** Cases wait for trial, a convene dialog of our own with roles, place and the conviction chance, a session with speeches and a verdict letter, a verdict from evidence, Social skill and the judge's bias, and the sentence from the lawbook. The judge is appointed; when the judge is the accused, the victim or family of either, or is dead, jailed or away, the best uninvolved colonist acts as judge and the dialog says why. Designed: [Cases go to trial](design.md#cases-go-to-trial) through [Verdict and sentence](design.md#verdict-and-sentence). - **Jail, then trial.** The offender is arrested at once as for Jail, held on Maintain only and sent to court; a conviction gives the row's days minus the days served, an acquittal releases it. This is "jail and maybe court" for a binger who already took some. Designed: [Jail, then trial](design.md#jail-then-trial). -- **Court on its own.** Waiting cases convene at the court hour without a click (off by default). Designed: [Court on its own](design.md#court-on-its-own). -- **Remove Blax Laws from a game.** A button that ends sessions and offers to release Laws' convicts, since a running session can't survive a plain unsubscribe. Designed: [Remove Blax Laws from a game](design.md#remove-blax-laws-from-a-game). +- **Court on its own.** Waiting cases convene at the court hour without a click (off by default), at the court place. Designed: [Court on its own](design.md#court-on-its-own). +- **Courtrooms.** An impressive room around the court place softens the verdict; no room role is added. Moved here from step 4: it only reads the court place's room at the verdict, and Fabian named the room. Designed: [Courtrooms](design.md#courtrooms). +- **Remove Blax Laws from a game.** A button that ends sessions and public punishments and offers to release Laws' convicts, since a running session can't survive a plain unsubscribe. Designed: [Remove Blax Laws from a game](design.md#remove-blax-laws-from-a-game). Step 3, the people of a trial (needs sessions): @@ -148,10 +168,9 @@ Step 3, the people of a trial (needs sessions): Step 4, long trials (needs sessions): - **Court days.** Serious and grave cases over 2 or 3 days; an accused in custody from "Jail, then trial" stays there between the days. Designed: [Court days](design.md#court-days). -- **Courtrooms.** An impressive room around the court place softens the verdict; no room role is added. Designed: [Courtrooms](design.md#courtrooms). - **Appeals.** A convict appeals once and is retried before another judge, picked by step 2's acting-judge rule. New, from the Backlog. Demand: Rimworld Law and Order has no appeal at all. -Ideas: a titled noble presides (Royalty), trial by duel (Ideology), a judge's bench (needs art and a removal story), trials for guests and enemy prisoners, a RimCourt bridge with its pillory and lash, confessions and interrogation. +Ideas: a titled noble presides (Royalty), trial by duel (Ideology), a judge's bench (needs art and a removal story), trials for guests and enemy prisoners, confessions and interrogation. ## 7. Colony votes @@ -178,22 +197,43 @@ Ideas: votes on punishments ("beating is cruel"), campaigning through vanilla de 1. First release, the smallest loop that stops a break and jails the one who did it: Lawbook step 1; from Crimes step 1 the seven categories with their groups, the special acts, the break links and no flood; from Enforcement step 1 enforcement, warn and guilty, subdue, jail and subdue then jail; from Sentences step 1 serving the sentence, with role holders and mechanitors held for "Arrest now". Fabian asked for a quick MVP, and none of these works without the others: a book without enforcement does nothing. 2. The other designed parts of the step 1s: Violence first, with its combat performance run, then slaughterers and drugs against the policy, reprimand, banish and execute, the give-back (which drops the hold) and pardon, early release and add days. -3. The criminal record (Repeat offenders step 1), then Court steps 1 and 2. The court is what Fabian asked for after the lawbook; step 1 gives Ideology players a trial at once, step 2 brings "Jail, then trial" for his binge example, and the court's repeat term reads the record. -4. Attorneys (Court step 3), law votes with the voting core (Colony votes step 1) and the elected judge (Colony votes step 2). Fabian asked for each; law votes need no court, the judge needs sessions. -5. Court days and courtrooms (Court step 4). -6. As soon as the sibling is there: "Castes keeps the caste" with Castes' join API (it lifts the 50-day cap), "Slaves' wardens first" with Slaves' "Wardens calm breakdowns", and jail for slaves, whose indentured slaves wait for the term member Slaves ships with its indentured servitude. -7. After that, the parts nobody asked for yet, each once its spec is written: decide myself, talk down, probation and escalation, lawbook templates and "Applies to", witnesses, the guilty plea, appeals, the jury, pardon petitions, uprisings, crimes against the faith, confinement (after Castes' join API), and subdue a pawn that fights back. +3. The criminal record (Repeat offenders step 1), then Court steps 1 and 2, the court place and courtrooms included. The court is what Fabian asked for after the lawbook; step 1 gives Ideology players a trial at once, step 2 brings "Jail, then trial" for his binge example, the court place answers the first of his 2026-12-03 asks, and the court's repeat term reads the record. +4. Fabian's punishments of 2026-12-03: the punishment catalogue (Enforcement step 4: the picker with options, alongside entries and "Instead", shunned, group beating, the execution corps, excommunicate and shaken faith), lose own bedroom and lose role (Sentences step 1), then reform (Repeat offenders step 1), then punishments in public (Enforcement step 5). Named punishments come later, in Lawbook step 2 beside templates ("Decided 2026-12-03" item 6), so they are in item 8. The catalogue itself needs only items 1 and 2 (step 1's subdue, banish and execute and the give-back); it follows item 3 because the court place was the first of his 2026-12-03 asks. Reform reads the record and fires at the end of these punishments, and public punishments need the court place and the session lord, so those two need item 3. If Fabian wants his punishments sooner, the catalogue, lose own bedroom and lose role can move ahead of Court steps 1 and 2 with no other change. +5. Attorneys (Court step 3), law votes with the voting core (Colony votes step 1) and the elected judge (Colony votes step 2). Fabian asked for each; law votes need no court, the judge needs sessions. +6. Court days (Court step 4). +7. As soon as the sibling is there: "Castes keeps the caste" with Castes' join API (it lifts the 50-day cap), "Slaves' wardens first" with Slaves' "Wardens calm breakdowns", jail for slaves, whose indentured slaves wait for the term member Slaves ships with its indentured servitude, and the sentence castes (bread and water and confinement first, since Fabian asked for one and decided the other) with Castes' sentence members. +8. After that, the parts nobody asked for yet, each once its spec is written: decide myself, talk down, probation and escalation, lawbook templates and named punishments, "Applies to", apology and public execution, witnesses, the guilty plea, appeals, the jury, pardon petitions, uprisings, crimes against the faith, and subdue a pawn that fights back. ## Left out - New crime events or extra mental breaks: Laws only watches. -- Torture and flogging, fines (colonists own no silver), work bans and a law-enforcement work type. -- House arrest and community service as Laws' own systems: allowed areas and work priorities are Castes', so "Confinement" (Sentences step 2) asks Castes instead. -- Anything that puts our defs into vanilla save lists: incidents, letters, hediffs or memory thoughts for votes, court days or punishments. +- Torture, maiming and any punishment that leaves scars or lost parts; torture furniture (pillory, stocks, gallows), which would also need art. A capped group beating that leaves bruises is in ("Decided 2026-12-03" item 1). +- Fines (colonists own no silver), work bans and a law-enforcement work type. +- Taking royal titles or honor: the Empire grants them, and a colony court has no say. +- Changing a pawn's ideoligion as excommunication ("Decided 2026-12-03" item 3): it can't be undone and takes spouses, bonds and the bed with it. +- House arrest and community service as Laws' own systems, and Laws writing policies, schedules, work priorities or allowed areas without Blax Castes: they are the sentence castes (Sentences step 2) and ask Castes instead. +- Gaining good traits: reform only removes or softens a vice tied to the act. +- Anything that puts our defs into vanilla save lists: incidents, letters, hediffs or memory thoughts for votes, court days or punishments, and any court building, designation or duty of our own. Reasons for these and the rest: `design.md`, "Cut". ## Decided 2026-12-01 1. **Jail for slaves writes slave status back** at the end of the sentence, and skips a slave serving an indentured term until Blax Slaves ships the member that keeps the term through a Laws sentence (with its indentured servitude), because it only restores what the sentence took, and without the member a short sentence would leave an indentured servant a slave for life. -2. **Confinement is a sentence** that puts the convict into a sentence caste for its time, built after Castes' join API, with the timed caste assignment Castes builds for it as its area 5, step 5, because allowed areas and work priorities are Castes'. +2. **Confinement is a sentence** that puts the convict into a sentence caste for its time, built after Castes' join API, with the timed caste assignment Castes builds for it as its area 5, step 5, because allowed areas and work priorities are Castes'. Widened by "Decided 2026-12-03" item 4: confinement is now one of several sentence castes. + +## Decided 2026-12-03 + +Fabian accepted every recommendation on 2026-12-03. + +1. **"No flogging" is lifted for the capped group beating only, vanilla gunfire is allowed for the execution corps, and "Offer harsh punishments" is on by default**, because Fabian asked for both harsh entries; the beating keeps Subdue's caps (bruises that heal, never the head, never death), and when the setting is off the entries stay visible but disabled with the reason, so the setting is easy to find. +2. **A death by the squad upsets the colony like a normal execution (-2)**, not like a colonist shot dead (-5 and -3), because the squad carries out a sentence. +3. **Excommunicate takes shunning, role and certainty only and never gives a new ideoligion**, because a new ideoligion can't be undone; it needs Ideology for role and certainty, and core players get "Shunned" as its "Instead". +4. **Blax Castes allows several sentence castes (bread and water, hard labour, no recreation, dry, rags, confinement and any caste marked "for sentences") instead of one confinement caste**, which widens "Decided 2026-12-01" item 2; no Laws fallback writes policies without Castes. +5. **Trait reform is on by default**, since Fabian asked for betterment: vices only, one step, at most 35%, once per 30 days, a letter every time; "Temporary effects only" is the gentler choice in the same setting, and if that is too little lasting change, a "Reformed" mark in the record that softens escalation is the next step, with no trait involved. +6. **Named punishments come later, in Lawbook step 2 beside templates**, because the catalogue with options, alongside entries and "Instead" covers all four of his examples, and he called customizable groups maybe too complex. +7. **A pardon ends every timed punishment on the case (shunned, lost bedroom, lost role, excommunication, a sentence caste) and gives back what it took, a role lost "for good" included**, so every punishment has a way back; "Release now" ends only the jail or sentence caste time, and lost certainty is not given back but grows back with mood. +8. **The group beating goes on until the convict is down, not truly unconscious**, because in the game pain alone can't knock a pawn unconscious, so the convict lies "beaten down". +9. **"Everyone able" is the group beating's default, with at most 4 beaters at once**, since he wrote "each colonist may beat"; 2, 3 or 4 beaters stay options. + +Defaults Fabian can object to, in `design.md`, "Defaults I picked": a convict struck but alive walks free and is tended, in his words "if they miss, he may be freed"; Kind pawns and the convict's kin, spouse and lover never beat or shoot; spectators of a public punishment are deterred from the punished break for 10 days.