Fix: bundle Ward's Patches into the aggregate (Rim Disorders integration)

The re-package vendored Ward's Defs and Textures but not its Patches/ dir,
so the disorder-treatable marking never applied -- psychiatric treatment
silently did nothing to the illness a patient was committed for. package.sh
now vendors Ward's Patches too. The folded-suite compat harness confirms it:
integration.disorderMarkedTreatable now passes with Ward bundled in the
aggregate.

Add the suite-overview wiki (Wiki/Home.md).
This commit is contained in:
flan
2026-07-15 20:27:57 +00:00
parent 2d46fef192
commit 25eb3a77db
5 changed files with 177 additions and 2 deletions
Binary file not shown.
Binary file not shown.
+72
View File
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Soft integration with [RF] Rim Disorders (Continued). The README's whole pitch is that its chronic
hediffs are Ward's admission criteria; this is what makes that true in the game rather than on
paper. Each operation is CONDITIONAL on the hediff existing, so the file is a silent no-op when Rim
Disorders is not loaded — Ward never hard-depends on it.
Attached only to the clinical, distress-causing conditions: major depression, generalized anxiety,
PTSD, cleanliness-OCD. Deliberately NOT Autism or ADHD — those are neurotypes, and a ward that
"treats away" who someone is would be a worse mod, not a more featureful one.
A player or another mod can opt any hediff in the same way: add the Contraband.TreatableConditionExtension extension.
-->
<Patch>
<Operation Class="PatchOperationConditional">
<xpath>/Defs/HediffDef[defName="MajorDepression"]</xpath>
<match Class="PatchOperationAdd">
<xpath>/Defs/HediffDef[defName="MajorDepression"]</xpath>
<value>
<modExtensions>
<li Class="Contraband.TreatableConditionExtension">
<reductionPerSession>0.10</reductionPerSession>
</li>
</modExtensions>
</value>
</match>
</Operation>
<Operation Class="PatchOperationConditional">
<xpath>/Defs/HediffDef[defName="GeneralizedAnxiety"]</xpath>
<match Class="PatchOperationAdd">
<xpath>/Defs/HediffDef[defName="GeneralizedAnxiety"]</xpath>
<value>
<modExtensions>
<li Class="Contraband.TreatableConditionExtension">
<reductionPerSession>0.12</reductionPerSession>
</li>
</modExtensions>
</value>
</match>
</Operation>
<Operation Class="PatchOperationConditional">
<xpath>/Defs/HediffDef[defName="PTSD"]</xpath>
<match Class="PatchOperationAdd">
<xpath>/Defs/HediffDef[defName="PTSD"]</xpath>
<value>
<modExtensions>
<li Class="Contraband.TreatableConditionExtension">
<reductionPerSession>0.08</reductionPerSession>
</li>
</modExtensions>
</value>
</match>
</Operation>
<Operation Class="PatchOperationConditional">
<xpath>/Defs/HediffDef[defName="COCD"]</xpath>
<match Class="PatchOperationAdd">
<xpath>/Defs/HediffDef[defName="COCD"]</xpath>
<value>
<modExtensions>
<li Class="Contraband.TreatableConditionExtension">
<reductionPerSession>0.10</reductionPerSession>
</li>
</modExtensions>
</value>
</match>
</Operation>
</Patch>
+8 -2
View File
@@ -50,8 +50,10 @@ if [[ -e "$JUST/Defs" ]]; then
mkdir -p "$HERE/Defs"
cp -r "$JUST/Defs/." "$HERE/Defs/"
fi
# Ward ships defs (interaction mode, hediffs, treatment station, room role) and its own textures.
# All its files are *_Ward.xml or under a Ward/ texture subdir, so nothing collides with the others.
# Ward ships defs (interaction mode, hediffs, treatment station, room role), its own textures, AND a
# Patches/ dir -- the Rim Disorders integration that marks disorders treatable (conditional, so it
# no-ops without that mod). Miss the Patches/ and treatment silently does nothing to the illness. All
# its files are *_Ward*.xml or under a Ward/ texture subdir, so nothing collides with the others.
if [[ -e "$WARD/Defs" ]]; then
mkdir -p "$HERE/Defs"
cp -r "$WARD/Defs/." "$HERE/Defs/"
@@ -60,6 +62,10 @@ if [[ -e "$WARD/Textures" ]]; then
mkdir -p "$HERE/Textures"
cp -r "$WARD/Textures/." "$HERE/Textures/"
fi
if [[ -e "$WARD/Patches" ]]; then
mkdir -p "$HERE/Patches"
cp -r "$WARD/Patches/." "$HERE/Patches/"
fi
echo "==> done. Assemblies:"
ls -1 "$HERE/Assemblies/" | sed 's/^/ /'
+97
View File
@@ -0,0 +1,97 @@
# Institution — Wiki
*Prison Architect in RimWorld. One install, five toggleable layers, over one shared engine.*
> **Every pawn has a criminal propensity on a spectrum — nature (traits) × nurture (mood,
> mistreatment, treatment) — and the colony can police it.**
That one sentence is the whole suite. Colonists, prisoners, and slaves drift toward crime on a
continuous spectrum; a policing-and-justice machine discovers, catches, weighs, punishes, reforms,
treats, and releases them — and catching one pawn changes the disposition of the rest.
**Institution** is the single mod that ships all of it. It bundles the suite's layers into one
install with a **checkbox per layer** (all on by default), owning no gameplay code itself — it is a
thin settings shim over the same separate, still-splittable feature DLLs. Pull it apart into its
layers again and nothing is lost.
---
## The gameplay loop
The suite is a closed loop, and each turn of it lives in a different layer:
1. **Disposition** *(Core)* — every pawn carries a seeded propensity: *would this one do it?*
2. **Crime** *(Justice · Policing)* — free colonists offend on that spectrum (rare in a small, tight,
well-deterred colony), with visible consequences — theft, vandalism, assault — that fray
relationships.
3. **Detection** *(Justice · Policing)* — witnesses and a **constable** work an open case until the
culprit is named.
4. **The weighed arrest** *(Justice · Policing)* — an arrest is made only when the crime is grave
enough to justify losing the pawn and the colony can afford to hold a prisoner; the disposed
**resist**, and a subdued resister is taken in.
5. **Contraband** *(Contraband)* — once held, a pawn conceals and improvises: shivs, brews, tunnels
under the perimeter, all countered by warden search — and a bent warden who smuggles for them.
6. **Gangs** *(Gangs)* — held pawns organise into contraband economies: joining by disposition,
smuggling networks, rivalry, fights that book as crimes.
7. **Corrections** *(Justice)* — classification grades the danger; discipline moves a **reform**
score (harden vs. rehabilitate); a **deterrence** climate rises and falls with visible justice and
feeds back into everyone's disposition; parole releases the genuinely reformed.
8. **Treatment** *(Ward)* — the other door: a prisoner committed for **psychiatric care** rather than
punished. Counselling reduces the disorder that broke them and builds a recovery track toward
discharge; neglect a committed patient and they deteriorate.
Steps 7 and 8 close the loop back onto step 1: catching, punishing, reforming, or treating one pawn
moves the colony's climate of order, which bends the disposition of everyone still deciding whether
crime pays here.
---
## The five layers
Each is a separate repo and DLL, bundled here behind a toggle. Every layer defaults **on**; turning
one off disables its systems in place without uninstalling anything.
| Layer | Toggle | What it adds | Wiki |
|---|---|---|---|
| **Core** | *(always on — the engine)* | propensity, the criminal record, secured context, the shared **treatment engine**, the deterrence seam | [Core](https://git.onetick.ninja/flan/rimworld-core/wiki) |
| **Contraband** | Contraband | concealment & intake, improvised shivs, Prison-Architect tunnels, warden search, warden corruption | [Contraband](https://git.onetick.ninja/flan/rimworld-contraband/wiki) |
| **Justice** | Justice | classification, deterrence feedback, discipline & reform, parole, regime (prisoner recreation) | [Justice](https://git.onetick.ninja/flan/rimworld-justice/wiki) |
| **Justice · Policing** | Policing | colony crime on the spectrum, witnesses, a constable, the weighed arrest, prison riots, recidivism alerts | [Policing](https://git.onetick.ninja/flan/rimworld-justice/wiki/Policing) |
| **Gangs** | Gangs | gangs as contraband economies — joining, smuggling networks, rivalry, fights-as-crime | [Gangs](https://git.onetick.ninja/flan/rimworld-gangs/wiki) |
| **Ward** | Ward | psychiatric care — treatment, recovery, discharge, ward neglect, sedation | [Ward](https://git.onetick.ninja/flan/rimworld-ward/wiki) |
**Policing** has its own toggle inside Justice because colony crime is a large behavioural change — a
player can run the rest of the corrections layer without their own colonists committing crimes.
---
## Why one Core, many layers
The suite runs on a small **Core** that owns exactly what every layer must agree on — *is this pawn
dangerous?*, *what have they actually done?*, *what hold are they under?* — plus two shared services:
the **treatment engine** (Ward's psychiatric care and Justice's rehabilitation point the same loop at
different states) and the **deterrence seam** (a neutral hook Justice fills so the order-climate
feedback runs *through* Core without Core ever depending on Justice).
Everything else builds up from there: Contraband and Justice on Core; Gangs on Core + Contraband +
Justice; Ward on Core. Cross-layer integrations that aren't hard dependencies stay soft — a feature
lights up if its sibling is present and the loop still closes without it. That is what keeps the
suite genuinely modular: this aggregate is a convenience, not a merge.
---
## Requirements & install
- **RimWorld 1.6.**
- **[Harmony](https://steamcommunity.com/sharedfiles/filedetails/?id=2009463077)** — required (the
suite's Harmony-using code is Justice's prisoner-recreation patch and Ward's).
- Install **Institution**, enable Harmony, and load Institution after it. That is the whole suite in
one mod; open the settings to toggle any layer.
The standalone **[Foul Play](https://git.onetick.ninja/flan/rimworld-foulplay)** framework is a
separate install that bridges into the suite when both are present.
---
*The **Institution** suite for RimWorld 1.6: Core · Contraband · Justice · Gangs · Ward. Designed and
built with substantial assistance from Claude (Anthropic).*