17 KiB
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. 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.
- 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.
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 for a prison break.
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.
- Blax Slaves: slave status, suppression, rebellion and the slave economy. Laws records a rebellion as an act and, if Fabian agrees, 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 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 (first release):
- Laws tab. Rows of Action, Stage, Severity, Punishment and Days; each dropdown offers only what fits the action. Designed: 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.
- 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.
- Missing entries wait. A row whose DLC or mod is gone shows "Needs " or "Missing: " and works again when it returns. Designed.
Step 2, lawbook templates (after Repeat offenders, so the file format holds the escalation column):
- Lawbook templates. Save the book to a file and load it in another colony, with Blax Defaults' write, read-back and backup rules. 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.
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 (first release):
- 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.
- 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. Designed: Violence. It joins the first release: a lawbook without assault and murder misses the crimes players name first.
- Slaughterers. The slaughterer break's "did it" is the animal it killed. Designed: 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.
- No flood. Acts outside a break open at most one case per offender and law a day. Designed.
Step 2, uprisings (needs Sentences step 1, and for rebel slaves Fabian's answer on jail for slaves):
- Prison break. Prisoners become offenders for this one act. Designed: Prison breaks and slave rebellions. The spec still has to say which punishments a prisoner gets; the proposal is warn, "Add days" on a Laws sentence and a confirmed execution.
- Slave rebellion. Records who rebelled; the rebellion itself stays Slaves'. Designed: same section. Needs Ideology.
Step 3, crimes against the faith (New; spec and a check of the precept code in the decompiled game first):
- Anything my ideoligion forbids. One group entry that matches any recorded act the offender's own ideoligion forbids, read from its precepts (
PreceptComp_UnwillingToDo.eventDef), so a vegetarian colony needs one row instead of one per meat. 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. - Apostasy. A colonist who leaves the colony's main ideoligion (
Pawn_IdeoTracker.SetIdeo). New, from the Backlog. Needs Ideology.
The two hooks above exist in the 1.7.5021 reference assemblies (a compile probe found both); what they do at runtime is not checked.
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 (first release):
- 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. Waiting cases retry by themselves. Designed: 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.
- Subdue. A capped fistfight that ends a break: torso and limbs only, never a bionic part, no catharsis for the offender, children never. Designed: Subdue.
- Jail and subdue then jail. The arrest; serving the sentence is area 4. Designed: Jail for N days, Subdue.
- Reprimand. -4 to -16 mood by severity for 3 days. Designed: Reprimand.
- Banish and execute. Always confirmed in a dialog, never automatic. Designed: Banish and execute.
Step 2, subdue a pawn that fights back (needs step 1's subdue proven in play):
- Subdue for aggressive breaks. Only an enforcer with Melee at least the offender's goes; when nobody qualifies, a letter asks you to draft someone. Designed: Subdue for aggressive breaks.
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 (first release):
- 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. Designed: 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. It joins the first release: a jail that takes the bedroom and the role for good is half a feature.
- Pardon, early release, add days. Designed: Pardon, early release and longer sentences.
Step 2, with the sibling mods (each part waits for its sibling or Fabian's answer):
- Castes keeps the caste. A convict returns to its own caste whatever the sentence length. Designed: 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. Designed: Jail for slaves. Needs Ideology and Fabian's yes, since it writes slave status.
- Indenture as a sentence. Serve N days as an indentured servant through Blax Slaves' indentured servitude. New, open question below. Needs Ideology, Slaves' indentured servitude and a SlavesApi call. Demand: players of Indentured Servitude asked to tie it to the guilty verdict (its comment page 2878184888, seen in search results; Steam rate-limited the page itself).
Idea: a life sentence until pardoned, as Prisoner Sentencing offers for prisoners.
5. Repeat offenders
Closed cases are pruned after 60 days 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.
One step (needs the first release's cases):
- 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 it once it exists.
- 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.
- 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.
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. Shows "Needs Ideology" without it until step 2.
Step 2, court sessions on the core game:
- Court sessions. Cases wait for trial, a ritual-style convene dialog 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. Designed: Cases go to trial through Verdict and sentence.
- Court on its own. Waiting cases convene at the court hour without a click (off by default). Designed: 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.
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.
- 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, with custody between them. Designed: Court days.
- Courtrooms. An impressive room around the court place softens the verdict. Designed: Courtrooms.
- Appeals. A convict appeals once and is retried before another judge. 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 who judges and in what the law is. All votes share one voting core.
Step 1, the voting core and the judge's office (needs court sessions):
- 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.
- Elected judge. A 60-day term, by-elections, recalls and an acting judge when the judge is involved in the case. Designed: Judge election.
- Leader or moral guide as judge. Designed: Ideoligion leader as judge. Needs Ideology.
Step 2, law votes:
- 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.
Step 3, jury and petitions (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).
- Pardon petitions. A convict's friends petition and the colony votes on a pardon. New, from the Backlog.
Ideas: votes on punishments ("beating is cruel"), campaigning through vanilla deep talks, Royalty vote weight, a Castes right "may serve in court" (needs a CastesApi addition).
Order
- First release, the core loop: Lawbook step 1, Crimes step 1, Enforcement step 1 and Sentences step 1. None of them is useful alone: a book without enforcement does nothing, and a jail without the give-back takes bedrooms and roles for good.
- Enforcement step 2. Berserk and rages are the breaks players fear most, and the fight needs the plain subdue proven first.
- Court, steps 1 to 4. The court is what Fabian asked for after the lawbook; step 1 gives Ideology players a trial at once, and each later step needs the one before.
- Colony votes, steps 1 to 3. They need court sessions; law votes and the jury reuse the voting core.
- Repeat offenders, then Lawbook step 2, so the template file holds the escalation column.
- As soon as they are unblocked: Crimes step 2 (prison break once Sentences step 1 exists, rebel slaves after Fabian's answer), Sentences step 2 (Castes' join API, Fabian's answers, Slaves' indentured servitude) and Crimes step 3 (after its spec and the precept check).
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: allowed areas and work priorities are Castes'.
- 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".
Open questions for Fabian
- Jail for slaves writes slave status back at the end of the sentence. Recommendation: yes, it only restores what the sentence took, and Blax Slaves' line in the shared ownership list already names the exception.
- Indenture as a sentence through Blax Slaves. Recommendation: yes, once Slaves' indentured servitude exists, with Slaves owning the status and the term and Laws only handing over the convict and the days.