From b024129ef79a36dd164360d430e76b5d166980f7 Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Tue, 1 Dec 2026 19:22:18 +0100 Subject: [PATCH] docs: plan review fixes Hooks checked against the decompiled 1.7 code: shared infirmary, rebellion alerts, sedation gizmo, colonist bar, organ harvest gate, abolitionists, slave ship under Odyssey, warden threshold, break blocker, kept surgery bills, rescue raid, bloodfeeding, fall-rate factors for loyalty and indenture, enslavement thoughts. Recruit and convert never save a Blax mode. Plan: gear drop moves to Captives pay, buy anyway stays the default, Sell any time follows Captives pay, Control step 2 splits into Wardens and Lingering terror, features that act on their own ship off, a table of the 14 slave and prisoner mods, Laws and Castes API links. --- docs/features.md | 122 +++++++++++++++------- docs/roadmap.md | 257 ++++++++++++++++++++++++++++------------------- 2 files changed, 237 insertions(+), 142 deletions(-) diff --git a/docs/features.md b/docs/features.md index 707de9d..cffb673 100644 --- a/docs/features.md +++ b/docs/features.md @@ -1,6 +1,6 @@ # Blax Slaves feature plan -Planned 2026-12-01. 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). +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). @@ -13,16 +13,18 @@ Status labels: - **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 and rebellion, slave work rules, slave medicine and implants, the way from slavery to loyalty and freedom, and how much a slave weighs for the storyteller. +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. +- **Blax Laws**: crimes and punishments, for slaves too (warn, guilty, subdue, jail, later court). Rebellion stays Slaves'; Laws only records it as a crime. If Fabian agrees (open question 1), Laws gives back the slave status a sentence took. The full contract is "Works with the other Blax mods" in the roadmap. @@ -40,11 +42,14 @@ Vanilla sells few slaves, lets few traders buy your captives, fixes the price an 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. [Designed](roadmap.md#slave-ship-on-request). -- **Abolitionists buy to free.** Anti-slavery traders buy your slaves at half price to free them; nobody minds the sale and their faction's goodwill rises. Becomes the default for anti-slavery traders. [Designed](roadmap.md#abolitionists-buy-to-free). -- **Caste picker on the trade row.** Pick the caste a bought pawn joins, next to the slave or colonist button. Needs Blax Castes with PrePick; hidden without it. [New](roadmap.md#caste-picker-on-the-trade-row), from Backlog. +- **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). -All three change who sells to you, who buys from you and what happens at the moment of the deal. Abolitionist pricing skips appraisal's buyer factor, so this step comes after Slave value. +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 @@ -55,6 +60,7 @@ 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": @@ -75,21 +81,26 @@ Vanilla's rebellion is a doom timer: well-kept slaves still revolt, wardens can' 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 (off by default); calm genes never rebel (Biotech). [Designed](roadmap.md#rebellion-options-armed-slaves-and-calm-genes). +- **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 and terror": +Step 2, "Wardens": -- **Lingering terror.** Terror fades over hours instead of at once. [Designed](roadmap.md#lingering-terror). -- **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), so slaves can haul in the armory or stay home while the colony travels. Demand: Useful Terror (2636462610, 21.8k, maintained on 1.7) does this; Slaves stands down while it is active. [New](roadmap.md#terror-covers-rebellion-risks). -- **Warden suppression threshold.** Wardens top slaves up below a level you pick instead of vanilla's 70%. Demand: Useful Terror's "smarter suppression" (90% there). [New](roadmap.md#warden-suppression-threshold). +- **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 1 comes first because its safe threshold and MTB postfix are what step 2's terror factors and threshold build on, and what Slave implants and Blax Laws reuse. +Step 3, "Lingering terror": -Idea: **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. +- **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 @@ -126,13 +137,13 @@ Control collars were the top medical request (Simple Slavery Collars, 52k, no 1. - **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 extension that loyalty and indenture reuse. Needs Control's "No doom timer". +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; an appraised-value stat with the spare organs' price next to it. [Designed](roadmap.md#slave-appraisal). +- **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). @@ -144,9 +155,11 @@ Vanilla's only way out of slavery is emancipation by hand, and years of good ser Step 1, "A way out": -- **Recruit slaves.** A warden mode that talks a slave round over days, no imprisonment detour. Replaces Recruit Slaves (26k). [Designed](roadmap.md#recruit-slaves). -- **Convert slaves.** A warden mode 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"; released slaves leave your weapons and armor behind. [Designed](roadmap.md#freedom-pays-off). +- **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. Step 2, "Loyalty": @@ -154,22 +167,22 @@ Step 2, "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. [Designed](roadmap.md#indentured-servitude-1). +- **Indentured servitude.** Terms of 15 to 120 days, "joins indentured" when buying, a term-end letter: stay, go home or extend. Adds SlavesApi.TermDaysLeft. If Fabian says yes to Blax Laws' indenture as a sentence (open question 3), it also adds SlavesApi.StartIndenture for Laws. [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-mode base once recruit and convert prove it. +- **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.** Needs a CastesApi addition the contract doesn't have; only if Castes adds a slot for sibling settings. +- **Per-caste blood donor and indenture term** through CastesApi version 4 (Castes area 5, step 4). Castes asks Fabian about it in its open question 1 and recommends yes; Castes would store the value per caste, Slaves would apply it. ## 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, 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). [Designed](roadmap.md#prisoners-count-too). +- **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 @@ -180,30 +193,58 @@ A slave counts 75% toward wealth, raid points and population, so a large slave w ## 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' PrePick and CasteLabels serve the caste picker on the trade row. +- **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' PrePick and CasteLabels (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, if Fabian says yes to Castes' open question 1. - **Calls ZonesApi.TryFindDropSpot** for every silver payout, from Faction deals' first step. -- **Offers SlavesApi**: Version and IsSafe (Control, step 1), CalmsBreaks (Control, step 2, for Blax Laws), Loyalty and TermDaysLeft (Freedom and loyalty, steps 2 and 3). +- **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 if Fabian says yes to Laws' open question 2** (open question 3 here): SlavesApi.StartIndenture(Pawn, int days, string source), shipping with Indentured servitude. ## Order The remaining steps, in build order: -1. **Control, "No doom timer"**: the top complaint (Slave Rebellions Improved, 71k), and its MTB postfix and SlavesApi.IsSafe are what implants, terror and Blax Laws 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. -3. **Colony conscience**: replaces No Sympathy For Prisoners from your mod list, and sits next to ransom because both are about the captives you hold. -4. **Running a slave workforce**: fills 1.7 gaps no maintained mod covers (Capable Slaves and SlaveBar have no 1.7 build). -5. **Slave medicine**, "One hospital", then "Harvests and blood". -6. **Slave implants**: need step 1's MTB postfix. -7. **Slave value**: counts implants and certificates. -8. **Trade, "Sell any time"**: abolitionist pricing needs appraisal in place, and the caste picker needs Castes' PrePick. -9. **Control, "Wardens and terror"**: Useful Terror covers terror on 1.7 today, so this waits; it goes right before Freedom because both teach wardens new jobs. +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. **Storyteller weight**: consolidation, since Slaves Are Worthless is maintained on 1.7. -13. **Faction deals, "Hire out"**: only if players ask. +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 | Open question 5. | +| [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: @@ -211,11 +252,16 @@ 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: they start in Suppress, as vanilla sets it (Pawn_GuestTracker.cs:501-503), and recruit or convert is set per slave. - 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. ## Open questions for Fabian -1. **Blax Laws' jail for slaves writes slave status.** Laws' design puts a jailed slave back into slavery when the sentence ends, and slave status is Slaves'. I recommend allowing it: it only restores what the sentence took, and Slaves keeps the brand, the time as a slave and loyalty through it. An indentured term ends at the arrest like at any imprisonment, unless Laws later hints the arrest to Slaves. -2. **Take over Useful Terror's slave rules?** Terror covers rebellion risks and the warden threshold copy what Useful Terror (21.8k, maintained on 1.7) does. I recommend building them: they sit in the same rebellion and suppression code Slaves already patches, two mods patching it would stack, and Slaves stands down while Useful Terror is active, so nobody loses anything. +1. **Blax Laws' jail for slaves writes slave status.** Laws' design puts a jailed slave back into slavery when the sentence ends, and slave status is Slaves'. I recommend allowing it: it only restores what the sentence took, and Slaves keeps the brand, the time as a slave and loyalty through it. An indentured term ends at the arrest like at any imprisonment; whether a term survives jail is settled together with question 3. +2. **Take over Useful Terror's slave rules?** Useful Terror (2636462610, 21.8k) is maintained on 1.7 and isn't in your mod list, so nothing of yours depends on it. Once "No doom timer" ships, a safe slave never rebels, and vanilla's weapon, map-edge and unattended factors only reach slaves below the safe threshold, mostly slaves left unsuppressed while every colonist is away (SlaveRebellionUtility.cs:131-134, 147-158, 215-225). I recommend building the warden threshold with the other warden features (Control, "Wardens"), because nothing in your list covers it and it keeps slaves further above the safe threshold, and keeping "Terror covers rebellion risks" an Idea until players report rebellions of unsafe slaves during caravan trips. Lingering terror stays a late step of its own. +3. **Indenture as a sentence (Blax Laws' open question 2).** Laws would sentence a convict to a term of indentured servitude, which needs SlavesApi.StartIndenture(Pawn, int days, string source). I recommend yes, answered together with Laws: Slaves owns the status and the term, Laws only hands over the convict and the days, and the call ships with Indentured servitude. +4. **Safe suppression on from the start?** Under the Blax rule it ships off, so an update never changes a running colony by itself. I recommend keeping it off, at the top of the Rebellion tab, with a change note that tells players to switch it on. On by default would end rebellions in every existing save the moment the update lands. +5. **Harvest Everything! (no 1.7 build, in your mod list).** It makes nearly every body part harvestable as an item and adds a lethal "harvest everything" surgery. I recommend leaving it out of Blax Slaves: it is 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. Vanilla's heart, lung, kidney and liver harvests stay, with the health gate and appraisal's organ prices. diff --git a/docs/roadmap.md b/docs/roadmap.md index 5d05e5e..6f9e530 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -14,14 +14,16 @@ Changes on 2026-12-01: - 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'. +- 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, 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 terror that lingers and covers rebellion risks, a warden threshold, room suppression and wardens who calm breakdowns | Slave Rebellions Improved (71k + 11.5k), No Slave Mental Breaks (2.3k), Dead Calm Slave (2.1k), Useful Terror (21.8k, partly) | +| 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 | @@ -34,12 +36,17 @@ The order of the remaining steps, and why: [features.md](features.md#order). Eff ## Defaults I picked -Change if you disagree. +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: + +- **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. Whether safe suppression should be on from the start is open question 4 in features.md. +- **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. -- Safe suppression is on at 50%: a slave at or above it never rebels. -- Wardens suppress below vanilla's 70% until you raise it. Terror covers the rebellion risks fully (100%) once that feature ships, and stands down for Useful Terror. -- Traders whose ideoligion rejects slavery still buy captives, as in vanilla. With abolitionists buy to free (Trade) they "buy to free" at half price instead. +- 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). - 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. @@ -64,7 +71,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" and makes it the default. +- **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. - **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,27 +123,38 @@ Who sells slaves to you and who buys them from you. 1.0 to 1.2 shipped the base: ### Sell any time -A buyer for captives whenever you want one, a fair deal with factions that reject slavery, and the caste a bought pawn joins picked where you buy it. Abolitionist pricing skips appraisal's buyer factor, so this step follows Slave value. +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. +- **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. -- **Settings:** slaveShipOnRequest (on). + - 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". -- **Risks:** Other mods that set canRequestOrbitalTrader on outlanders add their kinds next to ours (harmless). +- **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. 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). +- **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, 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. +- **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 @@ -173,24 +191,34 @@ The ledger and the payout helper come first, because every later deal and severa - 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). + - 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 queue holds RaidEnemy. Phase 2: payment and cooldowns survive reload. +- **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 (on), buybackMtbDays 20 (5 to 60), offer range 100 to 150% of the ransom price. +- **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. @@ -203,7 +231,7 @@ Orders pay a premium on the appraised price, so they follow Slave value. - 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. +- **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. @@ -231,13 +259,13 @@ Keeping slaves: suppression, rebellion and escape. Branding, branded trader slav ### No doom timer -Both reviewers put the rebellion fix first after 1.2: it is the top complaint (Slave Rebellions Improved, 71k). Its MTB postfix and SlavesApi.IsSafe are what Slave implants, the terror features and Blax Laws build on. +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. #### 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 (on), safeThreshold 50% (0 to 100), unsafeRebellionMtbFactor 1.0 (0.25 to 4), blockRebellionBreakWhenSafe (on). +- **Settings:** safeSuppressionEnabled (off until switched on; open question 4 in features.md), safeThreshold 50% (0 to 100), unsafeRebellionMtbFactor 1.0 (0.25 to 4), blockRebellionBreakWhenSafe (on; acts only while safe suppression is 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. @@ -247,7 +275,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 (on). +- **Settings:** armedSlavesNeverSafe (off), calmGenesNeverRebel (off until switched 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). @@ -256,77 +284,85 @@ 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. 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. +- **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. - **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). At 0.9 it is inactive. Hide on gives Inactive. +- **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. - **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 (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. +- **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. - **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 and terror +### Wardens -Ways to keep suppression up without a fight: terror that lasts and covers the rebellion risks, wardens who top slaves up earlier, suppress a whole room at once and talk slaves out of breakdowns. It builds on the safe threshold and the MTB postfix of No doom timer. - -#### 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. 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:** 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; 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. - -#### Terror covers rebellion risks - -- **Players get:** 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 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 (new 2026-12-01, not checked against the code):** The No doom timer postfix on InitiateSlaveRebellionMtbDaysHelper already sees every slave below the safe threshold. For each factor vanilla applied, it multiplies the MTB back by factor ^ (terror x coverage). The checks are SlaveRebellionUtility's private CanApplyWeaponFactor and InRoomTouchingMapEdge and its public IsUnattendedByColonists(Map); the factors are its constants WeaponProximityMultiplier (4), RoomTouchesMapEdge (1.7) and UnattendedByColonistsMultiplier (20). All of them exist in the 1.7.5021 reference assemblies; whether the helper applies them in exactly this form needs the decompiled body. 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 (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. +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 (new 2026-12-01, not checked against the code):** Need_Suppression.CanSuppressMaxThreshold is a const 0.7 read by the CanBeSuppressedNow getter. A const is compiled into its readers, and a tiny getter is the likeliest inlining target under CoreCLR, so the patch goes on the callers instead: WorkGiver_Warden_SuppressSlave.JobOnThing and Pawn_GuestTracker.ScheduledForSlaveSuppression recompute the test with the setting, and JobDriver_SuppressSlave's fail conditions must accept the higher level too. Pawn_GuestTracker.MinSlaveSuppressionIntervalTicks (60,000) keeps the daily gap. The members exist in the 1.7.5021 reference assemblies; which of them reads the 70% needs the decompiled code. Suppress the whole room uses the same test, so its bystanders follow the setting. +- **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 gets none either way. A bystander at 80% in the same room is suppressed with the setting at 90%. +- **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 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). +- **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. Share 0 does nothing. +- **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 (on), calmSuppressionCost 10% (0 to 30). +- **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. + +#### 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. +- **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). +- **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. +- **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. @@ -344,11 +380,11 @@ 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. 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. +- **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. - **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. A caravan with a slave still lists it. An all-slave map still gets vanilla's empty group entry. +- **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. - **Risks:** Colony Groups and other bar replacements bypass it; the Compat tab says so. #### Slave overview @@ -370,21 +406,24 @@ Medical depth was your ask. Slaves get the hospital, the operations and the medi #### 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). +- **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. 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. +- **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, 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. +- **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. - **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'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. +- **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. - **Risks:** Low. Mods that expect bills to clear can turn it off. ### Harvests and blood @@ -394,21 +433,24 @@ For colonies that use slaves' bodies. Both keep their state in the ledger from C #### 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). +- **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). - **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 the captive-surgery setting of Prisoners count too is on. Demand is small; the value is the health gate. +- **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. #### 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. +- **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). - **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. +- **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. ## Slave implants @@ -418,7 +460,7 @@ Control implants are the strongest medical demand on the Workshop (Simple Slaver #### 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 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 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 (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. - **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. @@ -432,13 +474,13 @@ 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: CompGetGizmos offers "Sedate now" (player only, needs a charge). + - 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. 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. 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. +- **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. #### Endurance implant @@ -465,10 +507,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. + - 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. 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 (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). +- **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). - **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. @@ -488,7 +530,7 @@ Pricing comes after the implants, so appraisal counts them from the start. The h - **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 (on), min multiplier 0.33, max 3.0 (1 to 5). +- **Settings:** honorByValue (off until switched 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. @@ -500,22 +542,24 @@ Recruiting is the strongest "path to freedom" signal (Recruit Slaves, 26k). The ### 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. +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. #### 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. 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. 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.) +- **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.) - **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. 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. +- **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. #### 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 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. +- **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. - **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. @@ -524,32 +568,32 @@ Recruit runs on its own persuasion counter, so it doesn't wait for loyalty. One #### Freedom pays off -- **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. +- **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. - **Risks:** Low. ### Loyalty -Built on recruit's persuasion counter and the fall-rate extension from the implants. +Built on recruit's persuasion counter and the generalised fall-rate patch from the implants. #### 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 BlaxSlaves_SuppressionFactor through the generalised fall-rate patch: +- **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): - 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.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 (on), baseGainPerDay 2% (0.5 to 10), rebellionPenalty 30%, obedientNeverRebels (on), loyalAllWork (off), loyalFullSpeed (off), devotedLetter (on), unwaveringCanBeDevoted (off). +- **Settings:** loyaltyEnabled (off until switched 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. 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. +- **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. - **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 @@ -559,16 +603,17 @@ Built on loyalty, which decides who is willing to stay, and on the buy-mode butt #### 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. 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: +- **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 as a source, only if Fabian says yes to Laws' open question 2 (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 with that answer. 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, 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. + 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, 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 StartIndenture with it if Laws' question is answered yes. - **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. Phase 2: the term survives 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. 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. - **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 @@ -577,15 +622,16 @@ Who in the colony minds what you do to the people you hold. "Harming slaves does #### 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. +- **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), Prisoner Harvesting 3347850851 (13,090). +- **Replaces:** No Sympathy For Prisoners 3533769253 (16,399 subs, in your mod list; with the enslavement frame), 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. +- **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 @@ -618,18 +664,19 @@ How much a slave counts for wealth, raids and population. Slaves Are Worthless i | blax.slaves.contractReturned | labor contract return (Hire out slaves) | 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 and PrePick, for the caste picker on the trade row (Trade, "Sell any time"). CasteIdOf stays unused. +- **Not used yet:** CastesApi.CasteLabels 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, only if Fabian says yes to Castes' open question 1. 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. 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 that feature, for Blax Laws. Loyalty(Pawn) with Loyalty, TermDaysLeft(Pawn) with Indentured servitude. -- **Calls from Blax Laws:** Laws reads SlavesApi.CalmsBreaks. While it is true, Laws leaves slaves in non-violent breaks to the wardens instead of subduing them. 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 would put a jailed slave back into slavery when the sentence ends, a write to slave status that waits for Fabian's decision (see Open questions in features.md). Until then the ownership line below stands unchanged. -- **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 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. 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. Laws owns the colony's lawbook, cases, sentences and later trials, judges, attorneys and law votes, slaves included as offenders; it acts through vanilla arrest, capture, release and guilt plus its own non-lethal subdue job. +- **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. Only if Fabian says yes to Laws' open question 2 (indenture as a sentence): StartIndenture(Pawn, int days, string source), also with Indentured servitude. +- **Calls from Blax Laws:** Laws reads SlavesApi.CalmsBreaks, not IsSafe. While it is true, Laws leaves slaves in non-violent breaks to the wardens instead of subduing them. 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 would put a jailed slave back into slavery when the sentence ends, a write to slave status that waits for Fabian's decision (open question 1 in features.md); the ownership line below carries that exception in Laws' wording, conditional on his yes. Its indenture as a sentence would call StartIndenture (open question 3 in features.md). +- **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) and, if Fabian says yes to Castes' open question 1, per-caste values other Blax mods register, which those mods apply. So 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. 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 (except the status Laws gives back to a slave it jailed, if Fabian agrees), the slave interaction mode (vanilla's modes plus Recruit and Convert), trade, prices, suppression, rebellion, slave medicine and the slave economy. Laws owns the colony's lawbook, cases, sentences and later trials, judges, attorneys and law votes, slaves included as offenders; it acts through vanilla arrest, capture, release and guilt plus its own non-lethal subdue job. - **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 defaults for blood donor and indenture term: needs a CastesApi addition that the contract doesn't have today. +- 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 Fabian's answer to Castes' open question 1 (recommendation yes) and for Blood bank and Indentured servitude. +- 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. @@ -640,9 +687,11 @@ How much a slave counts for wealth, raids and population. Slaves Are Worthless i - 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. - 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. +- 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, and each new part item needs a def and art. Open question 5 in features.md. +- A "mode for new slaves" setting: new slaves start in Suppress as vanilla sets it; recruit and convert are orders given per slave. - Sedation collar apparel: needs art on every body type; the relay implant does the same job. -- Absorbing Raiders Never Die: vanilla 1.7 custom difficulty already has the slider. +- Absorbing Raiders Never Die (2024330186, in your mod list): vanilla 1.7 custom difficulty already has the slider (Difficulty.enemyDeathOnDownedChanceFactor, Difficulty.cs:77). - 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.