Compare commits

..

6 Commits

Author SHA1 Message Date
Fabian @ Blax Software b673e44f76 docs: decisions of 2026-12-01 2026-12-01 19:48:13 +01:00
Fabian @ Blax Software 8ffc99f2e2 docs: the indentured term hint goes out at the capture
Laws calls Slaves' term member from hook K's prefix, in the same tick
as the imprisonment.
2026-12-01 19:35:54 +01:00
Fabian @ Blax Software 3fb454b217 docs: plans checked against the sibling plans
One ownership list in all five design docs. An unhinted arrest keeps
Castes' new-prisoner row; a jailed slave made a slave again gets the
released hint. Slaves' wardens first and talk down stand down only for
the breaks those wardens take. Sibling doc changes marked done.
2026-12-01 19:34:13 +01:00
Fabian @ Blax Software 5652d162fb docs: plan review fixes 2026-12-01 19:18:40 +01:00
Timothy a02630972e docs: feature plan by area instead of releases by size
docs/features.md is the new plan of record: seven areas (lawbook,
crimes, enforcement and punishments, sentences, repeat offenders,
court, colony votes), steps only where a part needs another part, a
sibling feature or a decision first, the order with its reasons, and
two open questions (jail for slaves, indenture as a sentence).

The first release now holds every crime family except uprisings and
faith, all punishments and sentences that give back what jail took.
New, not yet specced: lawbook templates, crimes against the faith,
criminal record, escalation, probation, witnesses, guilty plea,
appeals, jury and pardon petitions.

design.md: At a glance by area, release sections regrouped into areas
and steps, day counts gone, version references replaced by feature
names; Violence and the slaughterer/uprising section split along the
new areas. README: first-release features and Planned by area.
2026-12-01 17:20:25 +01:00
Timothy dd82dd75df docs: rework the design around an act catalogue
A law's Action is now picked from a catalogue built from the game's defs
(mental breaks, ate, used, social interactions, recorded acts, records,
bills, special acts), as Fabian asked on 2026-11-30. The six crimes become
starter rows and break-to-act links. New hooks for records, history
events, bills and usables, checked against the 1.7.5021 reference
assemblies; behaviour claims listed under "To verify". 1.0 is 12 days,
1.8 2 days, the plan 50.
2026-12-01 08:46:52 +01:00
3 changed files with 729 additions and 319 deletions

View File

@ -5,29 +5,34 @@
[![Any DLC combination](https://img.shields.io/badge/DLCs-any_combination-5a6b5d)](#dlc-support) [![Any DLC combination](https://img.shields.io/badge/DLCs-any_combination-5a6b5d)](#dlc-support)
[![Status: design](https://img.shields.io/badge/status-design-CDCDCD)](docs/design.md) [![Status: design](https://img.shields.io/badge/status-design-CDCDCD)](docs/design.md)
RimWorld mod (1.7) by Blax Gaming. Lawbook, crimes and punishments. Write your colony's laws, and colonists who break them get stopped, jailed and, later, tried in court. Add "Drug binge, planning, subdue" and when a colonist starts a wake-up binge, a warden goes for it at once and beats it down; if it reaches a drug first, that dose counts as "did it" and the did-it law applies. Add "Drug binge, did it, jail 5 days" and the one who already took some sits out five days in your prison and walks back to work. Needs Harmony. Works with any DLC combination, core only included. RimWorld mod (1.7) by Blax Gaming. Lawbook, crimes and punishments. Write your colony's laws, and colonists who break them get stopped, jailed and, later, tried in court. Add "Drug binge, wake-up, planning, subdue" and when a colonist starts a wake-up binge, a warden goes for it at once and beats it down; if it reaches a drug first, that dose counts as "did it" and the did-it law applies. Add "Drug binge, did it, jail 5 days" and the one who already took some sits out five days in your prison and walks back to work. Needs Harmony. Works with any DLC combination, core only included.
Status: design. Nothing is built yet; below is what 1.0 will do. The full design is in `docs/design.md`. Status: design. Nothing is built yet; below is what the first release, the quick first version, will do. What the whole mod covers and in which order: `docs/features.md`. The specs: `docs/design.md`.
## Features ## Features
### The lawbook ### The lawbook
- 📖 **An empty lawbook.** A "Laws" tab in the bottom bar. Add a law as Action (with an option such as "wake-up"), Stage, Severity, Punishment and Days, each a dropdown that only offers what fits. Nothing is watched or punished until the first row exists. `Source/BlaxLaws/MainTabWindow_Laws.cs` - 📖 **An empty lawbook.** A "Laws" tab in the bottom bar. Add a law as Action, Stage, Severity, Punishment and Days, each a dropdown that only offers what fits. Nothing is watched or punished until the first row exists. `Source/BlaxLaws/MainTabWindow_Laws.cs`
- 🔎 **Pick any act.** The Action comes from a searchable list, like choosing what to tailor: every mental break, everything that can be eaten or used, every social interaction, every act the game records, every record and every bill. It's built from the game's own data when the game starts, so DLC and modded breaks, drugs and recipes show up with no patch, each labelled with its mod. `Source/BlaxLaws/Dialog_PickAct.cs`
- 📝 **Starter lawbook.** One click adds seven suggested laws: subdue drug binges, fire-starting sprees and corpse obsession before they start, jail for binges and fires already done, a warning for fights and insults. `Source/BlaxLaws/Lawbook.cs` - 📝 **Starter lawbook.** One click adds seven suggested laws: subdue drug binges, fire-starting sprees and corpse obsession before they start, jail for binges and fires already done, a warning for fights and insults. `Source/BlaxLaws/Lawbook.cs`
- 🎯 **One law per act.** Each action, option and stage appears once in the book, and when two laws fit an act the more specific one wins: "wake-up" over "any drug", "human meat" over "any meat". - 🎯 **One law per act.** Each action, option and stage appears once in the book, and when two laws fit an act the more specific one wins: "wake-up" over "hard drugs" over "any drug", "human meat" over "any meat".
- 🎚️ **Stages that mean something.** "Planning" is the moment a mental break starts and nothing is done yet; "Did it" is the act. A crime only offers the stages the game can really tell apart. - 🎚️ **Stages that mean something.** "Planning" is the moment a mental break starts and nothing is done yet; "Did it" is the act the break is about, such as the first dose of a binge. An entry only offers the stages the game can really tell apart.
- 📋 **Case log.** Who, what, when, which punishment and how it ended, newest first, with a jump to the pawn and "Arrest now" for cases that wait. - 📋 **Case log.** Who, what, when, which punishment and how it ended, newest first, with a jump to the pawn and "Arrest now" for cases that wait.
### Crimes ### Crimes
- 💊 **Drug binge.** Any drug, hard or social drugs, or one chemical such as wake-up. Planning when the binge starts, did it with every dose. `Source/BlaxLaws/Detection/BingeHooks.cs` The catalogue holds hundreds of acts; these are the ones the starter lawbook and the examples use.
- 🔥 **Fire starting.** Planning when a pyromaniac's spree starts, did it with every fire set.
- 💊 **Drug binge.** Any drug, hard or social drugs, or one chemical such as wake-up. Planning when the binge starts, did it with every dose. `Source/BlaxLaws/Detection/BreakHooks.cs`
- 🔥 **Fire-starting spree.** Planning when a pyromaniac's spree starts, did it with every fire set.
- ⚰️ **Corpse obsession.** Planning when the obsession starts, did it when the corpse is on display; the case notes "on a table" and whether the corpse was dug up from a grave, which it usually is. - ⚰️ **Corpse obsession.** Planning when the obsession starts, did it when the corpse is on display; the case notes "on a table" and whether the corpse was dug up from a grave, which it usually is.
- 👊 **Started a fight.** The pawn who reacts and swings first, usually the insulted one. - 👊 **Started a social fight.** The pawn who reacts and swings first, usually the insulted one.
- 🗯️ **Insults.** Every insult by the one who insults, slights too if you want. Planning for insulting sprees. - 🗯️ **Insult.** Every insult by the one who insults; slights are their own entry. Planning for insulting sprees.
- 🍖 **Ate meat.** Any meat (meals included), raw meat and corpses, or human meat. - 🍖 **Ate.** Any food or drug by name, or a group: any meat (meals included), raw meat and corpses, human meat, insect meat, hard drugs.
- 🧮 **No flood.** Meat, fights and insults outside a break open at most one case per colonist and law a day; more acts only raise its count. - 🧾 **Recorded acts, records and bills.** Cut a tree, butchered a human, harvested an organ (most need Ideology); kills, bodies stripped; made a human leather duster, any surgery.
- 💢 **Tantrums and rages.** Planning when the break starts; a warden can subdue a tantrum or a murderous rage, since those pawns don't turn on it. A berserk colonist fights back, so its case takes a warning, guilt or jail, and the jail waits until the break is over or you down it.
- 🧮 **No flood.** Acts outside a break open at most one case per colonist and law a day; more acts only raise its count.
### Punishments ### Punishments
@ -37,6 +42,11 @@ Status: design. Nothing is built yet; below is what 1.0 will do. The full design
- 🔒 **Jail for N days.** Arrested into a prisoner bed, kept on "Maintain only" so no prison mod recruits or enslaves your colonist, released by a warden when the time is served, back to work with its priorities intact. `Source/BlaxLaws/Enforcement.cs` - 🔒 **Jail for N days.** Arrested into a prisoner bed, kept on "Maintain only" so no prison mod recruits or enslaves your colonist, released by a warden when the time is served, back to work with its priorities intact. `Source/BlaxLaws/Enforcement.cs`
- 🔗 **Subdue, then jail.** Beaten down and carried straight to a cell before a doctor takes it to bed. - 🔗 **Subdue, then jail.** Beaten down and carried straight to a cell before a doctor takes it to bed.
### Sentences
- ⏳ **Served and released.** The colonist sits out its days on "Maintain only", a warden lets it out when the time is served, and another mod's early release closes the sentence instead of fighting it.
- ⏸️ **Role holders and mechanitors wait.** An arrest would take an ideoligion role and shut a mechanitor's mechs down, so their case waits with "Arrest now" and a letter says why.
### Save and settings ### Save and settings
- 💾 **Save-safe.** One piece of game data holds the lawbook and the cases. Unsubscribing leaves a save that loads with two errors in the log; jailed colonists stay prisoners you can release by hand. `Source/BlaxLaws/GameComponent_BlaxLaws.cs` - 💾 **Save-safe.** One piece of game data holds the lawbook and the cases. Unsubscribing leaves a save that loads with two errors in the log; jailed colonists stay prisoners you can release by hand. `Source/BlaxLaws/GameComponent_BlaxLaws.cs`
@ -44,24 +54,28 @@ Status: design. Nothing is built yet; below is what 1.0 will do. The full design
## Planned ## Planned
Later releases, in order (details in `docs/design.md`): The whole plan, by area, with the order and the reasons: `docs/features.md`. Coming after the first release:
- 🛏️ **1.1 Sentences done right.** Release gives back the bed, grave, throne, deathrest casket, ideoligion role and mech work modes. Pardon and early release, reprimands, jail for slaves, banishment and execution after your confirmation, and "Trial" through Ideology's vanilla trial. - 🔪 **Violence, next.** Assault, harming prisoners or slaves, manslaughter and murder, plus "did it" for tantrums, berserk, rages and the slaughterer break; drugs the pawn's drug policy doesn't allow.
- 🔪 **1.2 Violent crimes.** Tantrums and vandalism, assault, harming prisoners or slaves, murderous rage, manslaughter and murder. - 🛏️ **Back to its own bed.** When the sentence is served the colonist gets back its bed, grave, throne, deathrest casket, ideoligion role, its mechs' work modes and the weapon the arrest made it drop, so role holders and mechanitors no longer wait. With it: pardon, early release and more days, a reprimand, and banish or execute after you confirm.
- 🏛️ **1.3 Court sessions.** Trials without any DLC: a judge, a prosecutor and spectators at a place you pick, a verdict that weighs evidence against Social skill, the sentence from your lawbook. If you want, the court sits on its own at a set hour. A button removes the mod from a save. - 🏛️ **Court.** "Trial" as a punishment through Ideology's trial, then court sessions without any DLC: a judge, a prosecutor and spectators at a place you pick, a verdict that weighs evidence against Social skill, the sentence from your lawbook, "jail, then trial" for an offender you want locked up until the verdict, and if you want a court that sits on its own at a set hour. Then attorneys, witnesses and a guilty plea, trials over up to three days, courtrooms and appeals.
- 🗳️ **1.4 Elected judge.** The colony votes for a judge for 60 days at a time, with by-elections and recalls. - 🗳️ **Colony votes.** Colonists propose and repeal laws and vote by traits, beliefs, opinion and mood, and you back or veto the result; the colony elects its judge, with terms, by-elections and recalls; later a jury and pardon petitions.
- 🗣️ **1.5 Attorneys.** The accused asks a colonist to defend it or speaks for itself; both sides argue with Social. - 📈 **Repeat offenders.** A criminal record per colonist, harsher punishments for a repeat offence, and early release on probation.
- 📅 **1.6 Multi-day trials and courtrooms.** Up to three court days for grave crimes, custody between them, and courtrooms that make a verdict easier to accept. - 🧑‍⚖️ **Your call.** Decide a case yourself instead of a fixed punishment, talk a colonist down instead of beating it, and laws for one group only: slaves, children, a caste, or a colonist above the law.
- 🙋 **1.7 Law votes.** Colonists propose and repeal laws and vote by traits, beliefs, opinion and mood, and you can back or veto the result. - 📚 **Lawbook templates.** Take your lawbook to the next colony.
- 🚪 **1.8 More crimes.** Jailbreaks, desertion, slaughtering colony animals, food binges, drugs against the drug policy, prison breaks, slave rebellions. - 🚨 **Uprisings.** Your own convicts breaking out, and slave rebellions, as crimes.
- 🙏 **Crimes against the faith.** One law for anything the colony's ideoligion forbids, and one for leaving it (Ideology).
- 🥊 **Subdue a pawn that fights back.** For a berserk colonist, you pick the fighter and Laws sends it.
- 🤝 **With the other Blax mods.** Blax Castes keeps a convict's caste through any sentence, Blax Slaves' wardens calm slaves before Laws steps in, jailed slaves become slaves again, and a confinement sentence through a Blax Castes caste (the last two still Fabian's call).
## DLC support ## DLC support
Blax Laws works with any combination of DLCs, core only included, and lists none as a dependency. Every 1.0 crime and punishment runs on the core game. Blax Laws works with any combination of DLCs, core only included, and lists none as a dependency. Every category and punishment of the first release runs on the core game; later, the throne, deathrest casket, role and mech parts of the release give-back switch off without their DLC. The act list shows what your game has: a DLC's breaks, drugs and recipes appear when it's active.
- **Ideology** adds slaves, who can be warned, marked guilty and subdued. Role holders aren't jailed automatically in 1.0, because an arrest takes their role. - **Ideology** adds slaves, who can be warned, marked guilty and subdued. An arrest takes a role holder's role, so its case waits for "Arrest now" until the give-back returns the role at the release.
- **Biotech** adds children, who are never beaten, and mechanitors, who aren't jailed automatically in 1.0, because an arrest shuts their mechs down. - **Biotech** adds children, who are never beaten, and mechanitors, whose mechs shut down in jail; their case waits for "Arrest now" until the give-back returns the mechs to their work modes.
- **Royalty**, **Anomaly** and **Odyssey**: 1.0 uses none of their content. - **Ideology** also records most of the game's acts (cut a tree, butchered a human); without it the recorded acts category rarely fires.
- **Royalty**, **Anomaly** and **Odyssey**: their acts appear in the list when active; Laws needs none of them.
- **A save made with a DLC** loads without it. - **A save made with a DLC** loads without it.
## Compatibility ## Compatibility

File diff suppressed because it is too large Load Diff

199
docs/features.md Normal file
View File

@ -0,0 +1,199 @@
# 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.
Status: design only, nothing built. 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.
## How this plan is cut
- An area is one player problem together with the system that solves it. No area is cut to fit a time box or a release size.
- 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 <DLC>"), 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.
## 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.
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 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.
## 1. Lawbook
Players want to say what is forbidden without a fixed crime list, and to see every case.
Step 1, the book:
- **Laws tab.** Rows of Action, Stage, Severity, Punishment and Days; each dropdown offers only what fits the action. Designed: [Lawbook tab](design.md#lawbook-tab).
- **Act picker.** A searchable tree like a tailoring bill's filter, built from the loaded defs, each entry labelled with its mod. Designed: [Lawbook tab](design.md#lawbook-tab).
- **Starter lawbook.** Seven suggested rows in one click. Designed: "Defaults I picked".
- **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 <DLC>" or "Missing: <mod>" and works again when it returns. Designed.
Step 2, the book across saves and groups (needs step 1; castes need Castes' read-only API):
- **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.
- **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.
Ideas: rows that tick several entries, like a bill's ingredient filter; a per-row "player orders count too" switch.
## 2. Crimes
Any act the game knows can be a crime, DLC and modded content included, and the colony sees it the moment it happens.
Step 1, every act the game records:
- **Seven categories.** Mental breaks, ate, used, social interactions, recorded acts, records and bills, each with group entries (any drug, hard drugs, human meat, any surgery). Designed: [Act catalogue and detection](design.md#act-catalogue-and-detection).
- **Special acts.** Set a fire, displayed a corpse, started a social fight. Designed: same section.
- **Planning and did it for breaks.** A link table gives drug and food binges, fire-starting sprees, corpse obsession, insulting sprees and the jailbreaker their "did it". Designed: same section.
- **Violence.** Assault, harming prisoners or slaves, manslaughter and murder, plus "did it" for tantrums, berserk, murderous and sadistic rage. A hit that kills is murder; an assault victim who dies of its wounds later turns that case into manslaughter. Designed: [Violence](design.md#violence).
- **Slaughterers.** The slaughterer break's "did it" is the animal it killed. Designed: [Slaughterers](design.md#slaughterers).
- **Drugs against the policy.** An Ate group entry for a drug the pawn's policy doesn't allow; Laws reads the policy Castes or the player set. Designed: [Drugs against the policy](design.md#drugs-against-the-policy).
- **No flood.** Acts outside a break open at most one case per offender and law a day. Designed.
Step 2, uprisings (needs "Add days" from Sentences step 1, and for rebel slaves jail for slaves):
- **Prison break.** Laws' own convicts who break out are offenders for this one act; they get a warning, "Add days" or a confirmed execution. Other escapees stay with the prison mods. Designed: [Prison breaks and slave rebellions](design.md#prison-breaks-and-slave-rebellions).
- **Slave rebellion.** Records who rebelled; the rebellion itself stays Slaves'. Designed: same section. Needs Ideology.
Step 3, crimes against the faith (New; needs only step 1's recorded acts, and its spec first):
- **Anything the colony's ideoligion forbids.** One group entry under recorded acts: an act whose history event a precept of the colony's primary ideoligion answers with a bad thought for the doer or for those who learn of it (`PreceptComp_SelfTookMemoryThought`, `PreceptComp_KnowsMemoryThought`) or with `PreceptComp_UnwillingToDo`. An option switches to the offender's own ideoligion. Laws caches the events per ideoligion and rebuilds the set when an ideoligion changes. Vanilla records meat eating as an event only for raw meat (Verse/Thing.cs:2055-2064); meals with meat reach the precepts through `FoodUtility.AddThoughtsFromIdeo` (RimWorld/FoodUtility.cs:968) and no event, so a vegetarian colony uses "Ate: any meat", which reads the food itself. New, from the Backlog. Needs Ideology. Demand: Rimworld Law and Order (419, 1.6 only) built its crimes on Ideology; vanilla answers a broken precept with mood alone.
- **Left the colony's ideoligion.** A group entry on the `ChangedIdeo` event, which `Pawn_IdeoTracker.SetIdeo` records with the pawn as doer while the old ideoligion is still set (RimWorld/Pawn_IdeoTracker.cs:189-192), so hook H sees it and no new hook is needed. New, from the Backlog. Needs Ideology.
Ideas: an "attempted" stage (needs the hot `StartJob` hook), crimes on caravans, theft during a break, used buildings and any job as a category, freeing a held entity (Anomaly).
## 3. Enforcement and punishments
When a law is broken the colony acts at once, safely, and the punishment fits the act.
Step 1:
- **Enforcement.** One enforcer per case, wardens first; nobody is pulled off a rescue, a tending, a fire, a turret or a surgery, and nobody is sent while hostiles threaten the map, a berserk colonist included. Waiting cases retry by themselves. Designed: [Enforcement and cases](design.md#enforcement-and-cases).
- **Warn and guilty.** A record and a message, or vanilla guilt for N days: certain arrest, a mild execution thought, no colony-wide banishment thought. Designed: [Warn and guilty](design.md#warn-and-guilty).
- **Subdue.** A capped fistfight that ends a break that isn't hostile to the colony, tantrums and murderous or sadistic rage included: torso and limbs only, never a bionic part, no catharsis for the offender, children never. Designed: [Subdue](design.md#subdue).
- **Jail and subdue then jail.** The arrest; on a berserk pawn the jail waits until the break ends or you down it. Serving the sentence is area 4. Designed: [Jail for N days](design.md#jail-for-n-days), [Subdue](design.md#subdue).
- **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.
Step 2, with the sibling mods (needs Slaves' "Wardens calm breakdowns"):
- **Slaves' wardens first.** While `SlavesApi.CalmsBreaks` is true, Laws doesn't subdue or talk down a slave in a break Slaves' wardens take (not `IsAggro`, not the rebellion) and leaves it to them. Tantrums, rages and slaughterers stay Laws', since the wardens skip them. Designed: [Subdue](design.md#subdue), "Works with the other Blax mods".
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 <name>" 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.
## 4. Sentences
A sentence ends and the colonist comes back whole. Jail must not cost a long colony its bedrooms, roles and mechs.
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).
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).
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.
Step 1, the record (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.
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.
## 6. Court
Grave cases get a trial instead of an automatic sentence, on the core game, with real roles.
Step 1, Ideology's trial as a punishment:
- **Trial.** A "Trial" punishment; with Ideology the leader's Accuse ability tries the case and the vanilla verdict closes it. Designed: [Trial through Ideology's ritual](design.md#trial-through-ideologys-ritual). Shows "Needs Ideology" without it until step 2.
Step 2, court sessions on the core game:
- **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).
Step 3, the people of a trial (needs sessions):
- **Attorneys.** Defence and prosecution argue with Social, gain XP and are remembered; a Kind judge cuts sentences, a cruel one adds to them. Designed: [Defence and prosecution](design.md#defence-and-prosecution).
- **Witnesses.** Colonists who saw the act testify and each adds evidence; an act nobody saw is harder to prove. New, from the Backlog. Demand: Rimworld Law and Order's trial odds weigh how many witnesses saw the crime. Hook: at filing, awake free colonists with line of sight to the act (`GenSight.LineOfSight`, in the reference assemblies). The spec decides how the verdict formula changes.
- **Guilty plea.** The accused pleads guilty for a shorter sentence and skips the session. New, from the Backlog.
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.
## 7. Colony votes
The colony has a say in what the law is and who judges. All votes share one voting core.
Step 1, the voting core and law votes (needs the first release; pardon petitions also Pardon):
- **Voting core.** Who votes, a ballot tab, a tally letter, an alert while a vote is open, "Aye" and "Nay" over the voters. Designed: [Voting core](design.md#voting-core).
- **Law votes.** Colonists propose and repeal laws and vote by traits, beliefs, opinion and mood; you back or veto the result. Designed: [Colony votes on the lawbook](design.md#colony-votes-on-the-lawbook).
- **Pardon petitions.** A convict's friends petition and the colony votes on a pardon. New, from the Backlog.
Step 2, the judge's office (needs court sessions):
- **Elected judge.** A 60-day term, by-elections and recalls; a judge involved in a case hands it over by Court step 2's acting-judge rule. Designed: [Judge election](design.md#judge-election).
- **Leader or moral guide as judge.** Designed: [Ideoligion leader as judge](design.md#ideoligion-leader-as-judge). Needs Ideology.
Step 3, the jury (needs court sessions and the voting core):
- **Jury.** The spectators vote the verdict through the voting core instead of the formula alone. New, from the Backlog. Demand: the older Jury Trial mod built a court with jury seats but no vote (seen in search results).
Ideas: votes on punishments ("beating is cruel"), campaigning through vanilla deep talks, Royalty vote weight, a Castes right "may serve in court" (a per-caste value Castes stores for sibling mods, CastesApi version 4, which Castes builds when the first sibling feature needs one).
## Order
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.
## 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.
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'.