rimworld-blax-slaves/docs/features.md

222 lines
18 KiB
Markdown

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