rimworld-blax-laws/README.md

9.9 KiB

Blax Laws

RimWorld 1.7 Needs Harmony Any DLC combination Status: design

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 the first release will do. What the whole mod covers and in which order: docs/features.md. The specs: docs/design.md.

Features

The lawbook

  • 📖 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
  • 🎯 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 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.

Crimes

The catalogue holds hundreds of acts; these are the ones the starter lawbook and the examples use.

  • 💊 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.
  • 👊 Started a social fight. The pawn who reacts and swings first, usually the insulted one.
  • 🗯️ Insult. Every insult by the one who insults; slights are their own entry. Planning for insulting sprees.
  • 🍖 Ate. Any food or drug by name, or a group: any meat (meals included), raw meat and corpses, human meat, insect meat, hard drugs.
  • 🧾 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.
  • 🔪 Violence. Assault, harming prisoners or slaves, manslaughter and murder, plus "did it" for tantrums, berserk and rages and for the slaughterer break. Berserk and rages take a warning or guilt; subduing a pawn that fights back comes in a later step.
  • 🚫 Drugs against the policy. Any drug the pawn's drug policy doesn't allow, outside binges and player orders.
  • 🧮 No flood. Acts outside a break open at most one case per colonist and law a day; more acts only raise its count.

Punishments

  • ✋ Warn. A record and a message.
  • ⚖️ Guilty for N days. Vanilla guilt: the arrest of a free colonist is always accepted, executing it costs the colony only the small "justified execution" mood hit plus its family's grief, and banishing it costs no colony-wide mood.
  • 🛑 Subdue. A warden beats the offender down with fists to stop the break: bruises on torso and limbs, never the head or a bionic part, no lost parts, no scars, and the beating doesn't hand out the break's catharsis. No warden is pulled off a rescue, a patient or a fire, and nobody is sent while raiders are on the map. Source/BlaxLaws/JobDriver_Subdue.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.
  • 😔 Reprimand. A mood penalty by severity for three days.
  • 🚪 Banish and execute. Only after you confirm them in a dialog.

Sentences

  • 🛏️ 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. A thing someone else claimed meanwhile stays theirs, and the letter says so.
  • 🕊️ Pardon, early release, more days. On any jailed case, from the case log.

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
  • ⚙️ Mod settings. "Enforce laws", "Show Laws tab", messages and letters, who enforces, catharsis after subdue, player orders exempt, days between cases for acts outside a break, how long closed cases stay, "Reset to defaults".

Planned

The whole plan, by area, with the order and the reasons: docs/features.md. Coming after the first release:

  • 🥊 Subdue a pawn that fights back. Berserk and rages get subdued too, by an enforcer at least as good at melee.
  • 🏛️ 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, 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.
  • 🗳️ Colony votes. The colony elects its judge, with terms, by-elections and recalls; colonists propose and repeal laws and vote by traits, beliefs, opinion and mood, and you back or veto the result; later a jury and pardon petitions.
  • 📈 Repeat offenders. A criminal record per colonist, harsher punishments for a repeat offence, and early release on probation.
  • 📚 Lawbook templates. Take your lawbook to the next colony.
  • 🚨 Uprisings. Prison breaks and slave rebellions as crimes.
  • 🙏 Crimes against the faith. One law for anything a colonist's own ideoligion forbids, and apostasy (Ideology).
  • 🤝 With the other Blax mods. Blax Castes keeps a convict's caste through any sentence, jailed slaves become slaves again, and an indenture as a sentence through Blax Slaves (both still Fabian's call).

DLC support

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; 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. An arrest takes a role holder's role; the release gives it back.
  • Biotech adds children, who are never beaten, and mechanitors, whose mechs shut down while they sit in jail and go back to their work modes at the release.
  • 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.

Compatibility

  • ✔️ Prison Labor, Prisoner Realism, Custom Prisoner Interactions and Hospitality: a jailed colonist is a vanilla prisoner, so their features apply; Laws only keeps its own prisoners on "Maintain only" and lets them go when the time is served.
  • ✔️ Prisoner Sentencing and Prison Expanded: if one of them releases a colonist Laws jailed, Laws closes its sentence instead of fighting it.
  • ✔️ RimCourt: it judges civil disputes as the lord, Laws tries those who break your laws; both run side by side.
  • ♻️ Replaces Rimworld Law and Order, which has no 1.7 build, needs Ideology and adds its own crime events.
  • ❌ Multiplayer: not supported.

Load order: Harmony, Blax Castes, Blax Zones, Blax Slaves, Blax Laws. No Blax mod needs another.


Made by Blax

Blax Software Open Source Initiative

🛠️ Blax Gaming is a project of Blax Software, an Austrian software practice. We write Austrian-quality code in many fields: web platforms, mobile apps, backends, infrastructure, and the mods we play in our own colonies. Need something built? 👉 www.blax.at