Compare commits

..

No commits in common. "ef7d7f86b0f7e6a80162c61ab86682a6f8aef50b" and "6bd0e4b6d0ac2d3faa668bfbcebecd6aaa3f0401" have entirely different histories.

3 changed files with 238 additions and 671 deletions

View File

@ -47,11 +47,11 @@ Blax Slaves works with any combination of DLCs, core only included, and lists no
- ✔️ Hospitality visitor groups never take a runaway who is due to be returned.
- ✔️ No Sympathy For Prisoners already removes slavery and execution precept thoughts for everyone, pacifists included.
- ♻️ Everybody Buys Slaves and [SYR] More Slaves can stay installed but aren't needed any more; with More Slaves, its extra 3~5 slaves per trader stack on ours.
- 🧩 [Blax Castes](https://steamcommunity.com/sharedfiles/filedetails/?id=3848261054), [Blax Zones](https://steamcommunity.com/sharedfiles/filedetails/?id=3848261160) and [Blax Defaults](https://steamcommunity.com/sharedfiles/filedetails/?id=3848261264) are optional companions on the Workshop. Blax Slaves binds the Castes and Zones APIs by reflection when they are loaded and works the same without them. Crimes and punishments, for slaves too, are planned in [Blax Laws](https://forgejo.blax.at/blax-software/rimworld-blax-laws).
- 🧩 Blax Castes and Blax Zones (planned, see `docs/`) are optional companions; Blax Slaves binds their APIs by reflection when they are loaded.
Not covered: eating slave meat, slave-leather apparel, slaves lost when a map closes or kidnapped by raiders (vanilla ransom handles those).
🗺️ What's planned, by area and in build order: `docs/features.md`. The spec of each feature: `docs/roadmap.md`.
🗺️ Roadmap: `docs/roadmap.md`.
## Development

View File

@ -1,270 +0,0 @@
# Blax Slaves feature plan
Planned 2026-12-01 and checked against the decompiled 1.7 code the same day. This is the plan of record for what Blax Slaves covers and in which order the rest gets built. How each feature works, its settings, tests and risks live in [roadmap.md](roadmap.md).
When it is complete, Blax Slaves is the one slavery mod a RimWorld 1.7 colony needs. You buy and sell slaves on your terms, make deals with factions over the people you hold, keep slaves without a rebellion doom timer, run a slave workforce with its own hospital and implants, and give slaves a way to loyalty and freedom. It replaces about thirty dead or conflicting slavery mods, every feature has its own toggle, and it works with any DLC combination (the slave features need Ideology).
Status: 1.0, 1.1 and 1.2.1 are on the Workshop (item 3847282171), 1.2.1 since 2026-11-29. Everything marked Designed has a full spec in the roadmap and no code yet.
Status labels:
- **Shipped x.y**: on the Workshop.
- **Designed**: specified in the roadmap, no code.
- **New**: added in this plan, with a spec stub in the roadmap; its hook is named but not checked against the decompiled code.
- **Idea**: in scope, waits until players ask.
Every unbuilt feature that changes a running colony by itself ships switched off. The others ship on but do nothing until you use them: a comms option, a bill, an order or a gizmo. Which is which: "Defaults I picked" in the roadmap.
## Scope
Blax Slaves covers slave status and everything that hangs on it: trade in slaves and captives, prices and value, deals with factions over the people you hold, suppression, rebellion and the slave interaction mode (vanilla's modes plus Recruit and Convert), slave work rules, slave medicine and implants, the way from slavery to loyalty and freedom, and how much a slave weighs for the storyteller.
It leaves to its siblings:
- **Blax Castes**: every per-pawn policy default (apparel, food, drugs, reading, medical care, schedule, work priorities, weapon loadout, allowed area and the rest). Slaves never sets a policy; it tells Castes why a pawn joined.
- **Blax Zones**: sleeping spots, beds by zone and every friendly drop location. Slaves' silver payouts land where ZonesApi says; slaves themselves are never routed into zones.
- **Blax Defaults**: what the game forbids when pawns go down, die or are stripped, slaves' gear included.
- **Blax Laws**: crimes and punishments, for slaves too (warn, guilty, subdue, jail, later court). Rebellion stays Slaves'; Laws only records it as a crime. Laws gives back the slave status a sentence took.
The full contract is "Works with the other Blax mods" in the roadmap.
## Trade
Vanilla sells few slaves, lets few traders buy your captives, fixes the price and decides for you whether a bought pawn joins as a slave or a colonist. This area makes the trade window and the traders work for a slave colony.
- **Slavers are common.** Slaver caravans and slave ships twice as often with more stock; other traders may carry a slave or two. Shipped 1.0.
- **Request a slaver caravan** from allied outlanders and tribes at the comms console. Shipped 1.1.
- **Buy as slave or colonist.** One click in the trade window, price updates. Shipped 1.2.
- **Every trader buys captives**, visitor groups included; anti-slavery factions may refuse. Shipped 1.2.
- **Slave stock ignores colony size**, so settlements keep selling. Shipped 1.2.
- **Price sliders** for buying slaves and selling captives, capped so buy-low-sell-high doesn't pay. Shipped 1.2.
- **Settings tabs and a Compat tab** that lists the mods you can unsubscribe. Shipped 1.2.
Next step, "Sell any time":
- **Slave ship on request.** Allied pro-slavery outlanders send an orbital slave ship from the comms console, so captives sell any time. With Odyssey the slave ship flies the Traders Guild's flag; the option says so and stays closed while the Guild is hostile. [Designed](roadmap.md#slave-ship-on-request).
- **Abolitionists buy to free.** A third choice for traders whose ideoligion rejects slavery, next to "buy anyway" (the default since 1.2, and it stays the default) and "refuse": they buy your slaves at half price to free them, nobody minds the sale and their faction's goodwill rises. [Designed](roadmap.md#abolitionists-buy-to-free).
Both answer "sell captives to anyone" at any time: a buyer on request, and a fair deal with factions that reject slavery. Neither needs another area. Slave appraisal, which comes later, leaves buy-to-free sales out of its buyer factor.
Waits for Blax Castes:
- **Caste picker on the trade row.** Pick the caste a bought pawn joins, next to the slave or colonist button. Ships once Castes' PrePick (CastesApi version 3) is out; hidden without it. [New](roadmap.md#caste-picker-on-the-trade-row), from Backlog.
## Faction deals
The people you hold are worth more to their own factions than to a trader, and vanilla gives you no way to ask. Every deal here pays silver by drop pod through one helper (into a Blax Zones delivery zone when one fits), and a purchase ledger keeps you from buying a pawn cheap and ransoming it home.
Step 1, "Captives pay":
- **Purchase ledger and payouts.** Nothing visible; the base every later deal reuses. [Designed](roadmap.md#purchase-ledger-and-payouts).
- **Ransom captives at the comms console.** They quote, your negotiator pushes for more at lower odds; a refusal may bring a rescue raid. Replaces PrisonerRansom (91k, no 1.7 build, in your mod list). [Designed](roadmap.md#ransom-captives-at-the-comms-console).
- **Factions buy back their people.** Letter offers for captives you hold; nobles and leaders draw more. [Designed](roadmap.md#factions-buy-back-their-people).
- **Released captives leave your gear behind.** A slave you ransom, sell back or release to walk home drops your weapons and armor before leaving. It ships with ransom because ransom is what first releases slaves in numbers. [Designed](roadmap.md#released-captives-leave-your-gear-behind).
Step 2, "Slave orders":
- **Faction slave orders.** Pro-slavery factions ask for slaves with a skill and pay a premium plus goodwill. Needs Slave value, because the premium sits on the appraised price. [Designed](roadmap.md#faction-slave-orders).
Step 3, "Hire out":
- **Hire out slaves** to allied factions for wages, built on vanilla's borrowed-pawn quests; escape and injury rolls. [Designed](roadmap.md#hire-out-slaves). Last on purpose: the riskiest feature in the plan with almost no demand. It moves to Backlog if nobody asks by the time slave orders are out.
## Control
Vanilla's rebellion is a doom timer: well-kept slaves still revolt, wardens can't keep up with a barracks, terror fades the moment a slave turns a corner, and a slave who escapes is gone for good. This area keeps slaves without that fight.
- **Branding and rebranding.** A brand that remembers its owner and slows suppression loss. Shipped 1.0.
- **Trader slaves come branded.** Shipped 1.0.
- **Runaways come back.** Non-hostile factions return branded escapees. Shipped 1.0.
Step 1, "No doom timer":
- **No rebellion while suppressed.** A slave at or above the safe threshold (50%) never rebels. Adds SlavesApi.IsSafe. [Designed](roadmap.md#no-rebellion-while-suppressed).
- **Rebellion options.** Armed slaves are never safe; calm genes never rebel (Biotech). Both off until switched on. [Designed](roadmap.md#rebellion-options-armed-slaves-and-calm-genes).
- **Rebellion alerts use the safe threshold**, worst first, each alert can be hidden. [Designed](roadmap.md#rebellion-alerts-use-the-safe-threshold).
- **Suppressed slaves don't break** (off by default). [Designed](roadmap.md#suppressed-slaves-dont-break).
Step 2, "Wardens":
- **Warden suppression threshold.** Wardens top slaves up below a level you pick instead of vanilla's 70%, which keeps slaves further above the safe threshold. Demand: Useful Terror's "smarter suppression" (90% there); nothing in your mod list does it. [Designed](roadmap.md#warden-suppression-threshold).
- **Suppress the whole room.** Bystanders within 6 cells get 70% of the gain. [Designed](roadmap.md#suppress-the-whole-room).
- **Wardens calm breakdowns.** A warden talks a slave out of a non-violent break at a suppression cost. Adds SlavesApi.CalmsBreaks, which Blax Laws reads to leave such slaves to the wardens. [Designed](roadmap.md#wardens-calm-breakdowns).
Step 3, "Lingering terror":
- **Lingering terror.** Terror fades over hours instead of at once. [Designed](roadmap.md#lingering-terror).
Step 1 comes first because its safe threshold and MTB postfix are what Slave implants and Loyalty build on. Step 2 teaches wardens new work, and its threshold test is what recruit and convert reuse. Step 3 stands alone.
Ideas:
- **Rebels may surrender** when most of a rebellion is down, instead of fighting to the death. Waits to see whether players still meet such fights after step 1.
- **Terror covers rebellion risks.** Terror weakens vanilla's three rebellion multipliers (weapon nearby x4, room at the map edge x1.7, no colonist on the map x20). After step 1 a safe slave never rebels, so this only reaches slaves below the safe threshold, or every slave with safe suppression off; in practice slaves left unsuppressed while every colonist travels. Useful Terror (2636462610, 21.8k, maintained on 1.7, not in your mod list) does it. Waits until players report rebellions of unsafe slaves during caravan trips once step 1 is out. [Spec](roadmap.md#terror-covers-rebellion-risks).
## Running a slave workforce
A big slave colony is hard to run: slaves can't do half the jobs, work at 85% speed and fill the colonist bar. This area is the daily view of that workforce.
- **Time as a slave** in the Records tab and the slave tab. Shipped 1.2.
- **Slave work rules.** Which banned work types slaves may do, work speed flat or by suppression, and slave wardens never suppress slaves. Replaces Capable Slaves (9.8k, no 1.7) and five smaller work mods. [Designed](roadmap.md#slave-work-rules).
- **Hide slaves from the colonist bar** with one toggle or a key; caravan slaves stay listed. Replaces SlaveBar (24.6k, last built for 1.5). [Designed](roadmap.md#hide-slaves-from-the-colonist-bar).
- **Slave overview.** A "Slaves" main tab, one sortable row per slave: suppression, days to a possible rebellion, time as a slave, and columns that appear as later areas ship (value, loyalty, term, donor). The place to see slaves once they leave the colonist bar. [New](roadmap.md#slave-overview), from Backlog.
One step: all three are the same daily job, managing the people who do the work.
## Slave medicine
Vanilla keeps slaves out of colonist medical beds, throws away queued operations when a pawn's status changes and gives slaves no hemogen farm. Medical depth was your ask.
Step 1, "One hospital":
- **Shared infirmary and slave-surgeon rule.** Slaves use colonist medical beds when theirs are full; slave doctors can be barred from operating on free colonists. [Designed](roadmap.md#shared-infirmary-and-slave-surgeon-rule).
- **Surgery bills and medical care survive status changes** (enslave, imprison, free). The medical care part stands down while Castes is loaded. [Designed](roadmap.md#surgery-bills-and-medical-care-survive-status-changes).
Step 2, "Harvests and blood":
- **Organ harvests wait for health**, never take the last kidney or lung, and stop at a stock target. [Designed](roadmap.md#organ-harvests-wait-for-health).
- **Blood bank.** Donor slaves get hemogen bills when well enough; sanguophages may feed on donors. Needs Biotech. [Designed](roadmap.md#blood-bank).
Step 1 fixes gaps every slave colony hits. Step 2 is for colonies that use slaves' bodies and keeps its state in the ledger from Faction deals' first step.
## Slave implants
Control collars were the top medical request (Simple Slavery Collars, 52k, no 1.7 build), and vanilla has nothing between suppression and a rebellion fight. All three implants are surgery with vanilla items, no new art, and go dormant once the pawn is free.
- **Compliance implant.** Suppression falls 30% slower, rebellions start half as often. [Designed](roadmap.md#compliance-implant).
- **Sedation relay.** Puts a rebelling or berserk slave under anesthesia; manual and area triggers. Nothing explodes. [Designed](roadmap.md#sedation-relay).
- **Endurance implant.** Full work speed for slaves at the cost of faster rest loss. [Designed](roadmap.md#endurance-implant).
One step: they share one hediff class with a status-driven stage and the generalised suppression fall-rate patch, which loyalty and indenture later feed through the ledger. Needs Control's "No doom timer".
## Slave value
Vanilla sells every slave at 60% of 60% of market value, so a healthy, skilled, branded slave sells like a sick raider.
- **Slave appraisal.** Sale price by suppression, your brand, best skill, health certificate, implant, recent rebellion and the buyer's view of slavery (left out of buy-to-free sales); an appraised-value stat with the spare organs' price next to it. [Designed](roadmap.md#slave-appraisal).
- **Health examination and certificate.** A healthy slave is certified for 30 days and sells for 15% more. Ships only with appraisal. [Designed](roadmap.md#health-examination-and-certificate).
- **Honor by quality at the tribute collector.** 1 to 9 honor by the slave's value instead of a flat 3. Needs Royalty. [Designed](roadmap.md#honor-by-quality-at-the-tribute-collector).
One step, after Slave implants, so appraisal counts implants from the start.
## Freedom and loyalty
Vanilla's only way out of slavery is emancipation by hand, and years of good service count for nothing.
Step 1, "A way out":
- **Recruit slaves.** A warden order that talks a slave round over days, no imprisonment detour. Replaces Recruit Slaves (26k). [Designed](roadmap.md#recruit-slaves).
- **Convert slaves.** A warden order for daily conversion, then suppress or recruit. [Designed](roadmap.md#convert-slaves).
- **Freedom pays off.** Freed slaves who stay get "freed from slavery" instead of "was enslaved". [Designed](roadmap.md#freedom-pays-off). The gear drop for released slaves ships earlier, with Faction deals' "Captives pay".
New slaves start in Suppress, as in vanilla; recruit and convert are orders you give per slave. A Blax order never reaches the save, so removing the mod leaves those slaves on Suppress. Blax Castes sets the per-caste default mode for new slaves, Recruit and Convert included; while recruit or convert is switched off here, slaves left in that order go back to Suppress.
Step 2, "Loyalty":
- **Loyalty.** Well-kept slaves grow Broken in, Obedient (never rebels), Loyal, then Devoted, when a letter offers to make them colonists. Adds SlavesApi.Loyalty. [Designed](roadmap.md#loyalty).
Step 3, "Indentured servitude":
- **Indentured servitude.** Terms of 15 to 120 days, "joins indentured" when buying, a term-end letter: stay, go home or extend. Adds SlavesApi.TermDaysLeft, and the SlavesApi member Blax Laws calls right before it captures an indentured slave it arrests, so the term runs on through the sentence. [Designed](roadmap.md#indentured-servitude-1).
The order follows the data: loyalty grows out of recruit's persuasion counter, and indenture's willingness check reads loyalty.
Ideas:
- **Order chains** such as "emancipate when healthy", on the warden-order base once recruit and convert prove it.
- **Loyal slaves join parties.** More Slavery Stuff (2896845138, 21.7k, last built for 1.6) offers it as a precept; check first how 1.7 keeps slaves out of gatherings.
- **Per-caste blood donor and indenture term** through CastesApi version 4 (Castes area 5, step 4). Castes stores the value per caste, Slaves applies it; Castes builds version 4 when the first sibling feature needs one.
- **Indenture as a sentence** for Blax Laws: SlavesApi.StartIndenture(Pawn, int days, string source) makes a convict a colony slave with a term. Laws keeps it as an idea until a player asks, because a slave loses work types and roles for good; built only once Laws takes it up.
## Colony conscience
Colonists mourn every slave or prisoner you harm, even ones the colony bought for that purpose, and factions punish surgery on captives you hold.
- **Harming slaves doesn't upset colonists.** Pacifists and family still mind. Shipped 1.0.
- **Prisoners count too.** The same rule for prisoners, enslaving a prisoner included, a mode that halves instead of removes, and optionally no goodwill loss for surgery on captives (execution still costs it). Replaces No Sympathy For Prisoners (16.4k, in your mod list) and Prisoner Harvesting (13.1k). Unlike No Sympathy For Prisoners, pacifists and family still mind. [Designed](roadmap.md#prisoners-count-too).
## Storyteller weight
A slave counts 75% toward wealth, raid points and population, so a large slave workforce brings large raids.
- **Slave wealth, raid and population weight.** Three sliders, vanilla by default. Slaves Are Worthless (10.2k) does it on 1.7, so this consolidates rather than fills a gap. [Designed](roadmap.md#slave-wealth-raid-and-population-weight).
- Idea: **caravan storyteller wealth**, which still counts slaves at 75%, if players report it.
## API for the Blax mods
- **Calls CastesApi** with five join reasons: a returned runaway (wired since 1.2), recruited, indenture served, bought indentured and contract returned (each with its feature). Castes' CasteLabels (version 1) and PrePick (version 3) serve the caste picker on the trade row.
- **Not used yet:** CastesApi version 4 (per-caste values a sibling registers), for the per-caste blood donor and indenture term idea.
- **Calls ZonesApi.TryFindDropSpot** for every silver payout, from Faction deals' first step.
- **Offers SlavesApi**: Version and IsSafe (Control, step 1), CalmsBreaks (Control, "Wardens", for Blax Laws), Loyalty and TermDaysLeft (Freedom and loyalty, steps 2 and 3).
- **Planned:** the member Laws calls right before it captures an indentured slave it arrests (its CapturedBy prefix), so the term runs on through the sentence, shipping with Indentured servitude. Its name is set in the spec.
- **Idea:** SlavesApi.StartIndenture(Pawn, int days, string source), only once Laws takes up indenture as a sentence.
## Order
The remaining steps, in build order:
1. **Control, "No doom timer"**: the top complaint (Slave Rebellions Improved, 71k), and its safe threshold and MTB postfix are what Slave implants and Loyalty build on.
2. **Faction deals, "Captives pay"**: PrisonerRansom (91k) has no 1.7 build and is in your mod list. It brings the ledger and the payout helper that medicine, value, orders and hire-out reuse, and the gear drop every release needs.
3. **Trade, "Sell any time"**: the other half of "sell captives to anyone", and it needs nothing from later areas.
4. **Colony conscience**: replaces No Sympathy For Prisoners from your mod list, and sits next to ransom because both are about the captives you hold.
5. **Running a slave workforce**: fills 1.7 gaps no maintained mod covers (Capable Slaves and SlaveBar have no 1.7 build).
6. **Slave medicine**, "One hospital", then "Harvests and blood".
7. **Slave implants**: need step 1's MTB postfix.
8. **Slave value**: counts implants and certificates.
9. **Control, "Wardens"**: nothing in your mod list covers it, CalmsBreaks is what Blax Laws reads, and its threshold test is what recruit and convert reuse, so it goes right before Freedom.
10. **Freedom and loyalty**, "A way out", "Loyalty", then "Indentured servitude".
11. **Faction deals, "Slave orders"**: needs appraisal and the payout helper.
12. **Control, "Lingering terror"**: Useful Terror covers it on 1.7 today.
13. **Storyteller weight**: consolidation, since Slaves Are Worthless is maintained on 1.7.
14. **Faction deals, "Hire out"**: only if players ask.
Waiting on a sibling: **Trade, caste picker on the trade row**, as soon as Castes' PrePick (CastesApi version 3) is out.
Each step is a release of its own and gets its version number when it ships.
## Your slave and prisoner mods
The 14 slave and prisoner mods in your mod list, checked against their installed About.xml on 2026-12-01. The Compat tab's list of mods you can unsubscribe follows the "Replaced" rows, each added with the release that replaces it.
| Mod | Workshop id | 1.7 build | What happens |
|---|---|---|---|
| Trade as Slave or Colonist | 3838162426 | yes | Replaced: Trade, "Buy as slave or colonist" (shipped 1.2). Our button stands down while it is active, so unsubscribe it. |
| Everybody Buys Slaves | 2799461327 | yes | Replaced: Trade, "Every trader buys captives" (shipped 1.2). Harmless if left installed. |
| [SYR] More Slaves (Continued) | 3361231919 | yes | Replaced: Trade, "Slave stock ignores colony size" (shipped 1.2). If left installed, its extra slaves stack on ours. |
| PrisonerRansom | 794038005 | no, 1.6 | Replaced by Faction deals, "Captives pay". |
| No Sympathy For Prisoners | 3533769253 | yes | Replaced by Colony conscience, "Prisoners count too", enslavement included. It keeps the pacifist and family exceptions this mod drops. |
| Raiders Never Die (Continued) | 2024330186 | yes | Not needed: vanilla 1.7's custom difficulty has the same slider (enemy death on downed, Difficulty.cs:77). |
| Prisoners Should Fear Turrets | 2602436826 | yes | Stays: no Blax mod covers its prisoner half, and Slaves doesn't take its slave half (Cut). |
| Prison Labor | 1899474310 | yes | Stays: prisoner work, which no Blax mod covers. Slaves only takes its resocialization-offer idea, for slaves (buy-back offers). |
| Prisoner Realism | 3760196312 | yes | Stays: prisoner handling, which no Blax mod covers. Its slave parts are in Cut. |
| Custom Prisoner Interactions | 2841231775 | yes | Stays: prisoner interaction modes, whose defaults are Castes'. Slaves takes its convert-then idea and auto hemogen for slaves (Convert slaves, Blood bank). |
| Harvest Organs Post Mortem (Continued) | 1204502413 | yes | Stays: harvesting corpses is medicine, not slave status. Slaves' mood rule already covers its autopsies (shipped). |
| War Crimes Expanded 2 Core (Updated) | 3032870787 | no, 1.6 | Not taken: torture and war crimes go past vanilla Ideology's tone (Cut). Slaves' mood rule covers its torture while it loads (shipped). |
| Harvest Everything! | 2007485974 | no, 1.6 | Not taken: a body-part system for every pawn, not slave rules (Left out). Vanilla's organ harvests stay, with the health gate and appraisal's organ prices. |
| [RH2] Rimdeed | 2411722784 | no, 1.6 | Not taken: it hires colonists at the comms console, which is recruitment, not slavery. Buy mode leaves its hire trader alone (shipped). The slave ship on request covers selling captives any time. |
PrisonerRansom, War Crimes Expanded 2, Harvest Everything! and Rimdeed have no 1.7 build: the game lists them as incompatible and still loads their 1.6 builds, and Rimdeed's throws errors on 1.7. PrisonerRansom goes once "Captives pay" ships; whether to keep the other three is your call.
## Left out
The roadmap's Cut has the reasons. In short:
- Anything past vanilla Ideology's tone: explosive or shock collars, torture, flogging, lobotomy, brainwash, automated lethal harvests, and Useful Terror's heart acidifier implant.
- Crimes and punishments for slaves: Blax Laws. Its subdue is a capped fistfight that ends a break, not a punishment system.
- Policy defaults for new slaves (outfit, food, drugs, medical care, area): Blax Castes. Slave sleeping zones: Blax Zones.
- A mode for new slaves in Slaves itself: they start in Suppress, as vanilla sets it (Pawn_GuestTracker.cs:501-503), and recruit or convert is set per slave. The per-caste default is Blax Castes'.
- Harvest Everything!'s part items and its lethal "harvest everything" surgery: a body-part system for every pawn, not slave rules; each new part item needs a def and art, and a one-click lethal harvest goes past the tone line this plan keeps.
- New collar or outfit art: there is no artist.
- Slave auctions, prisoner arenas and prisoner labor, gene extraction farms: maintained 1.7 mods cover them.
- Hiring colonists at the comms console (Rimdeed): recruitment, not slavery.
- A comms-console slave catalogue, slave romance rules, a docility drug, terror building rebalancing.
## Decided 2026-12-01
1. **Blax Laws' jail for slaves writes slave status.** Laws puts a jailed slave back into slavery when the sentence ends, because it only restores what the sentence took, and Slaves keeps the brand, the time as a slave and loyalty through it.
2. **Useful Terror's slave rules.** The warden threshold is built in Control, "Wardens", because nothing in your mod list covers it and it keeps slaves further above the safe threshold; "Terror covers rebellion risks" stays an Idea until players report rebellions of unsafe slaves during caravan trips, and lingering terror stays a late step of its own.
3. **An indentured term through a Laws sentence.** Slaves adds the SlavesApi member Laws calls right before the capture (its CapturedBy prefix), shipping with Indentured servitude, so the term runs on through the sentence instead of ending at the arrest and leaving the convict a slave for life.
4. **Safe suppression ships off.** It sits first on the Rebellion tab and the change note tells players to switch it on, because on by default would end rebellions in every existing save the moment the update lands.
5. **Harvest Everything! stays out of Blax Slaves.** It is a body-part system for every pawn, not slave rules, so it is in Left out; vanilla's heart, lung, kidney and liver harvests stay, with the health gate and appraisal's organ prices.

View File

@ -2,62 +2,42 @@
Blax Slaves replaces a dozen dead or conflicting slavery mods with one mod maintained for RimWorld 1.7. You choose slave or colonist when you buy, sell captives by quality or ransom them home, end the rebellion doom timer, and treat slaves in one hospital with control implants, a blood bank and health certificates, every feature with its own toggle.
Current release: 1.2.1, live on Workshop item 3847282171 since 2026-11-29.
What the mod covers when it is complete, grouped by area, and the order of the remaining steps: [features.md](features.md). This file holds the spec of every feature: what players get, how it works, settings, tests and risks.
Current release: 1.2 is live on Workshop item 3847282171. 1.2.1 (works with any DLC combination) is built and waiting for upload.
Every release works with any DLC combination, core only included: features that need a DLC (most of them need Ideology) switch off cleanly without it, show "Needs <DLC>" in the settings, and are tested with `-NoDlc` and every combination of the installed DLCs.
Changes on 2026-12-01:
- Fabian's decisions of the same day ("Decided 2026-12-01" in features.md): safe suppression ships off, first on the Rebellion tab, and the change note tells players to switch it on. Laws' jail for slaves gives back slave status, and the member that keeps an indentured term through a Laws sentence ships with Indentured servitude. The warden threshold stays in Wardens, terror covers rebellion risks stays an idea and lingering terror a late step. Harvest Everything! stays out. Blax Castes owns the slave interaction mode a new slave starts on and stores the per-caste values sibling mods register, and payouts follow Zones' global "Route orbital trade" switch.
- Releases are cut by area now, never by size or days. Every unshipped feature sits under its area, and an area with several steps lists them in dependency order. A step gets its version number when it ships; 1.0 to 1.2.1 keep theirs. The Days column, the day totals and the reasons tied to week-sized releases are gone; the per-feature effort marks stay as information.
- Moved by area: lingering terror, suppress the whole room and wardens calm breakdowns join the new warden and terror features in Control. The slave ship on request and abolitionists buy to free form Trade's next step. Organ harvests and the blood bank sit in Slave medicine, the work rules and the colonist bar in Running a slave workforce, prisoners count too in Colony conscience, and the slave weight sliders in Storyteller weight.
- New in the plan, hooks named but not checked against the code: terror covers rebellion risks and the warden suppression threshold (Control), the slave overview and the caste picker on the trade row (both from Backlog). Heart acidifier and terror building values from Useful Terror went to Cut.
- Blax Laws joins "Works with the other Blax mods": SlavesApi gains CalmsBreaks for it, and crimes and punishments of slaves are Laws'.
- The five Blax plans checked against each other the same day: the ownership list is the same in all five design docs, with the open question named on each part that waits for one. Laws moved indenture as a sentence to its ideas, so StartIndenture is an idea here too, and open question 3 now asks for the member that keeps an indentured term through a Laws jail sentence. Recruit and convert fall back to Suppress while switched off, so a mode Blax Castes' slave default may write never strands a slave. Laws stands down only for the breaks the wardens take.
- Checked against the decompiled 1.7 code the same day. New hooks for the shared infirmary, the rebellion alerts, the sedation relay's manual trigger, the colonist bar, organ harvests, abolitionists, the warden threshold, the break blocker, kept surgery bills, the rescue raid and bloodfeeding. Recruit and convert never write a Blax mode into the save. The slave ship handles Odyssey's Traders Guild flag. Loyalty and indenture reach the fall-rate patch through the ledger. Enslaving a prisoner joins Prisoners count too.
- Plan changes from that check: the released-gear drop moved to Captives pay, "buy anyway" stays the default for anti-slavery traders, Sell any time follows Captives pay and the caste picker waits for Castes on its own, Control's second step split into Wardens and Lingering terror, terror covers rebellion risks became an Idea, and every unbuilt feature that acts on its own ships off.
## At a glance
| Area | What players get | Mods it replaces |
|---|---|---|
| Trade | Shipped: pick slave or colonist when you buy, every trader buys captives, price sliders, slavers stay stocked and come on request. Next: a slave ship on request, abolitionists who buy slaves to free them, a caste picker on the trade row | Trade as Slave or Colonist (111), [SYR] More Slaves (14.8k + 22.7k), Everybody Buys Slaves (3.3k), 3 smaller (all shipped) |
| Faction deals | Ransom captives at the comms console, factions buy back their people, released captives leave your gear, faction slave orders, hire out slaves | PrisonerRansom (91k), Prisoner Exchange (11.1k, partly), Slave Contract Quest (220) |
| Control | Shipped: branding, branded trader slaves, runaways returned. Next: suppressed slaves never rebel, rebellion options and alerts, no breaks while suppressed. Then a warden threshold, room suppression, wardens who calm breakdowns and terror that lingers | Slave Rebellions Improved (71k + 11.5k), No Slave Mental Breaks (2.3k), Dead Calm Slave (2.1k), Useful Terror (21.8k, partly) |
| Running a slave workforce | Shipped: time as a slave. Next: slave work rules, slaves hidden from the colonist bar, a slave overview | Time As a Slave (35k, shipped), Capable Slaves (9.8k) and 5 work mods, SlaveBar (24.6k) |
| Slave medicine | One hospital for slaves and colonists, surgery bills and medical care that survive status changes, organ harvests that wait for health, a blood bank | Organ Harvest Button (1.1k), BetterHemogenFarm (273) |
| Slave implants | Compliance implant, sedation relay, endurance implant | Simple Slavery Collars (52k, control part), Pawn Suppression Implants (7.8k), BK's Suppression! (1.6k), 4 collar mods |
| Slave value | Slaves sell by quality, health certificates, honor by quality at the tribute collector | Profitable Slave Trade (378) |
| Freedom and loyalty | Recruit and convert slaves, freedom gives a mood boost, loyalty stages, indentured terms | Recruit Slaves (26k), Convert Slaves (7.1k), Indentured Servitude (1.3k), stage ideas from Simple Slavery Collars (52k) and More Slavery Stuff (21.7k) |
| Colony conscience | Shipped: harming slaves doesn't upset colonists. Next: the same for prisoners, a reduce mode, no goodwill loss for surgery on captives | No Sympathy For Prisoners (16.4k), Prisoner Harvesting (13.1k) |
| Storyteller weight | Sliders for how much a slave counts toward wealth, raid points and population | Slaves Are Worthless (10.2k), Slaves Aren't People (1.9k) |
| Version | What players get | Mods it replaces | Days |
|---|---|---|---|
| 1.2 | Economy: pick slave or colonist when you buy, every trader buys slaves, price sliders, slavers stay stocked | Trade as Slave or Colonist (111), Time As a Slave (35k), [SYR] More Slaves (14.8k + 22.7k), Everybody Buys Slaves (3.3k), 3 smaller | 5 |
| 1.3 | Rebellion and medicine: suppressed slaves never rebel, work rules, slave-free colonist bar, surgery bills and medical care survive status changes | Slave Rebellions Improved (71k + 11.5k), SlaveBar (24.6k), Capable Slaves (9.8k) and 5 work mods, No Slave Mental Breaks (2.3k), Dead Calm Slave (2.1k) | 5 |
| 1.4 | Economy: ransom captives at the comms console, factions buy back their people, slave ship on request | PrisonerRansom (91k), No Sympathy For Prisoners (16.4k), Prisoner Harvesting (13.1k), Prisoner Exchange (11.1k, partly) | 6 |
| 1.5 | Medicine: one hospital for slaves and colonists, compliance and endurance implants, sedation relay | Simple Slavery Collars (52k, control part), Pawn Suppression Implants (7.8k), BK's Suppression! (1.6k), 4 collar mods | 7 |
| 1.6 | Economy and medicine: slaves sell by quality, health certificates, blood bank, organ harvests that wait for health, honor by quality | Organ Harvest Button (1.1k), Profitable Slave Trade (378), BetterHemogenFarm (273) | 7 |
| 2.0 | Freedom: recruit and convert slaves, wardens calm breakdowns, room suppression, freedom gives a mood boost | Recruit Slaves (26k), Convert Slaves (7.1k) | 6 |
| 2.1 | Freedom: loyalty stages and indentured terms | Indentured Servitude (1.3k), stage ideas from Simple Slavery Collars (52k) and More Slavery Stuff (21.7k) | 7 |
| 2.2 | Economy: faction slave orders, slave wealth and raid weight sliders | Slaves Are Worthless (10.2k), Slaves Aren't People (1.9k), Slave Contract Quest (220) | 4 |
| 2.3 | Economy: hire out slaves to allied factions (optional release) | none (Prison Expanded does it for prisoners only) | 5 |
The order of the remaining steps, and why: [features.md](features.md#order). Effort marks in the specs: S = half a day, M = 2 days, L = 5 days.
Medical depth lands in 1.3, 1.5 and 1.6. Economic depth lands in 1.2, 1.4, 1.6, 2.2 and 2.3. Effort: S = half a day, M = 2 days, L = 5 days, summed per release and rounded up. Total: 52 working days.
## Defaults I picked
Change if you disagree. The Blax rule is that a feature is off or empty until used, so an update never changes a running colony by itself. Every unbuilt feature falls into one of two groups:
Change if you disagree.
- **Off until you switch it on**, because it acts by itself: safe suppression (No rebellion while suppressed), calm genes never rebel, lingering terror, suppress the whole room, wardens calm breakdowns, slaves in colonist medical beds and the medical-bed thought, organ harvests that wait for health, buy-back offers, faction slave orders, appraisal, honor by quality, the freedom mood swap, released captives leave your gear, and loyalty. Their sub-settings keep the suggested values below, ready for when you switch the feature on. Safe suppression stays off too: its switch sits first on the Rebellion tab, and the release's change note tells players to switch it on.
- **On, but nothing happens until you use it**: ransom, the slave ship request, recruit and convert orders, the three implants, blood donors, indenture, the health exam, kept surgery bills (they only keep what you queued), the slave overview tab (shown only while you hold slaves) and the caste picker.
Numbers and choices I picked:
- Captive sale price stays at vanilla 60%. Appraisal (Slave value) lifts well-kept slaves by up to 75%, capped below what a slaver would charge you for the same pawn.
- The safe threshold is 50%: once safe suppression is on, a slave at or above it never rebels.
- Wardens suppress below vanilla's 70% until you raise it.
- Traders whose ideoligion rejects slavery still buy captives at the full slider price ("buy anyway", the 1.2 default, which stays). "Buy to free" at half price is a third choice you pick (Trade, Abolitionists buy to free).
- Captive sale price stays at vanilla 60%. Appraisal (1.6) lifts well-kept slaves by up to 75%, capped below what a slaver would charge you for the same pawn.
- Safe suppression is on at 50%: a slave at or above it never rebels.
- Traders whose ideoligion rejects slavery still buy captives, as in vanilla. From 1.6 they "buy to free" at half price instead.
- Visitor groups buy slaves, like Everybody Buys Slaves.
- Unwaveringly loyal pawns stay slave-only when bought from orbital or settlement stock, and their loyalty stops at Loyal.
- Implants are surgery-only with vanilla items. The relay uses vanilla anesthesia with manual and area triggers. No explosives, no new art.
- Ransom pays 80% of market value. Pirates and other permanent enemies refuse.
- Surgery on prisoners of non-hostile factions still costs goodwill, as in vanilla.
## 1.2 Trade on your terms (shipped)
## 1.2 Trade on your terms
The hard requirement: buy-mode replaces Trade as Slave or Colonist, which is in your mod list. 1.2.0 went live on 2026-11-29, and 1.2.1 (any DLC combination) the same day.
The hard requirement: buy-mode replaces Trade as Slave or Colonist, which is in your mod list. Everything here is small and has no dependencies, so 1.2 ships after about a week of work. 5 days.
#### Buy as slave or colonist
@ -73,7 +53,7 @@ The hard requirement: buy-mode replaces Trade as Slave or Colonist, which is in
- **Players get:** Settlements, visitor groups and modded traders buy your slaves and prisoners too, not only slavers and caravans. A setting lets factions whose ideoligion rejects slavery refuse; their rows then show greyed out with the reason instead of vanishing.
- **How:** At startup and when the settings window closes (never during a TradeSession), every TraderKindDef where no stock generator HandlesThingDef(ThingDefOf.Human) gets a StockGenerator_BlaxBuySlaves, a subclass of StockGenerator_BuySlaves, with ResolveReferences(trader). In vanilla that adds Visitor_Neolithic_Standard, Visitor_Outlander_Standard, Empire_Caravan_TraderGeneral and Orbital_Empire. Kinds in any FactionDef.visitorTraderKinds follow the visitors setting. Hospitality's guest kind is skipped. There are never duplicates, so Everybody Buys Slaves can stay installed. Refuse mode: a postfix on the Tradeable.TraderWillTrade getter (Tradeable_Pawn doesn't override it) returns false for a colony slave or prisoner when the trader's faction has an ideo failing IdeoUtility.IdeoApprovesOfSlavery, unless pawn.HomeFaction == trader.Faction (ransom). The DrawCaptiveTradeInfo hook adds the reason line. Factionless orbital traders always buy. The gate covers 1.1's caravan generators too.
- **Settings:** allTradersBuySlaves (on), visitorsBuySlaves (on), antiSlaveryTraders: buy anyway (default, vanilla) or refuse. Abolitionists buy to free adds "buy to free" as a third choice; "buy anyway" stays the default.
- **Settings:** allTradersBuySlaves (on), visitorsBuySlaves (on), antiSlaveryTraders: buy anyway (default, vanilla) or refuse. 1.6 adds "buy to free" and makes it the default.
- **Replaces:** Everybody Buys Slaves 2799461327 (3,253 subs, XML, in your mod list).
- **Effort:** S.
- **Tests:** After startup every non-excluded TraderKindDef has one generator handling Human and none has two of ours; turning the setting off restores the original counts. In refuse mode, TraderWillTrade is false for a colony slave offered to a Slavery Abhorrent faction, true for that faction's own member, true for a factionless TradeShip. In buy-anyway mode it is true everywhere. A -Compat run with Everybody Buys Slaves shows no duplicate.
@ -116,158 +96,18 @@ The hard requirement: buy-mode replaces Trade as Slave or Colonist, which is in
- **Settings:** none of its own.
- **Replaces:** none.
- **Effort:** 2 x S (1 day).
- **Tests:** Smoke: SettingsCategory is set, the replaced-mod table resolves without exceptions, reset restores defaults (Fixtures.SnapshotSettings and RestoreSettings), an old settings file loads into the same values. Without siblings every API delegate is null and calls are no-ops. -Compat run with Blax Castes' join API (CastesApi version 2): a returned runaway lands in its previous caste.
- **Tests:** Smoke: SettingsCategory is set, the replaced-mod table resolves without exceptions, reset restores defaults (Fixtures.SnapshotSettings and RestoreSettings), an old settings file loads into the same values. Without siblings every API delegate is null and calls are no-ops. -Compat run with Blax Castes 1.3 or later: a returned runaway lands in its previous caste.
- **Risks:** None beyond wrong packageIds in the table.
## Trade
## 1.3 No doom timer
Who sells slaves to you and who buys them from you. 1.0 to 1.2 shipped the base: common slavers, slaver caravans on request, buy as slave or colonist, every trader buys captives, slave stock that ignores colony size and the price sliders.
### Sell any time
A buyer for captives whenever you want one, and a fair deal with factions that reject slavery. It needs nothing from later areas and follows Captives pay. Slave appraisal, when it ships, leaves buy-to-free sales out of its buyer factor.
#### Slave ship on request
- **Players get:** Allied outlander factions that accept slavery send an orbital slave ship on request from the comms console, so you can sell captives any time. Vanilla terms apply: 30 goodwill and one orbital request per 15 days. With Odyssey the slave ship is a Traders Guild ship; the option says so and stays closed while the Guild is hostile to you.
- **How:** No vanilla FactionDef sets canRequestOrbitalTrader, and Orbital_PirateMerchant (label "slave ship") has requestable false. An XML patch sets canRequestOrbitalTrader on the outlander FactionDefs, adds Orbital_PirateMerchant to their orbitalTraderKinds and makes it requestable. Vanilla FactionDialogMaker.RequestOrbitalTraderOption already demands an ally and runs a 900,000-tick cooldown. A postfix on that private method disables the option with a reason when the faction's ideo fails IdeoUtility.IdeoApprovesOfSlavery.
- The ship's faction is not the requester's. IncidentWorker_OrbitalTraderArrival ignores parms.faction and builds the TradeShip with GetFaction(traderKind), a random faction of the kind's def, or none (IncidentWorker_OrbitalTraderArrival.cs:30, 42-53), and a requested kind skips CanSpawn's trade check (:26). With Odyssey, Orbital_PirateMerchant has faction TradersGuild (Data/Core/Defs/TraderKindDefs/TraderKinds_Orbital_Misc.xml:538); a hostile Guild ship rejects every negotiator through CanTradeWith (FactionUtility.cs:30-32) after the 30 goodwill are paid. Without Odyssey the ship has no faction.
- So the same postfix, while Orbital_PirateMerchant.faction is set, disables the option with a reason while any faction of that def is hostile to the player, and the option text names the faction the ship flies under. The refuse and abolitionist gates read the ship's faction (the Guild, or none), not the requester's.
- **Settings:** slaveShipOnRequest (on; nothing happens until you request a ship).
- **Replaces:** none. Answers the "somewhere to sell any time" signal behind Call A Trader (52k) without the cut slave catalogue.
- **Effort:** S.
- **Tests:** An allied outlander faction with a pro-slavery ideo shows the option and the slave ship in the kind list; an anti-slavery one shows it disabled with the reason; a non-allied one shows vanilla's "must be ally". Odyssey case: the test machine doesn't own Odyssey, so a test sets Orbital_PirateMerchant.faction to the def of a faction it makes hostile; the option is disabled with the reason and names that faction, and with the faction made neutral it opens. The DLC test list notes that the real Odyssey run is not covered.
- **Risks:** Other mods that set canRequestOrbitalTrader on outlanders add their kinds next to ours (harmless). With Odyssey you sell to the Guild, not to the ally that sent the ship.
#### Abolitionists buy to free
- **Players get:** A third choice for traders whose ideoligion rejects slavery: they buy your slaves at half price to set them free. Nobody in the colony minds the sale, even an Abhorrent negotiator can make it, and the trader's faction gains goodwill. "Buy anyway" stays the default; you pick this one.
- **How:** Adds "buy to free" to antiSlaveryTraders (1.2) as a third value; the default stays "buy anyway", so saved settings and running colonies don't change. It builds on the frames Blax Slaves already ships, not on GuestUtility.IsSellingToSlavery or TransferableUIUtility.TradeIsPlayerSellingToSlavery: both are a few lines with one caller each (Tradeable_Pawn.cs:46, TradeUI.cs:52), small enough to be inlined so a postfix may never run, and the gift-pod path uses neither (TransportersArrivalAction_GiveGift.Arrived tests HomeFaction itself and records SoldSlave directly, :52-60).
- Sale event: Frame_SoldSlave (prefix on Tradeable_Pawn.ResolveTrade) and Frame_GiftArrived (prefix on TransportersArrivalAction_GiveGift.Arrived) set a [ThreadStatic] "abolitionist sale" mark when the trader's or the settlement's faction is an abolitionist in this mode. A bool prefix on HistoryEventsManager.RecordEvent, next to Frame_HistoryEvent, skips SoldSlave while the mark is set, so no precept thought and no history record follow. The finalizers clear the mark.
- Negotiator block: TradeUI.DrawTradeableRow greys the row when the negotiator's ideo is unwilling to do SoldSlave (TradeUI.cs:52). A prefix and finalizer on DrawTradeableRow set a [ThreadStatic] flag while TradeSession.trader's faction is an abolitionist in this mode, and a postfix on Ideo.MemberWillingToDo (Ideo.cs:881, a loop over precepts) returns true for SoldSlave under that flag.
- Price: Patch_SlavePrices multiplies the sell price by abolitionistPriceFactor; appraisal, when it ships, skips its buyer-ideology factor for these sales.
- Freeing: Pawn_TraderTracker.AddPawnToStock sets the sold pawn's kindDef to PawnKindDefOf.Slave (Pawn_TraderTracker.cs:215-218), so the ResolveTrade prefix saves each sold pawn's kindDef, and a postfix restores it, takes the pawn out of the trader's stock and makes it a free world pawn of its home faction, or of the trader's faction.
- Goodwill: +price/40, capped at +10 per trade, through Faction.TryAffectGoodwillWith.
- **Settings:** antiSlaveryTraders gains "buy to free" (third choice; "buy anyway" stays the default). abolitionistPriceFactor 50% (20 to 100).
- **Replaces:** none. Answers a 159-upvote counter-idea.
- **Effort:** S.
- **Tests:** Selling a colony slave to an anti-slavery trader in this mode: price x0.5 against the slider price, no SoldSlave in the history records, goodwill up by about price/40, and afterwards the pawn is a free world pawn with its old kindDef, not trader stock. An Abhorrent negotiator's row is not greyed out and the sale goes through. A gift pod of slaves to an abolitionist settlement records no SoldSlave. In "buy anyway" mode the same sale records SoldSlave as before. A setting file from 1.2 loads as "buy anyway".
- **Risks:** Goodwill farming is bounded by the price cut and the cap. Vanilla's MemberSold reaction from the pawn's other faction still applies.
### Caste picker (waits for Blax Castes)
Its own step, because it depends only on Castes' PrePick (CastesApi version 3, Castes area 5, step 3), not on anything else in Trade. It ships as soon as that is out.
#### Caste picker on the trade row
- **Players get:** With Blax Castes loaded, a small caste button sits next to "Joins as slave / Joins as colonist" on each pawn a trader sells. Pick the caste the pawn joins; without a pick, Castes' join row decides as before.
- **How (new 2026-12-01, not checked against the code):** The buy-mode prefix on TransferableUIUtility.DrawCaptiveTradeInfo draws the button when CastesApi.Version is 3 or higher, the version that adds Castes' PrePick. The button opens a FloatMenu of CastesApi.CasteLabels() and calls CastesApi.PrePick(pawn, casteId), which Castes applies when the purchase resolves. Without Castes, or with an older API, nothing is drawn and nothing is bound. The button shares the colony column the buy-mode button already grows into, so long translations need a layout check.
- **Settings:** castePickerOnTradeRow (on; shown only while Castes is loaded).
- **Replaces:** none.
- **Effort:** S.
- **Tests:** -Compat with Castes: a pre-picked stock pawn bought as a slave lands in the picked caste, not in the new-slave row; without a pick it lands in the row. Without Castes the button isn't drawn and the delegate is null.
- **Risks:** Waits for Castes' PrePick, which isn't built yet.
## Faction deals
Deals with factions over the people you hold, at the comms console and by letter. PrisonerRansom (91k) has no 1.7 build: the largest economic opening on 1.7. Every payout arrives as silver by drop pod through one helper, and the purchase ledger keeps pawns you bought out of ransom and orders.
### Captives pay
The ledger and the payout helper come first, because every later deal and several medicine and value features reuse them.
#### Purchase ledger and payouts
- **Players get:** Nothing visible on its own. It stops buy-and-ransom loops and delivers every silver payout.
- **How:** New GameComponent_BlaxSlaveLedger, the per-pawn store later features reuse (Scribe references, nulls purged on load). A postfix on Tradeable_Pawn.ResolveTrade for PlayerBuys records seller faction, price and tick. This matters because PawnGroupKindWorker_Trader re-factions caravan slaves to the trader's faction and orbital or settlement stock gets a random visible faction, so a bought slave often has a friendly HomeFaction that would pay ransom. GameComponent_BlaxPayments queues silver with a delay. BlaxDelivery.Drop(Map, Thing) asks ZonesApi.TryFindDropSpot and spawns the pod exactly on the returned cell with TradeUtility.SpawnDropPod, one thing per call; DropThingsNear would search a new random cell up to 5 cells away and miss a small zone. Without a zone cell it drops near DropCellFinder.TradeDropSpot with DropPodUtility.DropThingsNear.
- **Settings:** none.
- **Replaces:** none.
- **Effort:** S.
- **Tests:** Buying a stock slave writes a ledger entry with seller faction and price. A queued payment lands after its delay. Without Zones the drop uses TradeDropSpot. With a Zones delivery zone, the pod falls on the returned zone cell. Phase 2: ledger and pending payment survive reload.
- **Risks:** None for players; every payout feature depends on it.
#### Ransom captives at the comms console
- **Players get:** Call a faction and offer back their people you hold, prisoners or slaves. They quote a price; your negotiator can push for 25% more at a time at lower odds, and the dialog shows the odds. If they accept, silver arrives by drop pod within hours and the captive walks home. If they refuse, they won't talk ransom for 10 days, and a hostile faction may come to free the captive by force.
- **How:** A postfix on FactionDialogMaker.FactionDialogFor(Pawn, Faction) inserts a DiaOption before Disconnect, found by position, not index. It is disabled with a reason when nobody qualifies or a cooldown runs.
- Candidates: PrisonersOfColony and SlavesOfColonySpawned with HomeFaction == faction, not downed, not in a mental state, and not in the purchase ledger.
- Price: MarketValue x 0.8 x relation (hostile 0.5, neutral 0.8, ally 1.0) x noble factor (1 + MostSeniorTitle seniority / 500; faction leader x3). An average neutral captive brings 1,120 silver, against 630 at a trader.
- Odds: 0.6 + goodwill/200 + negotiator Social x 0.02, minus 0.25 per push, clamped 0.05 to 0.95. Permanent-enemy factions refuse unless the setting allows them; then they start at 0.3.
- Accept: the payout helper delivers the silver after 0.1 to 0.3 days. GenGuest.PrisonerRelease or GenGuest.SlaveRelease frees the captive, so vanilla's walk-home goodwill applies, plus 5; a released slave drops your gear first (Released captives leave your gear behind). No trade happens, so no SoldSlave event. A 3-day cooldown per faction follows.
- Refuse: 10-day cooldown per faction. A hostile faction has a 25% chance to send a rescue raid at DefaultThreatPointsNow x 0.8 in 3 to 7 days. The pending rescue (faction, map, points, due tick) lives in the Blax GameComponent, not in Storyteller.incidentQueue: vanilla RaidEnemy keeps parms.faction only while it is still hostile and otherwise picks a random hostile faction (IncidentWorker_RaidEnemy.cs:58-68), so a faction that made peace in the meantime would turn into a pirate raid. At the due tick, if the faction is still hostile and not defeated, the component calls IncidentDefOf.RaidEnemy.Worker.TryExecute with that faction and forced true; otherwise it drops the rescue without a message.
- **Settings:** ransomEnabled (on; nothing happens until you call a faction), ransomFactor 80% (20 to 200), pushStep 25%, refuseCooldownDays 10 (3 to 30), acceptCooldownDays 3 (0 to 10), rescueRaidChance 25% (0 to 100), permanentEnemiesMayAccept (off).
- **Replaces:** PrisonerRansom 794038005 (91,415 subs, no 1.7; in your mod list, where it loads its 1.6 DLL with a bundled Harmony 2.3.1.1), Prisoner Exchange 3495102506 (11,100, no 1.7; partly).
- **Effort:** M.
- **Tests:** With captives from a hostile and a neutral faction, the root node holds our option; with none it is disabled. A pawn bought from that faction's trader is not offered. Accept with odds forced to 1: a payment is pending, after 0.3 days map silver rises by the price and the captive is released; a second ransom within 3 days is disabled. Refuse with odds 0: cooldown set, and with raid chance 1 the component holds a pending rescue. At its due tick a still-hostile faction raids; a faction made neutral before the due tick sends nothing and no other faction raids instead. Phase 2: payment, cooldowns and the pending rescue survive reload.
- **Risks:** Ransoming every captured raider pays well; the price factor, odds and both cooldowns bound it. Comms-console overhauls that rebuild the dialog may hide the option.
#### Factions buy back their people
- **Players get:** Now and then a non-hostile faction with members among your captives writes in: "The Iron Ring offers 1,620 silver for Jana's freedom." Accept within 2 days for silver by drop pod and goodwill, and the pawn walks home. Nobles and leaders draw bigger offers.
- **How:** A GameComponent check every 2,500 ticks. Each eligible faction (non-hostile, humanlike, with a healthy member as your captive on a player map who is not in the purchase ledger) rolls Rand.MTBEventOccurs with a 20-day MTB. Price: the ransom base x Rand.Range(1.0, 1.5), no odds roll, as a reward for patience. Offers come as a ChoiceLetter with a 120,000-tick timeout (LetterWithTimeout.StartTimeout). Accepting reuses the ransom payout and release, plus 8 goodwill; declining or timing out changes nothing. One offer open at a time, at least 5 days apart. Pawns targeted by a pending rescue raid are skipped.
- **Settings:** buybackOffers (off until switched on), buybackMtbDays 20 (5 to 60), offer range 100 to 150% of the ransom price.
- **Replaces:** none directly. The resocialization-offer idea of Prison Labor 1899474310 (174,969 subs), for slaves; vanilla only has the reverse (IncidentWorker_RansomDemand).
- **Effort:** S.
- **Tests:** Force the MTB for a friendly faction's slave: our letter appears with a price in range. A slave bought from that faction's trader never draws an offer. Accepting queues a payment and releases the pawn. The letter expires after 120,000 ticks. A hostile faction never sends one. Phase 2: an open offer survives reload.
- **Risks:** Letter spam with many factions is held back by the one-offer limit and the gap.
#### Released captives leave your gear behind
- **Players get:** A slave you ransom, sell back through a buy-back offer, emancipate to walk home or release any other way drops your weapons and armor on the spot before leaving, and keeps basic clothes. Without it, every ransomed slave walks home in the colony's flak vest with its rifle.
- **How:** Vanilla GuestRelease starts the exit-map job with no gear drop (GenGuest.cs:44-80), and GenGuest.SlaveRelease calls it (GenGuest.cs:23-30). A prefix on GenGuest.SlaveRelease: when the pawn's HomeFaction is not the player (the pawn leaves the map, GenGuest.ShouldStayOnMapOnRelease false), drop carried and equipped weapons and Shell, Belt and Overhead apparel at the pawn's cell. Ransom and buy-back release through the same method, so one prefix covers all of them.
- **Settings:** releasedDropGear (off until switched on).
- **Replaces:** none. Answers a 186-upvote thread.
- **Effort:** S.
- **Tests:** Emancipating a foreign slave with a rifle and a flak vest leaves both on the ground, and the pawn leaves dressed. A ransomed slave drops its gear too. A colony-born slave emancipated into the colony keeps everything. With the setting off, vanilla.
- **Risks:** Low.
### Slave orders
Orders pay a premium on the appraised price, so they follow Slave value.
#### Faction slave orders
- **Players get:** Factions that approve of slavery post orders by letter: "Wanted: 2 slaves with Plants 8+, healthy, 15 to 50 years. Pays 160% of the sale price and +15 goodwill. 20 days." Accept, then sell matching slaves to any trader of that faction or gift them by drop pod. Matching slaves are marked in the trade window; the premium follows by drop pod and the goodwill comes when the order is full.
- **How:** GameComponent_BlaxMarket holds a List<SlaveOrder> (faction, SkillDef, minimum level, optional minimum loyalty stage, count, filled, expiry tick, premium, goodwill).
- Generation: MTB 15 days, at most 2 open orders, only non-hostile factions passing IdeoApprovesOfSlavery. Skill from Plants, Mining, Construction, Cooking, Crafting, Medicine, Melee or Shooting; minimum level 6 to 12 scaled by colony wealth; count 1 to 3; premium 1.4 to 1.8; goodwill 10 to 20. With loyalty on, a third of orders ask for Obedient or better. Offered as a ChoiceLetter.
- Filling, through patches Blax Slaves already has: Frame_SoldSlave on Tradeable_Pawn.ResolveTrade (the player sells a colony slave and trader.Faction == order.faction) and Frame_GiftArrived on TransportersArrivalAction_GiveGift.Arrived. A match (skill, age, health 80% or more, IsSlave, not bought from that same faction per the ledger) adds 1 to filled and queues appraised sell price x (premium - 1) through the payout helper. The premium inherits appraisal's cap.
- The buy-mode DrawCaptiveTradeInfo prefix draws "order +60%" on matching colony slaves; the captive branch keeps vanilla's icon and adds the tag.
- On expiry a letter arrives; an accepted, unfilled order costs 5 goodwill. Orders cancel if the faction turns hostile or is defeated.
- **Settings:** slaveOrders (off until switched on), ordersMtbDays 15 (5 to 60), maxOpenOrders 2 (1 to 5), premium 140 to 180%, unfilledPenalty -5 goodwill.
- **Replaces:** Slave Contract Quest 3677019267 (220 subs, no 1.7).
- **Effort:** M.
- **Tests:** A Plants 8, count 1 order for a friendly pro-slavery faction. Selling a matching slave to that faction's trader fills it, and the pending payment is the appraised price x 0.6 at premium 1.6, within the cap. A Plants 3 slave doesn't fill it, nor does a slave bought from that faction. A gift-pod arrival fills it. Past the deadline the expiry letter and penalty apply. Phase 2: open orders survive.
- **Risks:** Small Workshop signal (220 subs), so this is depth, not a draw. Letters instead of generated quests keep it at M.
### Hire out
The riskiest feature in the plan, and players barely ask for it. It is the last step and gets built only if players ask once slave orders are out; otherwise it moves to Backlog.
#### Hire out slaves
- **Players get:** At the comms console, an allied or neutral pro-slavery faction can hire your slaves. Pick the slaves and a term of 7, 15 or 30 days; they leave and come back at the end with wages of 1.2% of market value per slave per day (about 21 silver a day for an average slave, 315 for 15 days), plus goodwill and skill practice. A poorly suppressed slave may escape, a few come back hurt, and if the faction turns hostile it keeps them.
- **How:** Built on vanilla's borrowed-pawn system instead of a custom holder: a Quest with a QuestPart_LendColonistsToFaction subclass. Vanilla then exempts the pawns from world-pawn garbage collection (IsBorrowedByAnyFaction), counts them for population (TotalBorrowedColonistCount), keeps GameEnder from ending the game while they're away, returns corpses of lent pawns who die, and shows the timer in the quest tab. Lent pawns stay world pawns and keep ageing. The subclass writes the private lentColonists list through FieldRefAccess, overrides Enable to take the chosen slaves, and overrides Complete to pay wages and roll escape and injury. Dialog_BlaxHireOut opens from a second option of the ransom FactionDialogFor postfix: a checklist of secure, healthy adult slaves, a term picker and a wage preview. Slaves leave by shuttle or drop pod; if they walk out, Patch_RunawayExitMap skips borrowed pawns.
- Escape roll per slave: base chance x (1 - suppression at departure) x 0.5 if branded x (1 - loyalty) with loyalty on. Branded escapees go to GameComponent_BlaxRunaways.Register with the hirer's faction; others are lost, with a letter.
- Return: RunawayDelivery's spawn logic (walk-in for tribal and medieval factions, drop pod for industrial and up), still IsSlaveOfColony. CastesApi.NotifyJoined(pawn, "blax.slaves.contractReturned") one tick after each return. Wages through the payout helper. SkillRecord.Learn grants 300 XP per day in the best enabled skill. +1 goodwill per slave per 5 days. An injury roll adds a random vanilla injury. A hirer hostile by then keeps them, with a letter.
- **Settings:** laborContracts (on), wagePerDay 1.2% of market value (0.5 to 3), baseEscapeChance 10% (0 to 30), injuryChance 5% (0 to 20), deathChance 0% (0 to 5), terms 7/15/30 days, hirerMustApproveSlavery (on).
- **Replaces:** none. Prison Expanded 3827258534 (3,298 subs) has labor contracts for prisoners only.
- **Effort:** L.
- **Tests:** Contract 2 slaves for 7 days to a friendly faction with escape chance 0: they leave, IsBorrowedByAnyFaction is true, they survive world-pawn GC, they aren't in the runaway registry, and the quest tab shows the timer. After 7 days they are back as IsSlaveOfColony, silver rose by 2 x 7 x 1.2% x market value, their best skill gained XP, and with Castes loaded each produced one NotifyJoined. Escape chance 1 plus a brand puts them in the runaway registry. A faction hostile at term end triggers the kept letter. Phase 2: an active contract survives reload mid-term.
- **Risks:** The map can close while slaves walk out (abort and keep them). Castes policies stay untouched while away. Balance: 15 days of wages is about half a sale, tunable.
## Control
Keeping slaves: suppression, rebellion and escape. Branding, branded trader slaves and returned runaways shipped in 1.0.
### No doom timer
Both reviewers put the rebellion fix first after 1.2: it is the top complaint (Slave Rebellions Improved, 71k). Its safe threshold and MTB postfix are what Slave implants and Loyalty build on. Blax Laws reads CalmsBreaks from Wardens, not IsSafe.
Both reviewers put the rebellion fix right after 1.2: it is the top complaint (Slave Rebellions Improved, 71k). Work rules and the colonist bar come along because they have no dependencies and fill 1.7 gaps no active mod covers. 5 days.
#### No rebellion while suppressed
- **Players get:** A slave whose suppression stays at or above the safe threshold (50%) never starts or joins a rebellion. Only neglected slaves revolt, and the rebellion tooltip says why a slave is safe.
- **How:** A postfix on SlaveRebellionUtility.CanParticipateInSlaveRebellion returns false for a colony slave with Need_Suppression.CurLevelPercentage >= threshold. Vanilla's private InitiateSlaveRebellionMtbDaysHelper checks it first (MTB -1, shown as "Never"), and StartSlaveRebellion (the out-parameter overload both overloads reach), FindSlaveForRebellion and InteractionWorker_SparkSlaveRebellion all use it. MentalStateWorker_SlaveRebellion.StateCanOccur only checks FindSlaveForRebellion, so it gets its own postfix to block the Rebellion break for safe pawns. Below the threshold, a postfix on InitiateSlaveRebellionMtbDaysHelper multiplies a positive MTB by a setting; it runs inside vanilla's MTB cache, and the factors of Slave implants go into this same postfix. A postfix on GetSlaveRebellionMtbCalculationExplanation adds a "Blax Slaves" line, since vanilla returns "" for non-participants. Alert_SlaveRebellionLikely goes quiet on its own. Numbers: a Social 10 warden keeps a slave cycling between about 65% and 90%, so only unattended slaves drop under 50%. SlavesApi.IsSafe(Pawn) ships here.
- **Settings:** safeSuppressionEnabled (off until switched on; first on the Rebellion tab, and the change note tells players to switch it on), safeThreshold 50% (0 to 100), unsafeRebellionMtbFactor 1.0 (0.25 to 4), blockRebellionBreakWhenSafe (on; acts only while safe suppression is on).
- **How:** A postfix on SlaveRebellionUtility.CanParticipateInSlaveRebellion returns false for a colony slave with Need_Suppression.CurLevelPercentage >= threshold. Vanilla's private InitiateSlaveRebellionMtbDaysHelper checks it first (MTB -1, shown as "Never"), and StartSlaveRebellion (the out-parameter overload both overloads reach), FindSlaveForRebellion and InteractionWorker_SparkSlaveRebellion all use it. MentalStateWorker_SlaveRebellion.StateCanOccur only checks FindSlaveForRebellion, so it gets its own postfix to block the Rebellion break for safe pawns. Below the threshold, a postfix on InitiateSlaveRebellionMtbDaysHelper multiplies a positive MTB by a setting; it runs inside vanilla's MTB cache, and the 1.5 implant factors go into this same postfix. A postfix on GetSlaveRebellionMtbCalculationExplanation adds a "Blax Slaves" line, since vanilla returns "" for non-participants. Alert_SlaveRebellionLikely goes quiet on its own. Numbers: a Social 10 warden keeps a slave cycling between about 65% and 90%, so only unattended slaves drop under 50%. SlavesApi.IsSafe(Pawn) ships here.
- **Settings:** safeSuppressionEnabled (on), safeThreshold 50% (0 to 100), unsafeRebellionMtbFactor 1.0 (0.25 to 4), blockRebellionBreakWhenSafe (on).
- **Replaces:** Slave Rebellions Improved (Continued) 3259932217 (71,014 subs), Slave Rebellions Improved 2601801303 (11,458).
- **Effort:** S.
- **Tests:** Test through the vanilla callers (InitiateSlaveRebellionMtbDays, StartSlaveRebellion), not only CanParticipate, so a patch inlined away under the Waylith backend shows up as a failure. Call ClearCache between steps. A slave at 0.8 gives MTB -1; at 0.3 the MTB is above 0 and factor 2 doubles it. StartSlaveRebellion with an unsafe initiator leaves a 0.8 slave out of the lord. StateCanOccur is false at 0.8.
@ -277,7 +117,7 @@ Both reviewers put the rebellion fix first after 1.2: it is the top complaint (S
- **Players get:** Two switches. Armed slaves are never safe (off by default). Slaves with a gene that stops prison breaks, Dead Calm or a modded one, never rebel.
- **How:** Both live in the CanParticipate postfix. Armed: when on, a slave holding a weapon skips the safe rule, so vanilla's x4 weapon factor (CanApplyWeaponFactor) applies again; without this, the safe rule short-circuits it. Genes: any active gene with prisonBreakMTBFactor < 0 makes CanParticipate false, the same rule Pawn_GeneTracker uses for prisoners. It replaces a Dead Calm defName check: Dead Calm's aggro factor doesn't cover the Rebellion break, which is Malicious. Biotech only.
- **Settings:** armedSlavesNeverSafe (off), calmGenesNeverRebel (off until switched on).
- **Settings:** armedSlavesNeverSafe (off), calmGenesNeverRebel (on).
- **Replaces:** Dead Calm Slave 2898122682 (2,071 subs, no 1.7).
- **Effort:** S.
- **Tests:** An armed slave at 0.8 has MTB above 0 with the switch on and -1 with it off. A Dead Calm slave at 0.1 gives -1 (Biotech only).
@ -286,93 +126,37 @@ Both reviewers put the rebellion fix first after 1.2: it is the top complaint (S
#### Rebellion alerts use the safe threshold
- **Players get:** Vanilla's "slaves unsuppressed" alert lists every slave below the safe threshold, worst first, with suppression and expected days to rebellion. Each vanilla slave alert can be hidden.
- **How:** No new alert: vanilla already names culprits and jumps to them, so a third alert would duplicate a row. Only the Targets getter of Alert_SlavesUnsuppressed is patched (a loop, not inlinable). Vanilla's GetReport is CulpritsAre(Targets) and its GetExplanation is "SlavesUnsuppressedDesc".Translate(Targets[0]) (Alert_SlavesUnsuppressed.cs:10-28, 38-46). Patching GetReport alone would turn the alert on for a slave at 40% while Targets, still on vanilla's need.IsHigh (below 30%, :20), stays empty, and vanilla GetExplanation would then throw ArgumentOutOfRangeException on every tooltip draw. So a postfix on the Targets getter refills targetsResult, while safe suppression is on, with every colony slave below safeThreshold, sorted by InitiateSlaveRebellionMtbDays with -1 (sleeping or otherwise not participating) last. GetReport and GetExplanation both read it. A postfix on GetExplanation only appends one line per culprit with suppression % and days. Hide switches: the Targets postfix clears the list when hideUnsuppressedAlert is on, so GetReport finds no culprit; a prefix on Alert_SlaveRebellionLikely.GetReport (a full method with its own checks) returns AlertReport.Inactive when hideRebellionLikelyAlert is on.
- **How:** No new alert: vanilla already names culprits and jumps to them, so a third alert would duplicate a row. A postfix on Alert_SlavesUnsuppressed.GetReport (or its Targets getter) changes the culprit test from vanilla's 30% to suppression < safeThreshold while safe suppression is on, sorted by InitiateSlaveRebellionMtbDays. A postfix on its GetExplanation lists each culprit with suppression % and days. Two hide switches return AlertReport.Inactive.
- **Settings:** hideUnsuppressedAlert (off), hideRebellionLikelyAlert (off).
- **Replaces:** Slave Rebellions Improved (its named-alert part).
- **Effort:** S.
- **Tests:** A slave at 0.4 with threshold 0.5 makes the alert active with that pawn as culprit (vanilla ignores 0.4), and GetExplanation returns text without throwing. A sleeping slave at 0.2 sorts after an awake one at 0.4. At 0.9 it is inactive. Hide on gives Inactive for both alerts.
- **Tests:** A slave at 0.4 with threshold 0.5 makes the alert active with that pawn as culprit (vanilla ignores 0.4). At 0.9 it is inactive. Hide on gives Inactive.
- **Risks:** Cosmetic only.
#### Suppressed slaves don't break
- **Players get:** Optionally, slaves at or above the safe threshold have no random mood breaks. The mood ring, trait states such as pyromania, and blood rage stay vanilla.
- **How:** A prefix on the public MentalBreaker.TryDoRandomMoodCausedMentalBreak (MentalBreaker.cs:311) returns false for a colony slave at or above safeThreshold. Not the private CanHaveMentalBreak it calls first: TryDoMentalBreak checks it too (:330-337), and that is the path of blood rage and frenzy inducer berserks (AlwaysBerserkUtility.cs:15, 29), psilocap catatonia (IngestionOutcomeDoer_Psilocap.cs:15), book breaks (Book.cs:141) and Anomaly's breaks, which must stay vanilla. Not the CanDoRandomMentalBreaks getter the design named either: that getter also drives the mood ring, the break markers and trait mental states, and a tiny getter is the most likely target for CoreCLR to inline.
- **How:** A prefix on the public MentalBreaker.TryDoRandomMoodCausedMentalBreak (or the private CanHaveMentalBreak it calls first) returns false for a colony slave at or above safeThreshold. Not the CanDoRandomMentalBreaks getter the design named: that getter also drives the mood ring, the break markers and trait mental states, and a tiny getter is the most likely target for CoreCLR to inline.
- **Settings:** suppressedSlavesDontBreak (off).
- **Replaces:** No Slave Mental Breaks 3728648822 (2,307 subs).
- **Effort:** S.
- **Tests:** Through MentalBreakerTickInterval with TestMoodMentalBreak forced: a slave at 0.8 gets no break with the setting on and vanilla behaviour with it off. The colonist bar mood ring still draws. A colonist is unaffected.
- **Risks:** It removes a vanilla pressure valve, so it is off by default. "Wardens calm breakdowns" is the gentler fix.
### Wardens
Ways to keep suppression up without a fight: wardens who top slaves up earlier, suppress a whole room at once and talk slaves out of breakdowns. Nothing in your mod list covers these. The threshold test is one helper, which recruit and convert reuse, so this step comes before Freedom and loyalty.
#### Warden suppression threshold
- **Players get:** Choose when wardens top a slave up. Vanilla suppresses only below 70%; at 90% suppression stays near the top, well above the safe threshold. Vanilla's limit of one suppression per slave per day stays.
- **How:** Only WorkGiver_Warden_SuppressSlave.JobOnThing reads the 70%, through need.CanBeSuppressedNow (WorkGiver_Warden_SuppressSlave.cs:24), a tiny getter on the private const CanSuppressMaxThreshold (Need_Suppression.cs:8, 12). Pawn_GuestTracker.ScheduledForSlaveSuppression checks only the daily gap (Pawn_GuestTracker.cs:250) and is a tiny getter itself, and JobDriver_SuppressSlave has no level-based fail condition (JobDriver_SuppressSlave.cs:22-26), so neither is patched. One helper, BlaxSuppression.BelowWardenThreshold(need) = need.CurLevel < wardenSuppressBelow, is the test everywhere. A postfix on JobOnThing: when vanilla returned null, the need's CurLevel is at or above 0.7 and the helper is true, it repeats vanilla's checks (ShouldTakeCareOfSlave, which is protected, through an AccessTools delegate; mode Suppress; not Downed; Awake; CanReserve; ScheduledForSlaveSuppression) and returns JobMaker.MakeJob(JobDefOf.SlaveSuppress, t). Suppress the whole room and the recruit and convert base call the same helper instead of CanBeSuppressedNow.
- **Settings:** wardenSuppressBelow 70% (50 to 100).
- **Replaces:** Useful Terror 2636462610 (its smarter-suppression part, 90% there).
- **Effort:** S.
- **Tests:** A slave at 80% with the setting at 90%: a warden gets a SlaveSuppress job; at 70% (vanilla) none. A slave suppressed within the last day, asleep, downed or in another mode gets none either way. A bystander at 80% in the same room is suppressed with the setting at 90%.
- **Risks:** Wardens spend more time suppressing, so the default is vanilla.
#### Suppress the whole room
- **Players get:** When a warden suppresses one slave, other awake slaves within 6 cells in the same room are suppressed too, at 70% strength, and count as done for the day. One warden can handle a barracks at mealtime.
- **How:** A postfix on SlaveRebellionUtility.IncrementInteractionSuppression(initiator, recipient), whose only caller is InteractionWorker_Suppress. For every other awake colony slave in the radius and room for which BlaxSuppression.BelowWardenThreshold(need) and ScheduledForSlaveSuppression hold, it calls the public SlaveRebellionUtility.IncrementSuppression(need, initiator, slave, share x SuppressionPower x curve(level)), with vanilla's private static CurrentSuppressionFactorCurve read through StaticFieldRefAccess, then sets mindState.lastSlaveSuppressedTick. Calling IncrementSuppression, not the interaction method, means no recursion. Using the helper, not vanilla's CanBeSuppressedNow, makes bystanders follow the warden threshold.
- **Settings:** roomSuppression (off until switched on), bystanderShare 70% (10 to 100), radius 6 (2 to 12).
- **Replaces:** none.
- **Effort:** S.
- **Tests:** Three slaves at 0.4 in one room, suppress one: the other two rise by about 0.7x its gain and are no longer scheduled. A slave in the next room is unchanged. With the warden threshold at 90%, a bystander at 0.8 is suppressed too. Switched off, nothing happens.
- **Risks:** Wardens never suppress sleeping slaves, so it fires mostly at meals and in shared workrooms; expect a modest effect. Each bystander shows its own text mote.
#### Wardens calm breakdowns
- **Players get:** A warden walks over to a slave in a non-violent mental break and talks them out of it, at a 10% suppression cost, instead of watching a day-long tantrum.
- **How:** A WorkGiver_Warden subclass for colony slaves in a mental state that is neither IsAggro nor the Rebellion state. It needs its own precheck, because ShouldTakeCareOfSlave requires SlaveIsSecure, which is false during a mental state. JobDriver: go to touch, 180-tick talk, MentalState.RecoverFromState, then suppression drops by the setting.
- **Settings:** wardensCalmBreaks (off until switched on), calmSuppressionCost 10% (0 to 30).
- **Replaces:** none. Asked for by the opening post of the 1,785-upvote "Slavery Is Useless" thread.
- **Effort:** M (estimated S to M; I took the higher).
- **Tests:** A slave in a sad-wander break gets a warden with the calm job; afterwards the break is over and suppression is 10% lower. A berserk slave and a rebelling slave get no job.
- **Risks:** Modded mental states that block recovery stay as they are.
### Lingering terror
Terror that lasts after a slave walks away. It stands alone and comes late: Useful Terror covers it on 1.7 today.
- **Risks:** It removes a vanilla pressure valve, so it is off by default. 2.0's "wardens calm breakdowns" is the gentler fix.
#### Lingering terror
- **Players get:** Terror from skullspikes, gibbet cages and terror sculptures fades over hours instead of vanishing the moment a slave walks out of sight. Once switched on, the setting runs from 1 to 48 hours, default 12.
- **Players get:** Terror from skullspikes, gibbet cages and terror sculptures fades over hours instead of vanishing the moment a slave walks out of sight. The setting runs from 0 (vanilla) to 48 hours, default 12.
- **How:** A postfix on the extension method TerrorUtility.GetTerrorLevel(Pawn), the single source for StatWorker_Terror and StatPart_Terror, returns max(vanilla level, stored peak x linear decay). Peak and tick per pawn sit in an in-memory dictionary, so removing the mod leaves nothing behind. A postfix on the StatWorker_Terror explanation adds "lingering: x%". The design's version (raise ObservedTerror.durationDays) can't work: PawnObserver.ObserveSurroundingThings calls TerrorUtility.RemoveAllTerrorThoughts on every pass, about every 450 to 750 ticks.
- **Settings:** lingeringTerror (off until switched on), terrorLingerHours 12 (1 to 48).
- **Settings:** terrorLingerHours 12 (0 to 48).
- **Replaces:** none listed. It answers the top point of a 2,852-upvote thread and is what players recommend Useful Terror for.
- **Effort:** S.
- **Tests:** A slave next to a skullspike has terror X; moved away for one observation pass, it still has X x the decay for one hour; switched off, it drops to vanilla at once.
- **Tests:** A slave next to a skullspike has terror X; moved away for one observation pass, it still has X x the decay for one hour; at 0 hours it drops to vanilla at once.
- **Risks:** A reload clears stored peaks until the next observation pass. Higher terror lowers the suppression fall rate through vanilla's curve, so slavery gets easier.
### Idea: terror covers rebellion risks
Specified, not planned for a step. After No doom timer a safe slave never rebels: CanParticipateInSlaveRebellion is false and InitiateSlaveRebellionMtbDaysHelper returns -1 before any of the three factors (SlaveRebellionUtility.cs:131-134, factors at :147-158). So this only reaches slaves below the safe threshold, or every slave with safe suppression off; in practice slaves left unsuppressed while every colonist is away (IsUnattendedByColonists, :215-225). It waits until players report rebellions of unsafe slaves during caravan trips once No doom timer is out.
#### Terror covers rebellion risks
- **Players get:** For slaves below the safe threshold, or with safe suppression off, terror weakens the three vanilla situations that make a rebellion far more likely: a usable weapon nearby (x4), a room that touches the map edge (x1.7) and no free colonist on the map (x20). At full terror each factor drops to x1, so such slaves can haul in the armory, work at the map edge or stay home while the colonists travel, as long as the terror holds. The rebellion tooltip shows each reduced factor.
- **How:** The No doom timer postfix on InitiateSlaveRebellionMtbDaysHelper already sees every slave below the safe threshold. Vanilla divides the MTB by 1.7 when InRoomTouchingMapEdge, by 4 when CanApplyWeaponFactor and by 20 when IsUnattendedByColonists(Map) (SlaveRebellionUtility.cs:147-158). For each factor vanilla applied, the postfix multiplies the MTB back by factor ^ (terror x coverage), calling the same checks (the first two are private, through AccessTools delegates). Terror comes from TerrorUtility.GetTerrorLevel, so lingering terror counts. With "armed slaves are never safe" on, a slave holding a weapon keeps the full weapon factor. The explanation postfix adds one line per reduced factor.
- **Settings:** terrorCoversRisks (off until switched on), terrorCoverage 100% (0 to 100; 50% halves the effect).
- **Replaces:** Useful Terror 2636462610 (21,817 subs, maintained on 1.7; its rebellion-penalty part). Stands down while Useful Terror is active, and the Compat tab says so.
- **Effort:** S.
- **Tests:** Through InitiateSlaveRebellionMtbDays after ClearCache: an unsafe slave next to a rifle has vanilla's MTB at terror 0, the MTB without the weapon factor at terror 1, and the geometric middle at terror 0.5. The same for a map whose free colonists all left in a caravan. A safe slave stays at -1. Coverage 0 gives vanilla.
- **Risks:** Terror becomes a strong lever; the coverage slider tunes it.
## Running a slave workforce
The daily view of a big slave colony: what slaves may do, how fast, and where you see them. Time as a slave shipped in 1.2. The work rules and the colonist bar fill 1.7 gaps no active mod covers.
#### Slave work rules
- **Players get:** Choose which banned jobs slaves may do (warden, hunting, art, research and any modded type) and their work speed, flat or scaled by suppression. Slave wardens never suppress other slaves.
- **How:** The settings list every WorkTypeDef with disabledForSlaves true at load and record the originals. Allowing one sets disabledForSlaves false, which GuestUtility.GetDisabledWorkTypes reads live, then calls Notify_DisabledWorkTypesChanged on all colony slaves to clear the cache. Flat speed sets the private factor of the StatPart_Slave on WorkSpeedGlobal (Core XML 0.85, its only use) through FieldRefAccess. The suppression option sets that factor to 1.0 and adds a StatPart that runs from 70% at 0% suppression to 100% at full suppression; Loyalty can drive it later. A postfix on the protected WorkGiver_Warden.ShouldTakeCareOfSlave returns false when the warden is a slave, which also blocks self-suppression loops.
- **How:** The settings list every WorkTypeDef with disabledForSlaves true at load and record the originals. Allowing one sets disabledForSlaves false, which GuestUtility.GetDisabledWorkTypes reads live, then calls Notify_DisabledWorkTypesChanged on all colony slaves to clear the cache. Flat speed sets the private factor of the StatPart_Slave on WorkSpeedGlobal (Core XML 0.85, its only use) through FieldRefAccess. The suppression option sets that factor to 1.0 and adds a StatPart that runs from 70% at 0% suppression to 100% at full suppression; 2.1 can drive it by loyalty. A postfix on the protected WorkGiver_Warden.ShouldTakeCareOfSlave returns false when the warden is a slave, which also blocks self-suppression loops.
- **Settings:** Per work type "slaves may do" (all off = vanilla). slaveWorkSpeed 85% (50 to 100). speedFollowsSuppression (off), 70% to 100%.
- **Replaces:** Capable Slaves 2870120550 (9,842 subs, no 1.7), Capable Slaves plus Warden 2986875064 (1,381), Art n Smart Slaves 2605727464 (2,643), 100% Slave Work Speed 3106598768 (1,966), Slaves Work at Full Speed 3679470056 (388), Slaves Can Research 3743623338 (193).
- **Effort:** 2 x S (1 day).
@ -382,87 +166,103 @@ The daily view of a big slave colony: what slaves may do, how fast, and where yo
#### Hide slaves from the colonist bar
- **Players get:** A toggle in the bottom-right play controls (vanilla slave icon) or a keybinding hides slaves on the map from the colonist bar, so big slave colonies keep a readable bar. Caravan slaves stay listed.
- **How:** A postfix on PlaySettings.DoPlaySettingsGlobalControls adds the toggle with GuestUtility.SlaveIcon, plus a KeyBindingDef with no default key. Not a prefix on PlayerPawnsDisplayOrderUtility.Sort: it is a one-line wrapper around pawns.SortBy (PlayerPawnsDisplayOrderUtility.cs:12-15), small enough for CoreCLR to inline into its caller, so the prefix may never run. The patch goes on the private ColonistBar.CheckRecacheEntries, a large method that only does work while entriesDirty is set (ColonistBar.cs:210-297). A prefix stores entriesDirty in __state. When it was true and hiding is on, the postfix removes from cachedEntries every entry whose pawn is a spawned colony slave, adds Entry(null, map, group) for any map group left empty (as vanilla does at :261-264), rebuilds cachedReorderableGroups, and calls drawer.Notify_RecachedEntries() and drawLocsFinder.CalculateDrawLocs(cachedDrawLocs, out cachedScale, groupCount), the same closing steps vanilla runs. Caravan groups are left untouched. Toggling calls ColonistBar.MarkColonistsDirty.
- **How:** A postfix on PlaySettings.DoPlaySettingsGlobalControls adds the toggle with GuestUtility.SlaveIcon, plus a KeyBindingDef with no default key. In 1.7, PlayerPawnsDisplayOrderUtility.Sort is only called from ColonistBar.CheckRecacheEntries, once for map pawns and once for caravans. A prefix on Sort removes spawned colony slaves while the setting is on, so caravan slaves stay. A context flag around CheckRecacheEntries only guards against other mods calling Sort. Toggling calls ColonistBar.MarkColonistsDirty.
- **Settings:** hideSlavesFromBar (off, also toggled in game).
- **Replaces:** SlaveBar 3019111152 (24,584 subs, stale since 1.5).
- **Effort:** S.
- **Tests:** A map with a colonist and a slave: ColonistBar.Entries contains the slave; after hide and MarkColonistsDirty it doesn't, and the draw locations count matches the entries. A caravan with a slave still lists it. An all-slave map still gets vanilla's empty group entry. A second CheckRecacheEntries call without MarkColonistsDirty changes nothing.
- **Tests:** A map with a colonist and a slave: ColonistBar.Entries contains the slave; after hide and MarkColonistsDirty it doesn't. A caravan with a slave still lists it. An all-slave map still gets vanilla's empty group entry.
- **Risks:** Colony Groups and other bar replacements bypass it; the Compat tab says so.
#### Slave overview
- **Players get:** A "Slaves" main tab, text label only, with one row per colony slave: suppression, days until a possible rebellion ("Never" when safe), time as a slave and interaction mode. Columns appear as later features ship: appraised value (Slave value), loyalty and term (Freedom and loyalty), blood donor (Slave medicine). Sort by any column, click a name to jump to the slave. It is where slaves stay visible once they are hidden from the colonist bar.
- **How (new 2026-12-01, not checked against the code):** A MainButtonDef opening a MainTabWindow_PawnTable over a PawnTableDef whose columns are PawnColumnWorker subclasses. They read SlaveRebellionUtility.InitiateSlaveRebellionMtbDays, the time-as-slave component and the ledger. The button's worker hides it while the colony has no slaves and without Ideology. No icon art: vanilla shows the label. Check that no def of the table enters a save, so adding or removing the mod stays clean.
- **Settings:** slaveOverviewTab (on).
- **Replaces:** none directly. SlaveBar 3019111152 (24,529 subs, last built for 1.5) shows that players want slaves out of the colonist bar; this gives them a place to look instead.
- **Effort:** M.
- **Tests:** With two slaves and a colonist the table lists exactly the two slaves. The rebellion column shows "Never" for a safe slave and a number for an unsafe one. Columns of switched-off or unbuilt features are absent. Without Ideology, or with no slaves, the button is hidden.
- **Risks:** One more main tab; it only shows while you hold slaves.
## Slave medicine
Medical depth was your ask. Slaves get the hospital, the operations and the medical care colonists have, and colonies that use slaves' bodies get rules that keep the slave alive.
### One hospital
#### Shared infirmary and slave-surgeon rule
- **Players get:** Sick or injured slaves may lie in colonist medical beds when no slave medical bed is free, so one hospital serves everyone. Colonists in a medical bed no longer get "slept in a room with a slave". Optionally, colonists may use slave medical beds, and slave doctors can be barred from operating on free colonists.
- **How:** Vanilla RestUtility.CanUseBedNow rejects any bed whose ForSlaves differs from (guestStatusOverride ?? sleeper.GuestStatus), medical beds included (RestUtility.cs:119).
- Bed check: a postfix on CanUseBedNow acts only when vanilla returned false and the case applies: setting on, not strict (below), sleeper IsSlaveOfColony, bed Medical, player-owned and of colonist owner type, and HealthAIUtility.ShouldSeekMedicalRest true. A postfix only sees false, not which check failed, so it never just returns true: that would also accept a burning bed (:86), a bed with no free slot (:104), vacuum, a race that can't use it, an ideoligion or forbidden bed, or a slave set to no medical care (:129), and could send two pawns into one slot. Instead it calls CanUseBedNow again with guestStatusOverride GuestStatus.Guest under a [ThreadStatic] reentry guard and returns that result. With Guest only the ForSlaves test changes; every other vanilla check still runs. Because the check itself allows the bed, the per-tick job fail checks (Toils_Bed.FailOnBedNoLongerUsable), TuckIntoBed and the rescue float menu (IsValidBedFor) accept it too. The design's retry flag broke there: the slave would find the bed, fail the job next tick and loop.
- Bed search: vanilla FindBedFor almost never returns null for a slave. When no medical bed passes (:267-293) it falls through to the owned bed (:295) and then to any non-medical slave bed (:308-325), and FindPatientBedFor ends with FindBedFor(pawn) (:355). So a prefix on RestUtility.FindBedFor and FindPatientBedFor raises a [ThreadStatic] "strict" depth counter (FindPatientBedFor calls FindBedFor), so the first search behaves like vanilla and slave medical beds come first. The outermost postfix searches again when ShouldSeekMedicalRest(sleeper) is true and the strict result is null or not Medical: only colonist medical beds, with vanilla's two danger passes (Danger.None, then Deadly) and IsValidBedFor, strict off. It returns that bed if one is found, otherwise the strict result.
- The colonist-into-slave-bed mirror works the same way (off). Thought: the existing TryGainMemory gate drops SleptInRoomWithSlave when the receiver's CurrentBed() is Medical. Surgeon rule: a postfix on Bill_Medical.PawnAllowedToStartAnew returns false with a JobFailReason when the doctor IsSlave and the patient IsFreeNonSlaveColonist; tending is unaffected.
- **Settings:** slavesUseColonistMedicalBeds (off until switched on), colonistsUseSlaveMedicalBeds (off), noSleptWithSlaveInMedicalBed (off until switched on), slavesNoSurgeryOnFreeColonists (off).
- **Replaces:** none. Vanilla gap behind the "slave-only, colonist-only furniture" wish.
- **Effort:** M.
- **Tests:** An injured colony slave with only a colonist medical bed: FindBedFor and FindPatientBedFor return it with the setting on and null with it off. An injured slave who owns an ordinary slave bed gets the colonist medical bed, not the owned bed. The slave walks there and lies in it for 2,500 ticks without the job failing. A free slave medical bed wins. A non-medical colonist bed stays invalid, and so do a burning colonist medical bed and one with every slot taken; FindBedFor gives a slave set to no medical care no colonist medical bed. A colonist asleep in a medical bed next to a sleeping slave for 2,500 ticks gets no SleptInRoomWithSlave; in a normal bed the thought still comes. PawnAllowedToStartAnew(slave doctor) on a colonist's bill is true by default and false with the rule on.
- **Risks:** In a mass-casualty raid a slave can take the last colonist medical bed; colonists then fall back to normal beds, as vanilla does when beds run out. Colonies with only slave doctors get stuck with the surgeon rule on, so it is off. A Blax Zones sleeping zone switched to medical holds colonist medical beds, so slaves may use it too. Zones' own filters still decide, because its CanUseBedNow postfix runs after ours. Priority Treatment also postfixes PawnAllowedToStartAnew (harmless).
#### Surgery bills and medical care survive status changes
- **Players get:** Operations you queued survive enslaving a prisoner, imprisoning a slave or freeing a slave into the colony, as long as the operation still applies. Without Blax Castes, the medical care level you set also survives.
- **How:** Pawn_GuestTracker.SetGuestStatus ends with surgeryBills.Clear(), and BillStack.Clear doesn't mark bills deleted, so the same Bill instances can go back. A prefix copies the Bill_Medical list into __state. The postfix re-adds only bills no longer in the stack, and decides by the state after the call, not by guest.Released: vanilla frees a slave into the colony through EmancipateSlave, SlaveRelease and GuestRelease, which sets Released (GenGuest.cs:52) and then calls SetGuestStatus(null) while the pawn stays (:55-61), so skipping on Released would drop the bills in exactly the case players expect to keep them. It restores when the pawn ends as a colony prisoner, a colony slave, or a free member of the player faction (Faction.IsPlayer, not IsSlave, not IsPrisoner), whichever way it got there (enslaved, imprisoned, emancipated into the colony, recruited). It skips otherwise (released to leave, sold), when the status didn't change (SetGuestStatus returns early then), and while a prefix/finalizer flag on Pawn.PreTraded is set: a sale calls SetGuestStatus(null) while the pawn's Faction is still the player. Each bill must pass recipe.Worker.AvailableOnNow, plus CompletableEver for Recipe_Surgery workers. The same prefix and postfix save and restore the medCare that Pawn_PlayerSettings.ResetMedicalCare wipes; that part stands down when blax.castes is active, because Castes owns medical care.
- **How:** Pawn_GuestTracker.SetGuestStatus ends with surgeryBills.Clear(), and BillStack.Clear doesn't mark bills deleted, so the same Bill instances can go back. A prefix copies the Bill_Medical list into __state. The postfix re-adds only bills no longer in the stack, only on these transitions: prisoner of colony to slave of colony, slave of colony to prisoner of colony, slave to free colonist through RecruitUtility.Recruit. It skips when the status didn't change (SetGuestStatus returns early then), when guest.Released is set, and while a prefix/finalizer flag on Pawn.PreTraded is set: a sale calls SetGuestStatus(null) while the pawn's Faction is still the player. Each bill must pass recipe.Worker.AvailableOnNow, plus CompletableEver for Recipe_Surgery workers. The same prefix and postfix save and restore the medCare that Pawn_PlayerSettings.ResetMedicalCare wipes; that part stands down when blax.castes is active, because Castes owns medical care.
- **Settings:** keepSurgeryBills (on), keepMedicalCare (on; inactive while Castes is loaded).
- **Replaces:** none. Vanilla gap and a recurring Simple Slavery bug report.
- **Effort:** 2 x S (1 day).
- **Tests:** A prisoner with a queued kidney bill keeps exactly one after GenGuest.EnslavePrisoner. A slave whose HomeFaction is the player keeps a queued bill through GenGuest.EmancipateSlave. A slave's brand bill is dropped on imprisonment (slave-only recipe). A slave sold through trade has no bills afterwards, and a prisoner released to walk home gets none restored. SetGuestStatus to the same status duplicates nothing. "No medicine" survives enslavement without Castes; in a -Compat run with Castes our restore doesn't run.
- **Tests:** A prisoner with a queued kidney bill keeps exactly one after GenGuest.EnslavePrisoner. A slave's brand bill is dropped on imprisonment (slave-only recipe). A slave sold through trade, or released, has no bills. SetGuestStatus to the same status duplicates nothing. "No medicine" survives enslavement without Castes; in a -Compat run with Castes our restore doesn't run.
- **Risks:** Low. Mods that expect bills to clear can turn it off.
### Harvests and blood
## 1.4 Captives pay
For colonies that use slaves' bodies. Both keep their state in the ledger from Captives pay.
PrisonerRansom (91k) has no 1.7 build: the largest economic opening on 1.7, so both reviewers moved this ahead of pricing. It also brings the purchase ledger and payout helper later features reuse. 6 days.
#### Organ harvests wait for health
#### Purchase ledger and payouts
- **Players get:** Harvest bills you queue on slaves and prisoners wait until the patient is healthy. They never take the last kidney or lung, and they wait while you already store enough of that organ.
- **How:** No bill method is patched. BillStack.AddBill is two statements (BillStack.cs:69-73) and Bill_Medical.ShouldDoNow is "return !suspended" (Bill_Medical.cs:118-125), both tiny enough to be inlined. Recipe_RemoveBodyPart doesn't override CompletableEver, so a guard there would patch Recipe_Surgery's "return true" (Recipe_Surgery.cs:70-73), and a false CompletableEver makes WorkGiver_DoBill delete the bill without a word through BillStack.RemoveIncompletableBills (BillStack.cs:98-109), so the bill would be lost instead of waiting.
- Instead the ledger component checks every 2,500 ticks while the setting is on. It walks health.surgeryBills of colony slaves and prisoners and treats every bill whose worker is Recipe_RemoveBodyPart on a natural organ as gated. It sets bill.suspended while any rule fails: the health gate (summaryHealth >= threshold, no HasHediffsNeedingTend, no BloodLoss), the stock target (stored organs of that def), or the last natural kidney or lung (GetNotMissingParts, not HasDirectlyAddedPartFor). It clears only the suspensions it set itself, tracked in the ledger, once every rule passes.
- A suspended bill also drops out of surgeryBills.AnyShouldDoNow (HealthAIUtility.cs:74), so the patient doesn't lie in a medical bed while it waits. The bill shows vanilla's suspended state, and a message names the rule when the check first suspends it.
- The stock count uses map.listerThings.ThingsOfDef in storage, because ResourceCounter returns 0 for organs (they are Uncounted). Thoughts use vanilla MyOrganHarvested and the existing harm gate. The player still queues every harvest; nothing is queued automatically.
- **Settings:** harvestWaitsForHealth (off until switched on), healthThreshold 85% (50 to 100), stock target per organ (kidney 2, lung 2; 0 = no limit, max 10).
- **Replaces:** Organ Harvest Button 3342852552 (1,127 subs, stale), Quick Ops 3844998950 (25, partly), Repeat Organ Harvest 3819036722 (3).
- **Players get:** Nothing visible on its own. It stops buy-and-ransom loops and delivers every silver payout from 1.4 on.
- **How:** New GameComponent_BlaxSlaveLedger, the per-pawn store later features reuse (Scribe references, nulls purged on load). A postfix on Tradeable_Pawn.ResolveTrade for PlayerBuys records seller faction, price and tick. This matters because PawnGroupKindWorker_Trader re-factions caravan slaves to the trader's faction and orbital or settlement stock gets a random visible faction, so a bought slave often has a friendly HomeFaction that would pay ransom. GameComponent_BlaxPayments queues silver with a delay. BlaxDelivery.Drop(Map, Thing) asks ZonesApi.TryFindDropSpot and spawns the pod exactly on the returned cell with TradeUtility.SpawnDropPod, one thing per call; DropThingsNear would search a new random cell up to 5 cells away and miss a small zone. Without a zone cell it drops near DropCellFinder.TradeDropSpot with DropPodUtility.DropThingsNear.
- **Settings:** none.
- **Replaces:** none.
- **Effort:** S.
- **Tests:** A kidney bill on a slave at 60% health is suspended after the next check and AnyShouldDoNow is false; at 90% the suspension is lifted. With 2 stored kidneys, suspended. A slave with one natural kidney: suspended, and the bill is still in the stack after a doctor scans for work. A bill the player suspended by hand stays suspended after the gate passes. Switching the setting off lifts every suspension it set. Phase 2: the ledger's suspensions survive reload.
- **Risks:** Prisoners of non-hostile factions still cost vanilla's -70 goodwill unless the captive-surgery setting of Prisoners count too is on. A player who unsuspends a held bill by hand sees it suspended again at the next check while the rule fails. If the mod is removed while a bill waits, the bill stays suspended (saved by vanilla) until the player resumes it. Demand is small; the value is the health gate.
- **Tests:** Buying a stock slave writes a ledger entry with seller faction and price. A queued payment lands after its delay. Without Zones the drop uses TradeDropSpot. With a Zones delivery zone, the pod falls on the returned zone cell. Phase 2: ledger and pending payment survive reload.
- **Risks:** None for players; every payout feature depends on it.
#### Blood bank
#### Slave ship on request
- **Players get:** With Biotech, colony slaves get a "blood donor" toggle. Donors get a hemogen extraction bill whenever they're well enough, like vanilla's prisoner hemogen farm, which slaves never had. Optionally your sanguophages may feed on donor slaves when no hemogen pack is in reach.
- **How:** The ledger keeps the donor set. Every 15,000 ticks, the cadence of vanilla's prisoner-only HemogenFarm check in Pawn_GuestTracker, each donor who IsSlaveOfColony and passes SanguophageUtility.CanSafelyBeQueuedForHemogenExtraction (which already rejects a duplicate bill and BloodLoss) gets HealthCardUtility.CreateSurgeryBill(pawn, RecipeDefOf.ExtractHemogenPack, null, null, sendMessages: false). The toggle is a Command_Toggle from a Pawn.GetGizmos postfix with the vanilla HemogenPack icon, and it applies to every selected slave. Bloodfeeding: vanilla JobGiver_GetHemogen only feeds on prisoners. TryGiveJob also returns null when the pawn doesn't need hemogen (ShouldConsumeHemogenNow false, JobGiver_GetHemogen.cs:63-66), so a postfix acting on every null would bite donors whenever the think node runs. The postfix steps in only when the result is null, Gene_Hemogen.ShouldConsumeHemogenNow() is true, the pawn IsBloodfeeder and no hemogen pack was found. It picks the nearest donor slave that passes vanilla's CanFeedOnPrisoner checks adapted to slaves (:110-121): not WouldDieFromAdditionalBloodLoss(0.4499f), reachable and reservable at the pawn's normal max danger, not forbidden, not in an aggro mental state. It gives JobDef BlaxSlaves_FeedOnDonor (go to touch, wait 120 ticks, SanguophageUtility.DoBite with vanilla's prisoner amounts). Colonists' thoughts pass the existing harm gate. Slaves has no "new slaves donate" default; per-pawn defaults belong to Castes.
- **Settings:** bloodBank (on, Biotech only), checkIntervalHours 6 (1 to 24), bloodfeedOnDonors (on).
- **Replaces:** BetterHemogenFarm 2967718207 (273 subs, 1.4), and the slave half of Prison Labor 1899474310's hemogen mode and Custom Prisoner Interactions 2841231775's auto hemogen (both prisoner-only).
- **Players get:** Allied outlander factions that accept slavery send an orbital slave ship on request from the comms console, so you can sell captives any time. Vanilla terms apply: 30 goodwill and one orbital request per 15 days.
- **How:** No vanilla FactionDef sets canRequestOrbitalTrader, and Orbital_PirateMerchant (label "slave ship") has requestable false. An XML patch sets canRequestOrbitalTrader on the outlander FactionDefs, adds Orbital_PirateMerchant to their orbitalTraderKinds and makes it requestable. Vanilla FactionDialogMaker.RequestOrbitalTraderOption already demands an ally and runs a 900,000-tick cooldown. A postfix on that private method disables the option with a reason when the faction's ideo fails IdeoUtility.IdeoApprovesOfSlavery.
- **Settings:** slaveShipOnRequest (on).
- **Replaces:** none. Answers the "somewhere to sell any time" signal behind Call A Trader (52k) without the cut slave catalogue.
- **Effort:** S.
- **Tests:** An allied outlander faction with a pro-slavery ideo shows the option and the slave ship in the kind list; an anti-slavery one shows it disabled with the reason; a non-allied one shows vanilla's "must be ally".
- **Risks:** Other mods that set canRequestOrbitalTrader on outlanders add their kinds next to ours (harmless).
#### Ransom captives at the comms console
- **Players get:** Call a faction and offer back their people you hold, prisoners or slaves. They quote a price; your negotiator can push for 25% more at a time at lower odds, and the dialog shows the odds. If they accept, silver arrives by drop pod within hours and the captive walks home. If they refuse, they won't talk ransom for 10 days, and a hostile faction may come to free the captive by force.
- **How:** A postfix on FactionDialogMaker.FactionDialogFor(Pawn, Faction) inserts a DiaOption before Disconnect, found by position, not index. It is disabled with a reason when nobody qualifies or a cooldown runs.
- Candidates: PrisonersOfColony and SlavesOfColonySpawned with HomeFaction == faction, not downed, not in a mental state, and not in the purchase ledger.
- Price: MarketValue x 0.8 x relation (hostile 0.5, neutral 0.8, ally 1.0) x noble factor (1 + MostSeniorTitle seniority / 500; faction leader x3). An average neutral captive brings 1,120 silver, against 630 at a trader.
- Odds: 0.6 + goodwill/200 + negotiator Social x 0.02, minus 0.25 per push, clamped 0.05 to 0.95. Permanent-enemy factions refuse unless the setting allows them; then they start at 0.3.
- Accept: the payout helper delivers the silver after 0.1 to 0.3 days. GenGuest.PrisonerRelease or GenGuest.SlaveRelease frees the captive, so vanilla's walk-home goodwill applies, plus 5. No trade happens, so no SoldSlave event. A 3-day cooldown per faction follows.
- Refuse: 10-day cooldown per faction. A hostile faction has a 25% chance to queue IncidentDefOf.RaidEnemy at DefaultThreatPointsNow x 0.8 in 3 to 7 days through Storyteller.incidentQueue; hostility is checked again when it fires.
- **Settings:** ransomEnabled (on), ransomFactor 80% (20 to 200), pushStep 25%, refuseCooldownDays 10 (3 to 30), acceptCooldownDays 3 (0 to 10), rescueRaidChance 25% (0 to 100), permanentEnemiesMayAccept (off).
- **Replaces:** PrisonerRansom 794038005 (91,415 subs, no 1.7; in your mod list, where it loads its 1.6 DLL with a bundled Harmony 2.3.1.1), Prisoner Exchange 3495102506 (11,100, no 1.7; partly).
- **Effort:** M.
- **Tests:** Skipped without Biotech. After Fixtures.Tick(15000) a donor slave's BillStack holds ExtractHemogenPack; a non-donor and a donor with BloodLoss get none. A bloodfeeder colonist with low hemogen and no packs on the map gets BlaxSlaves_FeedOnDonor; with the setting off, null. The same colonist with full hemogen gets null, and a donor a bite would kill is skipped. Phase 2: the donor set survives.
- **Risks:** Biotech-only: job and recipe references use MayRequire. Hemogen income per slave matches vanilla's prisoner farm. Doctors' workload rises with many donors. The bite path is rare, since the bank fills the fridge with packs.
- **Tests:** With captives from a hostile and a neutral faction, the root node holds our option; with none it is disabled. A pawn bought from that faction's trader is not offered. Accept with odds forced to 1: a payment is pending, after 0.3 days map silver rises by the price and the captive is released; a second ransom within 3 days is disabled. Refuse with odds 0: cooldown set, and with raid chance 1 the queue holds RaidEnemy. Phase 2: payment and cooldowns survive reload.
- **Risks:** Ransoming every captured raider pays well; the price factor, odds and both cooldowns bound it. Comms-console overhauls that rebuild the dialog may hide the option.
## Slave implants
#### Factions buy back their people
Control implants are the strongest medical demand on the Workshop (Simple Slavery Collars 52k with no 1.7 build, Pawn Suppression Implants 7.8k). The three implants share one hediff class with a status-driven stage and need only the MTB postfix of No doom timer.
- **Players get:** Now and then a non-hostile faction with members among your captives writes in: "The Iron Ring offers 1,620 silver for Jana's freedom." Accept within 2 days for silver by drop pod and goodwill, and the pawn walks home. Nobles and leaders draw bigger offers.
- **How:** A GameComponent check every 2,500 ticks. Each eligible faction (non-hostile, humanlike, with a healthy member as your captive on a player map who is not in the purchase ledger) rolls Rand.MTBEventOccurs with a 20-day MTB. Price: the ransom base x Rand.Range(1.0, 1.5), no odds roll, as a reward for patience. Offers come as a ChoiceLetter with a 120,000-tick timeout (LetterWithTimeout.StartTimeout). Accepting reuses the ransom payout and release, plus 8 goodwill; declining or timing out changes nothing. One offer open at a time, at least 5 days apart. Pawns targeted by a pending rescue raid are skipped.
- **Settings:** buybackOffers (on), buybackMtbDays 20 (5 to 60), offer range 100 to 150% of the ransom price.
- **Replaces:** none directly. The resocialization-offer idea of Prison Labor 1899474310 (174,969 subs), for slaves; vanilla only has the reverse (IncidentWorker_RansomDemand).
- **Effort:** S.
- **Tests:** Force the MTB for a friendly faction's slave: our letter appears with a price in range. A slave bought from that faction's trader never draws an offer. Accepting queues a payment and releases the pawn. The letter expires after 120,000 ticks. A hostile faction never sends one. Phase 2: an open offer survives reload.
- **Risks:** Letter spam with many factions is held back by the one-offer limit and the gap.
#### Prisoners count too
- **Players get:** Optionally, the "harming slaves doesn't upset colonists" rule also covers prisoners, and it can reduce the mood hit instead of removing it. Factions can optionally stop losing goodwill over surgery on captives you hold.
- **How:**
- (a) Widen the victim predicate in the SlaveHarm frames to IsPrisonerOfColony, keeping the pacifist and family exceptions. It stands down while No Sympathy For Prisoners (sk.noprisonersympathy) is active, so two vetoes don't stack and undercut the pacifist rule.
- (b) Reduce mode: Patch_SlaveHarmGate scales Thought_Memory.moodPowerFactor and, for Thought_MemorySocial, opinionOffset by the same factor before letting the thought through. moodPowerFactor alone leaves opinion penalties (-5 to -20) at full strength.
- (c) A prefix on the protected RecipeWorker.ReportViolation skips it when the patient is a colony prisoner without questTags, for every worker except Recipe_ExecuteByCut, which keeps vanilla's -100. ReportViolation is the single funnel for surgery, hemogen, implants and execution, so the execution exclusion is explicit. Colony slaves never trigger it in vanilla.
- **Settings:** prisonersCountAsSlaves (off), harmMoodReduction 100% (0 to 100; 100 = full removal as today), captiveSurgeryNoGoodwillLoss (off; tooltip: execution still costs goodwill).
- **Replaces:** No Sympathy For Prisoners 3533769253 (16,399 subs, in your mod list), Prisoner Harvesting 3347850851 (13,090).
- **Effort:** M.
- **Tests:** Executing a prisoner with (a) on gives a non-pacifist colonist no new bad memories (Fixtures.NewBadMemories); a pacifist still minds. At 50% a mood memory and an opinion thought are both halved. Harvesting a neutral faction prisoner's kidney leaves goodwill unchanged with (c) on and drops it by 70 with it off. Executing that prisoner by cut still drops goodwill with (c) on. -Compat with NSFP: (a) stands down.
- **Risks:** (c) changes vanilla balance, so it is off by default. The broader gate needs more frame coverage in tests.
## 1.5 Slave medicine
Medical depth was your ask, and control implants are the strongest medical demand on the Workshop (Simple Slavery Collars 52k with no 1.7 build, Pawn Suppression Implants 7.8k). The implants need only the 1.3 MTB postfix. 7 days.
#### Shared infirmary and slave-surgeon rule
- **Players get:** Sick or injured slaves may lie in colonist medical beds when no slave medical bed is free, so one hospital serves everyone. Colonists in a medical bed no longer get "slept in a room with a slave". Optionally, colonists may use slave medical beds, and slave doctors can be barred from operating on free colonists.
- **How:** Vanilla RestUtility.CanUseBedNow rejects any bed whose ForSlaves differs from (guestStatusOverride ?? sleeper.GuestStatus), medical beds included. A postfix on CanUseBedNow always allows this case: setting on, sleeper IsSlaveOfColony, bed Medical, player-owned and of colonist owner type, and HealthAIUtility.ShouldSeekMedicalRest true. Because it always allows it, the per-tick job fail checks (Toils_Bed.FailOnBedNoLongerUsable), TuckIntoBed and the rescue float menu (IsValidBedFor) accept the bed too. The design's retry flag broke there: the slave would find the bed, fail the job next tick and loop. To keep slave medical beds first, a prefix on RestUtility.FindBedFor and FindPatientBedFor raises a [ThreadStatic] "strict" depth counter (FindPatientBedFor calls FindBedFor), so the first search behaves like vanilla; the postfix searches again with strict off only when the result is null. The colonist-into-slave-bed mirror works the same way (off). Thought: the existing TryGainMemory gate drops SleptInRoomWithSlave when the receiver's CurrentBed() is Medical. Surgeon rule: a postfix on Bill_Medical.PawnAllowedToStartAnew returns false with a JobFailReason when the doctor IsSlave and the patient IsFreeNonSlaveColonist; tending is unaffected.
- **Settings:** slavesUseColonistMedicalBeds (on), colonistsUseSlaveMedicalBeds (off), noSleptWithSlaveInMedicalBed (on), slavesNoSurgeryOnFreeColonists (off).
- **Replaces:** none. Vanilla gap behind the "slave-only, colonist-only furniture" wish.
- **Effort:** M.
- **Tests:** An injured colony slave with only a colonist medical bed: FindBedFor and FindPatientBedFor return it with the setting on and null with it off. The slave walks there and lies in it for 2,500 ticks without the job failing. A free slave medical bed wins. A non-medical colonist bed stays invalid. A colonist asleep in a medical bed next to a sleeping slave for 2,500 ticks gets no SleptInRoomWithSlave; in a normal bed the thought still comes. PawnAllowedToStartAnew(slave doctor) on a colonist's bill is true by default and false with the rule on.
- **Risks:** In a mass-casualty raid a slave can take the last colonist medical bed; colonists then fall back to normal beds, as vanilla does when beds run out. Colonies with only slave doctors get stuck with the surgeon rule on, so it is off. A Blax Zones sleeping zone switched to medical holds colonist medical beds, so slaves may use it too. Zones' own filters still decide, because its CanUseBedNow postfix runs after ours. Priority Treatment also postfixes PawnAllowedToStartAnew (harmless).
#### Compliance implant
- **Players get:** Surgery "install compliance implant" for colony slaves: Medicine 6, Microelectronics research, 2 components and 1 industrial medicine, no new item. Suppression falls 30% slower and the slave starts rebellions half as often, at -5% consciousness and a -4 mood. Removal is its own surgery and refunds a component; freed pawns keep a dormant implant with no effect.
- **How:** HediffDef BlaxSlaves_ComplianceImplant, class Hediff_SlaveImplant (a Hediff_Implant subclass on the Brain, countsAsAddedPartOrImplant). The stage follows Severity: a SetGuestStatus postfix sets severity 1 while the pawn is a slave and 0.5 when dormant, with stages at those thresholds, so vanilla's own change notifications refresh capacity, stat and thought caches. (Reviewers split here; one suggested calling Notify_HediffChanged on a status-driven stage. I took Severity because it uses vanilla's own notification path.) Active stage: capMods Consciousness -0.05, statFactors SlaveSuppressionFallRate 0.7 for display only. StatWorker_SuppressionFallRate.GetValueUnfinalized ignores hediff stat factors, so Brand.cs's Patch_BrandSuppressionFallRate (its postfix) and its explanation patch are generalised: the factor is the product of every hediff's BlaxSlaves_SuppressionFactor DefModExtension times SlaveLedger.FallFactor(pawn). The brand moves onto the extension. Loyalty and indenture have no hediff (a float and a term end tick in the ledger), so a hediff scan would never see them; FallFactor returns the loyalty stage factor times the indenture factor, 1 until those features ship. The explanation patch prints one line per hediff and one each for loyalty and the term. (One reviewer wanted this refactor with No doom timer; it ships here with its first new user, so a real feature tests it.) The MTB postfix of No doom timer doubles a positive MTB for implanted slaves. Install: a Recipe_InstallImplant subclass offered only for IsSlaveOfColony, research MicroelectronicsBasics, can fail like any vanilla implant. Removal: vanilla Recipe_RemoveImplant with removesHediff and spawnThingOnRemoved ComponentIndustrial; set priceImpact on purpose, since spawnThingOnRemoved raises market value. Mood: a slave-only ThoughtWorker, because the stock ThoughtWorker_Hediff maps hediff stages straight onto thought stages.
- **How:** HediffDef BlaxSlaves_ComplianceImplant, class Hediff_SlaveImplant (a Hediff_Implant subclass on the Brain, countsAsAddedPartOrImplant). The stage follows Severity: a SetGuestStatus postfix sets severity 1 while the pawn is a slave and 0.5 when dormant, with stages at those thresholds, so vanilla's own change notifications refresh capacity, stat and thought caches. (Reviewers split here; one suggested calling Notify_HediffChanged on a status-driven stage. I took Severity because it uses vanilla's own notification path.) Active stage: capMods Consciousness -0.05, statFactors SlaveSuppressionFallRate 0.7 for display only. StatWorker_SuppressionFallRate.GetValueUnfinalized ignores hediff stat factors, so Brand.cs's Patch_BrandSuppressionFallRate and its explanation patch are generalised to every hediff with a BlaxSlaves_SuppressionFactor DefModExtension; the brand moves onto the extension, and indenture and loyalty reuse it. (One reviewer wanted this refactor in 1.3; it ships here with its first new user, so a real feature tests it.) The 1.3 MTB postfix doubles a positive MTB for implanted slaves. Install: a Recipe_InstallImplant subclass offered only for IsSlaveOfColony, research MicroelectronicsBasics, can fail like any vanilla implant. Removal: vanilla Recipe_RemoveImplant with removesHediff and spawnThingOnRemoved ComponentIndustrial; set priceImpact on purpose, since spawnThingOnRemoved raises market value. Mood: a slave-only ThoughtWorker, because the stock ThoughtWorker_Hediff maps hediff stages straight onto thought stages.
- **Settings:** complianceImplant (on), fallFactor 70% (50 to 100), rebellionMtbFactor 2 (1 to 5), consciousnessCost 5% (0 to 20).
- **Replaces:** Pawn Suppression Implants 2883152389 (7,801 subs; its suppressor), BK's Suppression! 2848034996 (1,628).
- **Effort:** M.
@ -476,28 +276,28 @@ Control implants are the strongest medical demand on the Workshop (Simple Slaver
- A postfix on SlaveRebellionUtility.StartSlaveRebellion (out overload): when it returns true, every pawn in initiator.GetLord().ownedPawns with a charged relay is queued.
- A postfix on MentalStateHandler.TryStartMentalState: when it returns true for a colony slave with a relay and stateDef.IsAggro, or the Rebellion state, which is Malicious and needs its own check.
- Perimeter: a rare-tick check in the comp fires when the slave is outside its chosen area (default: home area) or starts an exit-map job outside a rebellion. The area picker sits on the gizmo.
- Manual: "Sedate now" (needs a charge) comes from a Pawn.GetGizmos postfix (the blood donor toggle plans one too), for any spawned slave of the player faction with a charged relay, whatever its mental state or lord. Not from HediffComp.CompGetGizmos: hediff gizmos reach the bar only through health.GetGizmos, which Pawn.GetGizmos calls only when IsColonistPlayerControlled, IsColonyMech or IsPrisonerOfColony (Pawn.cs:3507). IsColonistPlayerControlled needs no mental state and IsColonist (:778-790), IsColonist needs guest.SlaveIsSecure (:522), and SlaveIsSecure is false in a mental state, on an exit-map job and while rebelling (Pawn_GuestTracker.cs:164-189). So the comp's gizmo would vanish exactly when a slave rebels, escapes or goes berserk.
- Manual: CompGetGizmos offers "Sedate now" (player only, needs a charge).
After 120 ticks the comp calls vanilla HealthUtility.TryAnesthetize (forceDowned), adding Severity only if vanilla's duration proves too short, and ends the mental state explicitly. Downed rebels leave the rebellion lord through Notify_PawnLost, and the lord ends when all members are down. A message names whose relay fired. Implanted slaves' rebellion MTB is x1.5 through the same MTB postfix.
- **Settings:** sedationRelay (on), delaySeconds 2 (0 to 10), rechargeDays 3 (1 to 10), manualTrigger (on), perimeterTrigger (on), relayMtbFactor 1.5 (1 to 5).
- **Replaces:** Simple Slavery Collars (+Tweaks) 2557274194 (52,376 subs, no 1.7; its control part, without explosives or new art), Pawn Suppression Implants 2883152389 (7,801; partly), Slavery Utilities 2559195643 (3,062, dead), Explosive Slave Collar 3536301170 (2,397; its anesthetic payload), Simple Shock Collar 3355202541 (840), Advanced Slave Collar 3540721928 (607).
- **Effort:** M, plus S for the perimeter trigger (2.5 days).
- **Tests:** Two slaves with relays: force StartSlaveRebellion(initiator, forceAggressive: true); after 120 ticks both carry Anesthetic and are downed, and a third slave without a relay isn't. A second trigger within 3 days does nothing, and the gizmo stays disabled until the recharge passes. The "Sedate now" gizmo is present on a rebelling slave and on a berserk one. A berserk state on an implanted slave sedates them. A slave leaving its area is sedated; one inside isn't. After the anesthetic wears off the pawn is still IsSlaveOfColony. The lord ends when all members are down. Phase 2: the charge persists.
- **Risks:** A slave sedated next to a fire or in deep water takes vanilla risks (accepted). Pawns immune to downing are not stopped. With safe suppression in place it fires rarely, so it is depth rather than a draw. Reviewers split on timing; it ships after the compliance implant.
- **Tests:** Two slaves with relays: force StartSlaveRebellion(initiator, forceAggressive: true); after 120 ticks both carry Anesthetic and are downed, and a third slave without a relay isn't. A second trigger within 3 days does nothing, and the gizmo stays disabled until the recharge passes. A berserk state on an implanted slave sedates them. A slave leaving its area is sedated; one inside isn't. After the anesthetic wears off the pawn is still IsSlaveOfColony. The lord ends when all members are down. Phase 2: the charge persists.
- **Risks:** A slave sedated next to a fire or in deep water takes vanilla risks (accepted). Pawns immune to downing are not stopped. With safe suppression in place it fires rarely, so it is depth rather than a draw. Reviewers split on timing; it ships after the compliance implant and is the first feature to slip if 1.5 runs long.
#### Endurance implant
- **Players get:** "Endurance implant" for colony slaves (Medicine 6, Bionics research, 2 components and 1 industrial medicine). Work speed rises x1.15, which cancels vanilla's slave factor of x0.85. In exchange rest falls 20% faster and the slave takes a -3 mood. It goes dormant once the pawn is free.
- **How:** HediffDef with the shared Severity-driven Hediff_SlaveImplant stage. The active stage has statFactors WorkSpeedGlobal 1.15 and RestFallRateFactor 1.2, which the normal StatWorker applies with no patch. Recipe like the compliance implant's, research Bionics. It is the in-game route to full-speed slaves; the work-speed slider of the work rules stays for players who want it globally.
- **How:** HediffDef with the shared Severity-driven Hediff_SlaveImplant stage. The active stage has statFactors WorkSpeedGlobal 1.15 and RestFallRateFactor 1.2, which the normal StatWorker applies with no patch. Recipe like the compliance implant's, research Bionics. It is the in-game route to full-speed slaves; the 1.3 work-speed slider stays for players who want it globally.
- **Settings:** enduranceImplant (on), workSpeedFactor 115% (100 to 130), restFallFactor 120% (100 to 150).
- **Replaces:** 100% Slave Work Speed (1,966 subs; partly), Slaves Work at Full Speed (388; partly).
- **Effort:** S.
- **Tests:** An implanted slave's WorkSpeedGlobal is x1.15 and RestFallRateFactor x1.2 against an identical slave. A free colonist with the implant shows no change.
- **Risks:** Stacks with work drugs, bionics and the work-speed slider like any implant; both factors are sliders.
## Slave value
## 1.6 A slave is worth what it is
Pricing comes after the implants, so appraisal counts them from the start. The health certificate ships only with appraisal, which gives it a purpose.
Pricing comes after medicine, so appraisal counts implants from day one. The health certificate ships only with appraisal, which gives it a purpose. 7 days.
#### Slave appraisal
@ -509,10 +309,10 @@ Pricing comes after the implants, so appraisal counts them from the start. The h
- Certified healthy: x1.15, only if the pawn still passes the exam check at sale time.
- Compliance implant: x1.10.
- Recent rebel: x0.75 within 30 days. A postfix on StartSlaveRebellion (out overload) records participants in the ledger.
- Buyer ideology, from the Slavery precept of the trader faction's primary ideo: Honorable x1.20, Acceptable and Classic x1.00, Disapproved x0.85, Horrible x0.75, Abhorrent x0.65 (only reachable with "buy anyway"). Factionless orbital traders x1.00. The buyer-ideology factor is skipped for a sale in buy-to-free mode, which has its own price factor.
- Buyer ideology, from the Slavery precept of the trader faction's primary ideo: Honorable x1.20, Acceptable and Classic x1.00, Disapproved x0.85, Horrible x0.75, Abhorrent x0.65 (only reachable with "buy anyway"). Factionless orbital traders x1.00.
The 1.2 cap then applies: the sell price never exceeds 0.9 x what this negotiator would pay for the same pawn as a slave. Without it, a Social 20 negotiator buys a slave at 0.57 x market value and sells it branded and suppressed to an Honorable faction at 0.68, a profit on every slave at default sliders (vanilla loses: 0.475 against 0.57). The tooltip shows the cap line when it binds. A postfix on Tradeable.GetPriceTooltip adds one line per factor. New StatDef BlaxSlaves_AppraisedValue (category BasicsPawn, StatWorker_SlaveAppraisal, shown for colony slaves and prisoners) equals MarketValue x 0.6 x slaveSellFactor x grade for a neutral buyer. Its explanation also lists the summed trader sell price of the pawn's spare kidney and lung, so "harvest or sell" is visible. MarketValue itself is untouched, so wealth and raid points don't move. Loyalty adds Loyal x1.15. Example: an average adult (MV 1,750) sells for 630 in vanilla; at 80% suppression, your brand and Plants 14 the factor is x1.38 = 869, and to an Honorable faction x1.66 = 1,043 with an average negotiator.
- **Settings:** appraisalEnabled (off until switched on). Weight per factor: suppression 15%, brand 10%, specialist 3% per level, certificate 15%, implant 10%, recent rebel -25% over 30 days, buyer ideology (on). showAppraisalStat (on).
The 1.2 cap then applies: the sell price never exceeds 0.9 x what this negotiator would pay for the same pawn as a slave. Without it, a Social 20 negotiator buys a slave at 0.57 x market value and sells it branded and suppressed to an Honorable faction at 0.68, a profit on every slave at default sliders (vanilla loses: 0.475 against 0.57). The tooltip shows the cap line when it binds. A postfix on Tradeable.GetPriceTooltip adds one line per factor. New StatDef BlaxSlaves_AppraisedValue (category BasicsPawn, StatWorker_SlaveAppraisal, shown for colony slaves and prisoners) equals MarketValue x 0.6 x slaveSellFactor x grade for a neutral buyer. Its explanation also lists the summed trader sell price of the pawn's spare kidney and lung, so "harvest or sell" is visible. MarketValue itself is untouched, so wealth and raid points don't move. 2.1 adds Loyal x1.15. Example: an average adult (MV 1,750) sells for 630 in vanilla; at 80% suppression, your brand and Plants 14 the factor is x1.38 = 869, and to an Honorable faction x1.66 = 1,043 with an average negotiator.
- **Settings:** appraisalEnabled (on). Weight per factor: suppression 15%, brand 10%, specialist 3% per level, certificate 15%, implant 10%, recent rebel -25% over 30 days, buyer ideology (on). showAppraisalStat (on).
- **Replaces:** Profitable Slave Trade 3492615816 (378 subs, partly).
- **Effort:** M, plus S for the organ line (2.5 days).
- **Tests:** TradeSession with a TradeShip and with a faction whose test-made ideo has Slavery Honorable. A colony slave's sell price at 0% vs 100% suppression differs by 1.15/0.85 within 1%. Our brand gives x1.10, best skill 15 gives x1.18. After a recorded rebellion the price is x0.75. Sell <= buy holds for 50 random pawns. A Social 20 leader negotiator with every factor maxed sells below the slaver's buy price for the same pawn. The stat matches the trade sell price for a zero-bonus negotiator within 2%. Appraisal off gives exactly the 1.2 slider prices. The organ line lists kidney and lung for a healthy pawn and nothing for a pawn missing both spares. Phase 2: the rebellion record persists.
@ -528,120 +328,152 @@ Pricing comes after the implants, so appraisal counts them from the start. The h
- **Tests:** A healthy slave gets the certificate. A slave missing a kidney gets none and a message; one missing a finger passes. Adding flu to a certified slave stops the bonus at sale at once, and the certificate is gone after the next rare tick. The bill isn't offered while certified or within a day of a fail. Phase 2: the certificate survives reload and expires on time.
- **Risks:** Low. Other mods' chronic hediffs block certificates (intended). Nobody asked for it directly, so it ships only as part of appraisal.
#### Organ harvests wait for health
- **Players get:** Harvest bills you queue on slaves and prisoners wait until the patient is healthy. They never take the last kidney or lung, and they wait while you already store enough of that organ.
- **How:** When the setting is on, a postfix on BillStack.AddBill flags new RemoveBodyPart bills in the ledger, and the bill label shows "(waits for health)". A postfix on Bill_Medical.ShouldDoNow returns false for a flagged bill while the patient fails the gate (summaryHealth >= threshold, no HasHediffsNeedingTend, no BloodLoss) or while stored organs of that def reach the stock target. The count uses map.listerThings.ThingsOfDef in storage, because ResourceCounter returns 0 for organs (they are Uncounted). A CompletableEver guard refuses the last natural kidney or lung (GetNotMissingParts, not HasDirectlyAddedPartFor). Thoughts use vanilla MyOrganHarvested and the existing harm gate. The player still queues every harvest; nothing is queued automatically.
- **Settings:** harvestWaitsForHealth (on), healthThreshold 85% (50 to 100), stock target per organ (kidney 2, lung 2; 0 = no limit, max 10).
- **Replaces:** Organ Harvest Button 3342852552 (1,127 subs, stale), Quick Ops 3844998950 (25, partly), Repeat Organ Harvest 3819036722 (3).
- **Effort:** S.
- **Tests:** A flagged kidney bill on a slave at 60% health: ShouldDoNow false; at 90% true. With 2 stored kidneys, false. A slave with one natural kidney: CompletableEver false. Phase 2: the flag survives reload.
- **Risks:** Prisoners of non-hostile factions still cost vanilla's -70 goodwill unless 1.4's captive-surgery setting is on. Demand is small; the value is the health gate.
#### Blood bank
- **Players get:** With Biotech, colony slaves get a "blood donor" toggle. Donors get a hemogen extraction bill whenever they're well enough, like vanilla's prisoner hemogen farm, which slaves never had. Optionally your sanguophages may feed on donor slaves when no hemogen pack is in reach.
- **How:** The ledger keeps the donor set. Every 15,000 ticks, the cadence of vanilla's prisoner-only HemogenFarm check in Pawn_GuestTracker, each donor who IsSlaveOfColony and passes SanguophageUtility.CanSafelyBeQueuedForHemogenExtraction (which already rejects a duplicate bill and BloodLoss) gets HealthCardUtility.CreateSurgeryBill(pawn, RecipeDefOf.ExtractHemogenPack, null, null, sendMessages: false). The toggle is a Command_Toggle from a Pawn.GetGizmos postfix with the vanilla HemogenPack icon, and it applies to every selected slave. Bloodfeeding: vanilla JobGiver_GetHemogen only feeds on prisoners, so a postfix on its TryGiveJob steps in when a bloodfeeder got null: it picks the nearest reachable donor slave without BloodLoss and gives JobDef BlaxSlaves_FeedOnDonor (go to touch, wait 120 ticks, SanguophageUtility.DoBite with vanilla's prisoner amounts). Colonists' thoughts pass the existing harm gate. Slaves has no "new slaves donate" default; per-pawn defaults belong to Castes.
- **Settings:** bloodBank (on, Biotech only), checkIntervalHours 6 (1 to 24), bloodfeedOnDonors (on).
- **Replaces:** BetterHemogenFarm 2967718207 (273 subs, 1.4), and the slave half of Prison Labor 1899474310's hemogen mode and Custom Prisoner Interactions 2841231775's auto hemogen (both prisoner-only).
- **Effort:** M.
- **Tests:** Skipped without Biotech. After Fixtures.Tick(15000) a donor slave's BillStack holds ExtractHemogenPack; a non-donor and a donor with BloodLoss get none. A bloodfeeder colonist with low hemogen and no packs on the map gets BlaxSlaves_FeedOnDonor; with the setting off, null. Phase 2: the donor set survives.
- **Risks:** Biotech-only: job and recipe references use MayRequire. Hemogen income per slave matches vanilla's prisoner farm. Doctors' workload rises with many donors. The bite path is rare, since the bank fills the fridge with packs.
#### Honor by quality at the tribute collector
- **Players get:** The Empire's tribute collector pays honor by quality instead of a flat 3. A sickly, cheap slave brings 1, an average adult 3, and a healthy, skilled slave with bionics up to 9.
- **How:** Core's StatDef RoyalFavorValue has no parts list. A PatchOperationConditional adds one, and a PatchOperationAdd puts BlaxSlaves.StatPart_SlaveFavor in it. TransformValue only touches humanlike pawns and checks ModsConfig.RoyaltyActive (the stat is Core, so MayRequire doesn't fit): value x clamp(MarketValue / 1750, 0.33, 3.0), x1.1 with your brand, rounded, minimum 1. TradeUtility.GetPricePlayerSell returns Thing.RoyalFavorValue for TradeCurrency.Favor, so the tribute collector uses it with no code patch. Gold passes through untouched.
- **Settings:** honorByValue (off until switched on), min multiplier 0.33, max 3.0 (1 to 5).
- **Settings:** honorByValue (on), min multiplier 0.33, max 3.0 (1 to 5).
- **Replaces:** none. Asked for in Steam discussion 3808407695167544169.
- **Effort:** S.
- **Tests:** A crippled pawn gives 1, an average adult 3, a pawn worth over 5,250 gives 9. Animals and gold are unchanged. With the setting off every pawn gives 3; with Royalty inactive nothing changes.
- **Risks:** Honor per silver stays about constant, which weakens the vanilla cheapest-slave honor farm. Hediff offsets such as WCE2's brand still add before our factor.
## Freedom and loyalty
#### Abolitionists buy to free
Recruiting is the strongest "path to freedom" signal (Recruit Slaves, 26k). The way out comes first, loyalty grows out of it, and indenture reads loyalty.
- **Players get:** A third choice for traders whose ideoligion rejects slavery: they buy your slaves at half price to set them free. Nobody in the colony minds the sale, even an Abhorrent negotiator can make it, and the trader's faction gains goodwill. It becomes the default for anti-slavery traders.
- **How:** Adds "buy to free" to antiSlaveryTraders (1.2) and makes it the default. Postfixes on GuestUtility.IsSellingToSlavery and TransferableUIUtility.TradeIsPlayerSellingToSlavery return false when the trader's faction is an abolitionist in this mode. That removes the SoldSlave event, the precept thoughts and the negotiator block in one place. (The design's plan to drop the event in Frame_HistoryEvent doesn't work: that frame never drops events.) Patch_SlavePrices multiplies the sell price by abolitionistPriceFactor and skips appraisal's buyer-ideology factor. Pawn_TraderTracker.AddPawnToStock would turn the freed pawn into a Slave-kind ware, so a ResolveTrade postfix takes it out of the trader's stock and makes it a free world pawn of its home faction, or of the trader's faction. The gift-pod path uses the same predicate. Goodwill: +price/40, capped at +10 per trade, through Faction.TryAffectGoodwillWith.
- **Settings:** antiSlaveryTraders gains "buy to free" (new default). abolitionistPriceFactor 50% (20 to 100).
- **Replaces:** none. Answers a 159-upvote counter-idea.
- **Effort:** S.
- **Tests:** Selling a colony slave to an anti-slavery trader in this mode: price x0.5 against the slider price, IsSellingToSlavery false, no SoldSlave event, goodwill up by about price/40, and afterwards the pawn is a free world pawn, not trader stock. An Abhorrent negotiator may sell.
- **Risks:** Goodwill farming is bounded by the price cut and the cap. Players who never changed the setting move from "buy anyway" to "buy to free" on update; the patch notes say so. Vanilla's MemberSold reaction from the pawn's other faction still applies.
### A way out
## 2.0 Wardens and a way out
Recruit runs on its own persuasion counter, so it doesn't wait for loyalty. One reviewer wanted recruit next to the work rules; it stays with convert, which shares its warden-mode base. That base suppresses with the warden threshold helper from Control's Wardens step, which ships first. New slaves start in Suppress, as vanilla sets it (Pawn_GuestTracker.cs:501-503); recruit and convert are set per slave, and there is no "mode for new slaves" setting here. Blax Castes sets a per-caste default mode, Recruit and Convert included: Castes writes the mode one tick after the join, by defName, only while Slaves is loaded.
Recruiting is the strongest "path to freedom" signal (Recruit Slaves, 26k). It runs on its own persuasion counter, so it doesn't wait for loyalty. One reviewer wanted recruit next to the work rules in 1.3; I kept it here, the other reviewer's slot, so 1.3 stays at 5 days. 6 days.
#### Recruit slaves
- **Players get:** A new "recruit" order in the slave tab. Wardens keep the slave suppressed and talk them round once a day; at full persuasion the slave joins as a colonist, with no "imprison first" detour.
- **How:** SlaveInteractionModeDef BlaxSlaves_Recruit (listOrder 25); the slave tab lists every def by listOrder.
- Save safety: vanilla saves slaveInteractionMode with Scribe_Defs and repairs only the prisoner mode on load (Pawn_GuestTracker.cs:375, 394-399), and WorkGiver_Warden_SuppressSlave suppresses only in Suppress mode (WorkGiver_Warden_SuppressSlave.cs:19). A Blax mode in the save would load as null once the mod is removed, and that slave would never be suppressed again. So a Blax mode never reaches the save. The ledger's ExposeData, which the game runs before the world and the maps (Game.cs:401-403, 443), records every colony slave whose mode is BlaxSlaves_Recruit or BlaxSlaves_Convert. A prefix on Pawn_GuestTracker.ExposeData writes SlaveInteractionModeDefOf.Suppress into slaveInteractionMode while Scribe.mode is Saving, and a finalizer puts the real mode back. On load, the ledger's GameComponent.LoadedGame restores the recorded modes. Removing the mod leaves those slaves on Suppress.
- WorkGiver_Warden_BlaxSlaveMode, a base shared with convert, hands out vanilla's SlaveSuppress job while BlaxSuppression.BelowWardenThreshold(need) and ScheduledForSlaveSuppression hold (JobDriver_SuppressSlave doesn't check the mode). Otherwise, once a day, a JobDriver (walk over, 180-tick wait) runs InteractionDef BlaxSlaves_PersuadeSlave: persuasion in the ledger rises by 4% x the warden's NegotiationAbility, so a warden at 1.0 needs 25 talks. The DoSlavePriceListing line shows progress. At 100%: CastesApi.HintJoinReason(pawn, "blax.slaves.slaveRecruited"), then InteractionWorker_RecruitAttempt.DoRecruit(warden, slave), which adds the quest signal, tale, record and RecruitedMe that RecruitUtility.Recruit alone skips, then FreedFromSlavery. Non-recruitable pawns are skipped with a reason line. Loyalty turns this counter into the loyalty value and adds passive gain. (The design's fallback was a 3% chance per talk; I took the counter because it persists, shows progress and becomes loyalty later.)
- Switched off: with recruitMode off the slave tab stops offering the mode, and the ledger's 2,500-tick pass puts every slave still in BlaxSlaves_Recruit back on Suppress, because vanilla wardens suppress only in Suppress mode. So a mode set earlier by hand or by Blax Castes' slave default never leaves a slave unsuppressed. Convert does the same with convertMode.
- **How:** SlaveInteractionModeDef BlaxSlaves_Recruit (listOrder 25); the slave tab lists every def by listOrder. WorkGiver_Warden_BlaxSlaveMode, a base shared with convert, hands out vanilla's SlaveSuppress job below 70% suppression while ScheduledForSlaveSuppression (JobDriver_SuppressSlave doesn't check the mode). Otherwise, once a day, a JobDriver (walk over, 180-tick wait) runs InteractionDef BlaxSlaves_PersuadeSlave: persuasion in the ledger rises by 4% x the warden's NegotiationAbility, so a warden at 1.0 needs 25 talks. The DoSlavePriceListing line shows progress. At 100%: CastesApi.HintJoinReason(pawn, "blax.slaves.slaveRecruited"), then InteractionWorker_RecruitAttempt.DoRecruit(warden, slave), which adds the quest signal, tale, record and RecruitedMe that RecruitUtility.Recruit alone skips, then FreedFromSlavery. Non-recruitable pawns are skipped with a reason line. 2.1 turns this counter into loyalty and adds passive gain. (The design's fallback was a 3% chance per talk; I took the counter because it persists, shows progress and becomes loyalty later.)
- **Settings:** recruitMode (on), persuadeGain 4% (1 to 15).
- **Replaces:** Recruit Slaves 2887124861 (26,336 subs), No Slave Mental Breaks (its recruit interaction).
- **Effort:** M.
- **Tests:** Recruit mode, warden and slave at 0.8 suppression: JobOnThing gives the persuade job; at 0.5 it gives SlaveSuppress. One talk raises persuasion. At 0.99 plus one talk the pawn is a non-slave member of the player faction with FreedFromSlavery, and the quest signal fired. An unrecruitable slave gets a null job. With the warden threshold at 90%, a recruit-mode slave at 0.8 gets SlaveSuppress first. Phase 2: persuasion persists; the saved file holds Suppress as the slaveInteractionMode of a slave in Recruit mode, and after the reload that slave is in Recruit again. Removal: the same save loaded without Blax Slaves leaves the slave on Suppress.
- **Risks:** With Recruit Slaves also active the tab shows two recruit modes; the Compat tab says so. Another mod that reads slaveInteractionMode while saving sees Suppress for our slaves (harmless). With many slaves, wardens rarely get a free daily slot; room suppression helps.
- **Tests:** Recruit mode, warden and slave at 0.8 suppression: JobOnThing gives the persuade job; at 0.5 it gives SlaveSuppress. One talk raises persuasion. At 0.99 plus one talk the pawn is a non-slave member of the player faction with FreedFromSlavery, and the quest signal fired. An unrecruitable slave gets a null job. Phase 2: persuasion persists.
- **Risks:** With Recruit Slaves also active the tab shows two recruit modes; the Compat tab says so. Pawn_GuestTracker saves slaveInteractionMode with Scribe_Defs and no fallback, so removing the mod leaves slaves in Recruit or Convert with no mode and no suppression. The README and Compat tab say to switch them back to Suppress first. With many slaves, wardens rarely get a free daily slot; room suppression helps.
#### Convert slaves
- **Players get:** A "convert" order in the slave tab: wardens of the target ideoligion work on the slave's beliefs every day. When the slave converts, the order switches to suppress or recruit, whichever you chose.
- **How:** SlaveInteractionModeDef BlaxSlaves_Convert (listOrder 26) on the shared base, which suppresses first below the warden threshold and never saves the Blax mode (see Recruit slaves). The target is vanilla's saved guest.ideoForConversion, set through a picker in the slave tab like vanilla's prisoner convert, default the player's primary ideo. Only wardens whose Ideo equals the target get the job, so colonies with several ideos work. The driver is built from vanilla Toils_Interpersonal.TryConvert, which runs ConvertIdeoAttempt with no prisoner check. When the slave's ideo equals the target, the mode switches to the "then" setting. Vanilla colonists already try to convert slaves in passing; this adds daily, directed pressure.
- **How:** SlaveInteractionModeDef BlaxSlaves_Convert (listOrder 26) on the shared base, which suppresses first below 70%. The target is vanilla's saved guest.ideoForConversion, set through a picker in the slave tab like vanilla's prisoner convert, default the player's primary ideo. Only wardens whose Ideo equals the target get the job, so colonies with several ideos work. The driver is built from vanilla Toils_Interpersonal.TryConvert, which runs ConvertIdeoAttempt with no prisoner check. When the slave's ideo equals the target, the mode switches to the "then" setting. Vanilla colonists already try to convert slaves in passing; this adds daily, directed pressure.
- **Settings:** convertMode (on), afterConversion: Suppress (default) or Recruit.
- **Replaces:** Custom Prisoner Interactions 2841231775 (51,153 subs; its convert-then idea, for slaves), Convert Slaves 3411130205 (7,104, no 1.7).
- **Effort:** S.
- **Tests:** A slave with a foreign ideo at certainty 0.01, after one forced interaction, has the target ideo and its mode becomes Suppress (or Recruit by setting). A warden of another ideo gets no job. The picker sets ideoForConversion, and it survives reload.
- **Risks:** Ideology-only. Mods that change conversion math apply automatically.
#### Wardens calm breakdowns
- **Players get:** A warden walks over to a slave in a non-violent mental break and talks them out of it, at a 10% suppression cost, instead of watching a day-long tantrum.
- **How:** A WorkGiver_Warden subclass for colony slaves in a mental state that is neither IsAggro nor the Rebellion state. It needs its own precheck, because ShouldTakeCareOfSlave requires SlaveIsSecure, which is false during a mental state. JobDriver: go to touch, 180-tick talk, MentalState.RecoverFromState, then suppression drops by the setting.
- **Settings:** wardensCalmBreaks (on), calmSuppressionCost 10% (0 to 30).
- **Replaces:** none. Asked for by the opening post of the 1,785-upvote "Slavery Is Useless" thread.
- **Effort:** M (estimated S to M; I took the higher).
- **Tests:** A slave in a sad-wander break gets a warden with the calm job; afterwards the break is over and suppression is 10% lower. A berserk slave and a rebelling slave get no job.
- **Risks:** Modded mental states that block recovery stay as they are.
#### Suppress the whole room
- **Players get:** When a warden suppresses one slave, other awake slaves within 6 cells in the same room are suppressed too, at 70% strength, and count as done for the day. One warden can handle a barracks at mealtime.
- **How:** A postfix on SlaveRebellionUtility.IncrementInteractionSuppression(initiator, recipient), whose only caller is InteractionWorker_Suppress. For every other awake colony slave in the radius and room with Need_Suppression.CanBeSuppressedNow and ScheduledForSlaveSuppression, it calls the public SlaveRebellionUtility.IncrementSuppression(need, initiator, slave, share x SuppressionPower x curve(level)), with vanilla's private static CurrentSuppressionFactorCurve read through StaticFieldRefAccess, then sets mindState.lastSlaveSuppressedTick. Calling IncrementSuppression, not the interaction method, means no recursion.
- **Settings:** bystanderShare 70% (0 = off, max 100), radius 6 (2 to 12).
- **Replaces:** none.
- **Effort:** S.
- **Tests:** Three slaves at 0.4 in one room, suppress one: the other two rise by about 0.7x its gain and are no longer scheduled. A slave in the next room is unchanged. Share 0 does nothing.
- **Risks:** Wardens never suppress sleeping slaves, so it fires mostly at meals and in shared workrooms; expect a modest effect. Each bystander shows its own text mote.
#### Freedom pays off
- **Players get:** A slave you emancipate who stays in the colony gets "freed from slavery" (+15) instead of "was enslaved" (-6). (Released slaves leaving your gear behind ships earlier, with Faction deals' Captives pay.)
- **How:** A postfix on GenGuest.SlaveRelease: when the pawn stays as a colonist (HomeFaction is the player, the GenGuest.ShouldStayOnMapOnRelease case), remove WasEnslaved and add FreedFromSlavery. The gear drop's prefix on the same method is already there from Captives pay.
- **Settings:** freedomMoodSwap (off until switched on).
- **Replaces:** none. Asked for since 2019 ("+5 no longer a slave").
- **Effort:** S.
- **Tests:** Emancipating a colony-born slave gives FreedFromSlavery and no WasEnslaved. A foreign slave emancipated to walk home gets vanilla's thoughts.
- **Players get:** A slave you emancipate who stays in the colony gets "freed from slavery" (+15) instead of "was enslaved" (-6). Emancipated slaves who walk home leave your weapons and armor behind.
- **How:** A postfix on GenGuest.SlaveRelease: when the pawn stays as a colonist (HomeFaction is the player, the GenGuest.ShouldStayOnMapOnRelease case), remove WasEnslaved and add FreedFromSlavery. A prefix on the same method: when HomeFaction is not the player, drop carried weapons and Shell, Belt and Overhead apparel at the pawn's cell, keeping basic clothes. The drop also covers ransom and buy-back releases.
- **Settings:** freedomMoodSwap (on), releasedDropGear (on).
- **Replaces:** none. Asked for since 2019 ("+5 no longer a slave"), and the gear drop answers a 186-upvote thread.
- **Effort:** 2 x S (1 day).
- **Tests:** Emancipating a colony-born slave gives FreedFromSlavery and no WasEnslaved. Emancipating a foreign slave with a rifle and flak vest leaves both on the ground, and the pawn leaves dressed. A ransom release drops gear too.
- **Risks:** Low.
### Loyalty
## 2.1 Loyalty and indentured servitude
Built on recruit's persuasion counter and the generalised fall-rate patch from the implants.
The heaviest systems come last, on top of the persuasion counter, the fall-rate extension and the buy-mode button they need. If 2.1 runs long, indenture ships its gizmo and term-end letter first and the trade option later. 7 days.
#### Loyalty
- **Players get:** Well-kept slaves grow loyal over weeks. Stages show in the slave tab: Broken in, Obedient (never rebels), Loyal (sells for more, optionally full work and speed), then Devoted, when a letter asks whether to make them a colonist. Rebelling costs loyalty.
- **How:** A float per pawn in the ledger, the same number recruit mode uses: missing means 0, so slaves who existed before the update get it, and removal is clean. No hediff (it would clutter the health tab and log missing-def errors on removal). A DoSlavePriceListing line shows it with a stage tooltip. Every 2,500 ticks over SlavesOfColonySpawned: +2% per day while suppression >= safeThreshold. Slave mood sits high (ExpectationsSlave gives +28 to +46), so mood mostly scales gain by x1 to x1.5: above 75% x1.5, below 25% -2% per day (rare). Modifiers: your brand x1.25, indentured x1.5, compliance implant x0.5 (fear isn't loyalty). Joining a rebellion: -30% (StartSlaveRebellion postfix). Stages, each with a fall-rate factor that SlaveLedger.FallFactor(pawn) hands to the generalised fall-rate patch (there is no hediff for a DefModExtension to sit on):
- **How:** A float per pawn in the ledger, the same number recruit mode uses: missing means 0, so slaves who existed before the update get it, and removal is clean. No hediff (it would clutter the health tab and log missing-def errors on removal). A DoSlavePriceListing line shows it with a stage tooltip. Every 2,500 ticks over SlavesOfColonySpawned: +2% per day while suppression >= safeThreshold. Slave mood sits high (ExpectationsSlave gives +28 to +46), so mood mostly scales gain by x1 to x1.5: above 75% x1.5, below 25% -2% per day (rare). Modifiers: your brand x1.25, indentured x1.5, compliance implant x0.5 (fear isn't loyalty). Joining a rebellion: -30% (StartSlaveRebellion postfix). Stages, each with a BlaxSlaves_SuppressionFactor through the generalised fall-rate patch:
- 0.25 Broken in: fall rate x0.8.
- 0.5 Obedient: x0.6, and safe at any suppression through the No doom timer postfix.
- 0.5 Obedient: x0.6, and safe at any suppression through the 1.3 postfix.
- 0.75 Loyal: x0.5, appraisal +15%, options for full work and full speed through work rules.
- 1.0 Devoted: a ChoiceLetter, batched per day: Make colonist (HintJoinReason "blax.slaves.slaveRecruited", DoRecruit(null, pawn), which skips the letter but keeps the quest signal, then FreedFromSlavery) or Keep.
Unwaveringly loyal pawns cap at Loyal unless a setting allows more. SlavesApi.Loyalty(Pawn) ships here.
- **Settings:** loyaltyEnabled (off until switched on), baseGainPerDay 2% (0.5 to 10), rebellionPenalty 30%, obedientNeverRebels (on), loyalAllWork (off), loyalFullSpeed (off), devotedLetter (on), unwaveringCanBeDevoted (off).
- **Settings:** loyaltyEnabled (on), baseGainPerDay 2% (0.5 to 10), rebellionPenalty 30%, obedientNeverRebels (on), loyalAllWork (off), loyalFullSpeed (off), devotedLetter (on), unwaveringCanBeDevoted (off).
- **Replaces:** Simple Slavery Collars (+Tweaks) 2557274194 (52,376 subs, no 1.7; its slave-stage part), More Slavery Stuff 2896845138 (21,653; its "treatment decides rebellion" idea).
- **Effort:** L.
- **Tests:** A slave at 0.8 suppression and 0.6 mood, ticked 10 days, reaches about 0.2. A slave that existed before the feature starts at 0 and gains. At 0.5 the MTB is -1 even at 0.2 suppression. At 0.5 the SlaveSuppressionFallRate stat is x0.6 against an identical slave at 0, and the explanation shows a loyalty line. A forced rebellion costs 0.3. At 1.0 the letter arrives, and accepting gives !IsSlave and player faction. Phase 2: loyalty persists.
- **Tests:** A slave at 0.8 suppression and 0.6 mood, ticked 10 days, reaches about 0.2. A slave that existed before the feature starts at 0 and gains. At 0.5 the MTB is -1 even at 0.2 suppression. The fall-rate explanation shows x0.6. A forced rebellion costs 0.3. At 1.0 the letter arrives, and accepting gives !IsSlave and player faction. Phase 2: loyalty persists.
- **Risks:** Long games get easier; the rate sliders tune it. Stacked fall factors (brand 0.85 x implant 0.7 x indenture 0.7 x Loyal 0.5 = 0.21) make suppression nearly free, so each is a slider.
### Indentured servitude
Built on loyalty, which decides who is willing to stay, and on the buy-mode button. It can ship in two parts if needed: the gizmo and the term-end letter, then the trade option.
#### Indentured servitude
- **Players get:** A gizmo gives selected slaves a term of 15, 30, 60 or 120 days. Indentured slaves lose suppression 30% slower and grow loyal faster because they can see the end. The trade button gains a third choice, "joins indentured", at 80% of the colonist price. When a term ends, a letter says whether the slave is willing to stay: welcome them as a colonist (only if willing), send them home with goodwill, or extend 15 days at a mood cost. Either way out gives "served my term" (+8, 10 days) instead of "was enslaved".
- **How:** The ledger stores each pawn's term end tick and source. A SetGuestStatus postfix drops the term on sale, imprisonment or early release. The gizmo comes from a Pawn.GetGizmos postfix; the slave tab shows days left. While serving: a fall-rate factor x0.7 through SlaveLedger.FallFactor (no hediff, so not a DefModExtension) and loyalty gain x1.5.
- Blax Laws' jail: a SlavesApi member Laws calls from its CapturedBy prefix, right before it captures an indentured slave it arrests (named in the spec), marks the pawn in the ledger, so the SetGuestStatus postfix keeps the term at that imprisonment and the term runs on through the sentence. When Laws makes the convict a slave again the term goes on; if it leaves another way (released, recruited, escaped, dead), the term ends as before. The mark is cleared at the end of the tick if no imprisonment follows.
- Idea, only once Laws takes up indenture as a sentence: SlavesApi.StartIndenture(Pawn pawn, int days, string source) makes a convict a colony slave if it isn't one and registers the term like a gizmo term, with Laws' source saved next to it so the term-end letter names the sentence. Slaves owns the status and the term; Laws only hands over the convict and the days. How a convict's term ends (Welcome without the willingness check, since the convict was a colonist) is settled then.
- Term-end letters are grouped per day. Willing means loyalty >= 50% (with loyalty off, a seeded roll from 30% at 20% mood to 90% at 80% mood). Choices:
- **How:** The ledger stores each pawn's term end tick. A SetGuestStatus postfix drops the term on sale, imprisonment or early release. The gizmo comes from a Pawn.GetGizmos postfix; the slave tab shows days left. While serving: a BlaxSlaves_SuppressionFactor x0.7 and loyalty gain x1.5. Term-end letters are grouped per day. Willing means loyalty >= 50% (with loyalty off, a seeded roll from 30% at 20% mood to 90% at 80% mood). Choices:
- Welcome: HintJoinReason "blax.slaves.indentureServed", then DoRecruit plus FreedFromSlavery; disabled if the pawn isn't Recruitable.
- Send home: GenGuest.SlaveRelease with vanilla walk-home goodwill. Disabled with a reason when HomeFaction is null or the player, because ShouldStayOnMapOnRelease would quietly keep the pawn as a colonist and skip the willingness check.
- Extend 15 days: BlaxSlaves_TermBroken (-10 for 15 days), loyalty -25%.
After Welcome or Send home, WasEnslaved is removed and BlaxSlaves_ServedTerm added. autoResolve: the willing join, the rest go home. Buying: JoinStatus has no indentured value, so buy-mode keeps a pending Dictionary<Pawn, PurchaseMode>, cleared when the session closes or the pawn leaves stock, and the button cycles slave, indentured (30 days), colonist. The price postfix applies 0.8/0.6 to the slave buy price. A ResolveTrade(PlayerBuys) prefix calls HintJoinReason "blax.slaves.boughtIndentured"; the postfix registers the term and writes the purchase ledger, so ransom and buy-back skip the pawn. SlavesApi.TermDaysLeft(Pawn) ships here, and the Laws jail member with it.
After Welcome or Send home, WasEnslaved is removed and BlaxSlaves_ServedTerm added. autoResolve: the willing join, the rest go home. Buying: JoinStatus has no indentured value, so buy-mode keeps a pending Dictionary<Pawn, PurchaseMode>, cleared when the session closes or the pawn leaves stock, and the button cycles slave, indentured (30 days), colonist. The price postfix applies 0.8/0.6 to the slave buy price. A ResolveTrade(PlayerBuys) prefix calls HintJoinReason "blax.slaves.boughtIndentured"; the postfix registers the term and writes the purchase ledger, so ransom and buy-back skip the pawn. SlavesApi.TermDaysLeft(Pawn) ships here.
- **Settings:** indentureEnabled (on), term choices 15/30/60/120 days, fallFactor 70%, joinChance 30% to 90% (loyalty off only), indenturedBuyPrice 80% of the colonist price, extendDays 15, autoResolve (off).
- **Replaces:** Indentured Servitude 2878184888 (1,311 subs, 8,244 lifetime, no 1.7), ServeTime 3259353607 (84).
- **Effort:** M.
- **Tests:** Indenture a slave for 15 days and tick 15 days: the letter is there. Welcome at loyalty 0.6 makes a free colonist with ServedTerm and no WasEnslaved; at 0.2 Welcome is disabled. Send home releases a foreign slave and is disabled for a colony-born one. Extend moves the end by 15 days and adds TermBroken. Fall rate is x0.7 while serving. Buying as indentured gives a slave with a 30-day term at 0.8/0.6 of the slave price, in the purchase ledger. Laws jail member: an indentured slave marked through it, then imprisoned and made a slave again 5 days later, keeps its term end tick; an indentured slave imprisoned without the mark loses its term. If StartIndenture is built: a free colonist passed in for 15 days is a colony slave with a 15-day term and the given source. Phase 2: the term and its source survive reload.
- **Tests:** Indenture a slave for 15 days and tick 15 days: the letter is there. Welcome at loyalty 0.6 makes a free colonist with ServedTerm and no WasEnslaved; at 0.2 Welcome is disabled. Send home releases a foreign slave and is disabled for a colony-born one. Extend moves the end by 15 days and adds TermBroken. Fall rate is x0.7 while serving. Buying as indentured gives a slave with a 30-day term at 0.8/0.6 of the slave price, in the purchase ledger. Phase 2: the term survives reload.
- **Risks:** Coexists with Recruit Slaves, which is an interaction, not a term. Many slaves mean many letters, hence grouping and autoResolve. M is tight; the split above is the fallback.
## Colony conscience
## 2.2 Slave economy at scale
Who in the colony minds what you do to the people you hold. "Harming slaves doesn't upset colonists" shipped in 1.0; this extends it to prisoners and to faction goodwill.
Slave orders need appraisal and the payout helper. Slave weights come late because Slaves Are Worthless is maintained on 1.7, so this is consolidation, not a gap. 4 days.
#### Prisoners count too
#### Faction slave orders
- **Players get:** Optionally, the "harming slaves doesn't upset colonists" rule also covers prisoners, enslaving a prisoner included, and it can reduce the mood hit instead of removing it. Factions can optionally stop losing goodwill over surgery on captives you hold.
- **How:**
- (a) Widen the victim predicate in the SlaveHarm frames to IsPrisonerOfColony, keeping the pacifist and family exceptions. It stands down while No Sympathy For Prisoners (sk.noprisonersympathy) is active, so two vetoes don't stack and undercut the pacifist rule.
- (a) also covers enslavement, the biggest thought source of a slave colony. GenGuest.TryEnslavePrisoner records EnslavedPrisoner and EnslavedPrisonerNotPreviouslyEnslaved with only a Doer arg (GenGuest.cs:145, 148). The shipped Frame_HistoryEvent finds a victim only through a Victim arg, a Corpse subject or GotBlinded and GotScarified (SlaveHarm.cs:271-293), and nothing frames TryEnslavePrisoner, so widening the predicate alone never reaches these events. Ideology's slavery precepts turn them into EnslavedPrisoner_Horrible and _Disapproved and their _Know thoughts (Data/Ideology/Defs/PreceptDefs/Precepts_Slavery.xml:49-161). A new frame on TryEnslavePrisoner pushes the prisoner as a protected victim; both events fire after SetGuestStatus has made it a slave. The gate only drops negative thoughts, so the Honorable precept's positive enslavement thoughts still come. No Sympathy For Prisoners removes these thoughts for pacifists too; Blax keeps the pacifist and family exceptions, and the Compat tab says so.
- (b) Reduce mode: Patch_SlaveHarmGate scales Thought_Memory.moodPowerFactor and, for Thought_MemorySocial, opinionOffset by the same factor before letting the thought through. moodPowerFactor alone leaves opinion penalties (-5 to -20) at full strength.
- (c) A prefix on the protected RecipeWorker.ReportViolation skips it when the patient is a colony prisoner without questTags, for every worker except Recipe_ExecuteByCut, which keeps vanilla's -100. ReportViolation is the single funnel for surgery, hemogen, implants and execution, so the execution exclusion is explicit. Colony slaves never trigger it in vanilla.
- **Settings:** prisonersCountAsSlaves (off), harmMoodReduction 100% (0 to 100; 100 = full removal as today), captiveSurgeryNoGoodwillLoss (off; tooltip: execution still costs goodwill).
- **Replaces:** No Sympathy For Prisoners 3533769253 (16,399 subs, in your mod list; with the enslavement frame), Prisoner Harvesting 3347850851 (13,090).
- **Players get:** Factions that approve of slavery post orders by letter: "Wanted: 2 slaves with Plants 8+, healthy, 15 to 50 years. Pays 160% of the sale price and +15 goodwill. 20 days." Accept, then sell matching slaves to any trader of that faction or gift them by drop pod. Matching slaves are marked in the trade window; the premium follows by drop pod and the goodwill comes when the order is full.
- **How:** GameComponent_BlaxMarket holds a List<SlaveOrder> (faction, SkillDef, minimum level, optional minimum loyalty stage, count, filled, expiry tick, premium, goodwill).
- Generation: MTB 15 days, at most 2 open orders, only non-hostile factions passing IdeoApprovesOfSlavery. Skill from Plants, Mining, Construction, Cooking, Crafting, Medicine, Melee or Shooting; minimum level 6 to 12 scaled by colony wealth; count 1 to 3; premium 1.4 to 1.8; goodwill 10 to 20. With loyalty on, a third of orders ask for Obedient or better. Offered as a ChoiceLetter.
- Filling, through patches Blax Slaves already has: Frame_SoldSlave on Tradeable_Pawn.ResolveTrade (the player sells a colony slave and trader.Faction == order.faction) and Frame_GiftArrived on TransportersArrivalAction_GiveGift.Arrived. A match (skill, age, health 80% or more, IsSlave, not bought from that same faction per the ledger) adds 1 to filled and queues appraised sell price x (premium - 1) through the payout helper. The premium inherits appraisal's cap.
- The buy-mode DrawCaptiveTradeInfo prefix draws "order +60%" on matching colony slaves; the captive branch keeps vanilla's icon and adds the tag.
- On expiry a letter arrives; an accepted, unfilled order costs 5 goodwill. Orders cancel if the faction turns hostile or is defeated.
- **Settings:** slaveOrders (on), ordersMtbDays 15 (5 to 60), maxOpenOrders 2 (1 to 5), premium 140 to 180%, unfilledPenalty -5 goodwill.
- **Replaces:** Slave Contract Quest 3677019267 (220 subs, no 1.7).
- **Effort:** M.
- **Tests:** Executing a prisoner with (a) on gives a non-pacifist colonist no new bad memories (Fixtures.NewBadMemories); a pacifist still minds. A colonist whose ideo rates slavery Horrible gets no EnslavedPrisoner memory when a warden enslaves a prisoner, and neither does the warden; a pacifist still does. With an Honorable ideo the positive thought still comes. At 50% a mood memory and an opinion thought are both halved. Harvesting a neutral faction prisoner's kidney leaves goodwill unchanged with (c) on and drops it by 70 with it off. Executing that prisoner by cut still drops goodwill with (c) on. -Compat with NSFP: (a) stands down.
- **Risks:** (c) changes vanilla balance, so it is off by default. The broader gate needs more frame coverage in tests.
## Storyteller weight
How much a slave counts for wealth, raids and population. Slaves Are Worthless is maintained on 1.7, so this is consolidation, not a gap.
- **Tests:** A Plants 8, count 1 order for a friendly pro-slavery faction. Selling a matching slave to that faction's trader fills it, and the pending payment is the appraised price x 0.6 at premium 1.6, within the cap. A Plants 3 slave doesn't fill it, nor does a slave bought from that faction. A gift-pod arrival fills it. Past the deadline the expiry letter and penalty apply. Phase 2: open orders survive.
- **Risks:** Small Workshop signal (220 subs), so this is depth, not a draw. Letters instead of generated quests keep it at M.
#### Slave wealth, raid and population weight
@ -653,9 +485,25 @@ How much a slave counts for wealth, raids and population. Slaves Are Worthless i
- **Tests:** On a map with 3 slaves, wealthPawns at 75% equals vanilla and at 0% drops by sum(0.75 x market value). Under Rand.PushState(seed), DefaultThreatPointsNow at raid weight 0 equals the value with the slaves despawned. Harmony.GetPatchInfo shows our transpiler with its pattern-found flag set. PopulationValue_Slave reads back the setting.
- **Risks:** The mod's first transpiler under Waylith and the Harmony 3 RC, hence the log-and-skip fallback. Caravan storyteller wealth also counts slaves at 75% and isn't covered (documented). Low weights make raids easy, so vanilla is the default.
## 2.3 Hire out slaves
An optional release. It is the riskiest feature and players barely ask for it, so it ships only if 2.1 finished on time and players ask after 2.2; otherwise it moves to Backlog. 5 days.
#### Hire out slaves
- **Players get:** At the comms console, an allied or neutral pro-slavery faction can hire your slaves. Pick the slaves and a term of 7, 15 or 30 days; they leave and come back at the end with wages of 1.2% of market value per slave per day (about 21 silver a day for an average slave, 315 for 15 days), plus goodwill and skill practice. A poorly suppressed slave may escape, a few come back hurt, and if the faction turns hostile it keeps them.
- **How:** Built on vanilla's borrowed-pawn system instead of a custom holder: a Quest with a QuestPart_LendColonistsToFaction subclass. Vanilla then exempts the pawns from world-pawn garbage collection (IsBorrowedByAnyFaction), counts them for population (TotalBorrowedColonistCount), keeps GameEnder from ending the game while they're away, returns corpses of lent pawns who die, and shows the timer in the quest tab. Lent pawns stay world pawns and keep ageing. The subclass writes the private lentColonists list through FieldRefAccess, overrides Enable to take the chosen slaves, and overrides Complete to pay wages and roll escape and injury. Dialog_BlaxHireOut opens from a second option of the ransom FactionDialogFor postfix: a checklist of secure, healthy adult slaves, a term picker and a wage preview. Slaves leave by shuttle or drop pod; if they walk out, Patch_RunawayExitMap skips borrowed pawns.
- Escape roll per slave: base chance x (1 - suppression at departure) x 0.5 if branded x (1 - loyalty) with loyalty on. Branded escapees go to GameComponent_BlaxRunaways.Register with the hirer's faction; others are lost, with a letter.
- Return: RunawayDelivery's spawn logic (walk-in for tribal and medieval factions, drop pod for industrial and up), still IsSlaveOfColony. CastesApi.NotifyJoined(pawn, "blax.slaves.contractReturned") one tick after each return. Wages through the payout helper. SkillRecord.Learn grants 300 XP per day in the best enabled skill. +1 goodwill per slave per 5 days. An injury roll adds a random vanilla injury. A hirer hostile by then keeps them, with a letter.
- **Settings:** laborContracts (on), wagePerDay 1.2% of market value (0.5 to 3), baseEscapeChance 10% (0 to 30), injuryChance 5% (0 to 20), deathChance 0% (0 to 5), terms 7/15/30 days, hirerMustApproveSlavery (on).
- **Replaces:** none. Prison Expanded 3827258534 (3,298 subs) has labor contracts for prisoners only.
- **Effort:** L.
- **Tests:** Contract 2 slaves for 7 days to a friendly faction with escape chance 0: they leave, IsBorrowedByAnyFaction is true, they survive world-pawn GC, they aren't in the runaway registry, and the quest tab shows the timer. After 7 days they are back as IsSlaveOfColony, silver rose by 2 x 7 x 1.2% x market value, their best skill gained XP, and with Castes loaded each produced one NotifyJoined. Escape chance 1 plus a brand puts them in the runaway registry. A faction hostile at term end triggers the kept letter. Phase 2: an active contract survives reload mid-term.
- **Risks:** The map can close while slaves walk out (abort and keep them). Castes policies stay untouched while away. Balance: 15 days of wages is about half a sale, tunable.
## Works with the other Blax mods
- **Package ids:** blax.slaves (this mod), blax.castes, blax.zones, blax.defaults, blax.laws. No hard dependencies. About.xml gets loadAfter entries for blax.castes and blax.zones next to the existing brrainz.harmony and Mlie.SYRMoreSlaves. No sibling goes into modDependencies, where Harmony stays the only entry, and there is no assembly reference. Load order is Castes, Zones, Slaves, Laws: Blax Laws lists blax.slaves in its loadAfter because it reads SlavesApi, and Slaves lists no Laws entry, so there is no loadAfter cycle. Defaults lists no sibling and no sibling lists Defaults, so its position doesn't matter.
- **Package ids:** blax.slaves (this mod), blax.castes, blax.zones, blax.defaults. No hard dependencies. About.xml gets loadAfter entries for blax.castes and blax.zones next to the existing brrainz.harmony and Mlie.SYRMoreSlaves. No sibling goes into modDependencies, where Harmony stays the only entry, and there is no assembly reference. Load order is Castes, Zones, Slaves. No sibling lists blax.slaves, so there is no loadAfter cycle. Defaults lists no sibling and no sibling lists Defaults, so its position doesn't matter.
- **Detection:** one shared Compat helper, Compat.IsActive(id) = ModLister.GetActiveModWithIdentifier(id, ignorePostfix: true) != null. It moves out of SlaveHarm.cs in 1.2 and serves the siblings, the Compat tab and every stand-down check.
- **Binding:** at startup BlaxSlavesStartup resolves sibling APIs with AccessTools.TypeByName and AccessTools.Method into cached delegates and reads their int Version. A missing sibling or method makes that call a silent no-op, and every Slaves feature works alone. APIs only change additively.
- **Calls into BlaxCastes.CastesApi:** HintJoinReason(Pawn, string) right before a join Castes classifies itself (it expires at the end of the tick); NotifyJoined(Pawn, string) one tick after the status is final, for joins Castes can't see.
@ -663,62 +511,51 @@ How much a slave counts for wealth, raids and population. Slaves Are Worthless i
| Reason | Fired by | Call | Castes treats it as |
|---|---|---|---|
| blax.slaves.runawayReturned | RunawayDelivery.TryDeliver (existing code, wired in 1.2); it sets slave status directly | NotifyJoined | previous caste |
| blax.slaves.slaveRecruited | recruit mode (Recruit slaves), Devoted letter (Loyalty), before DoRecruit | HintJoinReason | recruited |
| blax.slaves.indentureServed | indenture Welcome (Indentured servitude), before DoRecruit | HintJoinReason | recruited |
| blax.slaves.boughtIndentured | indentured purchase (Indentured servitude), ResolveTrade prefix before PreTraded | HintJoinReason | bought as slave |
| blax.slaves.contractReturned | labor contract return (Hire out slaves) | NotifyJoined | keep current caste |
| blax.slaves.slaveRecruited | recruit mode (2.0), Devoted letter (2.1), before DoRecruit | HintJoinReason | recruited |
| blax.slaves.indentureServed | indenture Welcome (2.1), before DoRecruit | HintJoinReason | recruited |
| blax.slaves.boughtIndentured | indentured purchase (2.1), ResolveTrade prefix before PreTraded | HintJoinReason | bought as slave |
| blax.slaves.contractReturned | labor contract return (2.3) | NotifyJoined | keep current caste |
- **Buying needs no call:** buy-mode only sets guest.joinStatus before vanilla Pawn.PreTraded, and Castes classifies by the final status in its own PreTraded scope.
- **Not used yet:** CastesApi.CasteLabels (version 1) and PrePick (version 3), for the caste picker on the trade row (Trade, its own step that waits for Castes). CastesApi version 4 (per-caste values a sibling registers, Castes area 5, step 4), for a per-caste blood donor and indenture term (Backlog); Castes builds version 4 when the first sibling feature needs one. CasteIdOf stays unused.
- **Calls into BlaxZones.ZonesApi:** TryFindDropSpot(map, thing, out cell) inside BlaxDelivery.Drop for every silver payout (ransom and buy-back, order premiums, hire-out wages). The pod spawns exactly on that cell with TradeUtility.SpawnDropPod, as the ZonesApi contract asks; DropCellFinder.TradeDropSpot with DropThingsNear is the fallback. Payouts follow the zone's orbital checkbox and, once Zones makes TryFindDropSpot follow it, Zones' global "Route orbital trade" switch. Pawns are never routed into zones: returned runaways and hired-out slaves use the vanilla spot. TryFindDropSpot and Version are all of ZonesApi version 1; the shared infirmary only touches Medical beds.
- **BlaxSlaves.SlavesApi (static):** Version and IsSafe(Pawn) with No doom timer. CalmsBreaks (static bool, true while "Wardens calm breakdowns" is on) with Control's Wardens step, for Blax Laws. Loyalty(Pawn) with Loyalty, TermDaysLeft(Pawn) with Indentured servitude, and the member Laws calls right before it captures an indentured slave it arrests, also with Indentured servitude. StartIndenture(Pawn, int days, string source) only once Laws takes up indenture as a sentence.
- **Calls from Blax Laws:** Laws reads SlavesApi.CalmsBreaks, not IsSafe. While it is true, Laws leaves slaves in the breaks the wardens take (not IsAggro, not the rebellion) to them instead of subduing or talking them down; tantrums, rages and slaughterers stay Laws'. Laws treats slaves as offenders like colonists (warn, guilty, subdue, later jail and court), records a slave rebellion as a crime but leaves the rebellion itself to Slaves, and never touches suppression. Its designed jail for slaves puts a jailed slave back into slavery when the sentence ends, a write to slave status Fabian allowed on 2026-12-01; the ownership line below carries that exception in Laws' wording. Until the term member ships with Indentured servitude, it doesn't jail indentured slaves. Its idea of indenture as a sentence would call StartIndenture.
- **Ownership**, the same list in all five Blax design docs:
- Castes: every per-pawn policy default of colonists, slaves and prisoners (apparel, food, drug, reading, medical care, schedule, work priorities, weapon loadout, allowed area, hostility, self-tend, carried medicine, fire at will, prisoner interaction except the Maintain only and Release modes Laws sets on colonists it jailed), and the planned ones: the cold-weather apparel policy, the Combat Extended loadout, the Royalty and Biotech switches (room and apparel requirements, psyfocus target, entropy limit, hemogen pack use, deathrest auto-wake), the slave interaction mode a new slave starts on and per-caste values other Blax mods register, which those mods apply.
- 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.
- **What that means for Slaves:** Slaves never sets a policy. The medical-care keeper of "Surgery bills and medical care survive status changes" stands down when Castes is loaded, and blood donor and term have no "new slaves" default here.
- **Not used yet:** CastesApi.CasteIdOf, CasteLabels and PrePick, for the trade-row caste picker in Backlog.
- **Calls into BlaxZones.ZonesApi:** TryFindDropSpot(map, thing, out cell) inside BlaxDelivery.Drop for every silver payout (ransom and buy-back in 1.4, order premiums in 2.2, wages in 2.3). The pod spawns exactly on that cell with TradeUtility.SpawnDropPod, as the ZonesApi contract asks; DropCellFinder.TradeDropSpot with DropThingsNear is the fallback. Payouts follow the zone's orbital checkbox. Pawns are never routed into zones: returned runaways and hired-out slaves use the vanilla spot. TryFindDropSpot and Version are all of ZonesApi version 1; the shared infirmary only touches Medical beds.
- **BlaxSlaves.SlavesApi (static):** Version from 1.3. IsSafe(Pawn) from 1.3. Loyalty(Pawn) and TermDaysLeft(Pawn) from 2.1.
- **Ownership:** Castes owns every per-pawn policy default (apparel, food, drug, reading, medical care, schedule, work priorities, weapon loadout, allowed area, hostility, self-tend, carried medicine, fire at will, prisoner interaction), so Slaves never sets a policy: the 1.3 medical-care keeper stands down when Castes is loaded, and blood donor and term have no "new slaves" default here. Zones owns sleeping spots, beds by zone, every friendly drop location and per-cell work rules (work rule areas); it never changes a pawn's work priorities or allowed area. Defaults owns the starting settings of vanilla stockpiles and growing zones, storage buildings, production bills, workbenches, buildings, animals and mechs, 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. Slaves owns slave status, trade, prices, suppression, rebellion, slave medicine and the slave economy.
- **Shared conventions:** patches applied one class at a time from a [StaticConstructorOnStartup] class with the "[Blax Slaves] N patches applied" log line (already in BlaxSlavesStartup); a ModSettings toggle for every feature; the headless test mod pattern (Tests/BlaxSlavesTests harness, run-tests.ps1), which Castes and Zones copy.
## Backlog
- Slave order chains such as "emancipate when healthy" or "convert, then recruit" (S to M): build on the warden-mode base once recruit and convert prove it.
- Rebels may surrender (M): after No doom timer, rebellions get rare; check whether players still hit fights to the death.
- Per-caste blood donor and indenture term through CastesApi version 4 (Castes area 5, step 4): Castes stores the value per caste and shows it in its manager, Slaves reads it for a pawn and applies it. Waits for Blood bank and Indentured servitude; Castes builds version 4 when the first sibling feature needs one.
- Terror covers rebellion risks (S): specified under Control, "Idea: terror covers rebellion risks". After No doom timer it only reaches unsafe slaves; build it if players report rebellions of unsafe slaves during caravan trips.
- Slave weight for caravan storyteller wealth: not covered by Storyteller weight; add if players report it.
- Loyal slaves join parties (S to M): More Slavery Stuff 2896845138 (21,659 subs, last built for 1.6) offers slaves at gatherings as a precept. Check first how 1.7's gathering code (GatheringsUtility, LordJob_Joinable_Gathering) keeps slaves out; wait until players ask.
- Caste picker on the trade row, next to the buy-mode button (CasteLabels plus PrePick): waits for PrePick, which Blax Castes adds in its 1.4.
- Slave overview window (M, a text-label main button with one sortable row per slave): its best columns, loyalty and term, only exist after 2.1.
- Slave order chains such as "emancipate when healthy" or "convert, then recruit" (S to M): build on the warden-mode base once 2.0 proves it.
- Rebels may surrender (M): after 1.3, rebellions get rare; check whether players still hit fights to the death.
- Per-caste defaults for blood donor and indenture term: needs a CastesApi addition that the contract doesn't have today.
- Slave weight for caravan storyteller wealth: not covered by 2.2; add if players report it.
## Cut
- Turrets fire on rebelling slaves, turrets cause terror: Prisoners Should Fear Turrets (104k, maintained, in your mod list) stays installed for its prisoner half, so taking its slave half removes no mod. The Compat tab points to it.
- Longer terror memories through ObservedTerror.durationDays: can't work, vanilla clears terror thoughts on every observation pass. Lingering terror replaces it.
- A separate at-risk rebellion alert: vanilla alerts already name culprits; "Rebellion alerts use the safe threshold" retunes them instead.
- Organ donor gizmo with automatic harvests: its stock check could never work (organs are uncounted) and demand is tiny (1.1k). "Organ harvests wait for health" keeps the useful part.
- Longer terror memories through ObservedTerror.durationDays: can't work, vanilla clears terror thoughts on every observation pass. Lingering terror (1.3) replaces it.
- A separate at-risk rebellion alert: vanilla alerts already name culprits; 1.3 retunes them instead.
- Organ donor gizmo with automatic harvests: its stock check could never work (organs are uncounted) and demand is tiny (1.1k). "Organ harvests wait for health" (1.6) keeps the useful part.
- Slaves leave loose weapons alone: wrong premise, slaves and colonists don't pick up weapons in daily life; only rebels do.
- Comms-console slave catalogue: L effort with world-pawn cleanup risk, and 1.1 caravans, stock-any-size, every-trader-buys and the slave ship already cover supply. Revisit after faction slave orders if players ask. Rimdeed (2411722784, in your mod list, no 1.7 build) is not a reason to build it: it hires colonists at the console, which is recruitment, not slavery.
- Harvest Everything's part items and its lethal "harvest everything" surgery: a body-part system for every pawn, not slave rules, each new part item needs a def and art, and a one-click lethal harvest goes past the tone line this plan keeps (decided 2026-12-01).
- A "mode for new slaves" setting in Slaves: new slaves start in Suppress as vanilla sets it; recruit and convert are orders given per slave. The per-caste default is Blax Castes' (decided 2026-12-01).
- Comms-console slave catalogue: L effort with world-pawn cleanup risk, and 1.1 caravans, stock-any-size, every-trader-buys and the slave ship already cover supply. Revisit after 2.2 if players ask.
- Sedation collar apparel: needs art on every body type; the relay implant does the same job.
- Absorbing Raiders Never Die (2024330186, in your mod list): vanilla 1.7 custom difficulty already has the slider (Difficulty.enemyDeathOnDownedChanceFactor, Difficulty.cs:77).
- Absorbing Raiders Never Die: vanilla 1.7 custom difficulty already has the slider.
- Per-join policy defaults (outfit, food, drugs, reading, medical care, area): Castes owns them, and the README points players there.
- Slave sleeping zones and mass sleeping spots: Zones owns them.
- Medical triage ("treat only if worth more than X"): medical care is a Castes policy; appraisal shows the value and the player decides.
- New collar and outfit looks: need art, and there is no artist.
- Explosive, shock or skull-piercer collars, torture, flogging, lobotomy, nerve staple, brainwash chair: beyond vanilla Ideology's tone. Sedation and the compliance implant cover control. Blax Laws' subdue is a capped fistfight that ends a break, not a punishment system for slaves.
- Heart acidifier implant for permanent terror (Useful Terror): a threat implant, too close to the explosive collars above; the compliance implant covers control.
- Terror building values (gibbet and terror sculpture buffs, lightweight skullspikes, from Useful Terror): building balance, not slave rules. It stays Useful Terror's.
- Explosive, shock or skull-piercer collars, torture, flogging, lobotomy, nerve staple, brainwash chair: beyond vanilla Ideology's tone. Sedation and the compliance implant cover control.
- Automated lethal harvests (heart, liver, harvest before execution): automating killing goes past vanilla's manual choice.
- Slave romance and marriage rules: not a pain point.
- Keeping slaves out of parties and funerals: vanilla 1.7 already does it.
- Home factions angry when bought slaves are harvested: vanilla treats colony slaves as player faction, so no violation fires. Prisoners are covered by Prisoners count too.
- Home factions angry when bought slaves are harvested: vanilla treats colony slaves as player faction, so no violation fires. Prisoners are covered in 1.4.
- Slave auctions and market events: RimMarket (50k) and Auction House (5.5k) do it on 1.7 and are maintained.
- Prisoner arena and prisoner forced labor: maintained prisoner mods (Prison Labor, Prisoner Realism, Prison Expanded) cover it, and slaves already work.
- Gene extraction farm: Auto-Extract Genes (65.8k, 1.7) already covers slaves.
- Docility drug: needs item art, and drug schedules belong to Castes.
- Slave-surgeon sabotage: players dislike punitive randomness; the slave-surgeon rule covers trust.
- Slave-surgeon sabotage: players dislike punitive randomness; the 1.5 surgeon rule covers trust.
- "Slavery: Pragmatic" price precept: touches every ideo; sliders and appraisal's buyer factor do the job.
- Flee AI and rebellion size rework: L pathing work for little gain once safe suppression lands.
- Mood-based suppression decay: a second axis next to loyalty confuses players.