diff --git a/README.md b/README.md index 9b9fdd8..4516ded 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,11 @@ Blax Slaves works with any combination of DLCs, core only included, and lists no - ✔️ Hospitality visitor groups never take a runaway who is due to be returned. - ✔️ No Sympathy For Prisoners already removes slavery and execution precept thoughts for everyone, pacifists included. - ♻️ Everybody Buys Slaves and [SYR] More Slaves can stay installed but aren't needed any more; with More Slaves, its extra 3~5 slaves per trader stack on ours. -- 🧩 Blax Castes and Blax Zones (planned, see `docs/`) are optional companions; Blax Slaves binds their APIs by reflection when they are loaded. +- 🧩 [Blax Castes](https://steamcommunity.com/sharedfiles/filedetails/?id=3848261054), [Blax Zones](https://steamcommunity.com/sharedfiles/filedetails/?id=3848261160) and [Blax Defaults](https://steamcommunity.com/sharedfiles/filedetails/?id=3848261264) are optional companions on the Workshop. Blax Slaves binds the Castes and Zones APIs by reflection when they are loaded and works the same without them. Crimes and punishments, for slaves too, are planned in [Blax Laws](https://forgejo.blax.at/blax-software/rimworld-blax-laws). Not covered: eating slave meat, slave-leather apparel, slaves lost when a map closes or kidnapped by raiders (vanilla ransom handles those). -🗺️ Roadmap: `docs/roadmap.md`. +🗺️ What's planned, by area and in build order: `docs/features.md`. The spec of each feature: `docs/roadmap.md`. ## Development diff --git a/docs/features.md b/docs/features.md new file mode 100644 index 0000000..707de9d --- /dev/null +++ b/docs/features.md @@ -0,0 +1,221 @@ +# 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). + +When it is complete, Blax Slaves is the one slavery mod a RimWorld 1.7 colony needs. You buy and sell slaves on your terms, make deals with factions over the people you hold, keep slaves without a rebellion doom timer, run a slave workforce with its own hospital and implants, and give slaves a way to loyalty and freedom. It replaces about thirty dead or conflicting slavery mods, every feature has its own toggle, and it works with any DLC combination (the slave features need Ideology). + +Status: 1.0, 1.1 and 1.2.1 are on the Workshop (item 3847282171), 1.2.1 since 2026-11-29. Everything marked Designed has a full spec in the roadmap and no code yet. + +Status labels: + +- **Shipped x.y**: on the Workshop. +- **Designed**: specified in the roadmap, no code. +- **New**: added in this plan, with a spec stub in the roadmap; its hook is named but not checked against the decompiled code. +- **Idea**: in scope, waits until players ask. + +## 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. + +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. + +The full contract is "Works with the other Blax mods" in the roadmap. + +## Trade + +Vanilla sells few slaves, lets few traders buy your captives, fixes the price and decides for you whether a bought pawn joins as a slave or a colonist. This area makes the trade window and the traders work for a slave colony. + +- **Slavers are common.** Slaver caravans and slave ships twice as often with more stock; other traders may carry a slave or two. Shipped 1.0. +- **Request a slaver caravan** from allied outlanders and tribes at the comms console. Shipped 1.1. +- **Buy as slave or colonist.** One click in the trade window, price updates. Shipped 1.2. +- **Every trader buys captives**, visitor groups included; anti-slavery factions may refuse. Shipped 1.2. +- **Slave stock ignores colony size**, so settlements keep selling. Shipped 1.2. +- **Price sliders** for buying slaves and selling captives, capped so buy-low-sell-high doesn't pay. Shipped 1.2. +- **Settings tabs and a Compat tab** that lists the mods you can unsubscribe. Shipped 1.2. + +Next step, "Sell any time": + +- **Slave ship on request.** Allied pro-slavery outlanders send an orbital slave ship from the comms console, so captives sell any time. [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. + +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. + +## Faction deals + +The people you hold are worth more to their own factions than to a trader, and vanilla gives you no way to ask. Every deal here pays silver by drop pod through one helper (into a Blax Zones delivery zone when one fits), and a purchase ledger keeps you from buying a pawn cheap and ransoming it home. + +Step 1, "Captives pay": + +- **Purchase ledger and payouts.** Nothing visible; the base every later deal reuses. [Designed](roadmap.md#purchase-ledger-and-payouts). +- **Ransom captives at the comms console.** They quote, your negotiator pushes for more at lower odds; a refusal may bring a rescue raid. Replaces PrisonerRansom (91k, no 1.7 build, in your mod list). [Designed](roadmap.md#ransom-captives-at-the-comms-console). +- **Factions buy back their people.** Letter offers for captives you hold; nobles and leaders draw more. [Designed](roadmap.md#factions-buy-back-their-people). + +Step 2, "Slave orders": + +- **Faction slave orders.** Pro-slavery factions ask for slaves with a skill and pay a premium plus goodwill. Needs Slave value, because the premium sits on the appraised price. [Designed](roadmap.md#faction-slave-orders). + +Step 3, "Hire out": + +- **Hire out slaves** to allied factions for wages, built on vanilla's borrowed-pawn quests; escape and injury rolls. [Designed](roadmap.md#hire-out-slaves). Last on purpose: the riskiest feature in the plan with almost no demand. It moves to Backlog if nobody asks by the time slave orders are out. + +## Control + +Vanilla's rebellion is a doom timer: well-kept slaves still revolt, wardens can't keep up with a barracks, terror fades the moment a slave turns a corner, and a slave who escapes is gone for good. This area keeps slaves without that fight. + +- **Branding and rebranding.** A brand that remembers its owner and slows suppression loss. Shipped 1.0. +- **Trader slaves come branded.** Shipped 1.0. +- **Runaways come back.** Non-hostile factions return branded escapees. Shipped 1.0. + +Step 1, "No doom timer": + +- **No rebellion while suppressed.** A slave at or above the safe threshold (50%) never rebels. Adds SlavesApi.IsSafe. [Designed](roadmap.md#no-rebellion-while-suppressed). +- **Rebellion options.** Armed slaves are never safe (off by default); calm genes never rebel (Biotech). [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": + +- **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). +- **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. + +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. + +## Running a slave workforce + +A big slave colony is hard to run: slaves can't do half the jobs, work at 85% speed and fill the colonist bar. This area is the daily view of that workforce. + +- **Time as a slave** in the Records tab and the slave tab. Shipped 1.2. +- **Slave work rules.** Which banned work types slaves may do, work speed flat or by suppression, and slave wardens never suppress slaves. Replaces Capable Slaves (9.8k, no 1.7) and five smaller work mods. [Designed](roadmap.md#slave-work-rules). +- **Hide slaves from the colonist bar** with one toggle or a key; caravan slaves stay listed. Replaces SlaveBar (24.6k, last built for 1.5). [Designed](roadmap.md#hide-slaves-from-the-colonist-bar). +- **Slave overview.** A "Slaves" main tab, one sortable row per slave: suppression, days to a possible rebellion, time as a slave, and columns that appear as later areas ship (value, loyalty, term, donor). The place to see slaves once they leave the colonist bar. [New](roadmap.md#slave-overview), from Backlog. + +One step: all three are the same daily job, managing the people who do the work. + +## Slave medicine + +Vanilla keeps slaves out of colonist medical beds, throws away queued operations when a pawn's status changes and gives slaves no hemogen farm. Medical depth was your ask. + +Step 1, "One hospital": + +- **Shared infirmary and slave-surgeon rule.** Slaves use colonist medical beds when theirs are full; slave doctors can be barred from operating on free colonists. [Designed](roadmap.md#shared-infirmary-and-slave-surgeon-rule). +- **Surgery bills and medical care survive status changes** (enslave, imprison, free). The medical care part stands down while Castes is loaded. [Designed](roadmap.md#surgery-bills-and-medical-care-survive-status-changes). + +Step 2, "Harvests and blood": + +- **Organ harvests wait for health**, never take the last kidney or lung, and stop at a stock target. [Designed](roadmap.md#organ-harvests-wait-for-health). +- **Blood bank.** Donor slaves get hemogen bills when well enough; sanguophages may feed on donors. Needs Biotech. [Designed](roadmap.md#blood-bank). + +Step 1 fixes gaps every slave colony hits. Step 2 is for colonies that use slaves' bodies and keeps its state in the ledger from Faction deals' first step. + +## Slave implants + +Control collars were the top medical request (Simple Slavery Collars, 52k, no 1.7 build), and vanilla has nothing between suppression and a rebellion fight. All three implants are surgery with vanilla items, no new art, and go dormant once the pawn is free. + +- **Compliance implant.** Suppression falls 30% slower, rebellions start half as often. [Designed](roadmap.md#compliance-implant). +- **Sedation relay.** Puts a rebelling or berserk slave under anesthesia; manual and area triggers. Nothing explodes. [Designed](roadmap.md#sedation-relay). +- **Endurance implant.** Full work speed for slaves at the cost of faster rest loss. [Designed](roadmap.md#endurance-implant). + +One step: they share one hediff class with a status-driven stage and the generalised suppression-fall-rate extension that loyalty and indenture reuse. 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). +- **Health examination and certificate.** A healthy slave is certified for 30 days and sells for 15% more. Ships only with appraisal. [Designed](roadmap.md#health-examination-and-certificate). +- **Honor by quality at the tribute collector.** 1 to 9 honor by the slave's value instead of a flat 3. Needs Royalty. [Designed](roadmap.md#honor-by-quality-at-the-tribute-collector). + +One step, after Slave implants, so appraisal counts implants from the start. + +## Freedom and loyalty + +Vanilla's only way out of slavery is emancipation by hand, and years of good service count for nothing. + +Step 1, "A way out": + +- **Recruit slaves.** A warden 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). + +Step 2, "Loyalty": + +- **Loyalty.** Well-kept slaves grow Broken in, Obedient (never rebels), Loyal, then Devoted, when a letter offers to make them colonists. Adds SlavesApi.Loyalty. [Designed](roadmap.md#loyalty). + +Step 3, "Indentured servitude": + +- **Indentured servitude.** Terms of 15 to 120 days, "joins indentured" when buying, a term-end letter: stay, go home or extend. Adds SlavesApi.TermDaysLeft. [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. +- **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. + +## 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). + +## Storyteller weight + +A slave counts 75% toward wealth, raid points and population, so a large slave workforce brings large raids. + +- **Slave wealth, raid and population weight.** Three sliders, vanilla by default. Slaves Are Worthless (10.2k) does it on 1.7, so this consolidates rather than fills a gap. [Designed](roadmap.md#slave-wealth-raid-and-population-weight). +- Idea: **caravan storyteller wealth**, which still counts slaves at 75%, if players report it. + +## API for the Blax mods + +- **Calls CastesApi** with five join reasons: a returned runaway (wired since 1.2), recruited, indenture served, bought indentured and contract returned (each with its feature). Castes' PrePick and CasteLabels serve the caste picker on the trade row. +- **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). + +## 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. +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. + +Each step is a release of its own and gets its version number when it ships. + +## Left out + +The roadmap's Cut has the reasons. In short: + +- Anything past vanilla Ideology's tone: explosive or shock collars, torture, flogging, lobotomy, brainwash, automated lethal harvests, and Useful Terror's heart acidifier implant. +- Crimes and punishments for slaves: Blax Laws. Its subdue is a capped fistfight that ends a break, not a punishment system. +- Policy defaults for new slaves (outfit, food, drugs, medical care, area): Blax Castes. Slave sleeping zones: Blax Zones. +- 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. +- 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. diff --git a/docs/roadmap.md b/docs/roadmap.md index 928e08c..5d05e5e 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -2,42 +2,53 @@ Blax Slaves replaces a dozen dead or conflicting slavery mods with one mod maintained for RimWorld 1.7. You choose slave or colonist when you buy, sell captives by quality or ransom them home, end the rebellion doom timer, and treat slaves in one hospital with control implants, a blood bank and health certificates, every feature with its own toggle. -Current release: 1.2 is live on Workshop item 3847282171. 1.2.1 (works with any DLC combination) is built and waiting for upload. +Current release: 1.2.1, live on Workshop item 3847282171 since 2026-11-29. + +What the mod covers when it is complete, grouped by area, and the order of the remaining steps: [features.md](features.md). This file holds the spec of every feature: what players get, how it works, settings, tests and risks. Every release works with any DLC combination, core only included: features that need a DLC (most of them need Ideology) switch off cleanly without it, show "Needs " in the settings, and are tested with `-NoDlc` and every combination of the installed DLCs. +Changes on 2026-12-01: + +- Releases are cut by area now, never by size or days. Every unshipped feature sits under its area, and an area with several steps lists them in dependency order. A step gets its version number when it ships; 1.0 to 1.2.1 keep theirs. The Days column, the day totals and the reasons tied to week-sized releases are gone; the per-feature effort marks stay as information. +- Moved by area: lingering terror, suppress the whole room and wardens calm breakdowns join the new warden and terror features in Control. The slave ship on request and abolitionists buy to free form Trade's next step. Organ harvests and the blood bank sit in Slave medicine, the work rules and the colonist bar in Running a slave workforce, prisoners count too in Colony conscience, and the slave weight sliders in Storyteller weight. +- New in the plan, hooks named but not checked against the code: terror covers rebellion risks and the warden suppression threshold (Control), the slave overview and the caste picker on the trade row (both from Backlog). Heart acidifier and terror building values from Useful Terror went to Cut. +- Blax Laws joins "Works with the other Blax mods": SlavesApi gains CalmsBreaks for it, and crimes and punishments of slaves are Laws'. + ## At a glance -| Version | What players get | Mods it replaces | Days | -|---|---|---|---| -| 1.2 | Economy: pick slave or colonist when you buy, every trader buys slaves, price sliders, slavers stay stocked | Trade as Slave or Colonist (111), Time As a Slave (35k), [SYR] More Slaves (14.8k + 22.7k), Everybody Buys Slaves (3.3k), 3 smaller | 5 | -| 1.3 | Rebellion and medicine: suppressed slaves never rebel, work rules, slave-free colonist bar, surgery bills and medical care survive status changes | Slave Rebellions Improved (71k + 11.5k), SlaveBar (24.6k), Capable Slaves (9.8k) and 5 work mods, No Slave Mental Breaks (2.3k), Dead Calm Slave (2.1k) | 5 | -| 1.4 | Economy: ransom captives at the comms console, factions buy back their people, slave ship on request | PrisonerRansom (91k), No Sympathy For Prisoners (16.4k), Prisoner Harvesting (13.1k), Prisoner Exchange (11.1k, partly) | 6 | -| 1.5 | Medicine: one hospital for slaves and colonists, compliance and endurance implants, sedation relay | Simple Slavery Collars (52k, control part), Pawn Suppression Implants (7.8k), BK's Suppression! (1.6k), 4 collar mods | 7 | -| 1.6 | Economy and medicine: slaves sell by quality, health certificates, blood bank, organ harvests that wait for health, honor by quality | Organ Harvest Button (1.1k), Profitable Slave Trade (378), BetterHemogenFarm (273) | 7 | -| 2.0 | Freedom: recruit and convert slaves, wardens calm breakdowns, room suppression, freedom gives a mood boost | Recruit Slaves (26k), Convert Slaves (7.1k) | 6 | -| 2.1 | Freedom: loyalty stages and indentured terms | Indentured Servitude (1.3k), stage ideas from Simple Slavery Collars (52k) and More Slavery Stuff (21.7k) | 7 | -| 2.2 | Economy: faction slave orders, slave wealth and raid weight sliders | Slaves Are Worthless (10.2k), Slaves Aren't People (1.9k), Slave Contract Quest (220) | 4 | -| 2.3 | Economy: hire out slaves to allied factions (optional release) | none (Prison Expanded does it for prisoners only) | 5 | +| 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) | +| Running a slave workforce | Shipped: time as a slave. Next: slave work rules, slaves hidden from the colonist bar, a slave overview | Time As a Slave (35k, shipped), Capable Slaves (9.8k) and 5 work mods, SlaveBar (24.6k) | +| Slave medicine | One hospital for slaves and colonists, surgery bills and medical care that survive status changes, organ harvests that wait for health, a blood bank | Organ Harvest Button (1.1k), BetterHemogenFarm (273) | +| Slave implants | Compliance implant, sedation relay, endurance implant | Simple Slavery Collars (52k, control part), Pawn Suppression Implants (7.8k), BK's Suppression! (1.6k), 4 collar mods | +| Slave value | Slaves sell by quality, health certificates, honor by quality at the tribute collector | Profitable Slave Trade (378) | +| Freedom and loyalty | Recruit and convert slaves, freedom gives a mood boost, loyalty stages, indentured terms | Recruit Slaves (26k), Convert Slaves (7.1k), Indentured Servitude (1.3k), stage ideas from Simple Slavery Collars (52k) and More Slavery Stuff (21.7k) | +| Colony conscience | Shipped: harming slaves doesn't upset colonists. Next: the same for prisoners, a reduce mode, no goodwill loss for surgery on captives | No Sympathy For Prisoners (16.4k), Prisoner Harvesting (13.1k) | +| Storyteller weight | Sliders for how much a slave counts toward wealth, raid points and population | Slaves Are Worthless (10.2k), Slaves Aren't People (1.9k) | -Medical depth lands in 1.3, 1.5 and 1.6. Economic depth lands in 1.2, 1.4, 1.6, 2.2 and 2.3. Effort: S = half a day, M = 2 days, L = 5 days, summed per release and rounded up. Total: 52 working days. +The order of the remaining steps, and why: [features.md](features.md#order). Effort marks in the specs: S = half a day, M = 2 days, L = 5 days. ## Defaults I picked Change if you disagree. -- Captive sale price stays at vanilla 60%. Appraisal (1.6) lifts well-kept slaves by up to 75%, capped below what a slaver would charge you for the same pawn. +- 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. -- Traders whose ideoligion rejects slavery still buy captives, as in vanilla. From 1.6 they "buy to free" at half price instead. +- 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. - Visitor groups buy slaves, like Everybody Buys Slaves. - Unwaveringly loyal pawns stay slave-only when bought from orbital or settlement stock, and their loyalty stops at Loyal. - Implants are surgery-only with vanilla items. The relay uses vanilla anesthesia with manual and area triggers. No explosives, no new art. - Ransom pays 80% of market value. Pirates and other permanent enemies refuse. - Surgery on prisoners of non-hostile factions still costs goodwill, as in vanilla. -## 1.2 Trade on your terms +## 1.2 Trade on your terms (shipped) -The hard requirement: buy-mode replaces Trade as Slave or Colonist, which is in your mod list. Everything here is small and has no dependencies, so 1.2 ships after about a week of work. 5 days. +The hard requirement: buy-mode replaces Trade as Slave or Colonist, which is in your mod list. 1.2.0 went live on 2026-11-29, and 1.2.1 (any DLC combination) the same day. #### Buy as slave or colonist @@ -53,7 +64,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. 1.6 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" and makes it the default. - **Replaces:** Everybody Buys Slaves 2799461327 (3,253 subs, XML, in your mod list). - **Effort:** S. - **Tests:** After startup every non-excluded TraderKindDef has one generator handling Human and none has two of ours; turning the setting off restores the original counts. In refuse mode, TraderWillTrade is false for a colony slave offered to a Slavery Abhorrent faction, true for that faction's own member, true for a factionless TradeShip. In buy-anyway mode it is true everywhere. A -Compat run with Everybody Buys Slaves shows no duplicate. @@ -96,17 +107,136 @@ The hard requirement: buy-mode replaces Trade as Slave or Colonist, which is in - **Settings:** none of its own. - **Replaces:** none. - **Effort:** 2 x S (1 day). -- **Tests:** Smoke: SettingsCategory is set, the replaced-mod table resolves without exceptions, reset restores defaults (Fixtures.SnapshotSettings and RestoreSettings), an old settings file loads into the same values. Without siblings every API delegate is null and calls are no-ops. -Compat run with Blax Castes 1.3 or later: a returned runaway lands in its previous caste. +- **Tests:** Smoke: SettingsCategory is set, the replaced-mod table resolves without exceptions, reset restores defaults (Fixtures.SnapshotSettings and RestoreSettings), an old settings file loads into the same values. Without siblings every API delegate is null and calls are no-ops. -Compat run with Blax Castes' join API (CastesApi version 2): a returned runaway lands in its previous caste. - **Risks:** None beyond wrong packageIds in the table. -## 1.3 No doom timer +## Trade -Both reviewers put the rebellion fix right after 1.2: it is the top complaint (Slave Rebellions Improved, 71k). Work rules and the colonist bar come along because they have no dependencies and fill 1.7 gaps no active mod covers. 5 days. +Who sells slaves to you and who buys them from you. 1.0 to 1.2 shipped the base: common slavers, slaver caravans on request, buy as slave or colonist, every trader buys captives, slave stock that ignores colony size and the price sliders. + +### Sell any time + +A buyer for captives whenever you want one, 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. + +#### 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. +- **How:** No vanilla FactionDef sets canRequestOrbitalTrader, and Orbital_PirateMerchant (label "slave ship") has requestable false. An XML patch sets canRequestOrbitalTrader on the outlander FactionDefs, adds Orbital_PirateMerchant to their orbitalTraderKinds and makes it requestable. Vanilla FactionDialogMaker.RequestOrbitalTraderOption already demands an ally and runs a 900,000-tick cooldown. A postfix on that private method disables the option with a reason when the faction's ideo fails IdeoUtility.IdeoApprovesOfSlavery. +- **Settings:** slaveShipOnRequest (on). +- **Replaces:** none. Answers the "somewhere to sell any time" signal behind Call A Trader (52k) without the cut slave catalogue. +- **Effort:** S. +- **Tests:** An allied outlander faction with a pro-slavery ideo shows the option and the slave ship in the kind list; an anti-slavery one shows it disabled with the reason; a non-allied one shows vanilla's "must be ally". +- **Risks:** Other mods that set canRequestOrbitalTrader on outlanders add their kinds next to ours (harmless). + +#### 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). +- **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. + +#### Caste picker on the trade row + +- **Players get:** With Blax Castes loaded, a small caste button sits next to "Joins as slave / Joins as colonist" on each pawn a trader sells. Pick the caste the pawn joins; without a pick, Castes' join row decides as before. +- **How (new 2026-12-01, not checked against the code):** The buy-mode prefix on TransferableUIUtility.DrawCaptiveTradeInfo draws the button when CastesApi.Version is 3 or higher, the version that adds Castes' PrePick. The button opens a FloatMenu of CastesApi.CasteLabels() and calls CastesApi.PrePick(pawn, casteId), which Castes applies when the purchase resolves. Without Castes, or with an older API, nothing is drawn and nothing is bound. The button shares the colony column the buy-mode button already grows into, so long translations need a layout check. +- **Settings:** castePickerOnTradeRow (on; shown only while Castes is loaded). +- **Replaces:** none. +- **Effort:** S. +- **Tests:** -Compat with Castes: a pre-picked stock pawn bought as a slave lands in the picked caste, not in the new-slave row; without a pick it lands in the row. Without Castes the button isn't drawn and the delegate is null. +- **Risks:** Waits for Castes' PrePick, which isn't built yet. + +## Faction deals + +Deals with factions over the people you hold, at the comms console and by letter. PrisonerRansom (91k) has no 1.7 build: the largest economic opening on 1.7. Every payout arrives as silver by drop pod through one helper, and the purchase ledger keeps pawns you bought out of ransom and orders. + +### Captives pay + +The ledger and the payout helper come first, because every later deal and several medicine and value features reuse them. + +#### Purchase ledger and payouts + +- **Players get:** Nothing visible on its own. It stops buy-and-ransom loops and delivers every silver payout. +- **How:** New GameComponent_BlaxSlaveLedger, the per-pawn store later features reuse (Scribe references, nulls purged on load). A postfix on Tradeable_Pawn.ResolveTrade for PlayerBuys records seller faction, price and tick. This matters because PawnGroupKindWorker_Trader re-factions caravan slaves to the trader's faction and orbital or settlement stock gets a random visible faction, so a bought slave often has a friendly HomeFaction that would pay ransom. GameComponent_BlaxPayments queues silver with a delay. BlaxDelivery.Drop(Map, Thing) asks ZonesApi.TryFindDropSpot and spawns the pod exactly on the returned cell with TradeUtility.SpawnDropPod, one thing per call; DropThingsNear would search a new random cell up to 5 cells away and miss a small zone. Without a zone cell it drops near DropCellFinder.TradeDropSpot with DropPodUtility.DropThingsNear. +- **Settings:** none. +- **Replaces:** none. +- **Effort:** S. +- **Tests:** Buying a stock slave writes a ledger entry with seller faction and price. A queued payment lands after its delay. Without Zones the drop uses TradeDropSpot. With a Zones delivery zone, the pod falls on the returned zone cell. Phase 2: ledger and pending payment survive reload. +- **Risks:** None for players; every payout feature depends on it. + +#### Ransom captives at the comms console + +- **Players get:** Call a faction and offer back their people you hold, prisoners or slaves. They quote a price; your negotiator can push for 25% more at a time at lower odds, and the dialog shows the odds. If they accept, silver arrives by drop pod within hours and the captive walks home. If they refuse, they won't talk ransom for 10 days, and a hostile faction may come to free the captive by force. +- **How:** A postfix on FactionDialogMaker.FactionDialogFor(Pawn, Faction) inserts a DiaOption before Disconnect, found by position, not index. It is disabled with a reason when nobody qualifies or a cooldown runs. + - Candidates: PrisonersOfColony and SlavesOfColonySpawned with HomeFaction == faction, not downed, not in a mental state, and not in the purchase ledger. + - Price: MarketValue x 0.8 x relation (hostile 0.5, neutral 0.8, ally 1.0) x noble factor (1 + MostSeniorTitle seniority / 500; faction leader x3). An average neutral captive brings 1,120 silver, against 630 at a trader. + - Odds: 0.6 + goodwill/200 + negotiator Social x 0.02, minus 0.25 per push, clamped 0.05 to 0.95. Permanent-enemy factions refuse unless the setting allows them; then they start at 0.3. + - Accept: the payout helper delivers the silver after 0.1 to 0.3 days. GenGuest.PrisonerRelease or GenGuest.SlaveRelease frees the captive, so vanilla's walk-home goodwill applies, plus 5. No trade happens, so no SoldSlave event. A 3-day cooldown per faction follows. + - Refuse: 10-day cooldown per faction. A hostile faction has a 25% chance to queue IncidentDefOf.RaidEnemy at DefaultThreatPointsNow x 0.8 in 3 to 7 days through Storyteller.incidentQueue; hostility is checked again when it fires. +- **Settings:** ransomEnabled (on), ransomFactor 80% (20 to 200), pushStep 25%, refuseCooldownDays 10 (3 to 30), acceptCooldownDays 3 (0 to 10), rescueRaidChance 25% (0 to 100), permanentEnemiesMayAccept (off). +- **Replaces:** PrisonerRansom 794038005 (91,415 subs, no 1.7; in your mod list, where it loads its 1.6 DLL with a bundled Harmony 2.3.1.1), Prisoner Exchange 3495102506 (11,100, no 1.7; partly). +- **Effort:** M. +- **Tests:** With captives from a hostile and a neutral faction, the root node holds our option; with none it is disabled. A pawn bought from that faction's trader is not offered. Accept with odds forced to 1: a payment is pending, after 0.3 days map silver rises by the price and the captive is released; a second ransom within 3 days is disabled. Refuse with odds 0: cooldown set, and with raid chance 1 the queue holds RaidEnemy. Phase 2: payment and cooldowns survive reload. +- **Risks:** Ransoming every captured raider pays well; the price factor, odds and both cooldowns bound it. Comms-console overhauls that rebuild the dialog may hide the option. + +#### 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. +- **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. + +### Slave orders + +Orders pay a premium on the appraised price, so they follow Slave value. + +#### Faction slave orders + +- **Players get:** Factions that approve of slavery post orders by letter: "Wanted: 2 slaves with Plants 8+, healthy, 15 to 50 years. Pays 160% of the sale price and +15 goodwill. 20 days." Accept, then sell matching slaves to any trader of that faction or gift them by drop pod. Matching slaves are marked in the trade window; the premium follows by drop pod and the goodwill comes when the order is full. +- **How:** GameComponent_BlaxMarket holds a List (faction, SkillDef, minimum level, optional minimum loyalty stage, count, filled, expiry tick, premium, goodwill). + - Generation: MTB 15 days, at most 2 open orders, only non-hostile factions passing IdeoApprovesOfSlavery. Skill from Plants, Mining, Construction, Cooking, Crafting, Medicine, Melee or Shooting; minimum level 6 to 12 scaled by colony wealth; count 1 to 3; premium 1.4 to 1.8; goodwill 10 to 20. With loyalty on, a third of orders ask for Obedient or better. Offered as a ChoiceLetter. + - Filling, through patches Blax Slaves already has: Frame_SoldSlave on Tradeable_Pawn.ResolveTrade (the player sells a colony slave and trader.Faction == order.faction) and Frame_GiftArrived on TransportersArrivalAction_GiveGift.Arrived. A match (skill, age, health 80% or more, IsSlave, not bought from that same faction per the ledger) adds 1 to filled and queues appraised sell price x (premium - 1) through the payout helper. The premium inherits appraisal's cap. + - The buy-mode DrawCaptiveTradeInfo prefix draws "order +60%" on matching colony slaves; the captive branch keeps vanilla's icon and adds the tag. + - On expiry a letter arrives; an accepted, unfilled order costs 5 goodwill. Orders cancel if the faction turns hostile or is defeated. +- **Settings:** slaveOrders (on), ordersMtbDays 15 (5 to 60), maxOpenOrders 2 (1 to 5), premium 140 to 180%, unfilledPenalty -5 goodwill. +- **Replaces:** Slave Contract Quest 3677019267 (220 subs, no 1.7). +- **Effort:** M. +- **Tests:** A Plants 8, count 1 order for a friendly pro-slavery faction. Selling a matching slave to that faction's trader fills it, and the pending payment is the appraised price x 0.6 at premium 1.6, within the cap. A Plants 3 slave doesn't fill it, nor does a slave bought from that faction. A gift-pod arrival fills it. Past the deadline the expiry letter and penalty apply. Phase 2: open orders survive. +- **Risks:** Small Workshop signal (220 subs), so this is depth, not a draw. Letters instead of generated quests keep it at M. + +### Hire out + +The riskiest feature in the plan, and players barely ask for it. It is the last step and gets built only if players ask once slave orders are out; otherwise it moves to Backlog. + +#### Hire out slaves + +- **Players get:** At the comms console, an allied or neutral pro-slavery faction can hire your slaves. Pick the slaves and a term of 7, 15 or 30 days; they leave and come back at the end with wages of 1.2% of market value per slave per day (about 21 silver a day for an average slave, 315 for 15 days), plus goodwill and skill practice. A poorly suppressed slave may escape, a few come back hurt, and if the faction turns hostile it keeps them. +- **How:** Built on vanilla's borrowed-pawn system instead of a custom holder: a Quest with a QuestPart_LendColonistsToFaction subclass. Vanilla then exempts the pawns from world-pawn garbage collection (IsBorrowedByAnyFaction), counts them for population (TotalBorrowedColonistCount), keeps GameEnder from ending the game while they're away, returns corpses of lent pawns who die, and shows the timer in the quest tab. Lent pawns stay world pawns and keep ageing. The subclass writes the private lentColonists list through FieldRefAccess, overrides Enable to take the chosen slaves, and overrides Complete to pay wages and roll escape and injury. Dialog_BlaxHireOut opens from a second option of the ransom FactionDialogFor postfix: a checklist of secure, healthy adult slaves, a term picker and a wage preview. Slaves leave by shuttle or drop pod; if they walk out, Patch_RunawayExitMap skips borrowed pawns. + - Escape roll per slave: base chance x (1 - suppression at departure) x 0.5 if branded x (1 - loyalty) with loyalty on. Branded escapees go to GameComponent_BlaxRunaways.Register with the hirer's faction; others are lost, with a letter. + - Return: RunawayDelivery's spawn logic (walk-in for tribal and medieval factions, drop pod for industrial and up), still IsSlaveOfColony. CastesApi.NotifyJoined(pawn, "blax.slaves.contractReturned") one tick after each return. Wages through the payout helper. SkillRecord.Learn grants 300 XP per day in the best enabled skill. +1 goodwill per slave per 5 days. An injury roll adds a random vanilla injury. A hirer hostile by then keeps them, with a letter. +- **Settings:** laborContracts (on), wagePerDay 1.2% of market value (0.5 to 3), baseEscapeChance 10% (0 to 30), injuryChance 5% (0 to 20), deathChance 0% (0 to 5), terms 7/15/30 days, hirerMustApproveSlavery (on). +- **Replaces:** none. Prison Expanded 3827258534 (3,298 subs) has labor contracts for prisoners only. +- **Effort:** L. +- **Tests:** Contract 2 slaves for 7 days to a friendly faction with escape chance 0: they leave, IsBorrowedByAnyFaction is true, they survive world-pawn GC, they aren't in the runaway registry, and the quest tab shows the timer. After 7 days they are back as IsSlaveOfColony, silver rose by 2 x 7 x 1.2% x market value, their best skill gained XP, and with Castes loaded each produced one NotifyJoined. Escape chance 1 plus a brand puts them in the runaway registry. A faction hostile at term end triggers the kept letter. Phase 2: an active contract survives reload mid-term. +- **Risks:** The map can close while slaves walk out (abort and keep them). Castes policies stay untouched while away. Balance: 15 days of wages is about half a sale, tunable. + +## Control + +Keeping slaves: suppression, rebellion and escape. Branding, branded trader slaves and returned runaways shipped in 1.0. + +### No doom timer + +Both reviewers put the rebellion fix first after 1.2: it is the top complaint (Slave Rebellions Improved, 71k). Its MTB postfix and SlavesApi.IsSafe are what Slave implants, the terror features and Blax Laws build on. #### 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 1.5 implant factors go into this same postfix. A postfix on GetSlaveRebellionMtbCalculationExplanation adds a "Blax Slaves" line, since vanilla returns "" for non-participants. Alert_SlaveRebellionLikely goes quiet on its own. Numbers: a Social 10 warden keeps a slave cycling between about 65% and 90%, so only unattended slaves drop under 50%. SlavesApi.IsSafe(Pawn) ships here. +- **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). - **Replaces:** Slave Rebellions Improved (Continued) 3259932217 (71,014 subs), Slave Rebellions Improved 2601801303 (11,458). - **Effort:** S. @@ -141,7 +271,11 @@ Both reviewers put the rebellion fix right after 1.2: it is the top complaint (S - **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. 2.0's "wardens calm breakdowns" is the gentler fix. +- **Risks:** It removes a vanilla pressure valve, so it is off by default. "Wardens calm breakdowns" is the gentler fix. + +### Wardens and terror + +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 @@ -153,10 +287,54 @@ Both reviewers put the rebellion fix right after 1.2: it is the top complaint (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. + +#### 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. +- **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%. +- **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). +- **Replaces:** none. +- **Effort:** S. +- **Tests:** Three slaves at 0.4 in one room, suppress one: the other two rise by about 0.7x its gain and are no longer scheduled. A slave in the next room is unchanged. Share 0 does nothing. +- **Risks:** Wardens never suppress sleeping slaves, so it fires mostly at meals and in shared workrooms; expect a modest effect. Each bystander shows its own text mote. + +#### Wardens calm breakdowns + +- **Players get:** A warden walks over to a slave in a non-violent mental break and talks them out of it, at a 10% suppression cost, instead of watching a day-long tantrum. +- **How:** A WorkGiver_Warden subclass for colony slaves in a mental state that is neither IsAggro nor the Rebellion state. It needs its own precheck, because ShouldTakeCareOfSlave requires SlaveIsSecure, which is false during a mental state. JobDriver: go to touch, 180-tick talk, MentalState.RecoverFromState, then suppression drops by the setting. +- **Settings:** wardensCalmBreaks (on), calmSuppressionCost 10% (0 to 30). +- **Replaces:** none. Asked for by the opening post of the 1,785-upvote "Slavery Is Useless" thread. +- **Effort:** M (estimated S to M; I took the higher). +- **Tests:** A slave in a sad-wander break gets a warden with the calm job; afterwards the break is over and suppression is 10% lower. A berserk slave and a rebelling slave get no job. +- **Risks:** Modded mental states that block recovery stay as they are. + +## Running a slave workforce + +The daily view of a big slave colony: what slaves may do, how fast, and where you see them. Time as a slave shipped in 1.2. The work rules and the colonist bar fill 1.7 gaps no active mod covers. + #### Slave work rules - **Players get:** Choose which banned jobs slaves may do (warden, hunting, art, research and any modded type) and their work speed, flat or scaled by suppression. Slave wardens never suppress other slaves. -- **How:** The settings list every WorkTypeDef with disabledForSlaves true at load and record the originals. Allowing one sets disabledForSlaves false, which GuestUtility.GetDisabledWorkTypes reads live, then calls Notify_DisabledWorkTypesChanged on all colony slaves to clear the cache. Flat speed sets the private factor of the StatPart_Slave on WorkSpeedGlobal (Core XML 0.85, its only use) through FieldRefAccess. The suppression option sets that factor to 1.0 and adds a StatPart that runs from 70% at 0% suppression to 100% at full suppression; 2.1 can drive it by loyalty. A postfix on the protected WorkGiver_Warden.ShouldTakeCareOfSlave returns false when the warden is a slave, which also blocks self-suppression loops. +- **How:** The settings list every WorkTypeDef with disabledForSlaves true at load and record the originals. Allowing one sets disabledForSlaves false, which GuestUtility.GetDisabledWorkTypes reads live, then calls Notify_DisabledWorkTypesChanged on all colony slaves to clear the cache. Flat speed sets the private factor of the StatPart_Slave on WorkSpeedGlobal (Core XML 0.85, its only use) through FieldRefAccess. The suppression option sets that factor to 1.0 and adds a StatPart that runs from 70% at 0% suppression to 100% at full suppression; Loyalty can drive it later. A postfix on the protected WorkGiver_Warden.ShouldTakeCareOfSlave returns false when the warden is a slave, which also blocks self-suppression loops. - **Settings:** Per work type "slaves may do" (all off = vanilla). slaveWorkSpeed 85% (50 to 100). speedFollowsSuppression (off), 70% to 100%. - **Replaces:** Capable Slaves 2870120550 (9,842 subs, no 1.7), Capable Slaves plus Warden 2986875064 (1,381), Art n Smart Slaves 2605727464 (2,643), 100% Slave Work Speed 3106598768 (1,966), Slaves Work at Full Speed 3679470056 (388), Slaves Can Research 3743623338 (193). - **Effort:** 2 x S (1 day). @@ -173,81 +351,21 @@ Both reviewers put the rebellion fix right after 1.2: it is the top complaint (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. - **Risks:** Colony Groups and other bar replacements bypass it; the Compat tab says so. -#### Surgery bills and medical care survive status changes +#### Slave overview -- **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. -- **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. -- **Risks:** Low. Mods that expect bills to clear can turn it off. - -## 1.4 Captives pay - -PrisonerRansom (91k) has no 1.7 build: the largest economic opening on 1.7, so both reviewers moved this ahead of pricing. It also brings the purchase ledger and payout helper later features reuse. 6 days. - -#### Purchase ledger and payouts - -- **Players get:** Nothing visible on its own. It stops buy-and-ransom loops and delivers every silver payout from 1.4 on. -- **How:** New GameComponent_BlaxSlaveLedger, the per-pawn store later features reuse (Scribe references, nulls purged on load). A postfix on Tradeable_Pawn.ResolveTrade for PlayerBuys records seller faction, price and tick. This matters because PawnGroupKindWorker_Trader re-factions caravan slaves to the trader's faction and orbital or settlement stock gets a random visible faction, so a bought slave often has a friendly HomeFaction that would pay ransom. GameComponent_BlaxPayments queues silver with a delay. BlaxDelivery.Drop(Map, Thing) asks ZonesApi.TryFindDropSpot and spawns the pod exactly on the returned cell with TradeUtility.SpawnDropPod, one thing per call; DropThingsNear would search a new random cell up to 5 cells away and miss a small zone. Without a zone cell it drops near DropCellFinder.TradeDropSpot with DropPodUtility.DropThingsNear. -- **Settings:** none. -- **Replaces:** none. -- **Effort:** S. -- **Tests:** Buying a stock slave writes a ledger entry with seller faction and price. A queued payment lands after its delay. Without Zones the drop uses TradeDropSpot. With a Zones delivery zone, the pod falls on the returned zone cell. Phase 2: ledger and pending payment survive reload. -- **Risks:** None for players; every payout feature depends on it. - -#### 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. -- **How:** No vanilla FactionDef sets canRequestOrbitalTrader, and Orbital_PirateMerchant (label "slave ship") has requestable false. An XML patch sets canRequestOrbitalTrader on the outlander FactionDefs, adds Orbital_PirateMerchant to their orbitalTraderKinds and makes it requestable. Vanilla FactionDialogMaker.RequestOrbitalTraderOption already demands an ally and runs a 900,000-tick cooldown. A postfix on that private method disables the option with a reason when the faction's ideo fails IdeoUtility.IdeoApprovesOfSlavery. -- **Settings:** slaveShipOnRequest (on). -- **Replaces:** none. Answers the "somewhere to sell any time" signal behind Call A Trader (52k) without the cut slave catalogue. -- **Effort:** S. -- **Tests:** An allied outlander faction with a pro-slavery ideo shows the option and the slave ship in the kind list; an anti-slavery one shows it disabled with the reason; a non-allied one shows vanilla's "must be ally". -- **Risks:** Other mods that set canRequestOrbitalTrader on outlanders add their kinds next to ours (harmless). - -#### Ransom captives at the comms console - -- **Players get:** Call a faction and offer back their people you hold, prisoners or slaves. They quote a price; your negotiator can push for 25% more at a time at lower odds, and the dialog shows the odds. If they accept, silver arrives by drop pod within hours and the captive walks home. If they refuse, they won't talk ransom for 10 days, and a hostile faction may come to free the captive by force. -- **How:** A postfix on FactionDialogMaker.FactionDialogFor(Pawn, Faction) inserts a DiaOption before Disconnect, found by position, not index. It is disabled with a reason when nobody qualifies or a cooldown runs. - - Candidates: PrisonersOfColony and SlavesOfColonySpawned with HomeFaction == faction, not downed, not in a mental state, and not in the purchase ledger. - - Price: MarketValue x 0.8 x relation (hostile 0.5, neutral 0.8, ally 1.0) x noble factor (1 + MostSeniorTitle seniority / 500; faction leader x3). An average neutral captive brings 1,120 silver, against 630 at a trader. - - Odds: 0.6 + goodwill/200 + negotiator Social x 0.02, minus 0.25 per push, clamped 0.05 to 0.95. Permanent-enemy factions refuse unless the setting allows them; then they start at 0.3. - - Accept: the payout helper delivers the silver after 0.1 to 0.3 days. GenGuest.PrisonerRelease or GenGuest.SlaveRelease frees the captive, so vanilla's walk-home goodwill applies, plus 5. No trade happens, so no SoldSlave event. A 3-day cooldown per faction follows. - - Refuse: 10-day cooldown per faction. A hostile faction has a 25% chance to queue IncidentDefOf.RaidEnemy at DefaultThreatPointsNow x 0.8 in 3 to 7 days through Storyteller.incidentQueue; hostility is checked again when it fires. -- **Settings:** ransomEnabled (on), ransomFactor 80% (20 to 200), pushStep 25%, refuseCooldownDays 10 (3 to 30), acceptCooldownDays 3 (0 to 10), rescueRaidChance 25% (0 to 100), permanentEnemiesMayAccept (off). -- **Replaces:** PrisonerRansom 794038005 (91,415 subs, no 1.7; in your mod list, where it loads its 1.6 DLL with a bundled Harmony 2.3.1.1), Prisoner Exchange 3495102506 (11,100, no 1.7; partly). +- **Players get:** A "Slaves" main tab, text label only, with one row per colony slave: suppression, days until a possible rebellion ("Never" when safe), time as a slave and interaction mode. Columns appear as later features ship: appraised value (Slave value), loyalty and term (Freedom and loyalty), blood donor (Slave medicine). Sort by any column, click a name to jump to the slave. It is where slaves stay visible once they are hidden from the colonist bar. +- **How (new 2026-12-01, not checked against the code):** A MainButtonDef opening a MainTabWindow_PawnTable over a PawnTableDef whose columns are PawnColumnWorker subclasses. They read SlaveRebellionUtility.InitiateSlaveRebellionMtbDays, the time-as-slave component and the ledger. The button's worker hides it while the colony has no slaves and without Ideology. No icon art: vanilla shows the label. Check that no def of the table enters a save, so adding or removing the mod stays clean. +- **Settings:** slaveOverviewTab (on). +- **Replaces:** none directly. SlaveBar 3019111152 (24,529 subs, last built for 1.5) shows that players want slaves out of the colonist bar; this gives them a place to look instead. - **Effort:** M. -- **Tests:** With captives from a hostile and a neutral faction, the root node holds our option; with none it is disabled. A pawn bought from that faction's trader is not offered. Accept with odds forced to 1: a payment is pending, after 0.3 days map silver rises by the price and the captive is released; a second ransom within 3 days is disabled. Refuse with odds 0: cooldown set, and with raid chance 1 the queue holds RaidEnemy. Phase 2: payment and cooldowns survive reload. -- **Risks:** Ransoming every captured raider pays well; the price factor, odds and both cooldowns bound it. Comms-console overhauls that rebuild the dialog may hide the option. +- **Tests:** With two slaves and a colonist the table lists exactly the two slaves. The rebellion column shows "Never" for a safe slave and a number for an unsafe one. Columns of switched-off or unbuilt features are absent. Without Ideology, or with no slaves, the button is hidden. +- **Risks:** One more main tab; it only shows while you hold slaves. -#### Factions buy back their people +## Slave medicine -- **Players get:** Now and then a non-hostile faction with members among your captives writes in: "The Iron Ring offers 1,620 silver for Jana's freedom." Accept within 2 days for silver by drop pod and goodwill, and the pawn walks home. Nobles and leaders draw bigger offers. -- **How:** A GameComponent check every 2,500 ticks. Each eligible faction (non-hostile, humanlike, with a healthy member as your captive on a player map who is not in the purchase ledger) rolls Rand.MTBEventOccurs with a 20-day MTB. Price: the ransom base x Rand.Range(1.0, 1.5), no odds roll, as a reward for patience. Offers come as a ChoiceLetter with a 120,000-tick timeout (LetterWithTimeout.StartTimeout). Accepting reuses the ransom payout and release, plus 8 goodwill; declining or timing out changes nothing. One offer open at a time, at least 5 days apart. Pawns targeted by a pending rescue raid are skipped. -- **Settings:** buybackOffers (on), buybackMtbDays 20 (5 to 60), offer range 100 to 150% of the ransom price. -- **Replaces:** none directly. The resocialization-offer idea of Prison Labor 1899474310 (174,969 subs), for slaves; vanilla only has the reverse (IncidentWorker_RansomDemand). -- **Effort:** S. -- **Tests:** Force the MTB for a friendly faction's slave: our letter appears with a price in range. A slave bought from that faction's trader never draws an offer. Accepting queues a payment and releases the pawn. The letter expires after 120,000 ticks. A hostile faction never sends one. Phase 2: an open offer survives reload. -- **Risks:** Letter spam with many factions is held back by the one-offer limit and the gap. +Medical depth was your ask. Slaves get the hospital, the operations and the medical care colonists have, and colonies that use slaves' bodies get rules that keep the slave alive. -#### Prisoners count too - -- **Players get:** Optionally, the "harming slaves doesn't upset colonists" rule also covers prisoners, and it can reduce the mood hit instead of removing it. Factions can optionally stop losing goodwill over surgery on captives you hold. -- **How:** - - (a) Widen the victim predicate in the SlaveHarm frames to IsPrisonerOfColony, keeping the pacifist and family exceptions. It stands down while No Sympathy For Prisoners (sk.noprisonersympathy) is active, so two vetoes don't stack and undercut the pacifist rule. - - (b) Reduce mode: Patch_SlaveHarmGate scales Thought_Memory.moodPowerFactor and, for Thought_MemorySocial, opinionOffset by the same factor before letting the thought through. moodPowerFactor alone leaves opinion penalties (-5 to -20) at full strength. - - (c) A prefix on the protected RecipeWorker.ReportViolation skips it when the patient is a colony prisoner without questTags, for every worker except Recipe_ExecuteByCut, which keeps vanilla's -100. ReportViolation is the single funnel for surgery, hemogen, implants and execution, so the execution exclusion is explicit. Colony slaves never trigger it in vanilla. -- **Settings:** prisonersCountAsSlaves (off), harmMoodReduction 100% (0 to 100; 100 = full removal as today), captiveSurgeryNoGoodwillLoss (off; tooltip: execution still costs goodwill). -- **Replaces:** No Sympathy For Prisoners 3533769253 (16,399 subs, in your mod list), Prisoner Harvesting 3347850851 (13,090). -- **Effort:** M. -- **Tests:** Executing a prisoner with (a) on gives a non-pacifist colonist no new bad memories (Fixtures.NewBadMemories); a pacifist still minds. At 50% a mood memory and an opinion thought are both halved. Harvesting a neutral faction prisoner's kidney leaves goodwill unchanged with (c) on and drops it by 70 with it off. Executing that prisoner by cut still drops goodwill with (c) on. -Compat with NSFP: (a) stands down. -- **Risks:** (c) changes vanilla balance, so it is off by default. The broader gate needs more frame coverage in tests. - -## 1.5 Slave medicine - -Medical depth was your ask, and control implants are the strongest medical demand on the Workshop (Simple Slavery Collars 52k with no 1.7 build, Pawn Suppression Implants 7.8k). The implants need only the 1.3 MTB postfix. 7 days. +### One hospital #### Shared infirmary and slave-surgeon rule @@ -259,10 +377,48 @@ Medical depth was your ask, and control implants are the strongest medical deman - **Tests:** An injured colony slave with only a colonist medical bed: FindBedFor and FindPatientBedFor return it with the setting on and null with it off. The slave walks there and lies in it for 2,500 ticks without the job failing. A free slave medical bed wins. A non-medical colonist bed stays invalid. A colonist asleep in a medical bed next to a sleeping slave for 2,500 ticks gets no SleptInRoomWithSlave; in a normal bed the thought still comes. PawnAllowedToStartAnew(slave doctor) on a colonist's bill is true by default and false with the rule on. - **Risks:** In a mass-casualty raid a slave can take the last colonist medical bed; colonists then fall back to normal beds, as vanilla does when beds run out. Colonies with only slave doctors get stuck with the surgeon rule on, so it is off. A Blax Zones sleeping zone switched to medical holds colonist medical beds, so slaves may use it too. Zones' own filters still decide, because its CanUseBedNow postfix runs after ours. Priority Treatment also postfixes PawnAllowedToStartAnew (harmless). +#### 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. +- **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. +- **Risks:** Low. Mods that expect bills to clear can turn it off. + +### Harvests and blood + +For colonies that use slaves' bodies. Both keep their state in the ledger from Captives pay. + +#### Organ harvests wait for health + +- **Players get:** Harvest bills you queue on slaves and prisoners wait until the patient is healthy. They never take the last kidney or lung, and they wait while you already store enough of that organ. +- **How:** When the setting is on, a postfix on BillStack.AddBill flags new RemoveBodyPart bills in the ledger, and the bill label shows "(waits for health)". A postfix on Bill_Medical.ShouldDoNow returns false for a flagged bill while the patient fails the gate (summaryHealth >= threshold, no HasHediffsNeedingTend, no BloodLoss) or while stored organs of that def reach the stock target. The count uses map.listerThings.ThingsOfDef in storage, because ResourceCounter returns 0 for organs (they are Uncounted). A CompletableEver guard refuses the last natural kidney or lung (GetNotMissingParts, not HasDirectlyAddedPartFor). Thoughts use vanilla MyOrganHarvested and the existing harm gate. The player still queues every harvest; nothing is queued automatically. +- **Settings:** harvestWaitsForHealth (on), healthThreshold 85% (50 to 100), stock target per organ (kidney 2, lung 2; 0 = no limit, max 10). +- **Replaces:** Organ Harvest Button 3342852552 (1,127 subs, stale), Quick Ops 3844998950 (25, partly), Repeat Organ Harvest 3819036722 (3). +- **Effort:** S. +- **Tests:** A flagged kidney bill on a slave at 60% health: ShouldDoNow false; at 90% true. With 2 stored kidneys, false. A slave with one natural kidney: CompletableEver false. Phase 2: the flag survives reload. +- **Risks:** Prisoners of non-hostile factions still cost vanilla's -70 goodwill unless the captive-surgery setting of Prisoners count too is on. Demand is small; the value is the health gate. + +#### Blood bank + +- **Players get:** With Biotech, colony slaves get a "blood donor" toggle. Donors get a hemogen extraction bill whenever they're well enough, like vanilla's prisoner hemogen farm, which slaves never had. Optionally your sanguophages may feed on donor slaves when no hemogen pack is in reach. +- **How:** The ledger keeps the donor set. Every 15,000 ticks, the cadence of vanilla's prisoner-only HemogenFarm check in Pawn_GuestTracker, each donor who IsSlaveOfColony and passes SanguophageUtility.CanSafelyBeQueuedForHemogenExtraction (which already rejects a duplicate bill and BloodLoss) gets HealthCardUtility.CreateSurgeryBill(pawn, RecipeDefOf.ExtractHemogenPack, null, null, sendMessages: false). The toggle is a Command_Toggle from a Pawn.GetGizmos postfix with the vanilla HemogenPack icon, and it applies to every selected slave. Bloodfeeding: vanilla JobGiver_GetHemogen only feeds on prisoners, so a postfix on its TryGiveJob steps in when a bloodfeeder got null: it picks the nearest reachable donor slave without BloodLoss and gives JobDef BlaxSlaves_FeedOnDonor (go to touch, wait 120 ticks, SanguophageUtility.DoBite with vanilla's prisoner amounts). Colonists' thoughts pass the existing harm gate. Slaves has no "new slaves donate" default; per-pawn defaults belong to Castes. +- **Settings:** bloodBank (on, Biotech only), checkIntervalHours 6 (1 to 24), bloodfeedOnDonors (on). +- **Replaces:** BetterHemogenFarm 2967718207 (273 subs, 1.4), and the slave half of Prison Labor 1899474310's hemogen mode and Custom Prisoner Interactions 2841231775's auto hemogen (both prisoner-only). +- **Effort:** M. +- **Tests:** Skipped without Biotech. After Fixtures.Tick(15000) a donor slave's BillStack holds ExtractHemogenPack; a non-donor and a donor with BloodLoss get none. A bloodfeeder colonist with low hemogen and no packs on the map gets BlaxSlaves_FeedOnDonor; with the setting off, null. Phase 2: the donor set survives. +- **Risks:** Biotech-only: job and recipe references use MayRequire. Hemogen income per slave matches vanilla's prisoner farm. Doctors' workload rises with many donors. The bite path is rare, since the bank fills the fridge with packs. + +## Slave implants + +Control implants are the strongest medical demand on the Workshop (Simple Slavery Collars 52k with no 1.7 build, Pawn Suppression Implants 7.8k). The three implants share one hediff class with a status-driven stage and need only the MTB postfix of No doom timer. + #### 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 in 1.3; it ships here with its first new user, so a real feature tests it.) The 1.3 MTB postfix doubles a positive MTB for implanted slaves. Install: a Recipe_InstallImplant subclass offered only for IsSlaveOfColony, research MicroelectronicsBasics, can fail like any vanilla implant. Removal: vanilla Recipe_RemoveImplant with removesHediff and spawnThingOnRemoved ComponentIndustrial; set priceImpact on purpose, since spawnThingOnRemoved raises market value. Mood: a slave-only ThoughtWorker, because the stock ThoughtWorker_Hediff maps hediff stages straight onto thought stages. +- **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. - **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. @@ -283,21 +439,21 @@ Medical depth was your ask, and control implants are the strongest medical deman - **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. -- **Risks:** A slave sedated next to a fire or in deep water takes vanilla risks (accepted). Pawns immune to downing are not stopped. With safe suppression in place it fires rarely, so it is depth rather than a draw. Reviewers split on timing; it ships after the compliance implant and is the first feature to slip if 1.5 runs long. +- **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 - **Players get:** "Endurance implant" for colony slaves (Medicine 6, Bionics research, 2 components and 1 industrial medicine). Work speed rises x1.15, which cancels vanilla's slave factor of x0.85. In exchange rest falls 20% faster and the slave takes a -3 mood. It goes dormant once the pawn is free. -- **How:** HediffDef with the shared Severity-driven Hediff_SlaveImplant stage. The active stage has statFactors WorkSpeedGlobal 1.15 and RestFallRateFactor 1.2, which the normal StatWorker applies with no patch. Recipe like the compliance implant's, research Bionics. It is the in-game route to full-speed slaves; the 1.3 work-speed slider stays for players who want it globally. +- **How:** HediffDef with the shared Severity-driven Hediff_SlaveImplant stage. The active stage has statFactors WorkSpeedGlobal 1.15 and RestFallRateFactor 1.2, which the normal StatWorker applies with no patch. Recipe like the compliance implant's, research Bionics. It is the in-game route to full-speed slaves; the work-speed slider of the work rules stays for players who want it globally. - **Settings:** enduranceImplant (on), workSpeedFactor 115% (100 to 130), restFallFactor 120% (100 to 150). - **Replaces:** 100% Slave Work Speed (1,966 subs; partly), Slaves Work at Full Speed (388; partly). - **Effort:** S. - **Tests:** An implanted slave's WorkSpeedGlobal is x1.15 and RestFallRateFactor x1.2 against an identical slave. A free colonist with the implant shows no change. - **Risks:** Stacks with work drugs, bionics and the work-speed slider like any implant; both factors are sliders. -## 1.6 A slave is worth what it is +## Slave value -Pricing comes after medicine, so appraisal counts implants from day one. The health certificate ships only with appraisal, which gives it a purpose. 7 days. +Pricing comes after the implants, so appraisal counts them from the start. The health certificate ships only with appraisal, which gives it a purpose. #### Slave appraisal @@ -311,7 +467,7 @@ Pricing comes after medicine, so appraisal counts implants from day one. The hea - Recent rebel: x0.75 within 30 days. A postfix on StartSlaveRebellion (out overload) records participants in the ledger. - Buyer ideology, from the Slavery precept of the trader faction's primary ideo: Honorable x1.20, Acceptable and Classic x1.00, Disapproved x0.85, Horrible x0.75, Abhorrent x0.65 (only reachable with "buy anyway"). Factionless orbital traders x1.00. - The 1.2 cap then applies: the sell price never exceeds 0.9 x what this negotiator would pay for the same pawn as a slave. Without it, a Social 20 negotiator buys a slave at 0.57 x market value and sells it branded and suppressed to an Honorable faction at 0.68, a profit on every slave at default sliders (vanilla loses: 0.475 against 0.57). The tooltip shows the cap line when it binds. A postfix on Tradeable.GetPriceTooltip adds one line per factor. New StatDef BlaxSlaves_AppraisedValue (category BasicsPawn, StatWorker_SlaveAppraisal, shown for colony slaves and prisoners) equals MarketValue x 0.6 x slaveSellFactor x grade for a neutral buyer. Its explanation also lists the summed trader sell price of the pawn's spare kidney and lung, so "harvest or sell" is visible. MarketValue itself is untouched, so wealth and raid points don't move. 2.1 adds Loyal x1.15. Example: an average adult (MV 1,750) sells for 630 in vanilla; at 80% suppression, your brand and Plants 14 the factor is x1.38 = 869, and to an Honorable faction x1.66 = 1,043 with an average negotiator. + 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). - **Replaces:** Profitable Slave Trade 3492615816 (378 subs, partly). - **Effort:** M, plus S for the organ line (2.5 days). @@ -328,26 +484,6 @@ Pricing comes after medicine, so appraisal counts implants from day one. The hea - **Tests:** A healthy slave gets the certificate. A slave missing a kidney gets none and a message; one missing a finger passes. Adding flu to a certified slave stops the bonus at sale at once, and the certificate is gone after the next rare tick. The bill isn't offered while certified or within a day of a fail. Phase 2: the certificate survives reload and expires on time. - **Risks:** Low. Other mods' chronic hediffs block certificates (intended). Nobody asked for it directly, so it ships only as part of appraisal. -#### Organ harvests wait for health - -- **Players get:** Harvest bills you queue on slaves and prisoners wait until the patient is healthy. They never take the last kidney or lung, and they wait while you already store enough of that organ. -- **How:** When the setting is on, a postfix on BillStack.AddBill flags new RemoveBodyPart bills in the ledger, and the bill label shows "(waits for health)". A postfix on Bill_Medical.ShouldDoNow returns false for a flagged bill while the patient fails the gate (summaryHealth >= threshold, no HasHediffsNeedingTend, no BloodLoss) or while stored organs of that def reach the stock target. The count uses map.listerThings.ThingsOfDef in storage, because ResourceCounter returns 0 for organs (they are Uncounted). A CompletableEver guard refuses the last natural kidney or lung (GetNotMissingParts, not HasDirectlyAddedPartFor). Thoughts use vanilla MyOrganHarvested and the existing harm gate. The player still queues every harvest; nothing is queued automatically. -- **Settings:** harvestWaitsForHealth (on), healthThreshold 85% (50 to 100), stock target per organ (kidney 2, lung 2; 0 = no limit, max 10). -- **Replaces:** Organ Harvest Button 3342852552 (1,127 subs, stale), Quick Ops 3844998950 (25, partly), Repeat Organ Harvest 3819036722 (3). -- **Effort:** S. -- **Tests:** A flagged kidney bill on a slave at 60% health: ShouldDoNow false; at 90% true. With 2 stored kidneys, false. A slave with one natural kidney: CompletableEver false. Phase 2: the flag survives reload. -- **Risks:** Prisoners of non-hostile factions still cost vanilla's -70 goodwill unless 1.4's captive-surgery setting is on. Demand is small; the value is the health gate. - -#### Blood bank - -- **Players get:** With Biotech, colony slaves get a "blood donor" toggle. Donors get a hemogen extraction bill whenever they're well enough, like vanilla's prisoner hemogen farm, which slaves never had. Optionally your sanguophages may feed on donor slaves when no hemogen pack is in reach. -- **How:** The ledger keeps the donor set. Every 15,000 ticks, the cadence of vanilla's prisoner-only HemogenFarm check in Pawn_GuestTracker, each donor who IsSlaveOfColony and passes SanguophageUtility.CanSafelyBeQueuedForHemogenExtraction (which already rejects a duplicate bill and BloodLoss) gets HealthCardUtility.CreateSurgeryBill(pawn, RecipeDefOf.ExtractHemogenPack, null, null, sendMessages: false). The toggle is a Command_Toggle from a Pawn.GetGizmos postfix with the vanilla HemogenPack icon, and it applies to every selected slave. Bloodfeeding: vanilla JobGiver_GetHemogen only feeds on prisoners, so a postfix on its TryGiveJob steps in when a bloodfeeder got null: it picks the nearest reachable donor slave without BloodLoss and gives JobDef BlaxSlaves_FeedOnDonor (go to touch, wait 120 ticks, SanguophageUtility.DoBite with vanilla's prisoner amounts). Colonists' thoughts pass the existing harm gate. Slaves has no "new slaves donate" default; per-pawn defaults belong to Castes. -- **Settings:** bloodBank (on, Biotech only), checkIntervalHours 6 (1 to 24), bloodfeedOnDonors (on). -- **Replaces:** BetterHemogenFarm 2967718207 (273 subs, 1.4), and the slave half of Prison Labor 1899474310's hemogen mode and Custom Prisoner Interactions 2841231775's auto hemogen (both prisoner-only). -- **Effort:** M. -- **Tests:** Skipped without Biotech. After Fixtures.Tick(15000) a donor slave's BillStack holds ExtractHemogenPack; a non-donor and a donor with BloodLoss get none. A bloodfeeder colonist with low hemogen and no packs on the map gets BlaxSlaves_FeedOnDonor; with the setting off, null. Phase 2: the donor set survives. -- **Risks:** Biotech-only: job and recipe references use MayRequire. Hemogen income per slave matches vanilla's prisoner farm. Doctors' workload rises with many donors. The bite path is rare, since the bank fills the fridge with packs. - #### Honor by quality at the tribute collector - **Players get:** The Empire's tribute collector pays honor by quality instead of a flat 3. A sickly, cheap slave brings 1, an average adult 3, and a healthy, skilled slave with bionics up to 9. @@ -358,24 +494,18 @@ Pricing comes after medicine, so appraisal counts implants from day one. The hea - **Tests:** A crippled pawn gives 1, an average adult 3, a pawn worth over 5,250 gives 9. Animals and gold are unchanged. With the setting off every pawn gives 3; with Royalty inactive nothing changes. - **Risks:** Honor per silver stays about constant, which weakens the vanilla cheapest-slave honor farm. Hediff offsets such as WCE2's brand still add before our factor. -#### Abolitionists buy to free +## Freedom and loyalty -- **Players get:** A third choice for traders whose ideoligion rejects slavery: they buy your slaves at half price to set them free. Nobody in the colony minds the sale, even an Abhorrent negotiator can make it, and the trader's faction gains goodwill. It becomes the default for anti-slavery traders. -- **How:** Adds "buy to free" to antiSlaveryTraders (1.2) and makes it the default. Postfixes on GuestUtility.IsSellingToSlavery and TransferableUIUtility.TradeIsPlayerSellingToSlavery return false when the trader's faction is an abolitionist in this mode. That removes the SoldSlave event, the precept thoughts and the negotiator block in one place. (The design's plan to drop the event in Frame_HistoryEvent doesn't work: that frame never drops events.) Patch_SlavePrices multiplies the sell price by abolitionistPriceFactor and skips appraisal's buyer-ideology factor. Pawn_TraderTracker.AddPawnToStock would turn the freed pawn into a Slave-kind ware, so a ResolveTrade postfix takes it out of the trader's stock and makes it a free world pawn of its home faction, or of the trader's faction. The gift-pod path uses the same predicate. Goodwill: +price/40, capped at +10 per trade, through Faction.TryAffectGoodwillWith. -- **Settings:** antiSlaveryTraders gains "buy to free" (new default). abolitionistPriceFactor 50% (20 to 100). -- **Replaces:** none. Answers a 159-upvote counter-idea. -- **Effort:** S. -- **Tests:** Selling a colony slave to an anti-slavery trader in this mode: price x0.5 against the slider price, IsSellingToSlavery false, no SoldSlave event, goodwill up by about price/40, and afterwards the pawn is a free world pawn, not trader stock. An Abhorrent negotiator may sell. -- **Risks:** Goodwill farming is bounded by the price cut and the cap. Players who never changed the setting move from "buy anyway" to "buy to free" on update; the patch notes say so. Vanilla's MemberSold reaction from the pawn's other faction still applies. +Recruiting is the strongest "path to freedom" signal (Recruit Slaves, 26k). The way out comes first, loyalty grows out of it, and indenture reads loyalty. -## 2.0 Wardens and a way out +### A way out -Recruiting is the strongest "path to freedom" signal (Recruit Slaves, 26k). It runs on its own persuasion counter, so it doesn't wait for loyalty. One reviewer wanted recruit next to the work rules in 1.3; I kept it here, the other reviewer's slot, so 1.3 stays at 5 days. 6 days. +Recruit 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 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. 2.1 turns this counter into loyalty and adds passive gain. (The design's fallback was a 3% chance per talk; I took the counter because it persists, shows progress and becomes loyalty later.) +- **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.) - **Settings:** recruitMode (on), persuadeGain 4% (1 to 15). - **Replaces:** Recruit Slaves 2887124861 (26,336 subs), No Slave Mental Breaks (its recruit interaction). - **Effort:** M. @@ -392,26 +522,6 @@ Recruiting is the strongest "path to freedom" signal (Recruit Slaves, 26k). It r - **Tests:** A slave with a foreign ideo at certainty 0.01, after one forced interaction, has the target ideo and its mode becomes Suppress (or Recruit by setting). A warden of another ideo gets no job. The picker sets ideoForConversion, and it survives reload. - **Risks:** Ideology-only. Mods that change conversion math apply automatically. -#### Wardens calm breakdowns - -- **Players get:** A warden walks over to a slave in a non-violent mental break and talks them out of it, at a 10% suppression cost, instead of watching a day-long tantrum. -- **How:** A WorkGiver_Warden subclass for colony slaves in a mental state that is neither IsAggro nor the Rebellion state. It needs its own precheck, because ShouldTakeCareOfSlave requires SlaveIsSecure, which is false during a mental state. JobDriver: go to touch, 180-tick talk, MentalState.RecoverFromState, then suppression drops by the setting. -- **Settings:** wardensCalmBreaks (on), calmSuppressionCost 10% (0 to 30). -- **Replaces:** none. Asked for by the opening post of the 1,785-upvote "Slavery Is Useless" thread. -- **Effort:** M (estimated S to M; I took the higher). -- **Tests:** A slave in a sad-wander break gets a warden with the calm job; afterwards the break is over and suppression is 10% lower. A berserk slave and a rebelling slave get no job. -- **Risks:** Modded mental states that block recovery stay as they are. - -#### Suppress the whole room - -- **Players get:** When a warden suppresses one slave, other awake slaves within 6 cells in the same room are suppressed too, at 70% strength, and count as done for the day. One warden can handle a barracks at mealtime. -- **How:** A postfix on SlaveRebellionUtility.IncrementInteractionSuppression(initiator, recipient), whose only caller is InteractionWorker_Suppress. For every other awake colony slave in the radius and room with Need_Suppression.CanBeSuppressedNow and ScheduledForSlaveSuppression, it calls the public SlaveRebellionUtility.IncrementSuppression(need, initiator, slave, share x SuppressionPower x curve(level)), with vanilla's private static CurrentSuppressionFactorCurve read through StaticFieldRefAccess, then sets mindState.lastSlaveSuppressedTick. Calling IncrementSuppression, not the interaction method, means no recursion. -- **Settings:** bystanderShare 70% (0 = off, max 100), radius 6 (2 to 12). -- **Replaces:** none. -- **Effort:** S. -- **Tests:** Three slaves at 0.4 in one room, suppress one: the other two rise by about 0.7x its gain and are no longer scheduled. A slave in the next room is unchanged. Share 0 does nothing. -- **Risks:** Wardens never suppress sleeping slaves, so it fires mostly at meals and in shared workrooms; expect a modest effect. Each bystander shows its own text mote. - #### Freedom pays off - **Players get:** A slave you emancipate who stays in the colony gets "freed from slavery" (+15) instead of "was enslaved" (-6). Emancipated slaves who walk home leave your weapons and armor behind. @@ -422,16 +532,16 @@ Recruiting is the strongest "path to freedom" signal (Recruit Slaves, 26k). It r - **Tests:** Emancipating a colony-born slave gives FreedFromSlavery and no WasEnslaved. Emancipating a foreign slave with a rifle and flak vest leaves both on the ground, and the pawn leaves dressed. A ransom release drops gear too. - **Risks:** Low. -## 2.1 Loyalty and indentured servitude +### Loyalty -The heaviest systems come last, on top of the persuasion counter, the fall-rate extension and the buy-mode button they need. If 2.1 runs long, indenture ships its gizmo and term-end letter first and the trade option later. 7 days. +Built on recruit's persuasion counter and the fall-rate extension 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: - 0.25 Broken in: fall rate x0.8. - - 0.5 Obedient: x0.6, and safe at any suppression through the 1.3 postfix. + - 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. @@ -442,6 +552,10 @@ The heaviest systems come last, on top of the persuasion counter, the fall-rate - **Tests:** A slave at 0.8 suppression and 0.6 mood, ticked 10 days, reaches about 0.2. A slave that existed before the feature starts at 0 and gains. At 0.5 the MTB is -1 even at 0.2 suppression. The fall-rate explanation shows x0.6. A forced rebellion costs 0.3. At 1.0 the letter arrives, and accepting gives !IsSlave and player faction. Phase 2: loyalty persists. - **Risks:** Long games get easier; the rate sliders tune it. Stacked fall factors (brand 0.85 x implant 0.7 x indenture 0.7 x Loyal 0.5 = 0.21) make suppression nearly free, so each is a slider. +### Indentured servitude + +Built on loyalty, which decides who is willing to stay, and on the buy-mode button. It can ship in two parts if needed: the gizmo and the term-end letter, then the trade option. + #### Indentured servitude - **Players get:** A gizmo gives selected slaves a term of 15, 30, 60 or 120 days. Indentured slaves lose suppression 30% slower and grow loyal faster because they can see the end. The trade button gains a third choice, "joins indentured", at 80% of the colonist price. When a term ends, a letter says whether the slave is willing to stay: welcome them as a colonist (only if willing), send them home with goodwill, or extend 15 days at a mood cost. Either way out gives "served my term" (+8, 10 days) instead of "was enslaved". @@ -457,23 +571,26 @@ The heaviest systems come last, on top of the persuasion counter, the fall-rate - **Tests:** Indenture a slave for 15 days and tick 15 days: the letter is there. Welcome at loyalty 0.6 makes a free colonist with ServedTerm and no WasEnslaved; at 0.2 Welcome is disabled. Send home releases a foreign slave and is disabled for a colony-born one. Extend moves the end by 15 days and adds TermBroken. Fall rate is x0.7 while serving. Buying as indentured gives a slave with a 30-day term at 0.8/0.6 of the slave price, in the purchase ledger. Phase 2: the term survives reload. - **Risks:** Coexists with Recruit Slaves, which is an interaction, not a term. Many slaves mean many letters, hence grouping and autoResolve. M is tight; the split above is the fallback. -## 2.2 Slave economy at scale +## Colony conscience -Slave orders need appraisal and the payout helper. Slave weights come late because Slaves Are Worthless is maintained on 1.7, so this is consolidation, not a gap. 4 days. +Who in the colony minds what you do to the people you hold. "Harming slaves doesn't upset colonists" shipped in 1.0; this extends it to prisoners and to faction goodwill. -#### Faction slave orders +#### Prisoners count too -- **Players get:** Factions that approve of slavery post orders by letter: "Wanted: 2 slaves with Plants 8+, healthy, 15 to 50 years. Pays 160% of the sale price and +15 goodwill. 20 days." Accept, then sell matching slaves to any trader of that faction or gift them by drop pod. Matching slaves are marked in the trade window; the premium follows by drop pod and the goodwill comes when the order is full. -- **How:** GameComponent_BlaxMarket holds a List (faction, SkillDef, minimum level, optional minimum loyalty stage, count, filled, expiry tick, premium, goodwill). - - Generation: MTB 15 days, at most 2 open orders, only non-hostile factions passing IdeoApprovesOfSlavery. Skill from Plants, Mining, Construction, Cooking, Crafting, Medicine, Melee or Shooting; minimum level 6 to 12 scaled by colony wealth; count 1 to 3; premium 1.4 to 1.8; goodwill 10 to 20. With loyalty on, a third of orders ask for Obedient or better. Offered as a ChoiceLetter. - - Filling, through patches Blax Slaves already has: Frame_SoldSlave on Tradeable_Pawn.ResolveTrade (the player sells a colony slave and trader.Faction == order.faction) and Frame_GiftArrived on TransportersArrivalAction_GiveGift.Arrived. A match (skill, age, health 80% or more, IsSlave, not bought from that same faction per the ledger) adds 1 to filled and queues appraised sell price x (premium - 1) through the payout helper. The premium inherits appraisal's cap. - - The buy-mode DrawCaptiveTradeInfo prefix draws "order +60%" on matching colony slaves; the captive branch keeps vanilla's icon and adds the tag. - - On expiry a letter arrives; an accepted, unfilled order costs 5 goodwill. Orders cancel if the faction turns hostile or is defeated. -- **Settings:** slaveOrders (on), ordersMtbDays 15 (5 to 60), maxOpenOrders 2 (1 to 5), premium 140 to 180%, unfilledPenalty -5 goodwill. -- **Replaces:** Slave Contract Quest 3677019267 (220 subs, no 1.7). +- **Players get:** Optionally, the "harming slaves doesn't upset colonists" rule also covers prisoners, and it can reduce the mood hit instead of removing it. Factions can optionally stop losing goodwill over surgery on captives you hold. +- **How:** + - (a) Widen the victim predicate in the SlaveHarm frames to IsPrisonerOfColony, keeping the pacifist and family exceptions. It stands down while No Sympathy For Prisoners (sk.noprisonersympathy) is active, so two vetoes don't stack and undercut the pacifist rule. + - (b) Reduce mode: Patch_SlaveHarmGate scales Thought_Memory.moodPowerFactor and, for Thought_MemorySocial, opinionOffset by the same factor before letting the thought through. moodPowerFactor alone leaves opinion penalties (-5 to -20) at full strength. + - (c) A prefix on the protected RecipeWorker.ReportViolation skips it when the patient is a colony prisoner without questTags, for every worker except Recipe_ExecuteByCut, which keeps vanilla's -100. ReportViolation is the single funnel for surgery, hemogen, implants and execution, so the execution exclusion is explicit. Colony slaves never trigger it in vanilla. +- **Settings:** prisonersCountAsSlaves (off), harmMoodReduction 100% (0 to 100; 100 = full removal as today), captiveSurgeryNoGoodwillLoss (off; tooltip: execution still costs goodwill). +- **Replaces:** No Sympathy For Prisoners 3533769253 (16,399 subs, in your mod list), Prisoner Harvesting 3347850851 (13,090). - **Effort:** M. -- **Tests:** A Plants 8, count 1 order for a friendly pro-slavery faction. Selling a matching slave to that faction's trader fills it, and the pending payment is the appraised price x 0.6 at premium 1.6, within the cap. A Plants 3 slave doesn't fill it, nor does a slave bought from that faction. A gift-pod arrival fills it. Past the deadline the expiry letter and penalty apply. Phase 2: open orders survive. -- **Risks:** Small Workshop signal (220 subs), so this is depth, not a draw. Letters instead of generated quests keep it at M. +- **Tests:** Executing a prisoner with (a) on gives a non-pacifist colonist no new bad memories (Fixtures.NewBadMemories); a pacifist still minds. At 50% a mood memory and an opinion thought are both halved. Harvesting a neutral faction prisoner's kidney leaves goodwill unchanged with (c) on and drops it by 70 with it off. Executing that prisoner by cut still drops goodwill with (c) on. -Compat with NSFP: (a) stands down. +- **Risks:** (c) changes vanilla balance, so it is off by default. The broader gate needs more frame coverage in tests. + +## Storyteller weight + +How much a slave counts for wealth, raids and population. Slaves Are Worthless is maintained on 1.7, so this is consolidation, not a gap. #### Slave wealth, raid and population weight @@ -485,25 +602,9 @@ Slave orders need appraisal and the payout helper. Slave weights come late becau - **Tests:** On a map with 3 slaves, wealthPawns at 75% equals vanilla and at 0% drops by sum(0.75 x market value). Under Rand.PushState(seed), DefaultThreatPointsNow at raid weight 0 equals the value with the slaves despawned. Harmony.GetPatchInfo shows our transpiler with its pattern-found flag set. PopulationValue_Slave reads back the setting. - **Risks:** The mod's first transpiler under Waylith and the Harmony 3 RC, hence the log-and-skip fallback. Caravan storyteller wealth also counts slaves at 75% and isn't covered (documented). Low weights make raids easy, so vanilla is the default. -## 2.3 Hire out slaves - -An optional release. It is the riskiest feature and players barely ask for it, so it ships only if 2.1 finished on time and players ask after 2.2; otherwise it moves to Backlog. 5 days. - -#### Hire out slaves - -- **Players get:** At the comms console, an allied or neutral pro-slavery faction can hire your slaves. Pick the slaves and a term of 7, 15 or 30 days; they leave and come back at the end with wages of 1.2% of market value per slave per day (about 21 silver a day for an average slave, 315 for 15 days), plus goodwill and skill practice. A poorly suppressed slave may escape, a few come back hurt, and if the faction turns hostile it keeps them. -- **How:** Built on vanilla's borrowed-pawn system instead of a custom holder: a Quest with a QuestPart_LendColonistsToFaction subclass. Vanilla then exempts the pawns from world-pawn garbage collection (IsBorrowedByAnyFaction), counts them for population (TotalBorrowedColonistCount), keeps GameEnder from ending the game while they're away, returns corpses of lent pawns who die, and shows the timer in the quest tab. Lent pawns stay world pawns and keep ageing. The subclass writes the private lentColonists list through FieldRefAccess, overrides Enable to take the chosen slaves, and overrides Complete to pay wages and roll escape and injury. Dialog_BlaxHireOut opens from a second option of the ransom FactionDialogFor postfix: a checklist of secure, healthy adult slaves, a term picker and a wage preview. Slaves leave by shuttle or drop pod; if they walk out, Patch_RunawayExitMap skips borrowed pawns. - - Escape roll per slave: base chance x (1 - suppression at departure) x 0.5 if branded x (1 - loyalty) with loyalty on. Branded escapees go to GameComponent_BlaxRunaways.Register with the hirer's faction; others are lost, with a letter. - - Return: RunawayDelivery's spawn logic (walk-in for tribal and medieval factions, drop pod for industrial and up), still IsSlaveOfColony. CastesApi.NotifyJoined(pawn, "blax.slaves.contractReturned") one tick after each return. Wages through the payout helper. SkillRecord.Learn grants 300 XP per day in the best enabled skill. +1 goodwill per slave per 5 days. An injury roll adds a random vanilla injury. A hirer hostile by then keeps them, with a letter. -- **Settings:** laborContracts (on), wagePerDay 1.2% of market value (0.5 to 3), baseEscapeChance 10% (0 to 30), injuryChance 5% (0 to 20), deathChance 0% (0 to 5), terms 7/15/30 days, hirerMustApproveSlavery (on). -- **Replaces:** none. Prison Expanded 3827258534 (3,298 subs) has labor contracts for prisoners only. -- **Effort:** L. -- **Tests:** Contract 2 slaves for 7 days to a friendly faction with escape chance 0: they leave, IsBorrowedByAnyFaction is true, they survive world-pawn GC, they aren't in the runaway registry, and the quest tab shows the timer. After 7 days they are back as IsSlaveOfColony, silver rose by 2 x 7 x 1.2% x market value, their best skill gained XP, and with Castes loaded each produced one NotifyJoined. Escape chance 1 plus a brand puts them in the runaway registry. A faction hostile at term end triggers the kept letter. Phase 2: an active contract survives reload mid-term. -- **Risks:** The map can close while slaves walk out (abort and keep them). Castes policies stay untouched while away. Balance: 15 days of wages is about half a sale, tunable. - ## Works with the other Blax mods -- **Package ids:** blax.slaves (this mod), blax.castes, blax.zones, blax.defaults. No hard dependencies. About.xml gets loadAfter entries for blax.castes and blax.zones next to the existing brrainz.harmony and Mlie.SYRMoreSlaves. No sibling goes into modDependencies, where Harmony stays the only entry, and there is no assembly reference. Load order is Castes, Zones, Slaves. No sibling lists blax.slaves, so there is no loadAfter cycle. Defaults lists no sibling and no sibling lists Defaults, so its position doesn't matter. +- **Package ids:** blax.slaves (this mod), blax.castes, blax.zones, blax.defaults, blax.laws. No hard dependencies. About.xml gets loadAfter entries for blax.castes and blax.zones next to the existing brrainz.harmony and Mlie.SYRMoreSlaves. No sibling goes into modDependencies, where Harmony stays the only entry, and there is no assembly reference. Load order is Castes, Zones, Slaves, Laws: Blax Laws lists blax.slaves in its loadAfter because it reads SlavesApi, and Slaves lists no Laws entry, so there is no loadAfter cycle. Defaults lists no sibling and no sibling lists Defaults, so its position doesn't matter. - **Detection:** one shared Compat helper, Compat.IsActive(id) = ModLister.GetActiveModWithIdentifier(id, ignorePostfix: true) != null. It moves out of SlaveHarm.cs in 1.2 and serves the siblings, the Compat tab and every stand-down check. - **Binding:** at startup BlaxSlavesStartup resolves sibling APIs with AccessTools.TypeByName and AccessTools.Method into cached delegates and reads their int Version. A missing sibling or method makes that call a silent no-op, and every Slaves feature works alone. APIs only change additively. - **Calls into BlaxCastes.CastesApi:** HintJoinReason(Pawn, string) right before a join Castes classifies itself (it expires at the end of the tick); NotifyJoined(Pawn, string) one tick after the status is final, for joins Castes can't see. @@ -511,51 +612,53 @@ An optional release. It is the riskiest feature and players barely ask for it, s | Reason | Fired by | Call | Castes treats it as | |---|---|---|---| | blax.slaves.runawayReturned | RunawayDelivery.TryDeliver (existing code, wired in 1.2); it sets slave status directly | NotifyJoined | previous caste | -| blax.slaves.slaveRecruited | recruit mode (2.0), Devoted letter (2.1), before DoRecruit | HintJoinReason | recruited | -| blax.slaves.indentureServed | indenture Welcome (2.1), before DoRecruit | HintJoinReason | recruited | -| blax.slaves.boughtIndentured | indentured purchase (2.1), ResolveTrade prefix before PreTraded | HintJoinReason | bought as slave | -| blax.slaves.contractReturned | labor contract return (2.3) | NotifyJoined | keep current caste | +| blax.slaves.slaveRecruited | recruit mode (Recruit slaves), Devoted letter (Loyalty), before DoRecruit | HintJoinReason | recruited | +| blax.slaves.indentureServed | indenture Welcome (Indentured servitude), before DoRecruit | HintJoinReason | recruited | +| blax.slaves.boughtIndentured | indentured purchase (Indentured servitude), ResolveTrade prefix before PreTraded | HintJoinReason | bought as slave | +| blax.slaves.contractReturned | labor contract return (Hire out slaves) | NotifyJoined | keep current caste | - **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.CasteIdOf, CasteLabels and PrePick, for the trade-row caste picker in Backlog. -- **Calls into BlaxZones.ZonesApi:** TryFindDropSpot(map, thing, out cell) inside BlaxDelivery.Drop for every silver payout (ransom and buy-back in 1.4, order premiums in 2.2, wages in 2.3). The pod spawns exactly on that cell with TradeUtility.SpawnDropPod, as the ZonesApi contract asks; DropCellFinder.TradeDropSpot with DropThingsNear is the fallback. Payouts follow the zone's orbital checkbox. Pawns are never routed into zones: returned runaways and hired-out slaves use the vanilla spot. TryFindDropSpot and Version are all of ZonesApi version 1; the shared infirmary only touches Medical beds. -- **BlaxSlaves.SlavesApi (static):** Version from 1.3. IsSafe(Pawn) from 1.3. Loyalty(Pawn) and TermDaysLeft(Pawn) from 2.1. -- **Ownership:** Castes owns every per-pawn policy default (apparel, food, drug, reading, medical care, schedule, work priorities, weapon loadout, allowed area, hostility, self-tend, carried medicine, fire at will, prisoner interaction), so Slaves never sets a policy: the 1.3 medical-care keeper stands down when Castes is loaded, and blood donor and term have no "new slaves" default here. Zones owns sleeping spots, beds by zone, every friendly drop location and per-cell work rules (work rule areas); it never changes a pawn's work priorities or allowed area. Defaults owns the starting settings of vanilla stockpiles and growing zones, storage buildings, production bills, workbenches, buildings, animals and mechs, and what the game forbids when pawns go down, die or are stripped. It writes when something is made or joins, and through its opt-in forbid rules when a pawn goes down, dies or is stripped. It keeps nothing in the save. Slaves owns slave status, trade, prices, suppression, rebellion, slave medicine and the slave economy. +- **Not used yet:** CastesApi.CasteLabels and PrePick, for the caste picker on the trade row (Trade, "Sell any time"). 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. - **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 -- Caste picker on the trade row, next to the buy-mode button (CasteLabels plus PrePick): waits for PrePick, which Blax Castes adds in its 1.4. -- Slave overview window (M, a text-label main button with one sortable row per slave): its best columns, loyalty and term, only exist after 2.1. -- Slave order chains such as "emancipate when healthy" or "convert, then recruit" (S to M): build on the warden-mode base once 2.0 proves it. -- Rebels may surrender (M): after 1.3, rebellions get rare; check whether players still hit fights to the death. +- 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. -- Slave weight for caravan storyteller wealth: not covered by 2.2; add if players report it. +- 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. ## Cut - Turrets fire on rebelling slaves, turrets cause terror: Prisoners Should Fear Turrets (104k, maintained, in your mod list) stays installed for its prisoner half, so taking its slave half removes no mod. The Compat tab points to it. -- Longer terror memories through ObservedTerror.durationDays: can't work, vanilla clears terror thoughts on every observation pass. Lingering terror (1.3) replaces it. -- A separate at-risk rebellion alert: vanilla alerts already name culprits; 1.3 retunes them instead. -- Organ donor gizmo with automatic harvests: its stock check could never work (organs are uncounted) and demand is tiny (1.1k). "Organ harvests wait for health" (1.6) keeps the useful part. +- Longer terror memories through ObservedTerror.durationDays: can't work, vanilla clears terror thoughts on every observation pass. Lingering terror replaces it. +- A separate at-risk rebellion alert: vanilla alerts already name culprits; "Rebellion alerts use the safe threshold" retunes them instead. +- Organ donor gizmo with automatic harvests: its stock check could never work (organs are uncounted) and demand is tiny (1.1k). "Organ harvests wait for health" keeps the useful part. - 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 2.2 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. - 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. - Per-join policy defaults (outfit, food, drugs, reading, medical care, area): Castes owns them, and the README points players there. - Slave sleeping zones and mass sleeping spots: Zones owns them. - Medical triage ("treat only if worth more than X"): medical care is a Castes policy; appraisal shows the value and the player decides. - New collar and outfit looks: need art, and there is no artist. -- Explosive, shock or skull-piercer collars, torture, flogging, lobotomy, nerve staple, brainwash chair: beyond vanilla Ideology's tone. Sedation and the compliance implant cover control. +- Explosive, shock or skull-piercer collars, torture, flogging, lobotomy, nerve staple, brainwash chair: beyond vanilla Ideology's tone. Sedation and the compliance implant cover control. Blax Laws' subdue is a capped fistfight that ends a break, not a punishment system for slaves. +- Heart acidifier implant for permanent terror (Useful Terror): a threat implant, too close to the explosive collars above; the compliance implant covers control. +- Terror building values (gibbet and terror sculpture buffs, lightweight skullspikes, from Useful Terror): building balance, not slave rules. It stays Useful Terror's. - Automated lethal harvests (heart, liver, harvest before execution): automating killing goes past vanilla's manual choice. - Slave romance and marriage rules: not a pain point. - Keeping slaves out of parties and funerals: vanilla 1.7 already does it. -- Home factions angry when bought slaves are harvested: vanilla treats colony slaves as player faction, so no violation fires. Prisoners are covered in 1.4. +- Home factions angry when bought slaves are harvested: vanilla treats colony slaves as player faction, so no violation fires. Prisoners are covered by Prisoners count too. - Slave auctions and market events: RimMarket (50k) and Auction House (5.5k) do it on 1.7 and are maintained. - Prisoner arena and prisoner forced labor: maintained prisoner mods (Prison Labor, Prisoner Realism, Prison Expanded) cover it, and slaves already work. - Gene extraction farm: Auto-Extract Genes (65.8k, 1.7) already covers slaves. - Docility drug: needs item art, and drug schedules belong to Castes. -- Slave-surgeon sabotage: players dislike punitive randomness; the 1.5 surgeon rule covers trust. +- Slave-surgeon sabotage: players dislike punitive randomness; the slave-surgeon rule covers trust. - "Slavery: Pragmatic" price precept: touches every ideo; sliders and appraisal's buyer factor do the job. - Flee AI and rebellion size rework: L pathing work for little gain once safe suppression lands. - Mood-based suppression decay: a second axis next to loyalty confuses players.