rimworld-blax-slaves/docs/roadmap.md

123 KiB

Blax Slaves roadmap

Blax Slaves replaces a dozen dead or conflicting slavery mods with one mod maintained for RimWorld 1.7. You choose slave or colonist when you buy, sell captives by quality or ransom them home, end the rebellion doom timer, and treat slaves in one hospital with control implants, a blood bank and health certificates, every feature with its own toggle.

Current release: 1.2.1, live on Workshop item 3847282171 since 2026-11-29.

What the mod covers when it is complete, grouped by area, and the order of the remaining steps: features.md. 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'.
  • Checked against the decompiled 1.7 code the same day. New hooks for the shared infirmary, the rebellion alerts, the sedation relay's manual trigger, the colonist bar, organ harvests, abolitionists, the warden threshold, the break blocker, kept surgery bills, the rescue raid and bloodfeeding. Recruit and convert never write a Blax mode into the save. The slave ship handles Odyssey's Traders Guild flag. Loyalty and indenture reach the fall-rate patch through the ledger. Enslaving a prisoner joins Prisoners count too.
  • Plan changes from that check: the released-gear drop moved to Captives pay, "buy anyway" stays the default for anti-slavery traders, Sell any time follows Captives pay and the caste picker waits for Castes on its own, Control's second step split into Wardens and Lingering terror, terror covers rebellion risks became an Idea, and every unbuilt feature that acts on its own ships off.

At a glance

Area What players get Mods it replaces
Trade Shipped: pick slave or colonist when you buy, every trader buys captives, price sliders, slavers stay stocked and come on request. Next: a slave ship on request, abolitionists who buy slaves to free them, a caste picker on the trade row Trade as Slave or Colonist (111), [SYR] More Slaves (14.8k + 22.7k), Everybody Buys Slaves (3.3k), 3 smaller (all shipped)
Faction deals Ransom captives at the comms console, factions buy back their people, released captives leave your gear, faction slave orders, hire out slaves PrisonerRansom (91k), Prisoner Exchange (11.1k, partly), Slave Contract Quest (220)
Control Shipped: branding, branded trader slaves, runaways returned. Next: suppressed slaves never rebel, rebellion options and alerts, no breaks while suppressed. Then a warden threshold, room suppression, wardens who calm breakdowns and terror that lingers Slave Rebellions Improved (71k + 11.5k), No Slave Mental Breaks (2.3k), Dead Calm Slave (2.1k), Useful Terror (21.8k, partly)
Running a slave workforce Shipped: time as a slave. Next: slave work rules, slaves hidden from the colonist bar, a slave overview Time As a Slave (35k, shipped), Capable Slaves (9.8k) and 5 work mods, SlaveBar (24.6k)
Slave medicine One hospital for slaves and colonists, surgery bills and medical care that survive status changes, organ harvests that wait for health, a blood bank Organ Harvest Button (1.1k), BetterHemogenFarm (273)
Slave implants Compliance implant, sedation relay, endurance implant Simple Slavery Collars (52k, control part), Pawn Suppression Implants (7.8k), BK's Suppression! (1.6k), 4 collar mods
Slave value Slaves sell by quality, health certificates, honor by quality at the tribute collector Profitable Slave Trade (378)
Freedom and loyalty Recruit and convert slaves, freedom gives a mood boost, loyalty stages, indentured terms Recruit Slaves (26k), Convert Slaves (7.1k), Indentured Servitude (1.3k), stage ideas from Simple Slavery Collars (52k) and More Slavery Stuff (21.7k)
Colony conscience Shipped: harming slaves doesn't upset colonists. Next: the same for prisoners, a reduce mode, no goodwill loss for surgery on captives No Sympathy For Prisoners (16.4k), Prisoner Harvesting (13.1k)
Storyteller weight Sliders for how much a slave counts toward wealth, raid points and population Slaves Are Worthless (10.2k), Slaves Aren't People (1.9k)

The order of the remaining steps, and why: features.md. Effort marks in the specs: S = half a day, M = 2 days, L = 5 days.

Defaults I picked

Change if you disagree. The Blax rule is that a feature is off or empty until used, so an update never changes a running colony by itself. Every unbuilt feature falls into one of two groups:

  • Off until you switch it on, because it acts by itself: safe suppression (No rebellion while suppressed), calm genes never rebel, lingering terror, suppress the whole room, wardens calm breakdowns, slaves in colonist medical beds and the medical-bed thought, organ harvests that wait for health, buy-back offers, faction slave orders, appraisal, honor by quality, the freedom mood swap, released captives leave your gear, and loyalty. Their sub-settings keep the suggested values below, ready for when you switch the feature on. Whether safe suppression should be on from the start is open question 4 in features.md.
  • On, but nothing happens until you use it: ransom, the slave ship request, recruit and convert orders, the three implants, blood donors, indenture, the health exam, kept surgery bills (they only keep what you queued), the slave overview tab (shown only while you hold slaves) and the caste picker.

Numbers and choices I picked:

  • Captive sale price stays at vanilla 60%. Appraisal (Slave value) lifts well-kept slaves by up to 75%, capped below what a slaver would charge you for the same pawn.
  • The safe threshold is 50%: once safe suppression is on, a slave at or above it never rebels.
  • Wardens suppress below vanilla's 70% until you raise it.
  • Traders whose ideoligion rejects slavery still buy captives at the full slider price ("buy anyway", the 1.2 default, which stays). "Buy to free" at half price is a third choice you pick (Trade, Abolitionists buy to free).
  • Visitor groups buy slaves, like Everybody Buys Slaves.
  • Unwaveringly loyal pawns stay slave-only when bought from orbital or settlement stock, and their loyalty stops at Loyal.
  • Implants are surgery-only with vanilla items. The relay uses vanilla anesthesia with manual and area triggers. No explosives, no new art.
  • Ransom pays 80% of market value. Pirates and other permanent enemies refuse.
  • Surgery on prisoners of non-hostile factions still costs goodwill, as in vanilla.

1.2 Trade on your terms (shipped)

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

  • Players get: In the trade window, the "Joins as slave / Joins as colonist" label on each pawn a trader sells becomes a button. Click it to switch, and the price updates at once (a slave costs 60% of the colonist price, as in vanilla). Unwaveringly loyal pawns keep the terms vanilla rolled for them (usually slave), so the button is greyed out for them and the tooltip says why.
  • How: A prefix on TransferableUIUtility.DrawCaptiveTradeInfo takes over only the trader-stock branch; TradeUI calls it only while Ideology is active. Colony captives keep vanilla's ransom and slave icon. The button is 140 px (vanilla's label width), growing to 170 px into the empty colony column for long translations, which are cut with "..." beyond that; its tooltip lists both prices. A click flips guest.joinStatus between JoinAsSlave and JoinAsColonist, refused both ways for an unrecruitable pawn (vanilla can roll such a pawn as a colonist, and a one-way flip would lose that offer for good), sets Tradeable's private pricePlayerBuy and pricePlayerSell to -1 through FieldRefAccess so InitPriceDataIfNeeded recomputes, then calls TradeSession.deal.UpdateCurrencyCount(). ResolveTrade stays unpatched: vanilla Pawn.PreTraded(PlayerBuys) reads joinStatus. The default purchase mode is a new first step in the existing Patch_TraderSlaveBrand postfix on ThingWithComps.PostGeneratedForTrader. It must run before that postfix's early returns (children, non-Slave-kind stock, already branded pawns), or those pawns keep vanilla's 25/75 roll. Stands down and logs when Rhajiit.tradepurchasemode is active. Hidden without Ideology.
  • Settings: buyModeEnabled (on). defaultPurchaseMode: vanilla roll (default), always slave, always colonist; always colonist: recruitable pawns only (caravan chattel once the caravan's LordJob_TradeWithColony makes it recruitable).
  • Replaces: Trade as Slave or Colonist 3838162426 (111 subs, in your mod list).
  • Effort: M.
  • Tests: Generate Orbital_PirateMerchant stock through a real TradeShip and TradeSession.SetupWith (existing TradersTests pattern). Toggle flips joinStatus, and the colonist to slave price ratio is 1/0.6 within 1%. With unwavering prisoners on, an orbital stock pawn with Recruitable false refuses the toggle in both directions. A caravan pawn stays recruitable (vanilla's LordJob_TradeWithColony clause), so the toggle works there. ResolveTrade as colonist gives !IsSlave, player faction and FreedFromSlavery; as slave it gives IsSlaveOfColony. "Always slave" makes every stock pawn JoinAsSlave, unrecruitable ones, children and already branded pawns included, and the brand roll still runs. "Always colonist" makes unrecruitable caravan chattel JoinAsColonist once the caravan's trade lord is made, while orbital stock stays JoinAsSlave. Phase 2: a toggled pawn keeps its joinStatus.
  • Risks: Rimdeed also patches DrawCaptiveTradeInfo; we take only the stock branch. A choice made and then cancelled stays on the stock pawn (saved, harmless). A trader-branded slave bought as colonist keeps the old brand; SlaveHarm already ignores brands on free colonists.

Every trader buys slaves

  • Players get: Settlements, visitor groups and modded traders buy your slaves and prisoners too, not only slavers and caravans. A setting lets factions whose ideoligion rejects slavery refuse; their rows then show greyed out with the reason instead of vanishing.
  • How: At startup and when the settings window closes (never during a TradeSession), every TraderKindDef where no stock generator HandlesThingDef(ThingDefOf.Human) gets a StockGenerator_BlaxBuySlaves, a subclass of StockGenerator_BuySlaves, with ResolveReferences(trader). In vanilla that adds Visitor_Neolithic_Standard, Visitor_Outlander_Standard, Empire_Caravan_TraderGeneral and Orbital_Empire. Kinds in any FactionDef.visitorTraderKinds follow the visitors setting. Hospitality's guest kind is skipped. There are never duplicates, so Everybody Buys Slaves can stay installed. Refuse mode: a postfix on the Tradeable.TraderWillTrade getter (Tradeable_Pawn doesn't override it) returns false for a colony slave or prisoner when the trader's faction has an ideo failing IdeoUtility.IdeoApprovesOfSlavery, unless pawn.HomeFaction == trader.Faction (ransom). The DrawCaptiveTradeInfo hook adds the reason line. Factionless orbital traders always buy. The gate covers 1.1's caravan generators too.
  • Settings: allTradersBuySlaves (on), visitorsBuySlaves (on), antiSlaveryTraders: buy anyway (default, vanilla) or refuse. Abolitionists buy to free adds "buy to free" as a third choice; "buy anyway" stays the default.
  • 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.
  • Risks: Modded traders with their own humanlike generators are found through HandlesThingDef, not by name. Refuse mode means fewer buyers in mostly anti-slavery worlds, which is why it is opt-in.

Slave stock ignores colony size

  • Players get: Settlements and tribal camps keep selling slaves after your colony grows, so the 1 to 4 settlement slaves Blax Slaves promises show up. Ideologies that forbid slavery still don't sell.
  • How: StockGenerator_Slaves skips its whole stock when respectPopulationIntent is set and Rand.Value > PopulationIntent. Base_Neolithic_Standard, Base_Outlander_Standard and Royalty's Base_Empire_Standard set the flag. At startup the private field on every StockGenerator_Slaves is saved and cleared through FieldRefAccess, and restored when the setting goes off. slaveKindDef (Slave_Empire) stays intact, and vanilla's ideology check in GenerateThings still runs. If Mlie.SYRMoreSlaves is active, the Compat tab says its extra 3 to 5 slaves stack on ours. That replaces the README's loadAfter note.
  • Settings: slaveStockIgnoresColonySize (on).
  • Replaces: [SYR] More Slaves (Continued) 3361231919 (14,810 subs, in your mod list), [SYR] More Slaves 2021510577 (22,688, 1.4), Tribals Always Sell Slaves 3173095283 (5,182, abandoned), Simple more slaves 3227695395 (5,320, 1.6).
  • Effort: S.
  • Tests: Reflection shows the field false on every StockGenerator_Slaves, and Base_Empire_Standard keeps Slave_Empire. With PopulationIntent forced to 0 by a test-only patch, 20 Base_Outlander_Standard stocks generated for a null or pro-slavery faction all contain slaves; with the setting off, none do. (An anti-slavery faction yields nothing either way.)
  • Risks: Late-game slave supply rises above vanilla (toggle). With SYR still loaded, its generator stacks on ours until the player removes it.

Slave price sliders

  • Players get: Two sliders set what slaves cost (vanilla 60% of the colonist price) and what captives fetch (vanilla 60%). The trade tooltip shows the factor in use. A hard cap means no buy-low, sell-high loop, between traders or by switching negotiators.
  • How: One Patch_SlavePrices on the private Tradeable.InitPriceDataIfNeeded. A prefix stores in __state whether pricePlayerBuy <= 0, so the postfix only acts after a real compute, not after the cached early return. The postfix, for humanlike pawns with Ideology, sets priceFactorBuy_JoinAs (when it is 0.6) to slaveBuyFactor and priceFactorSell_HumanPawn to slaveSellFactor, then recomputes both prices with the public TradeUtility.GetPricePlayerBuy and GetPricePlayerSell, passing the stored priceFactor and priceGain fields read through FieldRefAccess. It does not scale the stored prices, because vanilla stores them already clamped and rounded. Then it re-clamps sell <= buy and applies the hard cap: a humanlike captive's sell price is at most 0.9 x TradeUtility.GetPricePlayerBuy for the same pawn as a slave, with slaveBuyFactor, the trader's buy price type counted at most Normal, its settlement gain, and the best negotiator gain any pawn can reach (TradePriceImprovement's maxValue, 0.395) instead of the current negotiator's. So the cap doesn't fall as Social rises, and buying with a skilled negotiator and selling with a poor one can't loop (the cheapest Normal purchase is 1.4 x buy factor x 0.585, the cap at most 0.9 x 1.4 x buy factor x 0.605). While slaveBuyFactor is at vanilla or above, the cap never goes below vanilla's own 60% sale price for the current negotiator, so raising only the sell slider never pays less than vanilla. That floor pays at most vanilla's sale against purchase prices at or above vanilla's, so it adds no loop vanilla lacks; below a 60% buy factor it is off, or the loop returns. Vanilla's GetPriceTooltip reads the factor fields, so the tooltip updates with no extra patch. Numbers: vanilla sale is market value x 0.6 x 0.6 = 36%, so an average adult (MV 1,750) fetches 630. Appraisal, abolitionist buyers and indenture pricing extend this one postfix.
  • Settings: slaveSellFactor 60% (30 to 100), slaveBuyFactor 60% (30 to 100).
  • Replaces: Profitable Slave Trade 3492615816 (378 subs, its +30% part).
  • Effort: S.
  • Tests: At sell factor 0.8 the price equals GetPricePlayerSell with factor 0.8 (within 1) and never exceeds the buy price. A second InitPriceDataIfNeeded call leaves both prices unchanged. At 0.6/0.6 both prices equal vanilla exactly. A JoinAsSlave stock pawn at buy factor 0.5 costs the recomputed price. At sell 100%/buy 50% with a Social 20 negotiator the sell price equals 0.9 x the best negotiator's slave buy price. At sell 60%/buy 30%, a stock slave bought with a Social 20 negotiator sells for less with a Social 0 one in a new session, and the Social 20 seller never gets less than the Social 0 one. At sell 65%/buy 60% a Social 20 seller gets at least vanilla's 60% price. The tooltip shows the new percentage.
  • Risks: A higher sell factor makes raider farming pay, so the default is vanilla and the cap bounds loops.

Time as a slave

  • Players get: The Records tab shows how long each pawn has been your slave, and the slave tab shows "Enslaved for 23 days (tracked since install)".
  • How: No RecordDef: vanilla saves records by def index (DefMap), so an added RecordDef shifts every later mod's record values when the mod is added to or removed from a save. Instead GameComponent_TimeAsSlave keeps pawn -> ticks and adds 250 ticks every 250 ticks to each colony slave from PawnsFinder.AllMapsCaravansAndTravellingTransporters_Alive_SlavesOfColony (maps, caravans, transporters), purging destroyed pawns on save and load. A postfix on the private RecordsCardUtility.DrawTimeRecords draws the row in the Records tab. A postfix on the private ITab_Pawn_Visitor.DoSlavePriceListing puts the line next to "Slave price" (the method also runs in the prisoner tab, so check IsSlave). The tab sizes itself, so the line can't be cut off. This postfix becomes the one place for later lines: appraised value, persuasion, loyalty, term.
  • Settings: showTimeInSlaveTab (on). The record always counts.
  • Replaces: Time As a Slave 3310058867 (35,004 subs, no 1.7).
  • Effort: S.
  • Tests: Phase 1: Fixtures.ColonySlave, Tick(2500), record above 0; a free colonist's record is 0. Phase 2: the value survives save and reload (T.Carry).
  • Risks: Recruit Slaves adds a similar record, which only duplicates a line.

Settings tabs, Compat tab and sibling hooks

  • Players get: The settings window gets tabs (Trade, Rebellion, Medicine, Freedom, General, Compat), each with a reset button; a tab appears once its release ships. The Compat tab lists active mods this version replaces, so you know what to unsubscribe, and which Blax siblings it found.
  • How: DoSettingsWindowContents draws TabDrawer.DrawTabs plus a scroll view per tab. Existing settings move to General with unchanged Scribe keys, so saved settings carry over; the trader-brand slider sits on Trade, and each tab's reset covers exactly the settings it draws. Compat.IsActive moves out of SlaveHarm.cs into a shared Compat.cs helper built on ModLister.GetActiveModWithIdentifier(id, ignorePostfix: true). ModsConfig.IsActive misses a mod installed both locally and from Steam, so nothing uses it. The Compat table is a static list of packageIds (Rhajiit.tradepurchasemode, bblkepling.EverybodyBuysSlaves, Mlie.SYRMoreSlaves, then the ones later releases add); check each against its Workshop About.xml. Sibling hooks bind BlaxCastes.CastesApi and BlaxZones.ZonesApi by reflection at startup (see "Works with the other Blax mods"). First user: RunawayDelivery.TryDeliver calls CastesApi.NotifyJoined(pawn, "blax.slaves.runawayReturned") one tick after a returned runaway is delivered. About.xml gains loadAfter entries for blax.castes and blax.zones.
  • Settings: none of its own.
  • Replaces: none.
  • Effort: 2 x S (1 day).
  • Tests: Smoke: SettingsCategory is set, the replaced-mod table resolves without exceptions, reset restores defaults (Fixtures.SnapshotSettings and RestoreSettings), an old settings file loads into the same values. Without siblings every API delegate is null and calls are no-ops. -Compat run with Blax Castes' join API (CastesApi version 2): a returned runaway lands in its previous caste.
  • Risks: None beyond wrong packageIds in the table.

Trade

Who sells slaves to you and who buys them from you. 1.0 to 1.2 shipped the base: common slavers, slaver caravans on request, buy as slave or colonist, every trader buys captives, slave stock that ignores colony size and the price sliders.

Sell any time

A buyer for captives whenever you want one, and a fair deal with factions that reject slavery. It needs nothing from later areas and follows Captives pay. Slave appraisal, when it ships, leaves buy-to-free sales out of its buyer factor.

Slave ship on request

  • Players get: Allied outlander factions that accept slavery send an orbital slave ship on request from the comms console, so you can sell captives any time. Vanilla terms apply: 30 goodwill and one orbital request per 15 days. With Odyssey the slave ship is a Traders Guild ship; the option says so and stays closed while the Guild is hostile to you.
  • How: No vanilla FactionDef sets canRequestOrbitalTrader, and Orbital_PirateMerchant (label "slave ship") has requestable false. An XML patch sets canRequestOrbitalTrader on the outlander FactionDefs, adds Orbital_PirateMerchant to their orbitalTraderKinds and makes it requestable. Vanilla FactionDialogMaker.RequestOrbitalTraderOption already demands an ally and runs a 900,000-tick cooldown. A postfix on that private method disables the option with a reason when the faction's ideo fails IdeoUtility.IdeoApprovesOfSlavery.
    • The ship's faction is not the requester's. IncidentWorker_OrbitalTraderArrival ignores parms.faction and builds the TradeShip with GetFaction(traderKind), a random faction of the kind's def, or none (IncidentWorker_OrbitalTraderArrival.cs:30, 42-53), and a requested kind skips CanSpawn's trade check (:26). With Odyssey, Orbital_PirateMerchant has faction TradersGuild (Data/Core/Defs/TraderKindDefs/TraderKinds_Orbital_Misc.xml:538); a hostile Guild ship rejects every negotiator through CanTradeWith (FactionUtility.cs:30-32) after the 30 goodwill are paid. Without Odyssey the ship has no faction.
    • So the same postfix, while Orbital_PirateMerchant.faction is set, disables the option with a reason while any faction of that def is hostile to the player, and the option text names the faction the ship flies under. The refuse and abolitionist gates read the ship's faction (the Guild, or none), not the requester's.
  • Settings: slaveShipOnRequest (on; nothing happens until you request a ship).
  • Replaces: none. Answers the "somewhere to sell any time" signal behind Call A Trader (52k) without the cut slave catalogue.
  • Effort: S.
  • Tests: An allied outlander faction with a pro-slavery ideo shows the option and the slave ship in the kind list; an anti-slavery one shows it disabled with the reason; a non-allied one shows vanilla's "must be ally". Odyssey case: the test machine doesn't own Odyssey, so a test sets Orbital_PirateMerchant.faction to the def of a faction it makes hostile; the option is disabled with the reason and names that faction, and with the faction made neutral it opens. The DLC test list notes that the real Odyssey run is not covered.
  • Risks: Other mods that set canRequestOrbitalTrader on outlanders add their kinds next to ours (harmless). With Odyssey you sell to the Guild, not to the ally that sent the ship.

Abolitionists buy to free

  • Players get: A third choice for traders whose ideoligion rejects slavery: they buy your slaves at half price to set them free. Nobody in the colony minds the sale, even an Abhorrent negotiator can make it, and the trader's faction gains goodwill. "Buy anyway" stays the default; you pick this one.
  • How: Adds "buy to free" to antiSlaveryTraders (1.2) as a third value; the default stays "buy anyway", so saved settings and running colonies don't change. It builds on the frames Blax Slaves already ships, not on GuestUtility.IsSellingToSlavery or TransferableUIUtility.TradeIsPlayerSellingToSlavery: both are a few lines with one caller each (Tradeable_Pawn.cs:46, TradeUI.cs:52), small enough to be inlined so a postfix may never run, and the gift-pod path uses neither (TransportersArrivalAction_GiveGift.Arrived tests HomeFaction itself and records SoldSlave directly, :52-60).
    • Sale event: Frame_SoldSlave (prefix on Tradeable_Pawn.ResolveTrade) and Frame_GiftArrived (prefix on TransportersArrivalAction_GiveGift.Arrived) set a [ThreadStatic] "abolitionist sale" mark when the trader's or the settlement's faction is an abolitionist in this mode. A bool prefix on HistoryEventsManager.RecordEvent, next to Frame_HistoryEvent, skips SoldSlave while the mark is set, so no precept thought and no history record follow. The finalizers clear the mark.
    • Negotiator block: TradeUI.DrawTradeableRow greys the row when the negotiator's ideo is unwilling to do SoldSlave (TradeUI.cs:52). A prefix and finalizer on DrawTradeableRow set a [ThreadStatic] flag while TradeSession.trader's faction is an abolitionist in this mode, and a postfix on Ideo.MemberWillingToDo (Ideo.cs:881, a loop over precepts) returns true for SoldSlave under that flag.
    • Price: Patch_SlavePrices multiplies the sell price by abolitionistPriceFactor; appraisal, when it ships, skips its buyer-ideology factor for these sales.
    • Freeing: Pawn_TraderTracker.AddPawnToStock sets the sold pawn's kindDef to PawnKindDefOf.Slave (Pawn_TraderTracker.cs:215-218), so the ResolveTrade prefix saves each sold pawn's kindDef, and a postfix restores it, takes the pawn out of the trader's stock and makes it a free world pawn of its home faction, or of the trader's faction.
    • Goodwill: +price/40, capped at +10 per trade, through Faction.TryAffectGoodwillWith.
  • Settings: antiSlaveryTraders gains "buy to free" (third choice; "buy anyway" stays the default). abolitionistPriceFactor 50% (20 to 100).
  • Replaces: none. Answers a 159-upvote counter-idea.
  • Effort: S.
  • Tests: Selling a colony slave to an anti-slavery trader in this mode: price x0.5 against the slider price, no SoldSlave in the history records, goodwill up by about price/40, and afterwards the pawn is a free world pawn with its old kindDef, not trader stock. An Abhorrent negotiator's row is not greyed out and the sale goes through. A gift pod of slaves to an abolitionist settlement records no SoldSlave. In "buy anyway" mode the same sale records SoldSlave as before. A setting file from 1.2 loads as "buy anyway".
  • Risks: Goodwill farming is bounded by the price cut and the cap. Vanilla's MemberSold reaction from the pawn's other faction still applies.

Caste picker (waits for Blax Castes)

Its own step, because it depends only on Castes' PrePick (CastesApi version 3, Castes area 5, step 3), not on anything else in Trade. It ships as soon as that is out.

Caste picker on the trade row

  • Players get: With Blax Castes loaded, a small caste button sits next to "Joins as slave / Joins as colonist" on each pawn a trader sells. Pick the caste the pawn joins; without a pick, Castes' join row decides as before.
  • How (new 2026-12-01, not checked against the code): The buy-mode prefix on TransferableUIUtility.DrawCaptiveTradeInfo draws the button when CastesApi.Version is 3 or higher, the version that adds Castes' PrePick. The button opens a FloatMenu of CastesApi.CasteLabels() and calls CastesApi.PrePick(pawn, casteId), which Castes applies when the purchase resolves. Without Castes, or with an older API, nothing is drawn and nothing is bound. The button shares the colony column the buy-mode button already grows into, so long translations need a layout check.
  • Settings: castePickerOnTradeRow (on; shown only while Castes is loaded).
  • Replaces: none.
  • Effort: S.
  • Tests: -Compat with Castes: a pre-picked stock pawn bought as a slave lands in the picked caste, not in the new-slave row; without a pick it lands in the row. Without Castes the button isn't drawn and the delegate is null.
  • Risks: Waits for Castes' PrePick, which isn't built yet.

Faction deals

Deals with factions over the people you hold, at the comms console and by letter. PrisonerRansom (91k) has no 1.7 build: the largest economic opening on 1.7. Every payout arrives as silver by drop pod through one helper, and the purchase ledger keeps pawns you bought out of ransom and orders.

Captives pay

The ledger and the payout helper come first, because every later deal and several medicine and value features reuse them.

Purchase ledger and payouts

  • Players get: Nothing visible on its own. It stops buy-and-ransom loops and delivers every silver payout.
  • How: New GameComponent_BlaxSlaveLedger, the per-pawn store later features reuse (Scribe references, nulls purged on load). A postfix on Tradeable_Pawn.ResolveTrade for PlayerBuys records seller faction, price and tick. This matters because PawnGroupKindWorker_Trader re-factions caravan slaves to the trader's faction and orbital or settlement stock gets a random visible faction, so a bought slave often has a friendly HomeFaction that would pay ransom. GameComponent_BlaxPayments queues silver with a delay. BlaxDelivery.Drop(Map, Thing) asks ZonesApi.TryFindDropSpot and spawns the pod exactly on the returned cell with TradeUtility.SpawnDropPod, one thing per call; DropThingsNear would search a new random cell up to 5 cells away and miss a small zone. Without a zone cell it drops near DropCellFinder.TradeDropSpot with DropPodUtility.DropThingsNear.
  • Settings: none.
  • Replaces: none.
  • Effort: S.
  • Tests: Buying a stock slave writes a ledger entry with seller faction and price. A queued payment lands after its delay. Without Zones the drop uses TradeDropSpot. With a Zones delivery zone, the pod falls on the returned zone cell. Phase 2: ledger and pending payment survive reload.
  • Risks: None for players; every payout feature depends on it.

Ransom captives at the comms console

  • Players get: Call a faction and offer back their people you hold, prisoners or slaves. They quote a price; your negotiator can push for 25% more at a time at lower odds, and the dialog shows the odds. If they accept, silver arrives by drop pod within hours and the captive walks home. If they refuse, they won't talk ransom for 10 days, and a hostile faction may come to free the captive by force.
  • How: A postfix on FactionDialogMaker.FactionDialogFor(Pawn, Faction) inserts a DiaOption before Disconnect, found by position, not index. It is disabled with a reason when nobody qualifies or a cooldown runs.
    • Candidates: PrisonersOfColony and SlavesOfColonySpawned with HomeFaction == faction, not downed, not in a mental state, and not in the purchase ledger.
    • Price: MarketValue x 0.8 x relation (hostile 0.5, neutral 0.8, ally 1.0) x noble factor (1 + MostSeniorTitle seniority / 500; faction leader x3). An average neutral captive brings 1,120 silver, against 630 at a trader.
    • Odds: 0.6 + goodwill/200 + negotiator Social x 0.02, minus 0.25 per push, clamped 0.05 to 0.95. Permanent-enemy factions refuse unless the setting allows them; then they start at 0.3.
    • Accept: the payout helper delivers the silver after 0.1 to 0.3 days. GenGuest.PrisonerRelease or GenGuest.SlaveRelease frees the captive, so vanilla's walk-home goodwill applies, plus 5; a released slave drops your gear first (Released captives leave your gear behind). No trade happens, so no SoldSlave event. A 3-day cooldown per faction follows.
    • Refuse: 10-day cooldown per faction. A hostile faction has a 25% chance to send a rescue raid at DefaultThreatPointsNow x 0.8 in 3 to 7 days. The pending rescue (faction, map, points, due tick) lives in the Blax GameComponent, not in Storyteller.incidentQueue: vanilla RaidEnemy keeps parms.faction only while it is still hostile and otherwise picks a random hostile faction (IncidentWorker_RaidEnemy.cs:58-68), so a faction that made peace in the meantime would turn into a pirate raid. At the due tick, if the faction is still hostile and not defeated, the component calls IncidentDefOf.RaidEnemy.Worker.TryExecute with that faction and forced true; otherwise it drops the rescue without a message.
  • Settings: ransomEnabled (on; nothing happens until you call a faction), ransomFactor 80% (20 to 200), pushStep 25%, refuseCooldownDays 10 (3 to 30), acceptCooldownDays 3 (0 to 10), rescueRaidChance 25% (0 to 100), permanentEnemiesMayAccept (off).
  • Replaces: PrisonerRansom 794038005 (91,415 subs, no 1.7; in your mod list, where it loads its 1.6 DLL with a bundled Harmony 2.3.1.1), Prisoner Exchange 3495102506 (11,100, no 1.7; partly).
  • Effort: M.
  • Tests: With captives from a hostile and a neutral faction, the root node holds our option; with none it is disabled. A pawn bought from that faction's trader is not offered. Accept with odds forced to 1: a payment is pending, after 0.3 days map silver rises by the price and the captive is released; a second ransom within 3 days is disabled. Refuse with odds 0: cooldown set, and with raid chance 1 the component holds a pending rescue. At its due tick a still-hostile faction raids; a faction made neutral before the due tick sends nothing and no other faction raids instead. Phase 2: payment, cooldowns and the pending rescue survive reload.
  • Risks: Ransoming every captured raider pays well; the price factor, odds and both cooldowns bound it. Comms-console overhauls that rebuild the dialog may hide the option.

Factions buy back their people

  • Players get: Now and then a non-hostile faction with members among your captives writes in: "The Iron Ring offers 1,620 silver for Jana's freedom." Accept within 2 days for silver by drop pod and goodwill, and the pawn walks home. Nobles and leaders draw bigger offers.
  • How: A GameComponent check every 2,500 ticks. Each eligible faction (non-hostile, humanlike, with a healthy member as your captive on a player map who is not in the purchase ledger) rolls Rand.MTBEventOccurs with a 20-day MTB. Price: the ransom base x Rand.Range(1.0, 1.5), no odds roll, as a reward for patience. Offers come as a ChoiceLetter with a 120,000-tick timeout (LetterWithTimeout.StartTimeout). Accepting reuses the ransom payout and release, plus 8 goodwill; declining or timing out changes nothing. One offer open at a time, at least 5 days apart. Pawns targeted by a pending rescue raid are skipped.
  • Settings: buybackOffers (off until switched on), buybackMtbDays 20 (5 to 60), offer range 100 to 150% of the ransom price.
  • Replaces: none directly. The resocialization-offer idea of Prison Labor 1899474310 (174,969 subs), for slaves; vanilla only has the reverse (IncidentWorker_RansomDemand).
  • Effort: S.
  • Tests: Force the MTB for a friendly faction's slave: our letter appears with a price in range. A slave bought from that faction's trader never draws an offer. Accepting queues a payment and releases the pawn. The letter expires after 120,000 ticks. A hostile faction never sends one. Phase 2: an open offer survives reload.
  • Risks: Letter spam with many factions is held back by the one-offer limit and the gap.

Released captives leave your gear behind

  • Players get: A slave you ransom, sell back through a buy-back offer, emancipate to walk home or release any other way drops your weapons and armor on the spot before leaving, and keeps basic clothes. Without it, every ransomed slave walks home in the colony's flak vest with its rifle.
  • How: Vanilla GuestRelease starts the exit-map job with no gear drop (GenGuest.cs:44-80), and GenGuest.SlaveRelease calls it (GenGuest.cs:23-30). A prefix on GenGuest.SlaveRelease: when the pawn's HomeFaction is not the player (the pawn leaves the map, GenGuest.ShouldStayOnMapOnRelease false), drop carried and equipped weapons and Shell, Belt and Overhead apparel at the pawn's cell. Ransom and buy-back release through the same method, so one prefix covers all of them.
  • Settings: releasedDropGear (off until switched on).
  • Replaces: none. Answers a 186-upvote thread.
  • Effort: S.
  • Tests: Emancipating a foreign slave with a rifle and a flak vest leaves both on the ground, and the pawn leaves dressed. A ransomed slave drops its gear too. A colony-born slave emancipated into the colony keeps everything. With the setting off, vanilla.
  • Risks: Low.

Slave orders

Orders pay a premium on the appraised price, so they follow Slave value.

Faction slave orders

  • Players get: Factions that approve of slavery post orders by letter: "Wanted: 2 slaves with Plants 8+, healthy, 15 to 50 years. Pays 160% of the sale price and +15 goodwill. 20 days." Accept, then sell matching slaves to any trader of that faction or gift them by drop pod. Matching slaves are marked in the trade window; the premium follows by drop pod and the goodwill comes when the order is full.
  • How: GameComponent_BlaxMarket holds a List (faction, SkillDef, minimum level, optional minimum loyalty stage, count, filled, expiry tick, premium, goodwill).
    • Generation: MTB 15 days, at most 2 open orders, only non-hostile factions passing IdeoApprovesOfSlavery. Skill from Plants, Mining, Construction, Cooking, Crafting, Medicine, Melee or Shooting; minimum level 6 to 12 scaled by colony wealth; count 1 to 3; premium 1.4 to 1.8; goodwill 10 to 20. With loyalty on, a third of orders ask for Obedient or better. Offered as a ChoiceLetter.
    • Filling, through patches Blax Slaves already has: Frame_SoldSlave on Tradeable_Pawn.ResolveTrade (the player sells a colony slave and trader.Faction == order.faction) and Frame_GiftArrived on TransportersArrivalAction_GiveGift.Arrived. A match (skill, age, health 80% or more, IsSlave, not bought from that same faction per the ledger) adds 1 to filled and queues appraised sell price x (premium - 1) through the payout helper. The premium inherits appraisal's cap.
    • The buy-mode DrawCaptiveTradeInfo prefix draws "order +60%" on matching colony slaves; the captive branch keeps vanilla's icon and adds the tag.
    • On expiry a letter arrives; an accepted, unfilled order costs 5 goodwill. Orders cancel if the faction turns hostile or is defeated.
  • Settings: slaveOrders (off until switched on), ordersMtbDays 15 (5 to 60), maxOpenOrders 2 (1 to 5), premium 140 to 180%, unfilledPenalty -5 goodwill.
  • Replaces: Slave Contract Quest 3677019267 (220 subs, no 1.7).
  • Effort: M.
  • Tests: A Plants 8, count 1 order for a friendly pro-slavery faction. Selling a matching slave to that faction's trader fills it, and the pending payment is the appraised price x 0.6 at premium 1.6, within the cap. A Plants 3 slave doesn't fill it, nor does a slave bought from that faction. A gift-pod arrival fills it. Past the deadline the expiry letter and penalty apply. Phase 2: open orders survive.
  • Risks: Small Workshop signal (220 subs), so this is depth, not a draw. Letters instead of generated quests keep it at M.

Hire out

The riskiest feature in the plan, and players barely ask for it. It is the last step and gets built only if players ask once slave orders are out; otherwise it moves to Backlog.

Hire out slaves

  • Players get: At the comms console, an allied or neutral pro-slavery faction can hire your slaves. Pick the slaves and a term of 7, 15 or 30 days; they leave and come back at the end with wages of 1.2% of market value per slave per day (about 21 silver a day for an average slave, 315 for 15 days), plus goodwill and skill practice. A poorly suppressed slave may escape, a few come back hurt, and if the faction turns hostile it keeps them.
  • How: Built on vanilla's borrowed-pawn system instead of a custom holder: a Quest with a QuestPart_LendColonistsToFaction subclass. Vanilla then exempts the pawns from world-pawn garbage collection (IsBorrowedByAnyFaction), counts them for population (TotalBorrowedColonistCount), keeps GameEnder from ending the game while they're away, returns corpses of lent pawns who die, and shows the timer in the quest tab. Lent pawns stay world pawns and keep ageing. The subclass writes the private lentColonists list through FieldRefAccess, overrides Enable to take the chosen slaves, and overrides Complete to pay wages and roll escape and injury. Dialog_BlaxHireOut opens from a second option of the ransom FactionDialogFor postfix: a checklist of secure, healthy adult slaves, a term picker and a wage preview. Slaves leave by shuttle or drop pod; if they walk out, Patch_RunawayExitMap skips borrowed pawns.
    • Escape roll per slave: base chance x (1 - suppression at departure) x 0.5 if branded x (1 - loyalty) with loyalty on. Branded escapees go to GameComponent_BlaxRunaways.Register with the hirer's faction; others are lost, with a letter.
    • Return: RunawayDelivery's spawn logic (walk-in for tribal and medieval factions, drop pod for industrial and up), still IsSlaveOfColony. CastesApi.NotifyJoined(pawn, "blax.slaves.contractReturned") one tick after each return. Wages through the payout helper. SkillRecord.Learn grants 300 XP per day in the best enabled skill. +1 goodwill per slave per 5 days. An injury roll adds a random vanilla injury. A hirer hostile by then keeps them, with a letter.
  • Settings: laborContracts (on), wagePerDay 1.2% of market value (0.5 to 3), baseEscapeChance 10% (0 to 30), injuryChance 5% (0 to 20), deathChance 0% (0 to 5), terms 7/15/30 days, hirerMustApproveSlavery (on).
  • Replaces: none. Prison Expanded 3827258534 (3,298 subs) has labor contracts for prisoners only.
  • Effort: L.
  • Tests: Contract 2 slaves for 7 days to a friendly faction with escape chance 0: they leave, IsBorrowedByAnyFaction is true, they survive world-pawn GC, they aren't in the runaway registry, and the quest tab shows the timer. After 7 days they are back as IsSlaveOfColony, silver rose by 2 x 7 x 1.2% x market value, their best skill gained XP, and with Castes loaded each produced one NotifyJoined. Escape chance 1 plus a brand puts them in the runaway registry. A faction hostile at term end triggers the kept letter. Phase 2: an active contract survives reload mid-term.
  • Risks: The map can close while slaves walk out (abort and keep them). Castes policies stay untouched while away. Balance: 15 days of wages is about half a sale, tunable.

Control

Keeping slaves: suppression, rebellion and escape. Branding, branded trader slaves and returned runaways shipped in 1.0.

No doom timer

Both reviewers put the rebellion fix first after 1.2: it is the top complaint (Slave Rebellions Improved, 71k). Its safe threshold and MTB postfix are what Slave implants and Loyalty build on. Blax Laws reads CalmsBreaks from Wardens, not IsSafe.

No rebellion while suppressed

  • Players get: A slave whose suppression stays at or above the safe threshold (50%) never starts or joins a rebellion. Only neglected slaves revolt, and the rebellion tooltip says why a slave is safe.
  • How: A postfix on SlaveRebellionUtility.CanParticipateInSlaveRebellion returns false for a colony slave with Need_Suppression.CurLevelPercentage >= threshold. Vanilla's private InitiateSlaveRebellionMtbDaysHelper checks it first (MTB -1, shown as "Never"), and StartSlaveRebellion (the out-parameter overload both overloads reach), FindSlaveForRebellion and InteractionWorker_SparkSlaveRebellion all use it. MentalStateWorker_SlaveRebellion.StateCanOccur only checks FindSlaveForRebellion, so it gets its own postfix to block the Rebellion break for safe pawns. Below the threshold, a postfix on InitiateSlaveRebellionMtbDaysHelper multiplies a positive MTB by a setting; it runs inside vanilla's MTB cache, and the factors of Slave implants go into this same postfix. A postfix on GetSlaveRebellionMtbCalculationExplanation adds a "Blax Slaves" line, since vanilla returns "" for non-participants. Alert_SlaveRebellionLikely goes quiet on its own. Numbers: a Social 10 warden keeps a slave cycling between about 65% and 90%, so only unattended slaves drop under 50%. SlavesApi.IsSafe(Pawn) ships here.
  • Settings: safeSuppressionEnabled (off until switched on; open question 4 in features.md), safeThreshold 50% (0 to 100), unsafeRebellionMtbFactor 1.0 (0.25 to 4), blockRebellionBreakWhenSafe (on; acts only while safe suppression is on).
  • Replaces: Slave Rebellions Improved (Continued) 3259932217 (71,014 subs), Slave Rebellions Improved 2601801303 (11,458).
  • Effort: S.
  • Tests: Test through the vanilla callers (InitiateSlaveRebellionMtbDays, StartSlaveRebellion), not only CanParticipate, so a patch inlined away under the Waylith backend shows up as a failure. Call ClearCache between steps. A slave at 0.8 gives MTB -1; at 0.3 the MTB is above 0 and factor 2 doubles it. StartSlaveRebellion with an unsafe initiator leaves a 0.8 slave out of the lord. StateCanOccur is false at 0.8.
  • Risks: Slave Rebellions Improved patches the same methods; both only reduce rebellions, so they coexist and the Compat tab notes it. Slavery gets easier, which is the goal. Escape-route rules (orbit, asteroid) stay vanilla.

Rebellion options: armed slaves and calm genes

  • Players get: Two switches. Armed slaves are never safe (off by default). Slaves with a gene that stops prison breaks, Dead Calm or a modded one, never rebel.
  • How: Both live in the CanParticipate postfix. Armed: when on, a slave holding a weapon skips the safe rule, so vanilla's x4 weapon factor (CanApplyWeaponFactor) applies again; without this, the safe rule short-circuits it. Genes: any active gene with prisonBreakMTBFactor < 0 makes CanParticipate false, the same rule Pawn_GeneTracker uses for prisoners. It replaces a Dead Calm defName check: Dead Calm's aggro factor doesn't cover the Rebellion break, which is Malicious. Biotech only.
  • Settings: armedSlavesNeverSafe (off), calmGenesNeverRebel (off until switched on).
  • Replaces: Dead Calm Slave 2898122682 (2,071 subs, no 1.7).
  • Effort: S.
  • Tests: An armed slave at 0.8 has MTB above 0 with the switch on and -1 with it off. A Dead Calm slave at 0.1 gives -1 (Biotech only).
  • Risks: Allowing Hunting in work rules arms slaves; the tooltip on that work type says so.

Rebellion alerts use the safe threshold

  • Players get: Vanilla's "slaves unsuppressed" alert lists every slave below the safe threshold, worst first, with suppression and expected days to rebellion. Each vanilla slave alert can be hidden.
  • How: No new alert: vanilla already names culprits and jumps to them, so a third alert would duplicate a row. Only the Targets getter of Alert_SlavesUnsuppressed is patched (a loop, not inlinable). Vanilla's GetReport is CulpritsAre(Targets) and its GetExplanation is "SlavesUnsuppressedDesc".Translate(Targets[0]) (Alert_SlavesUnsuppressed.cs:10-28, 38-46). Patching GetReport alone would turn the alert on for a slave at 40% while Targets, still on vanilla's need.IsHigh (below 30%, :20), stays empty, and vanilla GetExplanation would then throw ArgumentOutOfRangeException on every tooltip draw. So a postfix on the Targets getter refills targetsResult, while safe suppression is on, with every colony slave below safeThreshold, sorted by InitiateSlaveRebellionMtbDays with -1 (sleeping or otherwise not participating) last. GetReport and GetExplanation both read it. A postfix on GetExplanation only appends one line per culprit with suppression % and days. Hide switches: the Targets postfix clears the list when hideUnsuppressedAlert is on, so GetReport finds no culprit; a prefix on Alert_SlaveRebellionLikely.GetReport (a full method with its own checks) returns AlertReport.Inactive when hideRebellionLikelyAlert is on.
  • Settings: hideUnsuppressedAlert (off), hideRebellionLikelyAlert (off).
  • Replaces: Slave Rebellions Improved (its named-alert part).
  • Effort: S.
  • Tests: A slave at 0.4 with threshold 0.5 makes the alert active with that pawn as culprit (vanilla ignores 0.4), and GetExplanation returns text without throwing. A sleeping slave at 0.2 sorts after an awake one at 0.4. At 0.9 it is inactive. Hide on gives Inactive for both alerts.
  • Risks: Cosmetic only.

Suppressed slaves don't break

  • Players get: Optionally, slaves at or above the safe threshold have no random mood breaks. The mood ring, trait states such as pyromania, and blood rage stay vanilla.
  • How: A prefix on the public MentalBreaker.TryDoRandomMoodCausedMentalBreak (MentalBreaker.cs:311) returns false for a colony slave at or above safeThreshold. Not the private CanHaveMentalBreak it calls first: TryDoMentalBreak checks it too (:330-337), and that is the path of blood rage and frenzy inducer berserks (AlwaysBerserkUtility.cs:15, 29), psilocap catatonia (IngestionOutcomeDoer_Psilocap.cs:15), book breaks (Book.cs:141) and Anomaly's breaks, which must stay vanilla. Not the CanDoRandomMentalBreaks getter the design named either: that getter also drives the mood ring, the break markers and trait mental states, and a tiny getter is the most likely target for CoreCLR to inline.
  • Settings: suppressedSlavesDontBreak (off).
  • Replaces: No Slave Mental Breaks 3728648822 (2,307 subs).
  • Effort: S.
  • Tests: Through MentalBreakerTickInterval with TestMoodMentalBreak forced: a slave at 0.8 gets no break with the setting on and vanilla behaviour with it off. The colonist bar mood ring still draws. A colonist is unaffected.
  • Risks: It removes a vanilla pressure valve, so it is off by default. "Wardens calm breakdowns" is the gentler fix.

Wardens

Ways to keep suppression up without a fight: wardens who top slaves up earlier, suppress a whole room at once and talk slaves out of breakdowns. Nothing in your mod list covers these. The threshold test is one helper, which recruit and convert reuse, so this step comes before Freedom and loyalty.

Warden suppression threshold

  • Players get: Choose when wardens top a slave up. Vanilla suppresses only below 70%; at 90% suppression stays near the top, well above the safe threshold. Vanilla's limit of one suppression per slave per day stays.
  • How: Only WorkGiver_Warden_SuppressSlave.JobOnThing reads the 70%, through need.CanBeSuppressedNow (WorkGiver_Warden_SuppressSlave.cs:24), a tiny getter on the private const CanSuppressMaxThreshold (Need_Suppression.cs:8, 12). Pawn_GuestTracker.ScheduledForSlaveSuppression checks only the daily gap (Pawn_GuestTracker.cs:250) and is a tiny getter itself, and JobDriver_SuppressSlave has no level-based fail condition (JobDriver_SuppressSlave.cs:22-26), so neither is patched. One helper, BlaxSuppression.BelowWardenThreshold(need) = need.CurLevel < wardenSuppressBelow, is the test everywhere. A postfix on JobOnThing: when vanilla returned null, the need's CurLevel is at or above 0.7 and the helper is true, it repeats vanilla's checks (ShouldTakeCareOfSlave, which is protected, through an AccessTools delegate; mode Suppress; not Downed; Awake; CanReserve; ScheduledForSlaveSuppression) and returns JobMaker.MakeJob(JobDefOf.SlaveSuppress, t). Suppress the whole room and the recruit and convert base call the same helper instead of CanBeSuppressedNow.
  • Settings: wardenSuppressBelow 70% (50 to 100).
  • Replaces: Useful Terror 2636462610 (its smarter-suppression part, 90% there).
  • Effort: S.
  • Tests: A slave at 80% with the setting at 90%: a warden gets a SlaveSuppress job; at 70% (vanilla) none. A slave suppressed within the last day, asleep, downed or in another mode gets none either way. A bystander at 80% in the same room is suppressed with the setting at 90%.
  • Risks: Wardens spend more time suppressing, so the default is vanilla.

Suppress the whole room

  • Players get: When a warden suppresses one slave, other awake slaves within 6 cells in the same room are suppressed too, at 70% strength, and count as done for the day. One warden can handle a barracks at mealtime.
  • How: A postfix on SlaveRebellionUtility.IncrementInteractionSuppression(initiator, recipient), whose only caller is InteractionWorker_Suppress. For every other awake colony slave in the radius and room for which BlaxSuppression.BelowWardenThreshold(need) and ScheduledForSlaveSuppression hold, it calls the public SlaveRebellionUtility.IncrementSuppression(need, initiator, slave, share x SuppressionPower x curve(level)), with vanilla's private static CurrentSuppressionFactorCurve read through StaticFieldRefAccess, then sets mindState.lastSlaveSuppressedTick. Calling IncrementSuppression, not the interaction method, means no recursion. Using the helper, not vanilla's CanBeSuppressedNow, makes bystanders follow the warden threshold.
  • Settings: roomSuppression (off until switched on), bystanderShare 70% (10 to 100), radius 6 (2 to 12).
  • Replaces: none.
  • Effort: S.
  • Tests: Three slaves at 0.4 in one room, suppress one: the other two rise by about 0.7x its gain and are no longer scheduled. A slave in the next room is unchanged. With the warden threshold at 90%, a bystander at 0.8 is suppressed too. Switched off, nothing happens.
  • Risks: Wardens never suppress sleeping slaves, so it fires mostly at meals and in shared workrooms; expect a modest effect. Each bystander shows its own text mote.

Wardens calm breakdowns

  • Players get: A warden walks over to a slave in a non-violent mental break and talks them out of it, at a 10% suppression cost, instead of watching a day-long tantrum.
  • How: A WorkGiver_Warden subclass for colony slaves in a mental state that is neither IsAggro nor the Rebellion state. It needs its own precheck, because ShouldTakeCareOfSlave requires SlaveIsSecure, which is false during a mental state. JobDriver: go to touch, 180-tick talk, MentalState.RecoverFromState, then suppression drops by the setting.
  • Settings: wardensCalmBreaks (off until switched on), calmSuppressionCost 10% (0 to 30).
  • Replaces: none. Asked for by the opening post of the 1,785-upvote "Slavery Is Useless" thread.
  • Effort: M (estimated S to M; I took the higher).
  • Tests: A slave in a sad-wander break gets a warden with the calm job; afterwards the break is over and suppression is 10% lower. A berserk slave and a rebelling slave get no job.
  • Risks: Modded mental states that block recovery stay as they are.

Lingering terror

Terror that lasts after a slave walks away. It stands alone and comes late: Useful Terror covers it on 1.7 today.

Lingering terror

  • Players get: Terror from skullspikes, gibbet cages and terror sculptures fades over hours instead of vanishing the moment a slave walks out of sight. Once switched on, the setting runs from 1 to 48 hours, default 12.
  • How: A postfix on the extension method TerrorUtility.GetTerrorLevel(Pawn), the single source for StatWorker_Terror and StatPart_Terror, returns max(vanilla level, stored peak x linear decay). Peak and tick per pawn sit in an in-memory dictionary, so removing the mod leaves nothing behind. A postfix on the StatWorker_Terror explanation adds "lingering: x%". The design's version (raise ObservedTerror.durationDays) can't work: PawnObserver.ObserveSurroundingThings calls TerrorUtility.RemoveAllTerrorThoughts on every pass, about every 450 to 750 ticks.
  • Settings: lingeringTerror (off until switched on), terrorLingerHours 12 (1 to 48).
  • Replaces: none listed. It answers the top point of a 2,852-upvote thread and is what players recommend Useful Terror for.
  • Effort: S.
  • Tests: A slave next to a skullspike has terror X; moved away for one observation pass, it still has X x the decay for one hour; switched off, it drops to vanilla at once.
  • Risks: A reload clears stored peaks until the next observation pass. Higher terror lowers the suppression fall rate through vanilla's curve, so slavery gets easier.

Idea: terror covers rebellion risks

Specified, not planned for a step. After No doom timer a safe slave never rebels: CanParticipateInSlaveRebellion is false and InitiateSlaveRebellionMtbDaysHelper returns -1 before any of the three factors (SlaveRebellionUtility.cs:131-134, factors at :147-158). So this only reaches slaves below the safe threshold, or every slave with safe suppression off; in practice slaves left unsuppressed while every colonist is away (IsUnattendedByColonists, :215-225). It waits until players report rebellions of unsafe slaves during caravan trips once No doom timer is out.

Terror covers rebellion risks

  • Players get: For slaves below the safe threshold, or with safe suppression off, terror weakens the three vanilla situations that make a rebellion far more likely: a usable weapon nearby (x4), a room that touches the map edge (x1.7) and no free colonist on the map (x20). At full terror each factor drops to x1, so such slaves can haul in the armory, work at the map edge or stay home while the colonists travel, as long as the terror holds. The rebellion tooltip shows each reduced factor.
  • How: The No doom timer postfix on InitiateSlaveRebellionMtbDaysHelper already sees every slave below the safe threshold. Vanilla divides the MTB by 1.7 when InRoomTouchingMapEdge, by 4 when CanApplyWeaponFactor and by 20 when IsUnattendedByColonists(Map) (SlaveRebellionUtility.cs:147-158). For each factor vanilla applied, the postfix multiplies the MTB back by factor ^ (terror x coverage), calling the same checks (the first two are private, through AccessTools delegates). Terror comes from TerrorUtility.GetTerrorLevel, so lingering terror counts. With "armed slaves are never safe" on, a slave holding a weapon keeps the full weapon factor. The explanation postfix adds one line per reduced factor.
  • Settings: terrorCoversRisks (off until switched on), terrorCoverage 100% (0 to 100; 50% halves the effect).
  • Replaces: Useful Terror 2636462610 (21,817 subs, maintained on 1.7; its rebellion-penalty part). Stands down while Useful Terror is active, and the Compat tab says so.
  • Effort: S.
  • Tests: Through InitiateSlaveRebellionMtbDays after ClearCache: an unsafe slave next to a rifle has vanilla's MTB at terror 0, the MTB without the weapon factor at terror 1, and the geometric middle at terror 0.5. The same for a map whose free colonists all left in a caravan. A safe slave stays at -1. Coverage 0 gives vanilla.
  • Risks: Terror becomes a strong lever; the coverage slider tunes it.

Running a slave workforce

The daily view of a big slave colony: what slaves may do, how fast, and where you see them. Time as a slave shipped in 1.2. The work rules and the colonist bar fill 1.7 gaps no active mod covers.

Slave work rules

  • Players get: Choose which banned jobs slaves may do (warden, hunting, art, research and any modded type) and their work speed, flat or scaled by suppression. Slave wardens never suppress other slaves.
  • How: The settings list every WorkTypeDef with disabledForSlaves true at load and record the originals. Allowing one sets disabledForSlaves false, which GuestUtility.GetDisabledWorkTypes reads live, then calls Notify_DisabledWorkTypesChanged on all colony slaves to clear the cache. Flat speed sets the private factor of the StatPart_Slave on WorkSpeedGlobal (Core XML 0.85, its only use) through FieldRefAccess. The suppression option sets that factor to 1.0 and adds a StatPart that runs from 70% at 0% suppression to 100% at full suppression; Loyalty can drive it later. A postfix on the protected WorkGiver_Warden.ShouldTakeCareOfSlave returns false when the warden is a slave, which also blocks self-suppression loops.
  • 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).
  • Tests: Allowing Research makes WorkTypeIsDisabled(Research) false for a slave; restoring makes it true. The WorkSpeedGlobal explanation shows x100% at 1.0. With the suppression option, a slave at 0% gets 0.7 and at 100% gets 1.0. A slave warden gets no SlaveSuppress job.
  • Risks: Newly allowed work types start at priority 0. Allowing Hunting arms slaves, which brings back the x4 weapon factor below the threshold. The balance shifts toward slaves against mechs, as players asked.

Hide slaves from the colonist bar

  • Players get: A toggle in the bottom-right play controls (vanilla slave icon) or a keybinding hides slaves on the map from the colonist bar, so big slave colonies keep a readable bar. Caravan slaves stay listed.
  • How: A postfix on PlaySettings.DoPlaySettingsGlobalControls adds the toggle with GuestUtility.SlaveIcon, plus a KeyBindingDef with no default key. Not a prefix on PlayerPawnsDisplayOrderUtility.Sort: it is a one-line wrapper around pawns.SortBy (PlayerPawnsDisplayOrderUtility.cs:12-15), small enough for CoreCLR to inline into its caller, so the prefix may never run. The patch goes on the private ColonistBar.CheckRecacheEntries, a large method that only does work while entriesDirty is set (ColonistBar.cs:210-297). A prefix stores entriesDirty in __state. When it was true and hiding is on, the postfix removes from cachedEntries every entry whose pawn is a spawned colony slave, adds Entry(null, map, group) for any map group left empty (as vanilla does at :261-264), rebuilds cachedReorderableGroups, and calls drawer.Notify_RecachedEntries() and drawLocsFinder.CalculateDrawLocs(cachedDrawLocs, out cachedScale, groupCount), the same closing steps vanilla runs. Caravan groups are left untouched. Toggling calls ColonistBar.MarkColonistsDirty.
  • Settings: hideSlavesFromBar (off, also toggled in game).
  • Replaces: SlaveBar 3019111152 (24,584 subs, stale since 1.5).
  • Effort: S.
  • Tests: A map with a colonist and a slave: ColonistBar.Entries contains the slave; after hide and MarkColonistsDirty it doesn't, and the draw locations count matches the entries. A caravan with a slave still lists it. An all-slave map still gets vanilla's empty group entry. A second CheckRecacheEntries call without MarkColonistsDirty changes nothing.
  • Risks: Colony Groups and other bar replacements bypass it; the Compat tab says so.

Slave overview

  • Players get: A "Slaves" main tab, text label only, with one row per colony slave: suppression, days until a possible rebellion ("Never" when safe), time as a slave and interaction mode. Columns appear as later features ship: appraised value (Slave value), loyalty and term (Freedom and loyalty), blood donor (Slave medicine). Sort by any column, click a name to jump to the slave. It is where slaves stay visible once they are hidden from the colonist bar.
  • How (new 2026-12-01, not checked against the code): A MainButtonDef opening a MainTabWindow_PawnTable over a PawnTableDef whose columns are PawnColumnWorker subclasses. They read SlaveRebellionUtility.InitiateSlaveRebellionMtbDays, the time-as-slave component and the ledger. The button's worker hides it while the colony has no slaves and without Ideology. No icon art: vanilla shows the label. Check that no def of the table enters a save, so adding or removing the mod stays clean.
  • Settings: slaveOverviewTab (on).
  • Replaces: none directly. SlaveBar 3019111152 (24,529 subs, last built for 1.5) shows that players want slaves out of the colonist bar; this gives them a place to look instead.
  • Effort: M.
  • Tests: With two slaves and a colonist the table lists exactly the two slaves. The rebellion column shows "Never" for a safe slave and a number for an unsafe one. Columns of switched-off or unbuilt features are absent. Without Ideology, or with no slaves, the button is hidden.
  • Risks: One more main tab; it only shows while you hold slaves.

Slave medicine

Medical depth was your ask. Slaves get the hospital, the operations and the medical care colonists have, and colonies that use slaves' bodies get rules that keep the slave alive.

One hospital

Shared infirmary and slave-surgeon rule

  • Players get: Sick or injured slaves may lie in colonist medical beds when no slave medical bed is free, so one hospital serves everyone. Colonists in a medical bed no longer get "slept in a room with a slave". Optionally, colonists may use slave medical beds, and slave doctors can be barred from operating on free colonists.
  • How: Vanilla RestUtility.CanUseBedNow rejects any bed whose ForSlaves differs from (guestStatusOverride ?? sleeper.GuestStatus), medical beds included (RestUtility.cs:119).
    • Bed check: a postfix on CanUseBedNow acts only when vanilla returned false and the case applies: setting on, not strict (below), sleeper IsSlaveOfColony, bed Medical, player-owned and of colonist owner type, and HealthAIUtility.ShouldSeekMedicalRest true. A postfix only sees false, not which check failed, so it never just returns true: that would also accept a burning bed (:86), a bed with no free slot (:104), vacuum, a race that can't use it, an ideoligion or forbidden bed, or a slave set to no medical care (:129), and could send two pawns into one slot. Instead it calls CanUseBedNow again with guestStatusOverride GuestStatus.Guest under a [ThreadStatic] reentry guard and returns that result. With Guest only the ForSlaves test changes; every other vanilla check still runs. Because the check itself allows the bed, the per-tick job fail checks (Toils_Bed.FailOnBedNoLongerUsable), TuckIntoBed and the rescue float menu (IsValidBedFor) accept it too. The design's retry flag broke there: the slave would find the bed, fail the job next tick and loop.
    • Bed search: vanilla FindBedFor almost never returns null for a slave. When no medical bed passes (:267-293) it falls through to the owned bed (:295) and then to any non-medical slave bed (:308-325), and FindPatientBedFor ends with FindBedFor(pawn) (:355). So a prefix on RestUtility.FindBedFor and FindPatientBedFor raises a [ThreadStatic] "strict" depth counter (FindPatientBedFor calls FindBedFor), so the first search behaves like vanilla and slave medical beds come first. The outermost postfix searches again when ShouldSeekMedicalRest(sleeper) is true and the strict result is null or not Medical: only colonist medical beds, with vanilla's two danger passes (Danger.None, then Deadly) and IsValidBedFor, strict off. It returns that bed if one is found, otherwise the strict result.
    • The colonist-into-slave-bed mirror works the same way (off). Thought: the existing TryGainMemory gate drops SleptInRoomWithSlave when the receiver's CurrentBed() is Medical. Surgeon rule: a postfix on Bill_Medical.PawnAllowedToStartAnew returns false with a JobFailReason when the doctor IsSlave and the patient IsFreeNonSlaveColonist; tending is unaffected.
  • Settings: slavesUseColonistMedicalBeds (off until switched on), colonistsUseSlaveMedicalBeds (off), noSleptWithSlaveInMedicalBed (off until switched on), slavesNoSurgeryOnFreeColonists (off).
  • Replaces: none. Vanilla gap behind the "slave-only, colonist-only furniture" wish.
  • Effort: M.
  • Tests: An injured colony slave with only a colonist medical bed: FindBedFor and FindPatientBedFor return it with the setting on and null with it off. An injured slave who owns an ordinary slave bed gets the colonist medical bed, not the owned bed. The slave walks there and lies in it for 2,500 ticks without the job failing. A free slave medical bed wins. A non-medical colonist bed stays invalid, and so do a burning colonist medical bed and one with every slot taken; FindBedFor gives a slave set to no medical care no colonist medical bed. A colonist asleep in a medical bed next to a sleeping slave for 2,500 ticks gets no SleptInRoomWithSlave; in a normal bed the thought still comes. PawnAllowedToStartAnew(slave doctor) on a colonist's bill is true by default and false with the rule on.
  • Risks: In a mass-casualty raid a slave can take the last colonist medical bed; colonists then fall back to normal beds, as vanilla does when beds run out. Colonies with only slave doctors get stuck with the surgeon rule on, so it is off. A Blax Zones sleeping zone switched to medical holds colonist medical beds, so slaves may use it too. Zones' own filters still decide, because its CanUseBedNow postfix runs after ours. Priority Treatment also postfixes PawnAllowedToStartAnew (harmless).

Surgery bills and medical care survive status changes

  • Players get: Operations you queued survive enslaving a prisoner, imprisoning a slave or freeing a slave into the colony, as long as the operation still applies. Without Blax Castes, the medical care level you set also survives.
  • How: Pawn_GuestTracker.SetGuestStatus ends with surgeryBills.Clear(), and BillStack.Clear doesn't mark bills deleted, so the same Bill instances can go back. A prefix copies the Bill_Medical list into __state. The postfix re-adds only bills no longer in the stack, and decides by the state after the call, not by guest.Released: vanilla frees a slave into the colony through EmancipateSlave, SlaveRelease and GuestRelease, which sets Released (GenGuest.cs:52) and then calls SetGuestStatus(null) while the pawn stays (:55-61), so skipping on Released would drop the bills in exactly the case players expect to keep them. It restores when the pawn ends as a colony prisoner, a colony slave, or a free member of the player faction (Faction.IsPlayer, not IsSlave, not IsPrisoner), whichever way it got there (enslaved, imprisoned, emancipated into the colony, recruited). It skips otherwise (released to leave, sold), when the status didn't change (SetGuestStatus returns early then), and while a prefix/finalizer flag on Pawn.PreTraded is set: a sale calls SetGuestStatus(null) while the pawn's Faction is still the player. Each bill must pass recipe.Worker.AvailableOnNow, plus CompletableEver for Recipe_Surgery workers. The same prefix and postfix save and restore the medCare that Pawn_PlayerSettings.ResetMedicalCare wipes; that part stands down when blax.castes is active, because Castes owns medical care.
  • Settings: keepSurgeryBills (on), keepMedicalCare (on; inactive while Castes is loaded).
  • Replaces: none. Vanilla gap and a recurring Simple Slavery bug report.
  • Effort: 2 x S (1 day).
  • Tests: A prisoner with a queued kidney bill keeps exactly one after GenGuest.EnslavePrisoner. A slave whose HomeFaction is the player keeps a queued bill through GenGuest.EmancipateSlave. A slave's brand bill is dropped on imprisonment (slave-only recipe). A slave sold through trade has no bills afterwards, and a prisoner released to walk home gets none restored. SetGuestStatus to the same status duplicates nothing. "No medicine" survives enslavement without Castes; in a -Compat run with Castes our restore doesn't run.
  • 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: No bill method is patched. BillStack.AddBill is two statements (BillStack.cs:69-73) and Bill_Medical.ShouldDoNow is "return !suspended" (Bill_Medical.cs:118-125), both tiny enough to be inlined. Recipe_RemoveBodyPart doesn't override CompletableEver, so a guard there would patch Recipe_Surgery's "return true" (Recipe_Surgery.cs:70-73), and a false CompletableEver makes WorkGiver_DoBill delete the bill without a word through BillStack.RemoveIncompletableBills (BillStack.cs:98-109), so the bill would be lost instead of waiting.
    • Instead the ledger component checks every 2,500 ticks while the setting is on. It walks health.surgeryBills of colony slaves and prisoners and treats every bill whose worker is Recipe_RemoveBodyPart on a natural organ as gated. It sets bill.suspended while any rule fails: the health gate (summaryHealth >= threshold, no HasHediffsNeedingTend, no BloodLoss), the stock target (stored organs of that def), or the last natural kidney or lung (GetNotMissingParts, not HasDirectlyAddedPartFor). It clears only the suspensions it set itself, tracked in the ledger, once every rule passes.
    • A suspended bill also drops out of surgeryBills.AnyShouldDoNow (HealthAIUtility.cs:74), so the patient doesn't lie in a medical bed while it waits. The bill shows vanilla's suspended state, and a message names the rule when the check first suspends it.
    • The stock count uses map.listerThings.ThingsOfDef in storage, because ResourceCounter returns 0 for organs (they are Uncounted). Thoughts use vanilla MyOrganHarvested and the existing harm gate. The player still queues every harvest; nothing is queued automatically.
  • Settings: harvestWaitsForHealth (off until switched on), healthThreshold 85% (50 to 100), stock target per organ (kidney 2, lung 2; 0 = no limit, max 10).
  • Replaces: Organ Harvest Button 3342852552 (1,127 subs, stale), Quick Ops 3844998950 (25, partly), Repeat Organ Harvest 3819036722 (3).
  • Effort: S.
  • Tests: A kidney bill on a slave at 60% health is suspended after the next check and AnyShouldDoNow is false; at 90% the suspension is lifted. With 2 stored kidneys, suspended. A slave with one natural kidney: suspended, and the bill is still in the stack after a doctor scans for work. A bill the player suspended by hand stays suspended after the gate passes. Switching the setting off lifts every suspension it set. Phase 2: the ledger's suspensions survive reload.
  • Risks: Prisoners of non-hostile factions still cost vanilla's -70 goodwill unless the captive-surgery setting of Prisoners count too is on. A player who unsuspends a held bill by hand sees it suspended again at the next check while the rule fails. If the mod is removed while a bill waits, the bill stays suspended (saved by vanilla) until the player resumes it. Demand is small; the value is the health gate.

Blood bank

  • Players get: With Biotech, colony slaves get a "blood donor" toggle. Donors get a hemogen extraction bill whenever they're well enough, like vanilla's prisoner hemogen farm, which slaves never had. Optionally your sanguophages may feed on donor slaves when no hemogen pack is in reach.
  • How: The ledger keeps the donor set. Every 15,000 ticks, the cadence of vanilla's prisoner-only HemogenFarm check in Pawn_GuestTracker, each donor who IsSlaveOfColony and passes SanguophageUtility.CanSafelyBeQueuedForHemogenExtraction (which already rejects a duplicate bill and BloodLoss) gets HealthCardUtility.CreateSurgeryBill(pawn, RecipeDefOf.ExtractHemogenPack, null, null, sendMessages: false). The toggle is a Command_Toggle from a Pawn.GetGizmos postfix with the vanilla HemogenPack icon, and it applies to every selected slave. Bloodfeeding: vanilla JobGiver_GetHemogen only feeds on prisoners. TryGiveJob also returns null when the pawn doesn't need hemogen (ShouldConsumeHemogenNow false, JobGiver_GetHemogen.cs:63-66), so a postfix acting on every null would bite donors whenever the think node runs. The postfix steps in only when the result is null, Gene_Hemogen.ShouldConsumeHemogenNow() is true, the pawn IsBloodfeeder and no hemogen pack was found. It picks the nearest donor slave that passes vanilla's CanFeedOnPrisoner checks adapted to slaves (:110-121): not WouldDieFromAdditionalBloodLoss(0.4499f), reachable and reservable at the pawn's normal max danger, not forbidden, not in an aggro mental state. It gives JobDef BlaxSlaves_FeedOnDonor (go to touch, wait 120 ticks, SanguophageUtility.DoBite with vanilla's prisoner amounts). Colonists' thoughts pass the existing harm gate. Slaves has no "new slaves donate" default; per-pawn defaults belong to Castes.
  • Settings: bloodBank (on, Biotech only), checkIntervalHours 6 (1 to 24), bloodfeedOnDonors (on).
  • Replaces: BetterHemogenFarm 2967718207 (273 subs, 1.4), and the slave half of Prison Labor 1899474310's hemogen mode and Custom Prisoner Interactions 2841231775's auto hemogen (both prisoner-only).
  • Effort: M.
  • Tests: Skipped without Biotech. After Fixtures.Tick(15000) a donor slave's BillStack holds ExtractHemogenPack; a non-donor and a donor with BloodLoss get none. A bloodfeeder colonist with low hemogen and no packs on the map gets BlaxSlaves_FeedOnDonor; with the setting off, null. The same colonist with full hemogen gets null, and a donor a bite would kill is skipped. Phase 2: the donor set survives.
  • Risks: Biotech-only: job and recipe references use MayRequire. Hemogen income per slave matches vanilla's prisoner farm. Doctors' workload rises with many donors. The bite path is rare, since the bank fills the fridge with packs.

Slave implants

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 (its postfix) and its explanation patch are generalised: the factor is the product of every hediff's BlaxSlaves_SuppressionFactor DefModExtension times SlaveLedger.FallFactor(pawn). The brand moves onto the extension. Loyalty and indenture have no hediff (a float and a term end tick in the ledger), so a hediff scan would never see them; FallFactor returns the loyalty stage factor times the indenture factor, 1 until those features ship. The explanation patch prints one line per hediff and one each for loyalty and the term. (One reviewer wanted this refactor with No doom timer; it ships here with its first new user, so a real feature tests it.) The MTB postfix of No doom timer doubles a positive MTB for implanted slaves. Install: a Recipe_InstallImplant subclass offered only for IsSlaveOfColony, research MicroelectronicsBasics, can fail like any vanilla implant. Removal: vanilla Recipe_RemoveImplant with removesHediff and spawnThingOnRemoved ComponentIndustrial; set priceImpact on purpose, since spawnThingOnRemoved raises market value. Mood: a slave-only ThoughtWorker, because the stock ThoughtWorker_Hediff maps hediff stages straight onto thought stages.
  • Settings: complianceImplant (on), fallFactor 70% (50 to 100), rebellionMtbFactor 2 (1 to 5), consciousnessCost 5% (0 to 20).
  • Replaces: Pawn Suppression Implants 2883152389 (7,801 subs; its suppressor), BK's Suppression! 2848034996 (1,628).
  • Effort: M.
  • Tests: After ApplyOnPawn on a colony slave the hediff sits on the Brain. Suppression fall rate is x0.7 against an identical slave, and the brand still gives x0.85 through the generalised patch. InitiateSlaveRebellionMtbDays is x2 after ClearCache. Emancipated into the colony: severity 0.5 and consciousness back to 100% with no other cache refresh. Removal refunds a component. The recipe isn't offered for colonists or prisoners. Phase 2: hediff and severity survive. -Compat with Slave Rebellions Improved.
  • Risks: SRI rewrites the rebellion odds; our postfix multiplies whatever MTB comes out. Brand plus implant gives 0.85 x 0.7 = 0.6 fall rate (intended; both are sliders).

Sedation relay

  • Players get: A second brain implant (Medicine 8, 3 components and 2 industrial medicine). When the slave starts or joins a rebellion or an aggressive mental break, the relay puts them under anesthesia after 2 seconds, and they wake up later still a slave. You can also fire it by hand from the slave's gizmo, or have it fire when the slave leaves an area you pick. One dose every 3 days; nothing explodes.

  • How: Brain hediff with the same Severity-driven Hediff_SlaveImplant stage (dormant when free, -3 mood while a slave) and HediffComp_BlaxSedationRelay, which saves lastFiredTick. Triggers:

    • A postfix on SlaveRebellionUtility.StartSlaveRebellion (out overload): when it returns true, every pawn in initiator.GetLord().ownedPawns with a charged relay is queued.
    • A postfix on MentalStateHandler.TryStartMentalState: when it returns true for a colony slave with a relay and stateDef.IsAggro, or the Rebellion state, which is Malicious and needs its own check.
    • Perimeter: a rare-tick check in the comp fires when the slave is outside its chosen area (default: home area) or starts an exit-map job outside a rebellion. The area picker sits on the gizmo.
    • Manual: "Sedate now" (needs a charge) comes from a Pawn.GetGizmos postfix (the blood donor toggle plans one too), for any spawned slave of the player faction with a charged relay, whatever its mental state or lord. Not from HediffComp.CompGetGizmos: hediff gizmos reach the bar only through health.GetGizmos, which Pawn.GetGizmos calls only when IsColonistPlayerControlled, IsColonyMech or IsPrisonerOfColony (Pawn.cs:3507). IsColonistPlayerControlled needs no mental state and IsColonist (:778-790), IsColonist needs guest.SlaveIsSecure (:522), and SlaveIsSecure is false in a mental state, on an exit-map job and while rebelling (Pawn_GuestTracker.cs:164-189). So the comp's gizmo would vanish exactly when a slave rebels, escapes or goes berserk.

    After 120 ticks the comp calls vanilla HealthUtility.TryAnesthetize (forceDowned), adding Severity only if vanilla's duration proves too short, and ends the mental state explicitly. Downed rebels leave the rebellion lord through Notify_PawnLost, and the lord ends when all members are down. A message names whose relay fired. Implanted slaves' rebellion MTB is x1.5 through the same MTB postfix.

  • Settings: sedationRelay (on), delaySeconds 2 (0 to 10), rechargeDays 3 (1 to 10), manualTrigger (on), perimeterTrigger (on), relayMtbFactor 1.5 (1 to 5).

  • Replaces: Simple Slavery Collars (+Tweaks) 2557274194 (52,376 subs, no 1.7; its control part, without explosives or new art), Pawn Suppression Implants 2883152389 (7,801; partly), Slavery Utilities 2559195643 (3,062, dead), Explosive Slave Collar 3536301170 (2,397; its anesthetic payload), Simple Shock Collar 3355202541 (840), Advanced Slave Collar 3540721928 (607).

  • Effort: M, plus S for the perimeter trigger (2.5 days).

  • Tests: Two slaves with relays: force StartSlaveRebellion(initiator, forceAggressive: true); after 120 ticks both carry Anesthetic and are downed, and a third slave without a relay isn't. A second trigger within 3 days does nothing, and the gizmo stays disabled until the recharge passes. The "Sedate now" gizmo is present on a rebelling slave and on a berserk one. A berserk state on an implanted slave sedates them. A slave leaving its area is sedated; one inside isn't. After the anesthetic wears off the pawn is still IsSlaveOfColony. The lord ends when all members are down. Phase 2: the charge persists.

  • Risks: A slave sedated next to a fire or in deep water takes vanilla risks (accepted). Pawns immune to downing are not stopped. With safe suppression in place it fires rarely, so it is depth rather than a draw. Reviewers split on timing; it ships after the compliance implant.

Endurance implant

  • Players get: "Endurance implant" for colony slaves (Medicine 6, Bionics research, 2 components and 1 industrial medicine). Work speed rises x1.15, which cancels vanilla's slave factor of x0.85. In exchange rest falls 20% faster and the slave takes a -3 mood. It goes dormant once the pawn is free.
  • How: HediffDef with the shared Severity-driven Hediff_SlaveImplant stage. The active stage has statFactors WorkSpeedGlobal 1.15 and RestFallRateFactor 1.2, which the normal StatWorker applies with no patch. Recipe like the compliance implant's, research Bionics. It is the in-game route to full-speed slaves; the work-speed slider of the work rules stays for players who want it globally.
  • Settings: enduranceImplant (on), workSpeedFactor 115% (100 to 130), restFallFactor 120% (100 to 150).
  • Replaces: 100% Slave Work Speed (1,966 subs; partly), Slaves Work at Full Speed (388; partly).
  • Effort: S.
  • Tests: An implanted slave's WorkSpeedGlobal is x1.15 and RestFallRateFactor x1.2 against an identical slave. A free colonist with the implant shows no change.
  • Risks: Stacks with work drugs, bionics and the work-speed slider like any implant; both factors are sliders.

Slave value

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

  • Players get: Selling a slave pays for the slave's quality. The trade tooltip lists the appraisal: well suppressed, branded by you, a skilled specialist, certified healthy, implanted, sold to a faction that honors slavery, or recently rebellious. Each slave's info card shows an appraised sale value next to what its spare organs would fetch.

  • How: Extends Patch_SlavePrices (1.2) for humanlike pawns while Ideology is active. pricePlayerSell is multiplied by SlaveAppraisal.Factor(pawn, TradeSession.trader); trader stock gets only the specialist factor on its buy price. Factors multiply, and the total is clamped to 0.5 to 1.75:

    • Suppression: lerp(0.85, 1.15, suppression level), colony slaves only.
    • Your brand: x1.10 (BrandUtility.IsBrandedByPlayer).
    • Specialist: +3% per level of the best skill above 9 (Plants 14 = +15%, 20 = +33%).
    • Certified healthy: x1.15, only if the pawn still passes the exam check at sale time.
    • Compliance implant: x1.10.
    • Recent rebel: x0.75 within 30 days. A postfix on StartSlaveRebellion (out overload) records participants in the ledger.
    • Buyer ideology, from the Slavery precept of the trader faction's primary ideo: Honorable x1.20, Acceptable and Classic x1.00, Disapproved x0.85, Horrible x0.75, Abhorrent x0.65 (only reachable with "buy anyway"). Factionless orbital traders x1.00. The buyer-ideology factor is skipped for a sale in buy-to-free mode, which has its own price factor.

    The 1.2 cap then applies: the sell price never exceeds 0.9 x what this negotiator would pay for the same pawn as a slave. Without it, a Social 20 negotiator buys a slave at 0.57 x market value and sells it branded and suppressed to an Honorable faction at 0.68, a profit on every slave at default sliders (vanilla loses: 0.475 against 0.57). The tooltip shows the cap line when it binds. A postfix on Tradeable.GetPriceTooltip adds one line per factor. New StatDef BlaxSlaves_AppraisedValue (category BasicsPawn, StatWorker_SlaveAppraisal, shown for colony slaves and prisoners) equals MarketValue x 0.6 x slaveSellFactor x grade for a neutral buyer. Its explanation also lists the summed trader sell price of the pawn's spare kidney and lung, so "harvest or sell" is visible. MarketValue itself is untouched, so wealth and raid points don't move. Loyalty adds Loyal x1.15. Example: an average adult (MV 1,750) sells for 630 in vanilla; at 80% suppression, your brand and Plants 14 the factor is x1.38 = 869, and to an Honorable faction x1.66 = 1,043 with an average negotiator.

  • Settings: appraisalEnabled (off until switched on). Weight per factor: suppression 15%, brand 10%, specialist 3% per level, certificate 15%, implant 10%, recent rebel -25% over 30 days, buyer ideology (on). showAppraisalStat (on).

  • Replaces: Profitable Slave Trade 3492615816 (378 subs, partly).

  • Effort: M, plus S for the organ line (2.5 days).

  • Tests: TradeSession with a TradeShip and with a faction whose test-made ideo has Slavery Honorable. A colony slave's sell price at 0% vs 100% suppression differs by 1.15/0.85 within 1%. Our brand gives x1.10, best skill 15 gives x1.18. After a recorded rebellion the price is x0.75. Sell <= buy holds for 50 random pawns. A Social 20 leader negotiator with every factor maxed sells below the slaver's buy price for the same pawn. The stat matches the trade sell price for a zero-bonus negotiator within 2%. Appraisal off gives exactly the 1.2 slider prices. The organ line lists kidney and lung for a healthy pawn and nothing for a pawn missing both spares. Phase 2: the rebellion record persists.

  • Risks: RimMarket and Auction House price from MarketValue, so appraisal doesn't reach them (documented). The slave economy gets richer, bounded by the 1.75 clamp, the cap and the per-factor sliders.

Health examination and certificate

  • Players get: A new medical bill, "health examination", for slaves and prisoners: no medicine, Medicine 4. A healthy pawn is certified for 30 days, worth +15% on sale. Otherwise the doctor's message lists what failed. A slave you harvested a kidney from can't be certified, so harvesting and selling compete.
  • How: RecipeDef BlaxSlaves_HealthExam: workerClass Recipe_HealthExam (a Recipe_Surgery subclass), workAmount 400, no body part, no anesthesia, surgeryOutcomeEffect null so CheckSurgeryFail never fails it. It teaches Medicine. A pass needs all of: SummaryHealthPercent >= 0.9; no Hediff_Addiction; no bad hediff with HediffComp_Immunizable or a chronic def; no missing or added part on a Kidney, Lung, Liver, Heart or whole limb (a lost finger or toe doesn't count, or most captured raiders would fail). A pass adds HediffDef BlaxSlaves_HealthCertificate (not bad, HediffComp_Disappears at 1,800,000 ticks). No postfix on Pawn_HealthTracker.AddHediff, which runs for every hediff on every pawn: appraisal rechecks at sale time, and a rare-tick HediffComp check removes stale certificates. CompletableEver is false while a valid certificate exists, and a failed exam sets a 1-day cooldown in the ledger, so the bill is no free Medicine XP farm.
  • Settings: healthExam (on), certificateDays 30 (10 to 60). The price bonus lives in appraisal.
  • Replaces: none.
  • Effort: S.
  • 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.

Honor by quality at the tribute collector

  • Players get: The Empire's tribute collector pays honor by quality instead of a flat 3. A sickly, cheap slave brings 1, an average adult 3, and a healthy, skilled slave with bionics up to 9.
  • How: Core's StatDef RoyalFavorValue has no parts list. A PatchOperationConditional adds one, and a PatchOperationAdd puts BlaxSlaves.StatPart_SlaveFavor in it. TransformValue only touches humanlike pawns and checks ModsConfig.RoyaltyActive (the stat is Core, so MayRequire doesn't fit): value x clamp(MarketValue / 1750, 0.33, 3.0), x1.1 with your brand, rounded, minimum 1. TradeUtility.GetPricePlayerSell returns Thing.RoyalFavorValue for TradeCurrency.Favor, so the tribute collector uses it with no code patch. Gold passes through untouched.
  • Settings: honorByValue (off until switched on), min multiplier 0.33, max 3.0 (1 to 5).
  • Replaces: none. Asked for in Steam discussion 3808407695167544169.
  • Effort: S.
  • Tests: A crippled pawn gives 1, an average adult 3, a pawn worth over 5,250 gives 9. Animals and gold are unchanged. With the setting off every pawn gives 3; with Royalty inactive nothing changes.
  • Risks: Honor per silver stays about constant, which weakens the vanilla cheapest-slave honor farm. Hediff offsets such as WCE2's brand still add before our factor.

Freedom and loyalty

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.

A way out

Recruit runs on its own persuasion counter, so it doesn't wait for loyalty. One reviewer wanted recruit next to the work rules; it stays with convert, which shares its warden-mode base. That base suppresses with the warden threshold helper from Control's Wardens step, which ships first. New slaves start in Suppress, as vanilla sets it (Pawn_GuestTracker.cs:501-503); recruit and convert are set per slave, and there is no "mode for new slaves" setting.

Recruit slaves

  • Players get: A new "recruit" order in the slave tab. Wardens keep the slave suppressed and talk them round once a day; at full persuasion the slave joins as a colonist, with no "imprison first" detour.
  • How: SlaveInteractionModeDef BlaxSlaves_Recruit (listOrder 25); the slave tab lists every def by listOrder.
    • Save safety: vanilla saves slaveInteractionMode with Scribe_Defs and repairs only the prisoner mode on load (Pawn_GuestTracker.cs:375, 394-399), and WorkGiver_Warden_SuppressSlave suppresses only in Suppress mode (WorkGiver_Warden_SuppressSlave.cs:19). A Blax mode in the save would load as null once the mod is removed, and that slave would never be suppressed again. So a Blax mode never reaches the save. The ledger's ExposeData, which the game runs before the world and the maps (Game.cs:401-403, 443), records every colony slave whose mode is BlaxSlaves_Recruit or BlaxSlaves_Convert. A prefix on Pawn_GuestTracker.ExposeData writes SlaveInteractionModeDefOf.Suppress into slaveInteractionMode while Scribe.mode is Saving, and a finalizer puts the real mode back. On load, the ledger's GameComponent.LoadedGame restores the recorded modes. Removing the mod leaves those slaves on Suppress.
    • WorkGiver_Warden_BlaxSlaveMode, a base shared with convert, hands out vanilla's SlaveSuppress job while BlaxSuppression.BelowWardenThreshold(need) and ScheduledForSlaveSuppression hold (JobDriver_SuppressSlave doesn't check the mode). Otherwise, once a day, a JobDriver (walk over, 180-tick wait) runs InteractionDef BlaxSlaves_PersuadeSlave: persuasion in the ledger rises by 4% x the warden's NegotiationAbility, so a warden at 1.0 needs 25 talks. The DoSlavePriceListing line shows progress. At 100%: CastesApi.HintJoinReason(pawn, "blax.slaves.slaveRecruited"), then InteractionWorker_RecruitAttempt.DoRecruit(warden, slave), which adds the quest signal, tale, record and RecruitedMe that RecruitUtility.Recruit alone skips, then FreedFromSlavery. Non-recruitable pawns are skipped with a reason line. Loyalty turns this counter into the loyalty value and adds passive gain. (The design's fallback was a 3% chance per talk; I took the counter because it persists, shows progress and becomes loyalty later.)
  • Settings: recruitMode (on), persuadeGain 4% (1 to 15).
  • Replaces: Recruit Slaves 2887124861 (26,336 subs), No Slave Mental Breaks (its recruit interaction).
  • Effort: M.
  • Tests: Recruit mode, warden and slave at 0.8 suppression: JobOnThing gives the persuade job; at 0.5 it gives SlaveSuppress. One talk raises persuasion. At 0.99 plus one talk the pawn is a non-slave member of the player faction with FreedFromSlavery, and the quest signal fired. An unrecruitable slave gets a null job. With the warden threshold at 90%, a recruit-mode slave at 0.8 gets SlaveSuppress first. Phase 2: persuasion persists; the saved file holds Suppress as the slaveInteractionMode of a slave in Recruit mode, and after the reload that slave is in Recruit again. Removal: the same save loaded without Blax Slaves leaves the slave on Suppress.
  • Risks: With Recruit Slaves also active the tab shows two recruit modes; the Compat tab says so. Another mod that reads slaveInteractionMode while saving sees Suppress for our slaves (harmless). With many slaves, wardens rarely get a free daily slot; room suppression helps.

Convert slaves

  • Players get: A "convert" order in the slave tab: wardens of the target ideoligion work on the slave's beliefs every day. When the slave converts, the order switches to suppress or recruit, whichever you chose.
  • How: SlaveInteractionModeDef BlaxSlaves_Convert (listOrder 26) on the shared base, which suppresses first below the warden threshold and never saves the Blax mode (see Recruit slaves). The target is vanilla's saved guest.ideoForConversion, set through a picker in the slave tab like vanilla's prisoner convert, default the player's primary ideo. Only wardens whose Ideo equals the target get the job, so colonies with several ideos work. The driver is built from vanilla Toils_Interpersonal.TryConvert, which runs ConvertIdeoAttempt with no prisoner check. When the slave's ideo equals the target, the mode switches to the "then" setting. Vanilla colonists already try to convert slaves in passing; this adds daily, directed pressure.
  • Settings: convertMode (on), afterConversion: Suppress (default) or Recruit.
  • Replaces: Custom Prisoner Interactions 2841231775 (51,153 subs; its convert-then idea, for slaves), Convert Slaves 3411130205 (7,104, no 1.7).
  • Effort: S.
  • Tests: A slave with a foreign ideo at certainty 0.01, after one forced interaction, has the target ideo and its mode becomes Suppress (or Recruit by setting). A warden of another ideo gets no job. The picker sets ideoForConversion, and it survives reload.
  • Risks: Ideology-only. Mods that change conversion math apply automatically.

Freedom pays off

  • Players get: A slave you emancipate who stays in the colony gets "freed from slavery" (+15) instead of "was enslaved" (-6). (Released slaves leaving your gear behind ships earlier, with Faction deals' Captives pay.)
  • How: A postfix on GenGuest.SlaveRelease: when the pawn stays as a colonist (HomeFaction is the player, the GenGuest.ShouldStayOnMapOnRelease case), remove WasEnslaved and add FreedFromSlavery. The gear drop's prefix on the same method is already there from Captives pay.
  • Settings: freedomMoodSwap (off until switched on).
  • Replaces: none. Asked for since 2019 ("+5 no longer a slave").
  • Effort: S.
  • Tests: Emancipating a colony-born slave gives FreedFromSlavery and no WasEnslaved. A foreign slave emancipated to walk home gets vanilla's thoughts.
  • Risks: Low.

Loyalty

Built on recruit's persuasion counter and the generalised fall-rate patch from the implants.

Loyalty

  • Players get: Well-kept slaves grow loyal over weeks. Stages show in the slave tab: Broken in, Obedient (never rebels), Loyal (sells for more, optionally full work and speed), then Devoted, when a letter asks whether to make them a colonist. Rebelling costs loyalty.

  • How: A float per pawn in the ledger, the same number recruit mode uses: missing means 0, so slaves who existed before the update get it, and removal is clean. No hediff (it would clutter the health tab and log missing-def errors on removal). A DoSlavePriceListing line shows it with a stage tooltip. Every 2,500 ticks over SlavesOfColonySpawned: +2% per day while suppression >= safeThreshold. Slave mood sits high (ExpectationsSlave gives +28 to +46), so mood mostly scales gain by x1 to x1.5: above 75% x1.5, below 25% -2% per day (rare). Modifiers: your brand x1.25, indentured x1.5, compliance implant x0.5 (fear isn't loyalty). Joining a rebellion: -30% (StartSlaveRebellion postfix). Stages, each with a fall-rate factor that SlaveLedger.FallFactor(pawn) hands to the generalised fall-rate patch (there is no hediff for a DefModExtension to sit on):

    • 0.25 Broken in: fall rate x0.8.
    • 0.5 Obedient: x0.6, and safe at any suppression through the No doom timer postfix.
    • 0.75 Loyal: x0.5, appraisal +15%, options for full work and full speed through work rules.
    • 1.0 Devoted: a ChoiceLetter, batched per day: Make colonist (HintJoinReason "blax.slaves.slaveRecruited", DoRecruit(null, pawn), which skips the letter but keeps the quest signal, then FreedFromSlavery) or Keep.

    Unwaveringly loyal pawns cap at Loyal unless a setting allows more. SlavesApi.Loyalty(Pawn) ships here.

  • Settings: loyaltyEnabled (off until switched on), baseGainPerDay 2% (0.5 to 10), rebellionPenalty 30%, obedientNeverRebels (on), loyalAllWork (off), loyalFullSpeed (off), devotedLetter (on), unwaveringCanBeDevoted (off).

  • Replaces: Simple Slavery Collars (+Tweaks) 2557274194 (52,376 subs, no 1.7; its slave-stage part), More Slavery Stuff 2896845138 (21,653; its "treatment decides rebellion" idea).

  • Effort: L.

  • Tests: A slave at 0.8 suppression and 0.6 mood, ticked 10 days, reaches about 0.2. A slave that existed before the feature starts at 0 and gains. At 0.5 the MTB is -1 even at 0.2 suppression. At 0.5 the SlaveSuppressionFallRate stat is x0.6 against an identical slave at 0, and the explanation shows a loyalty line. A forced rebellion costs 0.3. At 1.0 the letter arrives, and accepting gives !IsSlave and player faction. Phase 2: loyalty persists.

  • Risks: Long games get easier; the rate sliders tune it. Stacked fall factors (brand 0.85 x implant 0.7 x indenture 0.7 x Loyal 0.5 = 0.21) make suppression nearly free, so each is a slider.

Indentured servitude

Built on loyalty, which decides who is willing to stay, and on the buy-mode button. It can ship in two parts if needed: the gizmo and the term-end letter, then the trade option.

Indentured servitude

  • Players get: A gizmo gives selected slaves a term of 15, 30, 60 or 120 days. Indentured slaves lose suppression 30% slower and grow loyal faster because they can see the end. The trade button gains a third choice, "joins indentured", at 80% of the colonist price. When a term ends, a letter says whether the slave is willing to stay: welcome them as a colonist (only if willing), send them home with goodwill, or extend 15 days at a mood cost. Either way out gives "served my term" (+8, 10 days) instead of "was enslaved".

  • How: The ledger stores each pawn's term end tick and source. A SetGuestStatus postfix drops the term on sale, imprisonment or early release. The gizmo comes from a Pawn.GetGizmos postfix; the slave tab shows days left. While serving: a fall-rate factor x0.7 through SlaveLedger.FallFactor (no hediff, so not a DefModExtension) and loyalty gain x1.5.

    • Blax Laws as a source, only if Fabian says yes to Laws' open question 2 (indenture as a sentence): SlavesApi.StartIndenture(Pawn pawn, int days, string source) makes a convict a colony slave if it isn't one and registers the term like a gizmo term, with Laws' source saved next to it so the term-end letter names the sentence. Slaves owns the status and the term; Laws only hands over the convict and the days. How a convict's term ends (Welcome without the willingness check, since the convict was a colonist) is settled with that answer. Term-end letters are grouped per day. Willing means loyalty >= 50% (with loyalty off, a seeded roll from 30% at 20% mood to 90% at 80% mood). Choices:
    • Welcome: HintJoinReason "blax.slaves.indentureServed", then DoRecruit plus FreedFromSlavery; disabled if the pawn isn't Recruitable.
    • Send home: GenGuest.SlaveRelease with vanilla walk-home goodwill. Disabled with a reason when HomeFaction is null or the player, because ShouldStayOnMapOnRelease would quietly keep the pawn as a colonist and skip the willingness check.
    • Extend 15 days: BlaxSlaves_TermBroken (-10 for 15 days), loyalty -25%.

    After Welcome or Send home, WasEnslaved is removed and BlaxSlaves_ServedTerm added. autoResolve: the willing join, the rest go home. Buying: JoinStatus has no indentured value, so buy-mode keeps a pending Dictionary<Pawn, PurchaseMode>, cleared when the session closes or the pawn leaves stock, and the button cycles slave, indentured (30 days), colonist. The price postfix applies 0.8/0.6 to the slave buy price. A ResolveTrade(PlayerBuys) prefix calls HintJoinReason "blax.slaves.boughtIndentured"; the postfix registers the term and writes the purchase ledger, so ransom and buy-back skip the pawn. SlavesApi.TermDaysLeft(Pawn) ships here, and StartIndenture with it if Laws' question is answered yes.

  • Settings: indentureEnabled (on), term choices 15/30/60/120 days, fallFactor 70%, joinChance 30% to 90% (loyalty off only), indenturedBuyPrice 80% of the colonist price, extendDays 15, autoResolve (off).

  • Replaces: Indentured Servitude 2878184888 (1,311 subs, 8,244 lifetime, no 1.7), ServeTime 3259353607 (84).

  • Effort: M.

  • Tests: Indenture a slave for 15 days and tick 15 days: the letter is there. Welcome at loyalty 0.6 makes a free colonist with ServedTerm and no WasEnslaved; at 0.2 Welcome is disabled. Send home releases a foreign slave and is disabled for a colony-born one. Extend moves the end by 15 days and adds TermBroken. Fall rate is x0.7 while serving. Buying as indentured gives a slave with a 30-day term at 0.8/0.6 of the slave price, in the purchase ledger. If StartIndenture is built: a free colonist passed in for 15 days is a colony slave with a 15-day term and the given source. Phase 2: the term and its source survive reload.

  • Risks: Coexists with Recruit Slaves, which is an interaction, not a term. Many slaves mean many letters, hence grouping and autoResolve. M is tight; the split above is the fallback.

Colony conscience

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.

Prisoners count too

  • Players get: Optionally, the "harming slaves doesn't upset colonists" rule also covers prisoners, enslaving a prisoner included, and it can reduce the mood hit instead of removing it. Factions can optionally stop losing goodwill over surgery on captives you hold.
  • How:
    • (a) Widen the victim predicate in the SlaveHarm frames to IsPrisonerOfColony, keeping the pacifist and family exceptions. It stands down while No Sympathy For Prisoners (sk.noprisonersympathy) is active, so two vetoes don't stack and undercut the pacifist rule.
    • (a) also covers enslavement, the biggest thought source of a slave colony. GenGuest.TryEnslavePrisoner records EnslavedPrisoner and EnslavedPrisonerNotPreviouslyEnslaved with only a Doer arg (GenGuest.cs:145, 148). The shipped Frame_HistoryEvent finds a victim only through a Victim arg, a Corpse subject or GotBlinded and GotScarified (SlaveHarm.cs:271-293), and nothing frames TryEnslavePrisoner, so widening the predicate alone never reaches these events. Ideology's slavery precepts turn them into EnslavedPrisoner_Horrible and _Disapproved and their _Know thoughts (Data/Ideology/Defs/PreceptDefs/Precepts_Slavery.xml:49-161). A new frame on TryEnslavePrisoner pushes the prisoner as a protected victim; both events fire after SetGuestStatus has made it a slave. The gate only drops negative thoughts, so the Honorable precept's positive enslavement thoughts still come. No Sympathy For Prisoners removes these thoughts for pacifists too; Blax keeps the pacifist and family exceptions, and the Compat tab says so.
    • (b) Reduce mode: Patch_SlaveHarmGate scales Thought_Memory.moodPowerFactor and, for Thought_MemorySocial, opinionOffset by the same factor before letting the thought through. moodPowerFactor alone leaves opinion penalties (-5 to -20) at full strength.
    • (c) A prefix on the protected RecipeWorker.ReportViolation skips it when the patient is a colony prisoner without questTags, for every worker except Recipe_ExecuteByCut, which keeps vanilla's -100. ReportViolation is the single funnel for surgery, hemogen, implants and execution, so the execution exclusion is explicit. Colony slaves never trigger it in vanilla.
  • Settings: prisonersCountAsSlaves (off), harmMoodReduction 100% (0 to 100; 100 = full removal as today), captiveSurgeryNoGoodwillLoss (off; tooltip: execution still costs goodwill).
  • Replaces: No Sympathy For Prisoners 3533769253 (16,399 subs, in your mod list; with the enslavement frame), Prisoner Harvesting 3347850851 (13,090).
  • Effort: M.
  • Tests: Executing a prisoner with (a) on gives a non-pacifist colonist no new bad memories (Fixtures.NewBadMemories); a pacifist still minds. A colonist whose ideo rates slavery Horrible gets no EnslavedPrisoner memory when a warden enslaves a prisoner, and neither does the warden; a pacifist still does. With an Honorable ideo the positive thought still comes. At 50% a mood memory and an opinion thought are both halved. Harvesting a neutral faction prisoner's kidney leaves goodwill unchanged with (c) on and drops it by 70 with it off. Executing that prisoner by cut still drops goodwill with (c) on. -Compat with NSFP: (a) stands down.
  • Risks: (c) changes vanilla balance, so it is off by default. The broader gate needs more frame coverage in tests.

Storyteller weight

How much a slave counts for wealth, raids and population. Slaves Are Worthless is maintained on 1.7, so this is consolidation, not a gap.

Slave wealth, raid and population weight

  • Players get: Three sliders set how much a slave counts toward colony wealth, raid points and storyteller population (vanilla 75% each). Set them to 50% if slaves shouldn't make raids so much bigger, or 100% for a harder game.
  • How: Wealth: a postfix on WealthWatcher.ForceRecount adds sum(slave MarketValue x (setting - 0.75)) to the private wealthPawns field, with vanilla's filter (player-faction slaves on the map that aren't quest lodgers). Pocket-map watchers get their own call first, so nothing counts twice. Raid points: a transpiler on StorytellerUtility.DefaultThreatPointsNow replaces the ldc.r4 0.75 after get_IsSlaveOfColony with a call to SlaveWeight.RaidFactor(). If the pattern isn't found under the Waylith backend, it logs one warning, greys out the raid slider and leaves vanilla in place. Population: the private static, non-readonly StorytellerUtilityPopulation.PopulationValue_Slave is set at startup and when settings close. If Slaves Are Worthless is active, the raid and wealth parts stand down and log it.
  • Settings: slaveWealthWeight 75% (0 to 100), slaveRaidWeight 75% (0 to 100), slavePopulationWeight 75% (0 to 100).
  • Replaces: Slaves Are Worthless 3522135747 (10,157 subs, maintained on 1.7), Slaves Aren't People 2897601862 (1,930, 1.4).
  • Effort: M.
  • 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.

Works with the other Blax mods

  • Package ids: blax.slaves (this mod), blax.castes, blax.zones, blax.defaults, blax.laws. No hard dependencies. About.xml gets loadAfter entries for blax.castes and blax.zones next to the existing brrainz.harmony and Mlie.SYRMoreSlaves. No sibling goes into modDependencies, where Harmony stays the only entry, and there is no assembly reference. Load order is Castes, Zones, Slaves, Laws: Blax Laws lists blax.slaves in its loadAfter because it reads SlavesApi, and Slaves lists no Laws entry, so there is no loadAfter cycle. Defaults lists no sibling and no sibling lists Defaults, so its position doesn't matter.
  • 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.
Reason Fired by Call Castes treats it as
blax.slaves.runawayReturned RunawayDelivery.TryDeliver (existing code, wired in 1.2); it sets slave status directly NotifyJoined previous caste
blax.slaves.slaveRecruited recruit mode (Recruit slaves), Devoted letter (Loyalty), before DoRecruit HintJoinReason recruited
blax.slaves.indentureServed indenture Welcome (Indentured servitude), before DoRecruit HintJoinReason recruited
blax.slaves.boughtIndentured indentured purchase (Indentured servitude), ResolveTrade prefix before PreTraded HintJoinReason bought as slave
blax.slaves.contractReturned labor contract return (Hire out slaves) NotifyJoined keep current caste
  • Buying needs no call: buy-mode only sets guest.joinStatus before vanilla Pawn.PreTraded, and Castes classifies by the final status in its own PreTraded scope.
  • Not used yet: CastesApi.CasteLabels and PrePick (version 3), for the caste picker on the trade row (Trade, its own step that waits for Castes). CastesApi version 4 (per-caste values a sibling registers, Castes area 5, step 4), for a per-caste blood donor and indenture term, only if Fabian says yes to Castes' open question 1. CasteIdOf stays unused.
  • Calls into BlaxZones.ZonesApi: TryFindDropSpot(map, thing, out cell) inside BlaxDelivery.Drop for every silver payout (ransom and buy-back, order premiums, hire-out wages). The pod spawns exactly on that cell with TradeUtility.SpawnDropPod, as the ZonesApi contract asks; DropCellFinder.TradeDropSpot with DropThingsNear is the fallback. Payouts follow the zone's orbital checkbox. Pawns are never routed into zones: returned runaways and hired-out slaves use the vanilla spot. TryFindDropSpot and Version are all of ZonesApi version 1; the shared infirmary only touches Medical beds.
  • BlaxSlaves.SlavesApi (static): Version and IsSafe(Pawn) with No doom timer. CalmsBreaks (static bool, true while "Wardens calm breakdowns" is on) with Control's Wardens step, for Blax Laws. Loyalty(Pawn) with Loyalty, TermDaysLeft(Pawn) with Indentured servitude. Only if Fabian says yes to Laws' open question 2 (indenture as a sentence): StartIndenture(Pawn, int days, string source), also with Indentured servitude.
  • Calls from Blax Laws: Laws reads SlavesApi.CalmsBreaks, not IsSafe. While it is true, Laws leaves slaves in non-violent breaks to the wardens instead of subduing them. Laws treats slaves as offenders like colonists (warn, guilty, subdue, later jail and court), records a slave rebellion as a crime but leaves the rebellion itself to Slaves, and never touches suppression. Its designed jail for slaves would put a jailed slave back into slavery when the sentence ends, a write to slave status that waits for Fabian's decision (open question 1 in features.md); the ownership line below carries that exception in Laws' wording, conditional on his yes. Its indenture as a sentence would call StartIndenture (open question 3 in features.md).
  • Ownership: Castes owns every per-pawn policy default (apparel, food, drug, reading, medical care, schedule, work priorities, weapon loadout, allowed area, hostility, self-tend, carried medicine, fire at will, prisoner interaction) and, if Fabian says yes to Castes' open question 1, per-caste values other Blax mods register, which those mods apply. So Slaves never sets a policy: the medical-care keeper of "Surgery bills and medical care survive status changes" stands down when Castes is loaded, and blood donor and term have no "new slaves" default here. Zones owns sleeping spots, beds by zone, every friendly drop location and per-cell work rules (work rule areas); it never changes a pawn's work priorities or allowed area. Defaults owns the starting settings of vanilla stockpiles and growing zones, storage buildings, production bills, workbenches, buildings, animals and mechs, and what the game forbids when pawns go down, die or are stripped. It writes when something is made or joins, and through its opt-in forbid rules when a pawn goes down, dies or is stripped. It keeps nothing in the save. Slaves owns slave status (except the status Laws gives back to a slave it jailed, if Fabian agrees), the slave interaction mode (vanilla's modes plus Recruit and Convert), trade, prices, suppression, rebellion, slave medicine and the slave economy. Laws owns the colony's lawbook, cases, sentences and later trials, judges, attorneys and law votes, slaves included as offenders; it acts through vanilla arrest, capture, release and guilt plus its own non-lethal subdue job.
  • Shared conventions: patches applied one class at a time from a [StaticConstructorOnStartup] class with the "[Blax Slaves] N patches applied" log line (already in BlaxSlavesStartup); a ModSettings toggle for every feature; the headless test mod pattern (Tests/BlaxSlavesTests harness, run-tests.ps1), which Castes and Zones copy.

Backlog

  • Slave order chains such as "emancipate when healthy" or "convert, then recruit" (S to M): build on the warden-mode base once recruit and convert prove it.
  • Rebels may surrender (M): after No doom timer, rebellions get rare; check whether players still hit fights to the death.
  • Per-caste blood donor and indenture term through CastesApi version 4 (Castes area 5, step 4): Castes stores the value per caste and shows it in its manager, Slaves reads it for a pawn and applies it. Waits for Fabian's answer to Castes' open question 1 (recommendation yes) and for Blood bank and Indentured servitude.
  • Terror covers rebellion risks (S): specified under Control, "Idea: terror covers rebellion risks". After No doom timer it only reaches unsafe slaves; build it if players report rebellions of unsafe slaves during caravan trips.
  • Slave weight for caravan storyteller wealth: not covered by Storyteller weight; add if players report it.
  • Loyal slaves join parties (S to M): More Slavery Stuff 2896845138 (21,659 subs, last built for 1.6) offers slaves at gatherings as a precept. Check first how 1.7's gathering code (GatheringsUtility, LordJob_Joinable_Gathering) keeps slaves out; wait until players ask.

Cut

  • Turrets fire on rebelling slaves, turrets cause terror: Prisoners Should Fear Turrets (104k, maintained, in your mod list) stays installed for its prisoner half, so taking its slave half removes no mod. The Compat tab points to it.
  • Longer terror memories through ObservedTerror.durationDays: can't work, vanilla clears terror thoughts on every observation pass. Lingering terror replaces it.
  • A separate at-risk rebellion alert: vanilla alerts already name culprits; "Rebellion alerts use the safe threshold" retunes them instead.
  • Organ donor gizmo with automatic harvests: its stock check could never work (organs are uncounted) and demand is tiny (1.1k). "Organ harvests wait for health" keeps the useful part.
  • Slaves leave loose weapons alone: wrong premise, slaves and colonists don't pick up weapons in daily life; only rebels do.
  • Comms-console slave catalogue: L effort with world-pawn cleanup risk, and 1.1 caravans, stock-any-size, every-trader-buys and the slave ship already cover supply. Revisit after faction slave orders if players ask. Rimdeed (2411722784, in your mod list, no 1.7 build) is not a reason to build it: it hires colonists at the console, which is recruitment, not slavery.
  • Harvest Everything's part items and its lethal "harvest everything" surgery: a body-part system for every pawn, not slave rules, and each new part item needs a def and art. Open question 5 in features.md.
  • A "mode for new slaves" setting: new slaves start in Suppress as vanilla sets it; recruit and convert are orders given per slave.
  • Sedation collar apparel: needs art on every body type; the relay implant does the same job.
  • Absorbing Raiders Never Die (2024330186, in your mod list): vanilla 1.7 custom difficulty already has the slider (Difficulty.enemyDeathOnDownedChanceFactor, Difficulty.cs:77).
  • Per-join policy defaults (outfit, food, drugs, reading, medical care, area): Castes owns them, and the README points players there.
  • Slave sleeping zones and mass sleeping spots: Zones owns them.
  • Medical triage ("treat only if worth more than X"): medical care is a Castes policy; appraisal shows the value and the player decides.
  • New collar and outfit looks: need art, and there is no artist.
  • Explosive, shock or skull-piercer collars, torture, flogging, lobotomy, nerve staple, brainwash chair: beyond vanilla Ideology's tone. Sedation and the compliance implant cover control. Blax Laws' subdue is a capped fistfight that ends a break, not a punishment system for slaves.
  • Heart acidifier implant for permanent terror (Useful Terror): a threat implant, too close to the explosive collars above; the compliance implant covers control.
  • Terror building values (gibbet and terror sculpture buffs, lightweight skullspikes, from Useful Terror): building balance, not slave rules. It stays Useful Terror's.
  • Automated lethal harvests (heart, liver, harvest before execution): automating killing goes past vanilla's manual choice.
  • Slave romance and marriage rules: not a pain point.
  • Keeping slaves out of parties and funerals: vanilla 1.7 already does it.
  • Home factions angry when bought slaves are harvested: vanilla treats colony slaves as player faction, so no violation fires. Prisoners are covered by Prisoners count too.
  • Slave auctions and market events: RimMarket (50k) and Auction House (5.5k) do it on 1.7 and are maintained.
  • Prisoner arena and prisoner forced labor: maintained prisoner mods (Prison Labor, Prisoner Realism, Prison Expanded) cover it, and slaves already work.
  • Gene extraction farm: Auto-Extract Genes (65.8k, 1.7) already covers slaves.
  • Docility drug: needs item art, and drug schedules belong to Castes.
  • Slave-surgeon sabotage: players dislike punitive randomness; the slave-surgeon rule covers trust.
  • "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.
  • "Serving a term" +4 mood: indenture keeps one in-term benefit and the end reward.
  • Hereditary slave status, slave recreation need, upkeep accounting, "break this slave" contract: low demand, already vanilla, or control content.
  • WCE2 brand overlap, Prisoner Realism's contraband search and despair for slaves, History graph line, slave/colonist furniture toggles: WCE2 still loads a 1.6 DLL, the rest has weak demand, and the shared infirmary covers hospitals.