docs: design synced with Zones and Defaults, DLC support section
CastesApi renumbered: read-only version 1 in 1.1 for Zones and Defaults, join calls in 1.3, pre-pick in 1.4. Animals and mechs go to Blax Defaults. Release table fixed: work priorities and the schedule are 1.0, totals match the rows (26 days). New DLC support section with a per-feature table.
This commit is contained in:
parent
dc59be968f
commit
221297b675
255
docs/design.md
255
docs/design.md
|
|
@ -2,19 +2,26 @@
|
||||||
|
|
||||||
Every slave you buy needs its apparel, food, drug and reading policy set by hand. Blax Castes bundles those policies into castes such as Slave or Miner slave, and puts each new pawn into the right caste the moment it joins.
|
Every slave you buy needs its apparel, food, drug and reading policy set by hand. Blax Castes bundles those policies into castes such as Slave or Miner slave, and puts each new pawn into the right caste the moment it joins.
|
||||||
|
|
||||||
|
Changes on 2026-11-29:
|
||||||
|
|
||||||
|
- DLC support: Castes works with any DLC combination, core only included. The new section "DLC support" holds the rule, the test plan (all 8 combinations of Royalty, Ideology and Biotech per release) and what each feature needs, checked against the 1.7 game data and DefOf attributes. Features that touch DLC content got their guard and their DLC-off test. No day count changed: the guards fit the existing estimates.
|
||||||
|
- At a glance: the total is 26 days, the sum of the rows (it said 23). Each release is the sum of its features, rounded up: 1.2 (M + S) and 1.3 (M + S + S) take 3 days, and 1.4 takes 2, since its work slot moved to 1.0. The 1.3 header drops Zones (its API moved to 1.1), and the 1.0 additions header carries the other 6 of 1.0's 12 days.
|
||||||
|
- Parts 1.0 built are marked as moved where later releases still described them: the schedule slot (1.2), the previous caste (1.3), work priorities (the 1.4 row). The 1.0 DLC behaviour follows the code: names of a DLC that is off stay in a caste, the slave rows show with a "Needs Ideology" note while they matter, and a save seeded without Ideology gets its Slave caste on the first load with it. DLC rows of later releases show with a "Needs <DLC>" note while they hold a pick or value instead of hiding.
|
||||||
|
- Blax Defaults joins "Works with the other Blax mods": animals and mechs go there, it reads `CastesApi` version 1, and the API is a contract across four repos.
|
||||||
|
|
||||||
## At a glance
|
## At a glance
|
||||||
|
|
||||||
| Version | What players get | Replaces (subs) | Days |
|
| Version | What players get | Replaces (subs) | Needs | Days |
|
||||||
|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| 1.0 | Castes that set apparel, food, drug, reading, medical care, schedule, work priorities and weapon loadout in one click, with hand changes kept per pawn. Ready-made Colonist, Slave and Prisoner castes. Every status change (bought, enslaved, recruited, freed, arrested, captured) moves the pawn into the matching caste automatically, and a pawn that comes back gets its old caste. Warnings for clashing defaults mods. | Automatic Slave Outfit (16.7k), PrisonerDefaults (1.1k), Plug and Play Joiner work (1.5k), and the join, schedule and work defaults of Better Pawn Control (228k), BPC Forked (1.3k) and 1trickPwnyta's Defaults (75k) | 12 |
|
| 1.0 | Castes that set apparel, food, drug, reading, medical care, schedule, work priorities and weapon loadout in one click, with hand changes kept per pawn. Ready-made Colonist, Slave and Prisoner castes. Every status change (bought, enslaved, recruited, freed, arrested, captured) moves the pawn into the matching caste automatically, and a pawn that comes back gets its old caste. Warnings for clashing defaults mods. | Automatic Slave Outfit (16.7k), PrisonerDefaults (1.1k), Plug and Play Joiner work (1.5k), and the join, schedule and work defaults of Better Pawn Control (228k), BPC Forked (1.3k) and 1trickPwnyta's Defaults (75k) | None (slaves: Ideology, Meditate hours: Royalty, Childcare: Biotech) | 12 |
|
||||||
| 1.1 | A caste button on selected pawns, policy delete guard, ideo conflict warnings, new caste from a pawn | Food Restriction Eleven starting policies, partly (15.4k) | 2 |
|
| 1.1 | A caste button on selected pawns, policy delete guard, ideo conflict warnings, new caste from a pawn. Read-only API for Blax Zones. | Food Restriction Eleven starting policies, partly (15.4k) | None (ideo warnings: Ideology) | 3 |
|
||||||
| 1.2 | Castes also set allowed area, hostility, self-tend, carried medicine and fire at will | Defaults' area, hostility and medicine defaults (75k), Plug and Play Joiner area (1.5k) | 2 |
|
| 1.2 | Castes also set allowed area, hostility, self-tend, carried medicine and fire at will | Defaults' area, hostility and medicine defaults (75k), Plug and Play Joiner area (1.5k) | None | 3 |
|
||||||
| 1.3 | A caste for every way a pawn joins, adult and child. Pickers in the prisoner tab. API for Blax Slaves and Zones. | Defaults' child defaults (75k), BPC's rescued-joiner fix (228k), PrisonerDefaults per-prisoner picks (1.1k) | 2 |
|
| 1.3 | A caste for every way a pawn joins, adult and child. Pickers in the prisoner tab. Join API for Blax Slaves. | Defaults' child defaults (75k), BPC's rescued-joiner fix (228k), PrisonerDefaults per-prisoner picks (1.1k) | None (slave rows: Ideology, child rows: Biotech, creepjoiner row: Anomaly) | 3 |
|
||||||
| 1.4 | Work priorities, shift schedules, default prisoner interaction, DLC switches, API support for a caste picker in Blax Slaves' trade window | Work Manager shifts, partly (14.2k), Plug and Play Joiner work (1.5k), prisoner defaults of Prison Labor and Custom Prisoner Interactions, partly | 4 |
|
| 1.4 | Shift schedules, default prisoner interaction, DLC switches, API support for a caste picker in Blax Slaves' trade window | Work Manager shifts, partly (14.2k), prisoner defaults of Prison Labor and Custom Prisoner Interactions, partly | None (DLC switches: Royalty or Biotech, some prisoner modes: Ideology, Biotech or Anomaly) | 2 |
|
||||||
| 1.5 | Castes exported to other colonies, caste colours | Better Policies (3.9k), Export Agency (16.3k), Save My Settings (3.8k), all partly | 3 |
|
| 1.5 | Castes exported to other colonies, caste colours | Better Policies (3.9k), Export Agency (16.3k), Save My Settings (3.8k), all partly | None | 3 |
|
||||||
| Total | | | 23 |
|
| Total | | | | 26 |
|
||||||
|
|
||||||
Effort: S = 0.5 days, M = 2, L = 5, summed per release and rounded up.
|
Effort: S = 0.5 days, M = 2, L = 5, summed per release and rounded up. Needs: "None" means the release runs on the core game, and a DLC in brackets marks the parts that switch off without it (see "DLC support").
|
||||||
|
|
||||||
## Defaults I picked
|
## Defaults I picked
|
||||||
|
|
||||||
|
|
@ -27,20 +34,20 @@ Change if you disagree.
|
||||||
- In an existing save the starter castes appear, but nobody moves until you click "Assign by status" and confirm.
|
- In an existing save the starter castes appear, but nobody moves until you click "Assign by status" and confirm.
|
||||||
- The name stays Blax Castes, with the subtitle "policy bundles and join defaults", because three other Workshop mods already use "caste".
|
- The name stays Blax Castes, with the subtitle "policy bundles and join defaults", because three other Workshop mods already use "caste".
|
||||||
- Castes 1.4 adds `PrePick` so Blax Slaves can put a caste picker next to its buy-as-slave toggle. The picker itself sits in the Blax Slaves backlog.
|
- Castes 1.4 adds `PrePick` so Blax Slaves can put a caste picker next to its buy-as-slave toggle. The picker itself sits in the Blax Slaves backlog.
|
||||||
- Not supported for now: multiplayer and animal castes.
|
- Not supported for now: multiplayer. Animals and mechs go to Blax Defaults, which gives them per-species join defaults.
|
||||||
|
|
||||||
## Data model
|
## Data model
|
||||||
|
|
||||||
### Caste
|
### Caste
|
||||||
|
|
||||||
- `Caste : Policy` with LoadKey "BlaxCaste". Ids, load IDs, rename (IRenameable) and duplicate (`CopyFrom`) work the vanilla way.
|
- `Caste : Policy` with LoadKey "BlaxCaste". Ids, load IDs, rename (IRenameable) and duplicate (`CopyFrom`) work the vanilla way.
|
||||||
- The Policy int id is the caste id. The API passes it as a string.
|
- The Policy int id is the caste id. The API (1.1) passes it as the string `"<token>:<id>"`. The token is a random int made once per `GameComponent_BlaxCastes` and saved with it, so an id stored by another mod never matches a new caste with the same number after Castes was removed and added back.
|
||||||
- Slots in 1.0: `ApparelPolicy`, `FoodPolicy`, `DrugPolicy` and `ReadingPolicy` (null = the caste leaves it alone), medCare as an int (-1 = leave alone, otherwise a `MedicalCareCategory`), the schedule as 24 `TimeAssignmentDef` names (null = leave alone), work priorities as work type defName to 0..4 (absent = leave alone) plus a "Start from nothing" flag, and the Weapons Tab Reborn loadout id (-1 = leave alone).
|
- Slots in 1.0: `ApparelPolicy`, `FoodPolicy`, `DrugPolicy` and `ReadingPolicy` (null = the caste leaves it alone), medCare as an int (-1 = leave alone, otherwise a `MedicalCareCategory`), the schedule as 24 `TimeAssignmentDef` names (null = leave alone), work priorities as work type defName to 0..4 (absent = leave alone) plus a "Start from nothing" flag, and the Weapons Tab Reborn loadout id (-1 = leave alone).
|
||||||
- Slots after the policies store defNames, labels or ints, never def references, and resolve with `GetNamedSilentFail`: schedule, work priorities and loadout id (1.0), area (label, per map), hostility, self-tend, carried medicine, fire at will, prisoner modes, DLC switches.
|
- Slots after the policies store defNames, labels or ints, never def references, and resolve with `GetNamedSilentFail`: schedule, work priorities and loadout id (1.0), area (label, per map), hostility, self-tend, carried medicine, fire at will, prisoner modes, DLC switches.
|
||||||
|
|
||||||
### Membership store
|
### Membership store
|
||||||
|
|
||||||
- One `GameComponent_BlaxCastes` holds all state: the caste list, `Dictionary<Pawn, CasteMembership>`, the join rows (reason to No caste, Default caste or a caste), the join queue, former-caste records, the next id, a seeded flag, the overlap mods this save was warned about, and API hints and pre-picks (1.3). The pawns that left the player side since the last tick sit in an unsaved field of the component, so they go away with the game. No static field holds the game or its pawns; the `Instance` cache is weak.
|
- One `GameComponent_BlaxCastes` holds all state: the caste list, `Dictionary<Pawn, CasteMembership>`, the join rows (reason to No caste, Default caste or a caste), the join queue, former-caste records, the next id, a seeded flag, the overlap mods this save was warned about, the API token (1.1), and API hints and pre-picks (1.3). The pawns that left the player side since the last tick sit in an unsaved field of the component, so they go away with the game. No static field holds the game or its pawns; the `Instance` cache is weak.
|
||||||
- `CasteMembership`: caste, auto flag (set by a join row or by hand), reason, tick. Caste = null means "casteless by choice". Later safety nets skip those pawns instead of reassigning them.
|
- `CasteMembership`: caste, auto flag (set by a join row or by hand), reason, tick. Caste = null means "casteless by choice". Later safety nets skip those pawns instead of reassigning them.
|
||||||
- No ThingComp and no data on vanilla objects. The only vanilla data Castes writes is the pawn's own policy fields, medical care, timetable and work priorities, plus its Weapons Tab Reborn loadout through that mod's API.
|
- No ThingComp and no data on vanilla objects. The only vanilla data Castes writes is the pawn's own policy fields, medical care, timetable and work priorities, plus its Weapons Tab Reborn loadout through that mod's API.
|
||||||
- Overrides are not stored. A slot value that differs from the caste is an override.
|
- Overrides are not stored. A slot value that differs from the caste is an override.
|
||||||
|
|
@ -57,13 +64,72 @@ Change if you disagree.
|
||||||
### Save safety
|
### Save safety
|
||||||
|
|
||||||
- Memberships save with `Scribe_Collections` (LookMode.Reference / Deep) and `logNullErrors: false`, because world-pawn GC leaves null keys. Null, Discarded and destroyed-but-not-dead keys are purged on save and after load.
|
- Memberships save with `Scribe_Collections` (LookMode.Reference / Deep) and `logNullErrors: false`, because world-pawn GC leaves null keys. Null, Discarded and destroyed-but-not-dead keys are purged on save and after load.
|
||||||
- PostLoadInit checks every slot (`CasteManager.CheckSlots`): policies with `db.All*.Contains`, a missing one becomes unmanaged, with one warning per caste; a schedule hour whose `TimeAssignmentDef` is gone becomes Anything and a work type that is gone is dropped, each with one warning; a loadout id Weapons Tab Reborn no longer has becomes unmanaged with one warning (without the mod the id is kept). Apply checks the same before every write. The manager runs the same check every frame, and saving runs it too.
|
- PostLoadInit checks every slot (`CasteManager.CheckSlots`): policies with `db.All*.Contains`, a missing one becomes unmanaged, with one warning per caste; a schedule hour whose `TimeAssignmentDef` is gone becomes Anything and a work type that is gone is dropped, each with one warning, while names of an official DLC that is off are kept with no warning (see "DLC support"); a loadout id Weapons Tab Reborn no longer has becomes unmanaged with one warning (without the mod the id is kept). Apply checks the same before every write. The manager runs the same check every frame, and saving runs it too.
|
||||||
- Policy load IDs contain the label. That is safe, because the caste and the policy sit in the same save.
|
- Policy load IDs contain the label. That is safe, because the caste and the policy sit in the same save.
|
||||||
- Former-caste records are keyed by ThingID string, not by reference, so a discarded pawn leaves no unresolved reference. The caste in a record is stored by id. The pawn's own policies are references, like a caste's policy slots, so a policy deleted since is skipped on return even when a new policy got its id (the game gives a new policy the highest id plus one, so deleting the newest one frees its id). A reference to a policy deleted since is dropped before each save, so loading never meets a reference it cannot resolve, or one that resolves to a new policy with the same load ID (`Policy.GetUniqueLoadID` is the label and the id, and a new policy that got the deleted one's id has its label too when both kept the default name). Records saved before that held the policy ids, which are looked up once on load.
|
- Former-caste records are keyed by ThingID string, not by reference, so a discarded pawn leaves no unresolved reference. The caste in a record is stored by id. The pawn's own policies are references, like a caste's policy slots, so a policy deleted since is skipped on return even when a new policy got its id (the game gives a new policy the highest id plus one, so deleting the newest one frees its id). A reference to a policy deleted since is dropped before each save, so loading never meets a reference it cannot resolve, or one that resolves to a new policy with the same load ID (`Policy.GetUniqueLoadID` is the label and the id, and a new policy that got the deleted one's id has its label too when both kept the default name). Records saved before that held the policy ids, which are looked up once on load.
|
||||||
- Former-caste records are pruned on save, after load and in the 2500-tick sweep when they are older than `formerCasteDays` or their caste is gone. Deleting a caste drops its records at once.
|
- Former-caste records are pruned on save, after load and in the 2500-tick sweep when they are older than `formerCasteDays` or their caste is gone. Deleting a caste drops its records at once.
|
||||||
- Removing the mod: pawns keep their last policies. The next load logs two red errors for the component: "Could not find class BlaxCastes.GameComponent_BlaxCastes" and "SaveableFromNode exception: Can't load abstract class Verse.GameComponent" (`ScribeExtractor.SaveableFromNode`). Both go away once the game is saved again.
|
- Removing the mod: pawns keep their last policies. The next load logs two red errors for the component: "Could not find class BlaxCastes.GameComponent_BlaxCastes" and "SaveableFromNode exception: Can't load abstract class Verse.GameComponent" (`ScribeExtractor.SaveableFromNode`). Both go away once the game is saved again.
|
||||||
- Adding it mid-save: `Game.ExposeData` creates the component. The starter castes are seeded once on `LoadedGame`.
|
- Adding it mid-save: `Game.ExposeData` creates the component. The starter castes are seeded once on `LoadedGame`.
|
||||||
|
|
||||||
|
## DLC support
|
||||||
|
|
||||||
|
Every Blax mod works with any DLC combination, core only included (rule of 2026-11-29). For Castes:
|
||||||
|
|
||||||
|
- No DLC in About.xml. Harmony is the only dependency.
|
||||||
|
- A feature that needs a DLC switches off cleanly without it: its setting or manager row shows it disabled with a "Needs <DLC>" note, and everything else keeps working. Join rows differ in one way: a row for a DLC that is off can still place pawns a save made with the DLC brought along (slaves, children), so it stays usable with the note while it holds a pick or such pawns exist, and is left out otherwise.
|
||||||
|
- DLC defs only through `MayRequire` in XML or the `[MayRequire<DLC>]` DefOf members, and stored names resolve with `GetNamedSilentFail`. DLC code runs behind `ModsConfig.<DLC>Active`. Reading a core field that a DLC fills (`IsSlave`, `DevelopmentalStage`, `IsMutant`) needs no check; writing DLC state or calling DLC code does.
|
||||||
|
- Castes' own data in a save made with a DLC loads without it. Castes saves defNames, labels and ints, never def references (see Data model), so its own data always resolves. Names of an official DLC that is off stay in the caste, with no warning: `DlcSupport` reads the DLC from the `[MayRequire<DLC>]` attribute of the vanilla DefOf field with that name. Meditate hours act as Anything and a Childcare priority is skipped, the manager notes them as "Meditate (needs Royalty)" or "Childcare 1 (needs Biotech)", and they work again once the DLC is back. A player who drops the DLC for good paints such hours over (the Anything brush counts the stored name, not the cell, `Dialog_ManageCastes.PaintsHour`) or clicks "Forget these" under the work note (`ForgetDlcOffWork`). "Apply to all members" hides while the only managed slot is a work slot that lists nothing but such types, since it would write nothing (`AppliesAnything`). Names nothing knows, from a removed mod, are still rewritten by the load check (`CheckSlots`) with one warning per caste. The Slave caste, its Slave outfit (a policy in the save, not a def) and the slave rows stay.
|
||||||
|
- Built in 1.0, the `ModsConfig` checks in Source/BlaxCastes:
|
||||||
|
- Ideology: the join defaults window shows the bought-as-slave and new-slave rows only while they still matter, that is while the colony has slaves (a save made with Ideology) or a slave row picks a caste, and then with a "Needs Ideology" note under them (`Dialog_JoinDefaults.ShowsSlaveRows`). Seeding makes no Slave caste, wires no slave row and marks the save as owed one (`StarterCastes.Seed`); the first load with Ideology adds it once (`StarterCastes.AddSlaveCasteIfOwed`, see "Starter castes and Assign by status"), with a Slave outfit made like the game's when the save has none. "Create Slave outfit" needs Ideology, since the game makes its Slave outfit only with it (`OutfitDatabase`). The settings page says slaves need Ideology and castes still work for colonists and prisoners, and the starter castes setting reads "Colonist and Prisoner" with the note "Slave caste: needs Ideology".
|
||||||
|
- Royalty: Meditate, a Royalty def (`TimeAssignmentDefOf.Meditate` is `[MayRequireRoyalty]`), applies as Anything without it (`ScheduleSlot.Resolve`), a stored Meditate hour stays in the caste (`ScheduleSlot.IsDlcOff`) with a note under the manager's grid, and the schedule row has four brushes instead of five.
|
||||||
|
- Biotech: no `ModsConfig` check needed. Babies (food slot, join queue) are found through the core `DevelopmentalStage`. The work slot lists Childcare only when its def exists; a stored Childcare priority stays in the caste and is skipped (`WorkSlot.IsDlcOff`), with a note under the work types. "Start from nothing" turns other work off only while at least one listed type is in the game (`WorkSlot.StripsOthers`), so a caste that lists only Childcare never leaves its members without work. A baby that grows into a child stays without a caste until the 1.3 growth rows; with Ideology a child of a slave parent becomes a slave as it grows up (`LifeStageWorker_HumanlikeChild`), and the SetGuestStatus hook puts it into the new-slave row like any other status change.
|
||||||
|
- Anomaly: no check needed. Mutants without policies are found through `IsMutant`, which is `mutant != null` and so false without Anomaly. A mutant whose def is gone (a save made with Anomaly, loaded without it) makes the game's own policy, food and work getters throw, since they read `mutant.Def`, so Castes leaves it alone: no slot, no join (`CasteUtility.IsMutantWithoutDef`).
|
||||||
|
- Odyssey: a gravship that leaves a map without a grav anchor passes the pawns left there to the world itself (`GravshipUtility.AbandonMap`), without `MapDeiniter.PassPawnsToWorld` and without ending a prisoner's status. A prefix and finalizer on it judge those pawns like a closing map: a prisoner left behind leaves its caste, colonists and slaves stay in the faction and keep theirs. The method is in the core assembly and returns at once without Odyssey.
|
||||||
|
|
||||||
|
Tests:
|
||||||
|
|
||||||
|
- `run-tests.ps1 -NoDlc` runs the suite on the core game. `-Dlc Royalty,Biotech` loads only the listed installed DLCs; every installed DLC stays listed as known, so the game does not switch a left-out one on as new.
|
||||||
|
- Every release runs all 8 combinations of Royalty, Ideology and Biotech: `-NoDlc`, `-Dlc` with each one alone, with each pair, and no switch for all three. Each run passes with no red errors. A test that needs a DLC skips with the reason (`T.Skip("needs Ideology (slaves)")`), after any core part it has. A test fails on any `[Blax Castes]` warning it did not declare (`T.ExpectWarning`, `T.AllowWarning`), and the startup test fails on any Blax Castes error or warning before the first test, world generation included.
|
||||||
|
- In 1.0 the slave fixtures, rows and transitions skip without Ideology, and the baby tests without Biotech. The Meditate hour (kept, and applied as Anything without Royalty), the number of starter castes (3 or 2) and of join rows (5, or 3 while no slave row picks a caste and the colony has no slaves) are checked both ways.
|
||||||
|
- Anomaly and Odyssey are not installed here, so they are guarded in code only and never run: the mutant checks (1.0), the creepjoiner row (1.3), the Study and Interrogate prisoner modes (1.4). The tests still run their DLC-off side: a mutant tracker without a def (`DlcTests.MutantWithoutDef`), Dark study and Fishing priorities kept and skipped (the DLC work tests pick the types whose DLC is off at run time, so they also hold with Anomaly or Odyssey on), and the gravship hook's body on a prisoner and a colonist. A gravship trip itself despawns its pawns without a status change, so they keep their caste like a caravan.
|
||||||
|
- The harness reloads within one run. `DlcTests` stores the names of DLCs that are off in a caste before the save and checks after the load that they are still there and that the load logged no Blax Castes warning, which is the state a save made with a DLC is in when it loads without it. Loading a real save across DLC sets is in the in-game check (`docs/ingame-check.md`).
|
||||||
|
|
||||||
|
| Feature | Release | Needs | Without it |
|
||||||
|
|---|---|---|---|
|
||||||
|
| Castes, caste manager, caste column, weapon loadout slot, overlap warnings | 1.0 | None | Same on the core game |
|
||||||
|
| Join rows: bought as colonist, new colonist, new prisoner | 1.0 | None | Same. Without Ideology the game rolls every trader's pawn as a colonist (`Pawn_GuestTracker.RandomizeJoinStatus`), so all purchases use the bought-as-colonist row |
|
||||||
|
| Join rows: bought as slave, new slave | 1.0 | Ideology | Shown with a "Needs Ideology" note while the colony has slaves or a slave row picks a caste; left out otherwise, picks kept |
|
||||||
|
| Starter castes Colonist and Prisoner, Assign by status | 1.0 | None | Same |
|
||||||
|
| Starter Slave caste, "Create Slave outfit" | 1.0 | Ideology | Not seeded and owed: the first load with Ideology adds it once, with a Slave outfit when the save has none, and picks it in the slave rows still at No caste. No button |
|
||||||
|
| Schedule slot | 1.0 | None | Same |
|
||||||
|
| Meditate hours | 1.0 | Royalty | No Meditate brush; a stored Meditate hour stays in the caste, acts as Anything and is noted "(needs Royalty)"; it works again with Royalty |
|
||||||
|
| Work priorities slot | 1.0 | None | Same |
|
||||||
|
| Childcare priority | 1.0 | Biotech | Not listed; a stored Childcare priority stays in the caste, is skipped and is noted "(needs Biotech)"; it works again with Biotech |
|
||||||
|
| Status changes: arrest, release, capture | 1.0 | None | Same |
|
||||||
|
| Status changes: enslave, free, imprison, sell and buy back a slave | 1.0 | Ideology | Never happen |
|
||||||
|
| Dark study and Fishing priorities | 1.0 | Anomaly, Odyssey | Like Childcare |
|
||||||
|
| Mutants skipped (no policies, no apparel, no schedule for subhumans) | 1.0 | Anomaly | No mutants exist; a mutant whose def is gone is left alone |
|
||||||
|
| A prisoner a gravship leaves behind leaves its caste | 1.0 | Odyssey | Never happens |
|
||||||
|
| Policy delete guard, caste gizmo, new caste from pawn, read-only API | 1.1 | None | Same |
|
||||||
|
| Ideo conflict warning | 1.1 | Ideology | Off, shown as "Needs Ideology" |
|
||||||
|
| Allowed area, hostility, self-tend, carried medicine, fire at will | 1.2 | None | Same |
|
||||||
|
| Join rows: starting, recruited prisoner, captured, wanderer, quest joiner, rescued | 1.3 | None | Same |
|
||||||
|
| Join rows: lodger arrived, lodger recruited | 1.3 | None | Same. Of Core and the installed DLCs only Royalty's hospitality quests bring lodgers, but mods do too, so the rows stay |
|
||||||
|
| Join rows: enslaved, emancipated, recruited slave; pre-pick when enslaved; slave tab picker | 1.3 | Ideology | Rows shown with a "Needs Ideology" note while the colony has slaves or a row picks a caste, left out otherwise, picks kept. The "when enslaved" pre-pick is not offered |
|
||||||
|
| Join rows: born (growth vat included), child colonist, child slave, came of age; child dropdowns | 1.3 | Biotech (child slave also Ideology) | Shown with a "Needs Biotech" note while the colony has children or a row or dropdown picks a caste, left out otherwise, picks kept. No new children are born |
|
||||||
|
| Join row: creepjoiner | 1.3 | Anomaly | Shown with a "Needs Anomaly" note while it picks a caste, left out otherwise, pick kept. Guarded in code only |
|
||||||
|
| Public API, pre-pick when recruited | 1.3 | None | Same |
|
||||||
|
| Shift schedules, trade-row picker support | 1.4 | None | Same. Blax Slaves hides its slave toggle without Ideology |
|
||||||
|
| Prisoner modes: maintain only, attempt recruit, reduce resistance, release, execution | 1.4 | None | Same |
|
||||||
|
| Prisoner modes: enslave, reduce will, convert | 1.4 | Ideology | Not offered; a stored mode is kept and not applied |
|
||||||
|
| Prisoner modes: bloodfeed, hemogen farm | 1.4 | Biotech | Not offered; a stored mode is kept and not applied |
|
||||||
|
| Prisoner modes: study, interrogate | 1.4 | Anomaly | Not offered; a stored mode is kept and not applied. Guarded in code only |
|
||||||
|
| DLC switches: room and apparel requirements, psyfocus target, entropy limit | 1.4 | Royalty | A row shows disabled with "Needs Royalty" while the caste holds a value, left out otherwise; values kept and not applied |
|
||||||
|
| DLC switches: hemogen packs, deathrest auto-wake | 1.4 | Biotech | A row shows disabled with "Needs Biotech" while the caste holds a value, left out otherwise; values kept and not applied |
|
||||||
|
| Caste templates, caste colours | 1.5 | None | An import drops the DLC defs the game lacks and reports the count |
|
||||||
|
|
||||||
|
Checked on 2026-11-29 against the 1.7 game: slaves, the Slave outfit, the ideo precepts and the enslave, reduce will and convert modes are Ideology; Meditate, titles, psyfocus and the hospitality quests are Royalty; babies, children (`Difficulty.ChildrenAllowed` is false without Biotech), the humanlike life stage workers (`MayRequire` in Core's LifeStages.xml), growth vats, genes, Childcare and the bloodfeed and hemogen farm modes are Biotech; mutants, creepjoiners and the study and interrogate modes are Anomaly. Reading policies, books, medicine carry and every tracker Castes writes in 1.0 are core.
|
||||||
|
|
||||||
## 1.0: castes and bought slaves (6 days)
|
## 1.0: castes and bought slaves (6 days)
|
||||||
|
|
||||||
Moved to 1.1 to keep 1.0 near a week: starter castes, overlap warnings, the policy delete guard, manager tools and the gizmo. Reviewers wanted starter castes and overlap warnings in 1.0. I picked the safer cut: 1.0 rows start at No caste and change nothing without a pick, and Castes already wins over other mods by applying a tick later. Reversed on 2026-11-29: starter castes, manager tools and overlap warnings are back in 1.0 (see "1.0 additions"); the delete guard and the gizmo stay in 1.1.
|
Moved to 1.1 to keep 1.0 near a week: starter castes, overlap warnings, the policy delete guard, manager tools and the gizmo. Reviewers wanted starter castes and overlap warnings in 1.0. I picked the safer cut: 1.0 rows start at No caste and change nothing without a pick, and Castes already wins over other mods by applying a tick later. Reversed on 2026-11-29: starter castes, manager tools and overlap warnings are back in 1.0 (see "1.0 additions"); the delete guard and the gizmo stay in 1.1.
|
||||||
|
|
@ -74,6 +140,7 @@ Moved to 1.1 to keep 1.0 near a week: starter castes, overlap warnings, the poli
|
||||||
- **How:**
|
- **How:**
|
||||||
- `CasteUtility.Apply(pawn, caste)` writes each managed slot through the vanilla setters: `CurrentApparelPolicy`, `CurrentFoodPolicy`, `CurrentPolicy` (drugs and reading), `playerSettings.medCare`.
|
- `CasteUtility.Apply(pawn, caste)` writes each managed slot through the vanilla setters: `CurrentApparelPolicy`, `CurrentFoodPolicy`, `CurrentPolicy` (drugs and reading), `playerSettings.medCare`.
|
||||||
- Per-slot checks. Apparel, drug and reading need the tracker, `!IsQuestLodger()`, no prisoner and no `disablePolicies` mutant; apparel also skips `disableApparel` mutants. Food needs `foodRestriction.Configurable`, a non-baby and no `disablePolicies` mutant. Medical care needs `playerSettings` and a flesh pawn. Prisoners get food and medical care only.
|
- Per-slot checks. Apparel, drug and reading need the tracker, `!IsQuestLodger()`, no prisoner and no `disablePolicies` mutant; apparel also skips `disableApparel` mutants. Food needs `foodRestriction.Configurable`, a non-baby and no `disablePolicies` mutant. Medical care needs `playerSettings` and a flesh pawn. Prisoners get food and medical care only.
|
||||||
|
- DLC: babies exist only with Biotech and mutants only with Anomaly. Both checks read core fields (`DevelopmentalStage`, `IsMutant`), so they need no `ModsConfig` check and never match on the core game.
|
||||||
- Assigning a caste, by hand or by a join row, writes every managed slot.
|
- Assigning a caste, by hand or by a join row, writes every managed slot.
|
||||||
- Sync: every slot edit goes through `CasteManager.SetSlot`. Members still on the old value get the new one. Members on another value keep it (the Follow rule from 1trickPwnyta's Defaults). A slot that was unmanaged has no old value, so making it managed moves every member; unmanaging a slot moves nobody.
|
- Sync: every slot edit goes through `CasteManager.SetSlot`. Members still on the old value get the new one. Members on another value keep it (the Follow rule from 1trickPwnyta's Defaults). A slot that was unmanaged has no old value, so making it managed moves every member; unmanaging a slot moves nobody.
|
||||||
- Edits inside a policy, such as the Slave outfit's filter, reach members through the vanilla reference already.
|
- Edits inside a policy, such as the Slave outfit's filter, reach members through the vanilla reference already.
|
||||||
|
|
@ -81,7 +148,7 @@ Moved to 1.1 to keep 1.0 near a week: starter castes, overlap warnings, the poli
|
||||||
- **Settings:** `enabled` (on). Off: nothing is applied, castes stay in the save.
|
- **Settings:** `enabled` (on). Off: nothing is applied, castes stay in the save.
|
||||||
- **Replaces:** Save My Settings (3648714184, 3,827 subs), applying clothing and food presets to pawns, partly.
|
- **Replaces:** Save My Settings (3648714184, 3,827 subs), applying clothing and food presets to pawns, partly.
|
||||||
- **Effort:** M, plus S for sync and S for the save safety in the data model (3 days).
|
- **Effort:** M, plus S for sync and S for the save safety in the data model (3 days).
|
||||||
- **Tests:** Phase 1: a caste with Slave outfit, Simple food, No drugs, None reading and HerbalOrWorse sets all five on `Fixtures.Colonist`. On a player prisoner, food and medical care change and the outfit tracker is untouched. A quest lodger and a baby skip the right slots. Two members, B set to Worker by hand: changing the caste from Slave to Nudist moves A only. Phase 2: castes, slots and memberships survive save and reload, including a casteless-by-choice entry.
|
- **Tests:** Phase 1: a caste with Slave outfit, Simple food, No drugs, None reading and HerbalOrWorse sets all five on `Fixtures.Colonist`. On a player prisoner, food and medical care change and the outfit tracker is untouched. A quest lodger and a baby skip the right slots (the baby test skips without Biotech). Two members, B set to Worker by hand: changing the caste from Slave to Nudist moves A only. Phase 2: castes, slots and memberships survive save and reload, including a casteless-by-choice entry.
|
||||||
- **Risks:** A pawn that happens to match the old value counts as following. Vanilla writes (ResetMedicalCare on a status change, TryDelete nulling fields, the mutant tracker nulling policies) show up as overrides. The column tooltip names the slot and its value, so the cause is visible.
|
- **Risks:** A pawn that happens to match the old value counts as following. Vanilla writes (ResetMedicalCare on a status change, TryDelete nulling fields, the mutant tracker nulling policies) show up as overrides. The column tooltip names the slot and its value, so the cause is visible.
|
||||||
|
|
||||||
#### Caste manager
|
#### Caste manager
|
||||||
|
|
@ -105,6 +172,7 @@ Moved to 1.1 to keep 1.0 near a week: starter castes, overlap warnings, the poli
|
||||||
- **Players get:** A Caste column left of the hostility, medical and policy columns. Click a cell, or drag-paint down the column, to assign. Header buttons open the caste manager and the join defaults.
|
- **Players get:** A Caste column left of the hostility, medical and policy columns. Click a cell, or drag-paint down the column, to assign. Header buttons open the caste manager and the join defaults.
|
||||||
- **How:**
|
- **How:**
|
||||||
- A `PatchOperationInsert` (order Prepend) before `li[text()="HostilityResponse"]` in `PawnTableDef[defName="Assign"]/columns` adds `PawnColumnDef BlaxCastes_Caste` with `PawnColumnWorker_BlaxCaste`. `PawnColumnWorker_Outfit` is the template.
|
- A `PatchOperationInsert` (order Prepend) before `li[text()="HostilityResponse"]` in `PawnTableDef[defName="Assign"]/columns` adds `PawnColumnDef BlaxCastes_Caste` with `PawnColumnWorker_BlaxCaste`. `PawnColumnWorker_Outfit` is the template.
|
||||||
|
- `HostilityResponse` is a core column. Core's Assign table lists `Ideo` and `Xenotype` before it with `MayRequire` for Ideology and Biotech, so the anchor holds in every DLC combination.
|
||||||
- Cell: `Widgets.Dropdown(..., paintable: true)`. The label is the caste name, "*" plus a tooltip naming overridden slots and their values, "(pending)" while a queued join will change the caste (the previous caste or the row gives one, or a No caste row takes a row-set caste away), or "Unchangeable" for quest lodgers.
|
- Cell: `Widgets.Dropdown(..., paintable: true)`. The label is the caste name, "*" plus a tooltip naming overridden slots and their values, "(pending)" while a queued join will change the caste (the previous caste or the row gives one, or a No caste row takes a row-set caste away), or "Unchangeable" for quest lodgers.
|
||||||
- Painting runs the matching menu action on every GUI event over a cell, the start cell included. A pawn already in the painted caste (or already casteless when painting No caste) is skipped while `Widgets.Painting`, so painting never wipes its hand changes. A click still rewrites every managed slot.
|
- Painting runs the matching menu action on every GUI event over a cell, the start cell included. A pawn already in the painted caste (or already casteless when painting No caste) is skipped while `Widgets.Painting`, so painting never wipes its hand changes. A click still rewrites every managed slot.
|
||||||
- Menu: No caste (stored as casteless by choice), each caste, Reset to caste, Edit caste.
|
- Menu: No caste (stored as casteless by choice), each caste, Reset to caste, Edit caste.
|
||||||
|
|
@ -120,7 +188,8 @@ Moved to 1.1 to keep 1.0 near a week: starter castes, overlap warnings, the poli
|
||||||
|
|
||||||
- **Players get:** A defaults window picks a caste for five rows: bought as slave, bought as colonist, new colonist, new slave, new prisoner. A bought slave arrives already wearing its caste's outfit and eating its food, and a message names the caste.
|
- **Players get:** A defaults window picks a caste for five rows: bought as slave, bought as colonist, new colonist, new slave, new prisoner. A bought slave arrives already wearing its caste's outfit and eating its food, and a message names the caste.
|
||||||
- **How:**
|
- **How:**
|
||||||
- Each row is No caste, Default caste or a specific caste. Rows live in the save component. Layout follows `Dialog_MedicalDefaults`. Without Ideology the window hides the two slave rows. Castes in the picker are sorted by label, like the column menu.
|
- Each row is No caste, Default caste or a specific caste. Rows live in the save component. Layout follows `Dialog_MedicalDefaults`. Without Ideology the window shows the two slave rows only while they still matter, that is while the colony has slaves or a slave row picks a caste, with a "Needs Ideology" note under them (`Dialog_JoinDefaults.ShowsSlaveRows`); otherwise it leaves them out. Their picks stay in the save. Castes in the picker are sorted by label, like the column menu.
|
||||||
|
- Without Ideology the game rolls every trader's pawn as JoinAsColonist (`Pawn_GuestTracker.RandomizeJoinStatus`), so every purchase lands in the bought-as-colonist row.
|
||||||
- Buying: a prefix on `Pawn.PreTraded` with PlayerBuys pushes "bought", a finalizer pops it. At apply time `IsSlave` picks the bought-as-slave or bought-as-colonist row. This covers Blax Slaves' buy mode, which only sets `guest.joinStatus` before `PreTraded`.
|
- Buying: a prefix on `Pawn.PreTraded` with PlayerBuys pushes "bought", a finalizer pops it. At apply time `IsSlave` picks the bought-as-slave or bought-as-colonist row. This covers Blax Slaves' buy mode, which only sets `guest.joinStatus` before `PreTraded`.
|
||||||
- Everything else goes to the new colonist, new slave or new prisoner row by final status: enslaving, recruiting, capturing, quest prisoners, slave-born children, Blax Slaves' returned runaways, modded paths.
|
- Everything else goes to the new colonist, new slave or new prisoner row by final status: enslaving, recruiting, capturing, quest prisoners, slave-born children, Blax Slaves' returned runaways, modded paths.
|
||||||
- Transition snapshot and deferral as in the data model. Vanilla's internal `SetGuestStatus(null)` calls on existing members do not re-queue them. A pawn sold between queue and apply is dropped. A specific reason beats a status fallback when a pawn is queued twice.
|
- Transition snapshot and deferral as in the data model. Vanilla's internal `SetGuestStatus(null)` calls on existing members do not re-queue them. A pawn sold between queue and apply is dropped. A specific reason beats a status fallback when a pawn is queued twice.
|
||||||
|
|
@ -129,7 +198,7 @@ Moved to 1.1 to keep 1.0 near a week: starter castes, overlap warnings, the poli
|
||||||
- If the row is No caste and a join row had put the pawn in its caste (membership auto), it leaves the caste. With `revertOnLeave`, each managed slot where the pawn still has the caste's value returns to the database default; medical care runs `ResetMedicalCare` only if the caste manages it and the pawn still has the caste's value. Slots changed by hand stay. This is PrisonerDefaults' revert on recruit. A caste picked by hand is never removed by a No caste row. The schedule, work priorities and loadout have no database default and are not reverted. Since the 1.0 additions the same revert runs when a row moves a row-set member to another caste, for the slots the new caste leaves alone.
|
- If the row is No caste and a join row had put the pawn in its caste (membership auto), it leaves the caste. With `revertOnLeave`, each managed slot where the pawn still has the caste's value returns to the database default; medical care runs `ResetMedicalCare` only if the caste manages it and the pawn still has the caste's value. Slots changed by hand stay. This is PrisonerDefaults' revert on recruit. A caste picked by hand is never removed by a No caste row. The schedule, work priorities and loadout have no database default and are not reverted. Since the 1.0 additions the same revert runs when a row moves a row-set member to another caste, for the slots the new caste leaves alone.
|
||||||
- Leaving the player faction, for example by being sold, ends the membership. Leaving the map is judged as a whole (see "Status changes and the old caste").
|
- Leaving the player faction, for example by being sold, ends the membership. Leaving the map is judged as a whole (see "Status changes and the old caste").
|
||||||
- Babies and quest lodgers are skipped until 1.3.
|
- Babies and quest lodgers are skipped until 1.3.
|
||||||
- **Settings:** `enableJoinDefaults` (on), `joinMessages` (on), `revertOnLeave` (on; only governs the revert when a row takes a pawn out of a row-set caste).
|
- **Settings:** `enableJoinDefaults` (on), `joinMessages` (on), `revertOnLeave` (on; only governs the revert when a row takes a pawn out of a row-set caste). Without Ideology the settings page says slaves need it.
|
||||||
- **Replaces:** Automatic Slave Outfit (2912063732, 16,672 subs). PrisonerDefaults (3531556159, 1,086 subs). The join defaults of Better Pawn Control (1541460369, 227,665 subs), Better Pawn Control Forked (3724294345, 1,308 subs) and 1trickPwnyta's Defaults (3285178686, 75,424 subs).
|
- **Replaces:** Automatic Slave Outfit (2912063732, 16,672 subs). PrisonerDefaults (3531556159, 1,086 subs). The join defaults of Better Pawn Control (1541460369, 227,665 subs), Better Pawn Control Forked (3724294345, 1,308 subs) and 1trickPwnyta's Defaults (3285178686, 75,424 subs).
|
||||||
- **Effort:** M (2 days).
|
- **Effort:** M (2 days).
|
||||||
- **Tests:**
|
- **Tests:**
|
||||||
|
|
@ -142,24 +211,25 @@ Moved to 1.1 to keep 1.0 near a week: starter castes, overlap warnings, the poli
|
||||||
- A pawn sold between queue and apply is dropped without errors.
|
- A pawn sold between queue and apply is dropped without errors.
|
||||||
- An exception inside the scope leaves the stack empty.
|
- An exception inside the scope leaves the stack empty.
|
||||||
- -Compat with Blax Slaves (and without Trade as Slave or Colonist, so Blax Slaves' own buy mode runs): its slave or colonist choice lands in the right row. -Tasoc adds Trade as Slave or Colonist, and the same test drives that mod's choice.
|
- -Compat with Blax Slaves (and without Trade as Slave or Colonist, so Blax Slaves' own buy mode runs): its slave or colonist choice lands in the right row. -Tasoc adds Trade as Slave or Colonist, and the same test drives that mod's choice.
|
||||||
|
- Without Ideology the window shows three rows, and five with the "Needs Ideology" note once a slave row picks a caste; the slave tests skip after their colonist and prisoner parts.
|
||||||
- **Risks:** Better Pawn Control and its fork write policies in their own SetGuestStatus postfix. Castes applies a tick later and wins, and warns about it (1.0 additions). While the game is paused after a trade, the pawn shows "(pending)" until the next tick.
|
- **Risks:** Better Pawn Control and its fork write policies in their own SetGuestStatus postfix. Castes applies a tick later and wins, and warns about it (1.0 additions). While the game is paused after a trade, the pawn shows "(pending)" until the next tick.
|
||||||
|
|
||||||
## 1.0 additions (scope change 2026-11-29)
|
## 1.0 additions (scope change 2026-11-29, 6 days)
|
||||||
|
|
||||||
#### Schedule slot
|
#### Schedule slot
|
||||||
|
|
||||||
- **Players get:** A caste can carry a daily schedule. Slaves, colonists and anyone who changes status get their caste's schedule automatically. A schedule changed by hand on one pawn stays until "Reset to caste".
|
- **Players get:** A caste can carry a daily schedule. Slaves, colonists and anyone who changes status get their caste's schedule automatically. A schedule changed by hand on one pawn stays until "Reset to caste".
|
||||||
- **How:**
|
- **How:**
|
||||||
- Slot: 24 `TimeAssignmentDef` defNames (null = unmanaged), resolved with `GetNamedSilentFail`. Meditate becomes Anything without Royalty. Written with `Pawn_TimetableTracker.SetAssignment` only when `pawn.timetable` exists (prisoners have none and skip the slot; the schedule lands when they become slaves or colonists).
|
- Slot: 24 `TimeAssignmentDef` defNames (null = unmanaged), resolved with `GetNamedSilentFail`. Meditate applies as Anything without Royalty, and the caste keeps it. Written with `Pawn_TimetableTracker.SetAssignment` only when `pawn.timetable` exists (prisoners have none and skip the slot; the schedule lands when they become slaves or colonists).
|
||||||
- Follow rule on the whole day: a member whose 24 hours equal the caste's old schedule moves to the new one; any other member keeps theirs. The override tooltip names "Schedule".
|
- Follow rule on the whole day: a member whose 24 hours equal the caste's old schedule moves to the new one; any other member keeps theirs. The override tooltip names "Schedule".
|
||||||
- Manager row: a 24-cell grid painted like the vanilla Schedule tab (the vanilla time assignment selector picks the brush), plus "Copy from pawn" (a float menu of colony pawns) and "Unmanaged".
|
- Manager row: a 24-cell grid painted like the vanilla Schedule tab (the vanilla time assignment selector picks the brush), plus "Copy from pawn" (a float menu of colony pawns) and "Unmanaged".
|
||||||
- The caste column is also added to `PawnTableDef` Restrict (the Schedule tab), right after the timetable column (see Built).
|
- The caste column is also added to `PawnTableDef` Restrict (the Schedule tab), right after the timetable column (see Built).
|
||||||
- **Settings:** covered by `enabled`.
|
- **Settings:** covered by `enabled`.
|
||||||
- **Replaces:** default schedules in 1trickPwnyta's Defaults (75k) and Better Pawn Control (228k).
|
- **Replaces:** default schedules in 1trickPwnyta's Defaults (75k) and Better Pawn Control (228k).
|
||||||
- **Tests:** a caste with a night schedule sets all 24 hours on a colonist and a slave; a prisoner skips it without errors; Follow rule (A follows, B with one hour changed keeps its own); an unknown defName becomes Anything; the schedule survives save and reload; the manager's grid paints only after a press that started on it.
|
- **Tests:** a caste with a night schedule sets all 24 hours on a colonist and a slave (the slave part skips without Ideology); a prisoner skips it without errors; Follow rule (A follows, B with one hour changed keeps its own); an unknown defName becomes Anything with one warning; in a run without Royalty a stored Meditate hour stays in the caste with no warning and applies as Anything; the schedule survives save and reload; the manager's grid paints only after a press that started on it.
|
||||||
- **Built (2026-11-29),** `ScheduleSlot.cs`:
|
- **Built (2026-11-29),** `ScheduleSlot.cs`:
|
||||||
- Checks: a timetable, not a quest lodger, not a prisoner (an arrested colonist keeps its timetable and is still skipped), not a mutant without policies, and not `IsSubhuman` (the vanilla Schedule tab leaves those out).
|
- Checks: a timetable, not a quest lodger, not a prisoner (an arrested colonist keeps its timetable and is still skipped), not a mutant without policies, and not `IsSubhuman` (the vanilla Schedule tab leaves those out).
|
||||||
- Unknown names become Anything three times over: `SetSlot` stores Anything, Apply resolves an unknown stored name to Anything, and `CheckSlots` rewrites it after a load with one warning. Without Royalty the Meditate def does not exist, so it resolves the same way.
|
- Unknown names become Anything three times over: `SetSlot` stores Anything, Apply resolves an unknown stored name to Anything, and `CheckSlots` rewrites it after a load with one warning. Names of an official DLC that is off are the exception (`ScheduleSlot.IsKept`): `SetSlot` and `CheckSlots` keep them with no warning and Apply resolves them to Anything, so Meditate hours act as Anything without Royalty and come back with it. The manager draws them as Anything and names them in a note under the grid (`Dialog_ManageCastes.ScheduleDlcNote`).
|
||||||
- Manager: the selector is vanilla's `TimeAssignmentSelector.DrawTimeAssignmentSelectorGrid`, so the brush is shared with the Schedule tab. Painting copies `PawnColumnWorker_Timetable` (mouse button held over a cell), with one change: the grid ends where the scroll view's scrollbar starts, so painting needs a press that started on the grid (`Dialog_ManageCastes.SchedulePaintAllowed`). Without it, dragging the scrollbar with the cursor a pixel or two onto the grid painted the last hours. "Unmanaged" is the "Leave alone" button, the word the other rows use. While unmanaged the cells show the game's starting schedule faded; painting one hour starts from it and, the slot having no old value, gives every member the whole day (the unmanaged tooltip and the manager hint say so, and "Copy from pawn" says the same). Each painted hour is one `SetSlot`, so followers follow hour by hour.
|
- Manager: the selector is vanilla's `TimeAssignmentSelector.DrawTimeAssignmentSelectorGrid`, so the brush is shared with the Schedule tab. Painting copies `PawnColumnWorker_Timetable` (mouse button held over a cell), with one change: the grid ends where the scroll view's scrollbar starts, so painting needs a press that started on the grid (`Dialog_ManageCastes.SchedulePaintAllowed`). Without it, dragging the scrollbar with the cursor a pixel or two onto the grid painted the last hours. "Unmanaged" is the "Leave alone" button, the word the other rows use. While unmanaged the cells show the game's starting schedule faded; painting one hour starts from it and, the slot having no old value, gives every member the whole day (the unmanaged tooltip and the manager hint say so, and "Copy from pawn" says the same). Each painted hour is one `SetSlot`, so followers follow hour by hour.
|
||||||
- The column goes right after the timetable (`CasteColumns.ApplyToSchedule`, Patches/BlaxCastes_ScheduleWork.xml). The Schedule tab has no extra top space, so its header starts at y 0, and `MainTabWindow_Schedule` draws the time assignment selector at (0, 0, 191, 65) after the table: one row of brushes 95.5 px wide at y 2 to 29.5, reaching x 476 with Royalty. The brushes draw on top of the header, and the header's buttons take the click first, so a column with header buttons anywhere left of x 476 steals the brush clicks. Everything left of the timetable is narrower than that (name 80 px or more, ideo, xenotype, copy and paste 36), and the timetable is at least 360 px, so right of it the column is always clear. The copy and paste buttons still sit next to the timetable.
|
- The column goes right after the timetable (`CasteColumns.ApplyToSchedule`, Patches/BlaxCastes_ScheduleWork.xml). The Schedule tab has no extra top space, so its header starts at y 0, and `MainTabWindow_Schedule` draws the time assignment selector at (0, 0, 191, 65) after the table: one row of brushes 95.5 px wide at y 2 to 29.5, reaching x 476 with Royalty. The brushes draw on top of the header, and the header's buttons take the click first, so a column with header buttons anywhere left of x 476 steals the brush clicks. Everything left of the timetable is narrower than that (name 80 px or more, ideo, xenotype, copy and paste 36), and the timetable is at least 360 px, so right of it the column is always clear. The copy and paste buttons still sit next to the timetable.
|
||||||
- The brushes in the manager share the row's width (four, five with Royalty), 64 to 96 px each; at the window's starting size that is about 91 px, about what the Schedule tab gives them. At 64 px "Recreation" does not fit the Small font.
|
- The brushes in the manager share the row's width (four, five with Royalty), 64 to 96 px each; at the window's starting size that is about 91 px, about what the Schedule tab gives them. At 64 px "Recreation" does not fit the Small font.
|
||||||
|
|
@ -172,10 +242,11 @@ Moved to 1.1 to keep 1.0 near a week: starter castes, overlap warnings, the poli
|
||||||
- Applied after the status is final (the one-tick deferral), because `SetFaction(player)` runs `EnableAndInitialize` and slaves ignore backstory disables. Work types where `Pawn.WorkTypeIsDisabled` is true are skipped, which avoids the `SetPriority` error. With manual priorities off (`Current.Game.playSettings.useWorkPriorities` false), any nonzero value means on. Castes stores the caste's own number anyway: `GetPriority` reads every stored nonzero value as 3 while manual priorities are off, so the game behaves the same, and when the player turns manual priorities on the member still has the caste's number. Storing 3 would detach every member at that moment, because nothing reacts to the switch.
|
- Applied after the status is final (the one-tick deferral), because `SetFaction(player)` runs `EnableAndInitialize` and slaves ignore backstory disables. Work types where `Pawn.WorkTypeIsDisabled` is true are skipped, which avoids the `SetPriority` error. With manual priorities off (`Current.Game.playSettings.useWorkPriorities` false), any nonzero value means on. Castes stores the caste's own number anyway: `GetPriority` reads every stored nonzero value as 3 while manual priorities are off, so the game behaves the same, and when the player turns manual priorities on the member still has the caste's number. Storing 3 would detach every member at that moment, because nothing reacts to the switch.
|
||||||
- Follow rule per work type: a member whose priority equals the caste's old value for that type moves; others keep theirs. The override tooltip names the work types that differ.
|
- Follow rule per work type: a member whose priority equals the caste's old value for that type moves; others keep theirs. The override tooltip names the work types that differ.
|
||||||
- Manager row: a list of work types (all `WorkTypeDef`s in vanilla order) with a cycle button per type: leave alone, 1, 2, 3, 4, off. "Start from nothing" (per caste, off by default) turns every other work type off before writing, for castes that should do only their listed work.
|
- Manager row: a list of work types (all `WorkTypeDef`s in vanilla order) with a cycle button per type: leave alone, 1, 2, 3, 4, off. "Start from nothing" (per caste, off by default) turns every other work type off before writing, for castes that should do only their listed work.
|
||||||
|
- Childcare is a Biotech work type (`WorkTypeDefOf.Childcare` is `[MayRequireBiotech]`). Without Biotech the row does not list it; a stored Childcare priority stays in the caste with no warning, is skipped, and shows in a note under the work types as "Childcare 1 (needs Biotech)" (`WorkSlot.IsDlcOff`). It works again with Biotech.
|
||||||
- The caste column is also added to `PawnTableDef` Work, before the work columns.
|
- The caste column is also added to `PawnTableDef` Work, before the work columns.
|
||||||
- **Settings:** `manageWorkPriorities` (on). The row is greyed out with a note when Work Tab, Free Will, Work Manager, AutoPriorities or WorkRoles is active (packageIds checked before shipping), because they reset priorities all the time.
|
- **Settings:** `manageWorkPriorities` (on). The row is greyed out with a note when Work Tab, Free Will, Work Manager, AutoPriorities or WorkRoles is active (packageIds checked before shipping), because they reset priorities all the time.
|
||||||
- **Replaces:** default work priorities in 1trickPwnyta's Defaults (75k) and Plug and Play Joiner (1.5k).
|
- **Replaces:** default work priorities in 1trickPwnyta's Defaults (75k) and Plug and Play Joiner (1.5k).
|
||||||
- **Tests:** a slave in a caste with Growing 1 and Firefighting 1 has both, other types unchanged; a disabled work type stays 0 with no log error; "Start from nothing" leaves only the caste's types, plus Patient and Bed rest as they were; with manual priorities off, nonzero becomes on and turning them on detaches nobody; clicking the cycle button through other values moves only the members that followed before the first click, and pawns "Assign by status" puts into the caste during the run follow its next clicks; Follow rule per type; survives save and reload.
|
- **Tests:** a slave in a caste with Growing 1 and Firefighting 1 has both, other types unchanged (skips without Ideology; the other work tests use colonists); a disabled work type stays 0 with no log error; "Start from nothing" leaves only the caste's types, plus Patient and Bed rest as they were; with manual priorities off, nonzero becomes on and turning them on detaches nobody; clicking the cycle button through other values moves only the members that followed before the first click, and pawns "Assign by status" puts into the caste during the run follow its next clicks; Follow rule per type; survives save and reload. In every run the work types whose DLC is off (read at run time) stay in the caste with no warning and are skipped, a caste that lists only those with "Start from nothing" turns no work off, shows no "Apply to all members", and "Forget these" drops them without moving anyone; a work type from a removed mod is dropped with one warning.
|
||||||
- **Risks:** automatic work managers fight any fixed priorities, hence the detection.
|
- **Risks:** automatic work managers fight any fixed priorities, hence the detection.
|
||||||
- **Built (2026-11-29),** `WorkSlot.cs`:
|
- **Built (2026-11-29),** `WorkSlot.cs`:
|
||||||
- Colonists and slaves of the player with initialized work settings; prisoners and quest lodgers are skipped.
|
- Colonists and slaves of the player with initialized work settings; prisoners and quest lodgers are skipped.
|
||||||
|
|
@ -185,7 +256,7 @@ Moved to 1.1 to keep 1.0 near a week: starter castes, overlap warnings, the poli
|
||||||
- Comparisons (Follow rule, overrides) use the priority as the game treats it: with manual priorities off, every nonzero value counts as on, so a caste value 1 and a pawn on 3 match. A work type the pawn cannot do never counts as an override.
|
- Comparisons (Follow rule, overrides) use the priority as the game treats it: with manual priorities off, every nonzero value counts as on, so a caste value 1 and a pawn on 3 match. A work type the pawn cannot do never counts as an override.
|
||||||
- Greyed out means off: while `manageWorkPriorities` is off or a work manager is active, nothing is written and work never counts as an override. The caste keeps its values. The manager shows the reason; the settings page names the active work manager.
|
- Greyed out means off: while `manageWorkPriorities` is off or a work manager is active, nothing is written and work never counts as an override. The caste keeps its values. The manager shows the reason; the settings page names the active work manager.
|
||||||
- The manager lists the visible work types in the Work tab's order (`WorkTypeDefsInPriorityOrder`), three columns, each with a cycle button (left click; the cycle wraps). The tooltip shows the work type's description.
|
- The manager lists the visible work types in the Work tab's order (`WorkTypeDefsInPriorityOrder`), three columns, each with a cycle button (left click; the cycle wraps). The tooltip shows the work type's description.
|
||||||
- A work type that no longer exists is dropped from the caste with one warning (`CheckSlots`).
|
- A work type that no longer exists is dropped from the caste with one warning (`CheckSlots`), unless it belongs to an official DLC that is off (Childcare without Biotech, Dark study without Anomaly, Fishing without Odyssey): the caste keeps it and skips it. "Start from nothing" turns other work off only while at least one listed type is in the game (`WorkSlot.StripsOthers`).
|
||||||
- The column goes right before `CopyPasteWorkPriorities`; the game adds the work columns after that column when it builds the table, so the Caste column ends up just left of them. In the Work table its header asks for the 25 px label and sort area plus one button (48 px) instead of 65, so the header stays at the work columns' 50 px and their label guide lines still end at the cells; only "Manage castes" sits above the label there (the join defaults are in the Assign and Schedule tabs and the mod settings). The column finds its table through `PawnTable`'s private `def` field (`AccessTools.FieldRefAccess`, with a fallback to the full header). The "Higher priority" and "Lower priority" hints `MainTabWindow_Work` draws at fixed x 370 and 630 stay where they are: they sit above the work columns with or without the Caste column and point at no column.
|
- The column goes right before `CopyPasteWorkPriorities`; the game adds the work columns after that column when it builds the table, so the Caste column ends up just left of them. In the Work table its header asks for the 25 px label and sort area plus one button (48 px) instead of 65, so the header stays at the work columns' 50 px and their label guide lines still end at the cells; only "Manage castes" sits above the label there (the join defaults are in the Assign and Schedule tabs and the mod settings). The column finds its table through `PawnTable`'s private `def` field (`AccessTools.FieldRefAccess`, with a fallback to the full header). The "Higher priority" and "Lower priority" hints `MainTabWindow_Work` draws at fixed x 370 and 630 stay where they are: they sit above the work columns with or without the Caste column and point at no column.
|
||||||
|
|
||||||
#### Weapon loadout slot (Weapons Tab Reborn)
|
#### Weapon loadout slot (Weapons Tab Reborn)
|
||||||
|
|
@ -207,6 +278,7 @@ Moved to 1.1 to keep 1.0 near a week: starter castes, overlap warnings, the poli
|
||||||
|
|
||||||
- From 1.1 "Starter castes" and "Manager tools", unchanged in substance: Colonist, Slave and Prisoner castes seeded on a new game and once per existing save, rows wired (colonist rows to Colonist, slave rows to Slave, new prisoner to Prisoner), starting colonists assigned. In an existing save nobody moves until "Assign pawns without a caste by status"; the manager footer also gets the member count and "Apply to all members".
|
- From 1.1 "Starter castes" and "Manager tools", unchanged in substance: Colonist, Slave and Prisoner castes seeded on a new game and once per existing save, rows wired (colonist rows to Colonist, slave rows to Slave, new prisoner to Prisoner), starting colonists assigned. In an existing save nobody moves until "Assign pawns without a caste by status"; the manager footer also gets the member count and "Apply to all members".
|
||||||
- Slave and Colonist schedules and loadouts start unmanaged: the player sets them once on the caste and every member follows.
|
- Slave and Colonist schedules and loadouts start unmanaged: the player sets them once on the caste and every member follows.
|
||||||
|
- Without Ideology only Colonist and Prisoner are seeded, the slave rows stay at No caste, "Create Slave outfit" is not offered, and the save is marked as owed the Slave caste. On the first load with Ideology, `StarterCastes.AddSlaveCasteIfOwed` adds it once, as a new game would have it, picks it in the slave rows still at No caste and posts one message. The game makes its Slave outfit only in a new game with Ideology and loads the saved outfit list over it, so such a save has none: the new caste then gets one made like the game's (`CreateSlaveOutfit`), the one policy Castes creates without a click. A caste already named Slave is used instead of a second one, nothing is added when both slave rows already pick a caste, and nobody moves. While `seedStarterCastes` is off the caste stays owed. The starter tests expect two castes without Ideology and skip the Slave caste checks; with Ideology, a component marked as owing the Slave caste gets it once, wired to the slave rows still at No caste, and with the Slave outfit renamed away gets a new Slave outfit on that caste.
|
||||||
- Built (2026-11-29), `StarterCastes.cs`:
|
- Built (2026-11-29), `StarterCastes.cs`:
|
||||||
- New game: `StartedNewGame` clears the join queue (joins queued while the colony was generated are not joins), seeds, then runs "Assign by status" on every player pawn. There is no separate starting-colonists row: the player cannot open the window before the game starts, so the new colonist row (Default caste, Colonist) places the starting colonists, and a starting slave goes to the new slave row.
|
- New game: `StartedNewGame` clears the join queue (joins queued while the colony was generated are not joins), seeds, then runs "Assign by status" on every player pawn. There is no separate starting-colonists row: the player cannot open the window before the game starts, so the new colonist row (Default caste, Colonist) places the starting colonists, and a starting slave goes to the new slave row.
|
||||||
- Existing save: `LoadedGame` seeds once, only if the save has no castes; a save that has castes is marked as seeded, so deleting them later never brings the starters back. With `seedStarterCastes` off nothing is seeded or marked. The one message replaces the first-load message.
|
- Existing save: `LoadedGame` seeds once, only if the save has no castes; a save that has castes is marked as seeded, so deleting them later never brings the starters back. With `seedStarterCastes` off nothing is seeded or marked. The one message replaces the first-load message.
|
||||||
|
|
@ -228,32 +300,32 @@ Moved to 1.1 to keep 1.0 near a week: starter castes, overlap warnings, the poli
|
||||||
- A record stores the caste id (not a reference), the status, the membership's auto flag and the tick. It is restored with that auto flag and the reason "previousCaste", and removed when used. A record whose status does not match stays until it is pruned, so a colonist arrested, enslaved and later freed within the window still comes back to its colonist caste.
|
- A record stores the caste id (not a reference), the status, the membership's auto flag and the tick. It is restored with that auto flag and the reason "previousCaste", and removed when used. A record whose status does not match stays until it is pruned, so a colonist arrested, enslaved and later freed within the window still comes back to its colonist caste.
|
||||||
- Order at apply time: a hand pick after queueing, then the previous caste, then the row.
|
- Order at apply time: a hand pick after queueing, then the previous caste, then the row.
|
||||||
- **Settings:** `returnToPreviousCaste` (on), `formerCasteDays` (60, 1 to 120). Records are written even while the setting is off, so turning it on later works.
|
- **Settings:** `returnToPreviousCaste` (on), `formerCasteDays` (60, 1 to 120). Records are written even while the setting is off, so turning it on later works.
|
||||||
- **Tests:** a Miner colonist arrested and released returns to Miner; a Miner slave sold and re-bought returns to Miner slave; an arrested colonist who is enslaved goes to the slave row; a record older than `formerCasteDays` is ignored and pruned; records survive save and reload, with the pawn's own settings. An arrested and released colonist keeps its hand-set outfit, drugs, medical care and schedule hour, and a followed slot gets the caste's new value; a pawn that never left its caste (No caste rows) gets nothing rewritten; a No caste pawn comes back to No caste with its own food; the prisoner caste's food is undone for a caste that leaves food alone; a row move from a row-set caste resets the old caste's food; a slot and a work type the caste starts managing while the pawn is away reach it, and an older record without the managed slots keeps the pawn's own; a hand-set policy deleted while the pawn is away is skipped even when a new policy got its id, and a record whose policy was deleted before the save loads without that policy and without errors or warnings, even when a new policy got its id and label (the same load ID). Leaving the map: a freed slave from another faction that walks off, an escaped slave and an escaped prisoner leave their caste (the slaves with a slave record) and nothing is queued; a colonist in a caravan or kidnapped keeps its caste; a slave on a closing map leaves with a slave record (the hook around `MapDeiniter.PassPawnsToWorld`, driven with that method's body for one pawn). Plus one test per transition the harness can drive: arrest, release, freeing a home slave, imprisoning a slave, enslaving after an arrest, selling and buying back; recruiting, enslaving and capturing are in the join tests.
|
- **Tests:** a Miner colonist arrested and released returns to Miner; a Miner slave sold and re-bought returns to Miner slave; an arrested colonist who is enslaved goes to the slave row; a record older than `formerCasteDays` is ignored and pruned; records survive save and reload, with the pawn's own settings. An arrested and released colonist keeps its hand-set outfit, drugs, medical care and schedule hour, and a followed slot gets the caste's new value; a pawn that never left its caste (No caste rows) gets nothing rewritten; a No caste pawn comes back to No caste with its own food; the prisoner caste's food is undone for a caste that leaves food alone; a row move from a row-set caste resets the old caste's food; a slot and a work type the caste starts managing while the pawn is away reach it, and an older record without the managed slots keeps the pawn's own; a hand-set policy deleted while the pawn is away is skipped even when a new policy got its id, and a record whose policy was deleted before the save loads without that policy and without errors or warnings, even when a new policy got its id and label (the same load ID). Leaving the map: a freed slave from another faction that walks off, an escaped slave and an escaped prisoner leave their caste (the slaves with a slave record) and nothing is queued; a colonist in a caravan or kidnapped keeps its caste; a slave on a closing map leaves with a slave record (the hook around `MapDeiniter.PassPawnsToWorld`, driven with that method's body for one pawn). Plus one test per transition the harness can drive: arrest, release, freeing a home slave, imprisoning a slave, enslaving after an arrest, selling and buying back; recruiting, enslaving and capturing are in the join tests. Every slave transition needs Ideology and skips without it; arrest, release and capture run on the core game.
|
||||||
|
|
||||||
#### Overlap warnings
|
#### Overlap warnings
|
||||||
|
|
||||||
- From 1.1 "Overlap warnings", unchanged, plus Weapons Tab Reborn's own default loadout: when the loadout slot is managed, Castes writes a tick after the join, so its choice wins; unmanaged, Weapons Tab Reborn keeps control.
|
- From 1.1 "Overlap warnings", unchanged, plus Weapons Tab Reborn's own default loadout: when the loadout slot is managed, Castes writes a tick after the join, so its choice wins; unmanaged, Weapons Tab Reborn keeps control.
|
||||||
- Built (2026-11-29), `OverlapWarnings.cs`: the settings page lists each active overlapping mod with what it sets; one message per save names the mods this save was not warned about yet (the component keeps the warned ids). Package ids, each read from the mod's About.xml in its public source repository (the repositories are listed in `Compat.cs`): Better Pawn Control `VouLT.BetterPawnControl`, Better Pawn Control Forked `KyleMHB.BetterPawnControlForked`, 1trickPwnyta's Defaults `defaults.1trickPwnyta`, Automatic Slave Outfit `ben.automaticslaveoutfit`, PrisonerDefaults `MSWS.PrisonerDefaults`. For the work slot: Work Tab `Fluffy.WorkTab`, Free Will `freemapa.freewill` (and `freemapa.freewill.unstable`), Work Manager `LordKuper.WorkManager`, AutoPriorities `LokiVKlokeNaAndoke.AutoPriorities`, WorkRoles `mnmr.workroles`. None is installed on the test machine; the test injects an id into the detection list.
|
- Built (2026-11-29), `OverlapWarnings.cs`: the settings page lists each active overlapping mod with what it sets; one message per save names the mods this save was not warned about yet (the component keeps the warned ids). Package ids, each read from the mod's About.xml in its public source repository (the repositories are listed in `Compat.cs`): Better Pawn Control `VouLT.BetterPawnControl`, Better Pawn Control Forked `KyleMHB.BetterPawnControlForked`, 1trickPwnyta's Defaults `defaults.1trickPwnyta`, Automatic Slave Outfit `ben.automaticslaveoutfit`, PrisonerDefaults `MSWS.PrisonerDefaults`. For the work slot: Work Tab `Fluffy.WorkTab`, Free Will `freemapa.freewill` (and `freemapa.freewill.unstable`), Work Manager `LordKuper.WorkManager`, AutoPriorities `LokiVKlokeNaAndoke.AutoPriorities`, WorkRoles `mnmr.workroles`. None is installed on the test machine; the test injects an id into the detection list.
|
||||||
|
|
||||||
## 1.1: ready out of the box (2 days)
|
## 1.1: ready out of the box (3 days)
|
||||||
|
|
||||||
Starter castes, manager tools, overlap warnings moved to 1.0 (2026-11-29).
|
Starter castes, manager tools, overlap warnings moved to 1.0 (2026-11-29). The read-only API for Blax Zones joined 1.1 on 2026-11-29, so Zones' caste filter doesn't wait for the join API in 1.3.
|
||||||
|
|
||||||
#### Starter castes
|
#### Starter castes
|
||||||
|
|
||||||
- **Players get:** A new colony starts with Colonist, Slave and Prisoner castes, already wired to the join rows. In a new colony colonists see no change. In an existing save the castes appear, but nobody moves until you click "Assign by status" (it asks first, because it replaces the pawns' own policies).
|
- **Players get:** A new colony starts with Colonist, Slave and Prisoner castes, already wired to the join rows. In a new colony colonists see no change. In an existing save the castes appear, but nobody moves until you click "Assign by status" (it asks first, because it replaces the pawns' own policies).
|
||||||
- **How:**
|
- **How:**
|
||||||
- Colonist: each slot is set to the database's current default (`DefaultOutfit()`, `DefaultFoodRestriction()`, `DefaultDrugPolicy()`, `DefaultReadingPolicy()`). These already carry the ideo drug rule set in `PostIdeoChosen` and any earlier "Make default". Medical care is unmanaged.
|
- Colonist: each slot is set to the database's current default (`DefaultOutfit()`, `DefaultFoodRestriction()`, `DefaultDrugPolicy()`, `DefaultReadingPolicy()`). These already carry the ideo drug rule set in `PostIdeoChosen` and any earlier "Make default". Medical care is unmanaged.
|
||||||
- Slave: the Ideology Slave apparel policy, Simple food, No drugs. Reading stays unmanaged, because slave children need books for the Learning need. Medical care stays unmanaged, so vanilla `defaultCareForSlave` stays in charge.
|
- Slave, only with Ideology (see "1.0 additions"): the Ideology Slave apparel policy, Simple food, No drugs. Reading stays unmanaged, because slave children need books for the Learning need. Medical care stays unmanaged, so vanilla `defaultCareForSlave` stays in charge.
|
||||||
- Prisoner: Simple food.
|
- Prisoner: Simple food.
|
||||||
- Lookup: No drugs by `DrugPolicy.sourceDef` defName "NoDrugs", first match (`CopyFrom` copies sourceDef). Slave outfit and Simple food by their translated starting labels (OutfitSlave, FoodRestrictionSimple). On a miss the slot stays unmanaged and the manager shows a "Create Slave outfit" button. Castes never creates vanilla policies silently.
|
- Lookup: No drugs by `DrugPolicy.sourceDef` defName "NoDrugs", first match (`CopyFrom` copies sourceDef). Slave outfit and Simple food by their translated starting labels (OutfitSlave, FoodRestrictionSimple). On a miss the slot stays unmanaged and the manager shows a "Create Slave outfit" button. Castes never creates vanilla policies silently, except the Slave outfit for the Slave caste a save started without Ideology gets on its first load with it.
|
||||||
- Rows: starting colonists, bought as colonist and new colonist use Default caste (Colonist). Bought as slave and new slave use Slave. New prisoner uses Prisoner.
|
- Rows: starting colonists, bought as colonist and new colonist use Default caste (Colonist). Bought as slave and new slave use Slave. New prisoner uses Prisoner.
|
||||||
- New game: seeded in `StartedNewGame`, then starting colonists are assigned through the new "starting colonists" row. Existing save: `GameComponent.LoadedGame` seeds once per save, only if the save has no castes, with one message. Not `FinalizeInit`, which also runs on every new game.
|
- New game: seeded in `StartedNewGame`, then starting colonists are assigned through the new "starting colonists" row. Existing save: `GameComponent.LoadedGame` seeds once per save, only if the save has no castes, with one message. Not `FinalizeInit`, which also runs on every new game.
|
||||||
- The Slave caste's tooltip and the manager warn that the vanilla Slave outfit has no cold protection.
|
- The Slave caste's tooltip and the manager warn that the vanilla Slave outfit has no cold protection.
|
||||||
- **Settings:** `seedStarterCastes` (on).
|
- **Settings:** `seedStarterCastes` (on).
|
||||||
- **Replaces:** Food Restriction Eleven (2780048210, 15,428 subs), sane starting policies, partly. Automatic Slave Outfit (16,672 subs) in any language, because Castes uses the policy reference, not the label.
|
- **Replaces:** Food Restriction Eleven (2780048210, 15,428 subs), sane starting policies, partly. Automatic Slave Outfit (16,672 subs) in any language, because Castes uses the policy reference, not the label.
|
||||||
- **Effort:** S (0.5 days).
|
- **Effort:** S (0.5 days).
|
||||||
- **Tests:** A quick-test game has three castes. The Slave caste's apparel is the database's Slave outfit. No drugs is matched by sourceDef. Rows map as listed. Starting colonists are Colonist members with unchanged policies. A start with a drug-prohibiting ideo keeps NoDrugs on the Colonist caste. Phase 2: no second seeding after reload. Removing the Slave outfit before seeding leaves the slot unmanaged.
|
- **Tests:** A quick-test game has three castes, two without Ideology. The Slave caste's apparel is the database's Slave outfit. No drugs is matched by sourceDef. Rows map as listed. Starting colonists are Colonist members with unchanged policies. A start with a drug-prohibiting ideo keeps NoDrugs on the Colonist caste. Phase 2: no second seeding after reload. Removing the Slave outfit before seeding leaves the slot unmanaged.
|
||||||
- **Risks:** Policies the player renamed before adding Castes miss the label match. The slot stays unmanaged and the create button shows. Slaves in the Slave outfit freeze in cold biomes; the warning makes that visible.
|
- **Risks:** Policies the player renamed before adding Castes miss the label match. The slot stays unmanaged and the create button shows. Slaves in the Slave outfit freeze in cold biomes; the warning makes that visible.
|
||||||
|
|
||||||
#### Manager tools
|
#### Manager tools
|
||||||
|
|
@ -314,29 +386,42 @@ Starter castes, manager tools, overlap warnings moved to 1.0 (2026-11-29).
|
||||||
#### Ideo conflict warning
|
#### Ideo conflict warning
|
||||||
|
|
||||||
- **Players get:** The manager flags a caste whose drug or food policy clashes with a member's ideoligion, for example Social drugs for a drug-prohibiting ideo, or food with meat for a vegetarian ideo. Surprise mood hits are the main reason players blame a defaults mod.
|
- **Players get:** The manager flags a caste whose drug or food policy clashes with a member's ideoligion, for example Social drugs for a drug-prohibiting ideo, or food with meat for a vegetarian ideo. Surprise mood hits are the main reason players blame a defaults mod.
|
||||||
- **How:** Drug: the member's ideo has a precept with `defaultDrugPolicyOverride`, and the caste's drug policy is not the matching policy. Food: the ideo has a `MeatEating_Disapproved`, `MeatEating_Horrible` or `MeatEating_Abhorrent` precept, and the caste's food filter allows meat. Checked when the manager opens, a member joins or a slot changes, never per tick. Shown as a warning line in the manager and a "!" in the column tooltip. Ideology only.
|
- **How:** Drug: the member's ideo has a precept with `defaultDrugPolicyOverride`, and the caste's drug policy is not the matching policy. Food: the ideo has a `MeatEating_Disapproved`, `MeatEating_Horrible` or `MeatEating_Abhorrent` precept, and the caste's food filter allows meat. Checked when the manager opens, a member joins or a slot changes, never per tick. Shown as a warning line in the manager and a "!" in the column tooltip. Ideology only: the check runs behind `ModsConfig.IdeologyActive`, and the precepts (Data/Ideology, Precepts_MeatEating.xml and Precepts_DrugUse.xml) are found by defName with `GetNamedSilentFail`.
|
||||||
- **Settings:** `warnIdeoConflicts` (on).
|
- **Settings:** `warnIdeoConflicts` (on). Without Ideology it shows disabled with "Needs Ideology".
|
||||||
- **Replaces:** none.
|
- **Replaces:** none.
|
||||||
- **Effort:** S (0.5 days).
|
- **Effort:** S (0.5 days).
|
||||||
- **Tests:** A member with a drug-prohibiting ideo in a Social drugs caste is flagged, and on No drugs it is not. A member with a vegetarian ideo in a Lavish caste is flagged. Skipped without Ideology.
|
- **Tests:** A member with a drug-prohibiting ideo in a Social drugs caste is flagged, and on No drugs it is not. A member with a vegetarian ideo in a Lavish caste is flagged. Skipped without Ideology; in a -NoDlc run the check flags nobody and logs no errors.
|
||||||
- **Risks:** Modded precepts that forbid drugs without `defaultDrugPolicyOverride` are missed.
|
- **Risks:** Modded precepts that forbid drugs without `defaultDrugPolicyOverride` are missed.
|
||||||
|
|
||||||
|
#### Read-only API for Blax Zones
|
||||||
|
|
||||||
|
- **Players get:** Nothing visible on its own. With Blax Zones 1.5, a people sleeping zone can be limited to castes.
|
||||||
|
- **How:**
|
||||||
|
- `BlaxCastes.CastesApi` (static), Version 1: `Version`, `Active`, `CasteIdOf`, `CasteLabels`. Signatures in "Works with the other Blax mods".
|
||||||
|
- Ids are `"<token>:<id>"` in both members. The token is made with `Rand.Int` the first time the component needs it and saved with it; the string is cached on the caste (unsaved), so `CasteIdOf` allocates nothing. `CasteLabels()` builds a new `List<KeyValuePair<string, string>>` per call, sorted by label to match Castes' own pickers. Not a ValueTuple: Zones binds the exact return type.
|
||||||
|
- `Active` is false with no game loaded or with `enableApi` off; then `CasteIdOf` returns null and `CasteLabels` null.
|
||||||
|
- Main thread only. Castes calls nothing in the other mods.
|
||||||
|
- **Settings:** `enableApi` (on). Off: `Active` is false.
|
||||||
|
- **Replaces:** none.
|
||||||
|
- **Effort:** S (0.5 days).
|
||||||
|
- **Tests:** `CasteIdOf` and `CasteLabels` round-trip: every id from `CasteLabels()` has the token prefix, and `CasteIdOf` of a member returns one of them. The token survives a save and reload. A casteless-by-choice pawn gives null. With `enableApi` off, `Active` is false and both calls return null. 1,000 `CasteIdOf` calls allocate below 1 KB (`GC.GetAllocatedBytesForCurrentThread`).
|
||||||
|
- **Risks:** This is a contract across four repos (Castes, Zones, Slaves, Defaults). Add members only, never change a signature, and raise Version on each addition.
|
||||||
|
|
||||||
## 1.2: more settings per caste (3 days)
|
## 1.2: more settings per caste (3 days)
|
||||||
|
|
||||||
#### Schedule and allowed area
|
#### Allowed area (the schedule part moved to 1.0 on 2026-11-29)
|
||||||
|
|
||||||
- **Players get:** Castes can also set the daily schedule and the allowed area. Pawns still in a drop pod or caravan, or arriving on another map, get the area when they arrive.
|
- **Players get:** Castes can also set the allowed area. Pawns still in a drop pod or caravan, or arriving on another map, get the area when they arrive. The daily schedule is the 1.0 schedule slot (see "1.0 additions").
|
||||||
- **How:**
|
- **How:**
|
||||||
- Schedule: 24 `TimeAssignmentDef` defNames (null = leave alone), resolved with `GetNamedSilentFail`. Meditate becomes Anything without Royalty. Written with `Pawn_TimetableTracker.SetAssignment`.
|
|
||||||
- Area: the area label, resolved per map with `AreaManager.GetLabeled` and `Area.AssignableAsAllowed()`. Applied when `MapHeld != null`, `SupportsAllowedAreas`, `Faction.IsPlayer` and `HostFaction == null`. Not gated on `RespectsAllowedArea`, which is false for any pawn in a Lord (rituals, parties, caravan forming).
|
- Area: the area label, resolved per map with `AreaManager.GetLabeled` and `Area.AssignableAsAllowed()`. Applied when `MapHeld != null`, `SupportsAllowedAreas`, `Faction.IsPlayer` and `HostFaction == null`. Not gated on `RespectsAllowedArea`, which is false for any pawn in a Lord (rituals, parties, caravan forming).
|
||||||
- Otherwise the pawn goes on a pending list. A `Pawn.SpawnSetup` postfix applies pending entries, and the area on a map where Castes never set one for that pawn (tracked per pawn per map id), then clears them. A 250-tick sweep retries pending entries.
|
- Otherwise the pawn goes on a pending list. A `Pawn.SpawnSetup` postfix applies pending entries, and the area on a map where Castes never set one for that pawn (tracked per pawn per map id), then clears them. A 250-tick sweep retries pending entries.
|
||||||
- It never re-applies on every spawn, so manual choices and AAAA's "#safe" swaps survive caravans, transport pods and map moves.
|
- It never re-applies on every spawn, so manual choices and AAAA's "#safe" swaps survive caravans, transport pods and map moves.
|
||||||
- A label missing on the map means leave alone. The manager shows "missing on <map>" with a "Create area" button (`AreaManager.TryMakeNewAllowed`). A renamed area shows as missing until re-picked.
|
- A label missing on the map means leave alone. The manager shows "missing on <map>" with a "Create area" button (`AreaManager.TryMakeNewAllowed`). A renamed area shows as missing until re-picked.
|
||||||
- The caste column is also added to `PawnTableDef` Restrict (the Schedule tab).
|
- The caste column is already in `PawnTableDef` Restrict (the Schedule tab) since 1.0, next to the vanilla area column.
|
||||||
- **Settings:** `allowScheduleAndArea` (on), `applyAreaOnSpawn` (on).
|
- **Settings:** `allowArea` (on), `applyAreaOnSpawn` (on).
|
||||||
- **Replaces:** 1trickPwnyta's Defaults (75,424 subs), default area per pawn type. Plug and Play Joiner (Continued) (3383245777, 1,489 subs), preset area for joiners.
|
- **Replaces:** 1trickPwnyta's Defaults (75,424 subs), default area per pawn type. Plug and Play Joiner (Continued) (3383245777, 1,489 subs), preset area for joiners.
|
||||||
- **Effort:** M (2 days).
|
- **Effort:** M (2 days) for the area alone: the pending list, the spawn hook with per-map tracking and the missing-area UI.
|
||||||
- **Tests:** A caste with a test area and a night schedule. A bought-slave fixture left unspawned gets the schedule at once and the area pending, and spawning applies the area. A second spawn on the same map after a manual change keeps the manual area. Deleting the area makes the slot report missing, and Apply does nothing, without errors. An unknown time defName becomes Anything.
|
- **Tests:** A caste with a test area. A bought fixture left unspawned (a slave with Ideology, a colonist without) gets the area pending, and spawning applies it. A second spawn on the same map after a manual change keeps the manual area. Deleting the area makes the slot report missing, and Apply does nothing, without errors.
|
||||||
- **Risks:** AAAA (3264193512, 100,585 subs) swaps areas on threats. Castes writes areas only on assign, join, first arrival on a map and caste edits.
|
- **Risks:** AAAA (3264193512, 100,585 subs) swaps areas on threats. Castes writes areas only on assign, join, first arrival on a map and caste edits.
|
||||||
|
|
||||||
#### Hostility, self-tend, carried medicine, fire at will
|
#### Hostility, self-tend, carried medicine, fire at will
|
||||||
|
|
@ -355,56 +440,58 @@ Starter castes, manager tools, overlap warnings moved to 1.0 (2026-11-29).
|
||||||
- **Tests:** A violent colonist gets Attack, 2 industrial medicine and self-tend. A pacifist gets Flee. A pawn with Doctor disabled keeps self-tend off. After despawn and spawn, FireAtWill is restored.
|
- **Tests:** A violent colonist gets Attack, 2 industrial medicine and self-tend. A pacifist gets Flee. A pawn with Doctor disabled keeps self-tend off. After despawn and spawn, FireAtWill is restored.
|
||||||
- **Risks:** Big castes with carry above 0 drain the hospital, hence the warning.
|
- **Risks:** Big castes with carry above 0 drain the hospital, hence the warning.
|
||||||
|
|
||||||
## 1.3: every join path, Blax Slaves and Zones (3 days)
|
## 1.3: every join path and Blax Slaves (3 days)
|
||||||
|
|
||||||
#### Every join path, adult and child
|
#### Every join path, adult and child
|
||||||
|
|
||||||
- **Players get:** The defaults window lists every way a pawn joins, each with an adult caste and a child caste: wanderer, quest reward, rescued, lodger recruited, freed slave, born, child chosen as colonist or slave, coming of age. Pawns that come back (re-bought, released after arrest, re-enslaved, returned runaways) get their old caste.
|
- **Players get:** The defaults window lists every way a pawn joins, each with an adult caste and a child caste: wanderer, quest reward, rescued, lodger recruited, freed slave, born, child chosen as colonist or slave, coming of age. Pawns that come back already get their old caste since 1.0.
|
||||||
- **How:**
|
- **How:**
|
||||||
- Rows: starting, boughtSlave, boughtColonist, enslaved, recruitedPrisoner, captured, wanderer, questJoiner, rescued, lodgerArrived (default No caste), lodgerRecruited, emancipated, recruitedSlave, born (incl. growth vat), childColonist, childSlave, cameOfAge, creepjoiner (Anomaly only), and the three status fallbacks. Each row has an adult and a child dropdown; the child one defaults to "same as adult". Picks from 1.0 carry over.
|
- Rows: starting, boughtSlave, boughtColonist, enslaved, recruitedPrisoner, captured, wanderer, questJoiner, rescued, lodgerArrived (default No caste), lodgerRecruited, emancipated, recruitedSlave, born (incl. growth vat), childColonist, childSlave, cameOfAge, creepjoiner (Anomaly only), and the three status fallbacks. Each row has an adult and a child dropdown; the child one defaults to "same as adult". Picks from 1.0 carry over.
|
||||||
- New scopes: `GenGuest.TryEnslavePrisoner` (EnslavePrisoner is a one-line wrapper that CoreCLR may inline), `RecruitUtility.Recruit` (records whether the pawn was a prisoner or a slave), `Pawn_GuestTracker.CapturedBy`.
|
- New scopes: `GenGuest.TryEnslavePrisoner` (EnslavePrisoner is a one-line wrapper that CoreCLR may inline), `RecruitUtility.Recruit` (records whether the pawn was a prisoner or a slave), `Pawn_GuestTracker.CapturedBy`.
|
||||||
- One scope on `Quest.Notify_SignalReceived` carries `quest.root`: WandererJoins goes to wanderer, creepjoiner roots to creepjoiner, everything else to questJoiner. It is the only dispatcher of `QuestPart.Notify_QuestSignalReceived`, so it covers SetFaction, PawnsArrive, JoinPlayer, DropPods, GiveToCaravan, GiveNearPawn and modded quest parts.
|
- One scope on `Quest.Notify_SignalReceived` carries `quest.root`: WandererJoins goes to wanderer, creepjoiner roots to creepjoiner, everything else to questJoiner. It is the only dispatcher of `QuestPart.Notify_QuestSignalReceived`, so it covers SetFaction, PawnsArrive, JoinPlayer, DropPods, GiveToCaravan, GiveNearPawn and modded quest parts.
|
||||||
- Other hooks: `Pawn_GuestTracker.Notify_PawnUndowned` and `Pawn_MindState.JoinColonyBecauseRescuedBy` (rescued), `GenGuest.EmancipateSlave`, `ChoiceLetter_BabyToChild.ChoseColonist` / `ChoseSlave` (private), `LifeStageWorker_HumanlikeChild` and `LifeStageWorker_HumanlikeAdult.Notify_LifeStageStarted`, `PregnancyUtility.ApplyBirthOutcome`, `Faction.Notify_MemberLeftExtraFaction` (a lodger stops being one).
|
- Other hooks: `Pawn_GuestTracker.Notify_PawnUndowned` and `Pawn_MindState.JoinColonyBecauseRescuedBy` (rescued), `GenGuest.EmancipateSlave`, `ChoiceLetter_BabyToChild.ChoseColonist` / `ChoseSlave` (private), `LifeStageWorker_HumanlikeChild` and `LifeStageWorker_HumanlikeAdult.Notify_LifeStageStarted`, `PregnancyUtility.ApplyBirthOutcome`, `Faction.Notify_MemberLeftExtraFaction` (a lodger stops being one).
|
||||||
- Status rows always move the pawn. Growth rows move only members whose membership is still auto-assigned.
|
- Status rows always move the pawn. Growth rows move only members whose membership is still auto-assigned.
|
||||||
- Previous caste: when a member leaves the player faction, is sold, or becomes a prisoner (arrest, slave Imprison mode), Castes writes a former-caste record (caste id, status class, tick). If the pawn comes back within `formerCasteDays` with the same status class, it gets that caste back. An arrested colonist who is then enslaved goes to the enslaved row instead.
|
- DLC: without the DLC that makes it happen, a row shows with a "Needs <DLC>" note only while it still matters, that is while it holds a pick or the colony has pawns it applies to (slaves or children from a save made with the DLC), as the 1.0 slave rows do. Otherwise the window leaves it out. Picks stay in the save either way. Ideology: enslaved, emancipated, recruitedSlave, childSlave and the new-slave fallback. Biotech: born, childColonist, childSlave, cameOfAge and every child dropdown, since without Biotech no children exist (`Difficulty.ChildrenAllowed` is false) and the humanlike life stage workers are `MayRequire` Biotech in Core's LifeStages.xml. Anomaly: creepjoiner (`ModsConfig.AnomalyActive`, guarded in code only). The lodger rows always show: in Core and the three installed DLCs only Royalty's hospitality quests bring lodgers (`QuestNode_ExtraFaction`), but mods bring lodgers too. The hooked methods are in the core assembly, so every patch applies in every combination and fires only when the DLC is there.
|
||||||
- Order at apply time: pre-pick, then previous caste, then the row.
|
- Previous caste: built in 1.0 (moved on 2026-11-29, see "Status changes and the old caste"). New here: an arrested colonist who is then enslaved goes to the enslaved row instead of the new-slave row.
|
||||||
|
- Order at apply time: a hand pick after queueing, then the pre-pick, then the previous caste, then the row.
|
||||||
- Safety net: on spawn, a player humanlike with no membership record whose `playerSettings.joinTick` is after the component's creation tick gets its status-fallback row once. Casteless-by-choice pawns are skipped.
|
- Safety net: on spawn, a player humanlike with no membership record whose `playerSettings.joinTick` is after the component's creation tick gets its status-fallback row once. Casteless-by-choice pawns are skipped.
|
||||||
- **Settings:** `returnToPreviousCaste` (on), `formerCasteDays` (60), `catchAllOnSpawn` (on).
|
- **Settings:** `catchAllOnSpawn` (on). `returnToPreviousCaste` and `formerCasteDays` are 1.0's.
|
||||||
- **Replaces:** 1trickPwnyta's Defaults (75,424 subs): child colonist defaults and the child-to-adult switch. Better Pawn Control (227,665 subs): its rescued and guest joiners arriving on Lavish food and Glitter medicine.
|
- **Replaces:** 1trickPwnyta's Defaults (75,424 subs): child colonist defaults and the child-to-adult switch. Better Pawn Control (227,665 subs): its rescued and guest joiners arriving on Lavish food and Glitter medicine.
|
||||||
- **Effort:** M (2 days). It would be L with one patch per QuestPart.
|
- **Effort:** M (2 days). It would be L with one patch per QuestPart.
|
||||||
- **Tests:**
|
- **Tests:**
|
||||||
- One per path the harness can trigger: `Notify_PawnUndowned` by reflection on a downed friendly pawn (forced roll), `Quest.Notify_SignalReceived` with a fake quest whose root is WandererJoins, `EmancipateSlave` on a colony-born slave, the `ChoiceLetter_BabyToChild` actions on a baby fixture, a life-stage change from setting biological age, `ApplyBirthOutcome` (Biotech only, skipped without it).
|
- One per path the harness can trigger: `Notify_PawnUndowned` by reflection on a downed friendly pawn (forced roll), `Quest.Notify_SignalReceived` with a fake quest whose root is WandererJoins, `EmancipateSlave` on a colony-born slave, the `ChoiceLetter_BabyToChild` actions on a baby fixture, a life-stage change from setting biological age, `ApplyBirthOutcome` (Biotech only, skipped without it).
|
||||||
- A child fixture uses the child dropdown.
|
- A child fixture uses the child dropdown.
|
||||||
- A Miner slave sold with `PreTraded(PlayerSells)` and re-bought returns to Miner slave. An arrested Miner colonist who is released returns to Miner. An arrested colonist who is enslaved goes to the enslaved row.
|
- The return tests are 1.0's. New here: an arrested colonist who is enslaved goes to the enslaved row (skips without Ideology).
|
||||||
- Lodger arrival gives no caste. A recruited lodger gets the lodgerRecruited row.
|
- Lodger arrival gives no caste. A recruited lodger gets the lodgerRecruited row.
|
||||||
- A casteless-by-choice pawn stays casteless after a caravan returns.
|
- A casteless-by-choice pawn stays casteless after a caravan returns.
|
||||||
|
- In a -NoDlc run the window lists only the core and lodger rows with no child dropdowns, and the Ideology and Biotech path tests skip. A slave or child row given a pick in that run shows with its "Needs <DLC>" note and keeps the pick.
|
||||||
- **Risks:** Quest code shifts between 1.7 builds. The status fallbacks and the spawn safety net keep unknown paths working. Hospitality guests are never player faction and are ignored.
|
- **Risks:** Quest code shifts between 1.7 builds. The status fallbacks and the spawn safety net keep unknown paths working. Hospitality guests are never player faction and are ignored.
|
||||||
|
|
||||||
#### Public API
|
#### Public API
|
||||||
|
|
||||||
- **Players get:** With Blax Slaves, returned runaways come back into their old caste and indentured pawns are sorted correctly. With Blax Zones, a sleeping zone can be limited to a caste.
|
- **Players get:** With Blax Slaves, returned runaways come back into their old caste and indentured pawns are sorted correctly.
|
||||||
- **How:**
|
- **How:**
|
||||||
- `BlaxCastes.CastesApi`, Version 1: `HintJoinReason`, `NotifyJoined`, `CasteIdOf`, `CasteLabels`. Signatures and the reason table are in "Works with the other Blax mods".
|
- `BlaxCastes.CastesApi`, Version 2 adds `HintJoinReason` and `NotifyJoined` to the read-only Version 1 from 1.1. Signatures and the reason table are in "Works with the other Blax mods".
|
||||||
- Hints sit in a per-pawn map. The next classification consumes a hint, and any hint left is cleared at the end of the tick.
|
- Hints sit in a per-pawn map. The next classification consumes a hint, and any hint left is cleared at the end of the tick.
|
||||||
- `NotifyJoined` queues the pawn with that reason like any other join. The specific reason replaces a status fallback, even if the fallback already ran.
|
- `NotifyJoined` queues the pawn with that reason like any other join. The specific reason replaces a status fallback, even if the fallback already ran.
|
||||||
- Unknown reasons use the status fallbacks. Castes calls nothing in the other mods.
|
- Unknown reasons use the status fallbacks. Castes calls nothing in the other mods.
|
||||||
- **Settings:** `enableApi` (on). Off: API calls are ignored.
|
- **Settings:** `enableApi` (on). Off: API calls are ignored.
|
||||||
- **Replaces:** none.
|
- **Replaces:** none.
|
||||||
- **Effort:** S (0.5 days).
|
- **Effort:** S (0.5 days).
|
||||||
- **Tests:** `CasteIdOf` and `CasteLabels` round-trip. A hint beats the status fallback and is gone on the next tick. `NotifyJoined` on a pawn the fallback already placed moves it to the reason's row. -Compat with Blax Slaves: a returned runaway lands in its previous caste.
|
- **Tests:** `Version` reads 2. A hint beats the status fallback and is gone on the next tick. `NotifyJoined` on a pawn the fallback already placed moves it to the reason's row. -Compat with Blax Slaves: a returned runaway lands in its previous caste.
|
||||||
- **Risks:** This is a contract across three repos. Add methods only, never change a signature, and raise Version on each addition.
|
- **Risks:** This is a contract across four repos (Castes, Zones, Slaves, Defaults). Add methods only, never change a signature, and raise Version on each addition.
|
||||||
|
|
||||||
#### Pre-pick in the prisoner and slave tabs
|
#### Pre-pick in the prisoner and slave tabs
|
||||||
|
|
||||||
- **Players get:** The prisoner tab shows the prisoner's caste plus two pickers: caste when recruited and caste when enslaved. The slave tab shows the slave's caste and a "caste when freed" picker. A pick beats every default for that pawn.
|
- **Players get:** The prisoner tab shows the prisoner's caste plus two pickers: caste when recruited and caste when enslaved. The slave tab shows the slave's caste and a "caste when freed" picker. A pick beats every default for that pawn.
|
||||||
- **How:** Postfixes on the private `ITab_Pawn_Visitor.DoPrisonerTab(bool, Listing_Standard)` and `DoSlaveTab(Listing_Standard)` append rows at the end. The tab sizes itself from `listing.CurHeight`. Picks are stored in the component as pawn to (reason to caste), saved by reference, and cleared when used, when the pawn leaves, or when the caste is deleted. Hidden for wild men and non-player captives.
|
- **How:** Postfixes on the private `ITab_Pawn_Visitor.DoPrisonerTab(bool, Listing_Standard)` and `DoSlaveTab(Listing_Standard)` append rows at the end. The tab sizes itself from `listing.CurHeight`. Picks are stored in the component as pawn to (reason to caste), saved by reference, and cleared when used, when the pawn leaves, or when the caste is deleted. Hidden for wild men and non-player captives. Without Ideology only "caste when recruited" shows: enslaving and slaves need Ideology.
|
||||||
- **Settings:** `showVisitorTabPickers` (on).
|
- **Settings:** `showVisitorTabPickers` (on).
|
||||||
- **Replaces:** PrisonerDefaults (1,086 subs): per-prisoner food choice, partly.
|
- **Replaces:** PrisonerDefaults (1,086 subs): per-prisoner food choice, partly.
|
||||||
- **Effort:** S (0.5 days).
|
- **Effort:** S (0.5 days).
|
||||||
- **Tests:** A prisoner with "when enslaved" set to Miner slave ends in Miner slave after `EnslavePrisoner`, and the pick is gone. Without a pick, the row applies. Phase 2: the pick survives save and reload.
|
- **Tests:** A prisoner with "when enslaved" set to Miner slave ends in Miner slave after `EnslavePrisoner`, and the pick is gone. Without a pick, the row applies. Phase 2: the pick survives save and reload. Without Ideology the enslave tests skip, and a "when recruited" pick still lands after `RecruitUtility.Recruit`.
|
||||||
- **Risks:** Prison Labor and Prisoner Realism also draw in this tab. Appending at the end avoids overlap; check with -Compat.
|
- **Risks:** Prison Labor and Prisoner Realism also draw in this tab. Appending at the end avoids overlap; check with -Compat.
|
||||||
|
|
||||||
## 1.4: work and prisoners (4 days)
|
## 1.4: shifts and prisoners (2 days)
|
||||||
|
|
||||||
#### Work priorities per caste (moved to 1.0 on 2026-11-29; kept here for the shift-schedule notes below)
|
#### Work priorities per caste (moved to 1.0 on 2026-11-29; kept here for the shift-schedule notes below)
|
||||||
|
|
||||||
|
|
@ -419,7 +506,7 @@ Starter castes, manager tools, overlap warnings moved to 1.0 (2026-11-29).
|
||||||
#### Shift schedules
|
#### Shift schedules
|
||||||
|
|
||||||
- **Players get:** A caste can hold up to three schedules. New members are dealt out in turn so day and night shifts fill evenly, and "Rebalance" spreads current members again.
|
- **Players get:** A caste can hold up to three schedules. New members are dealt out in turn so day and night shifts fill evenly, and "Rebalance" spreads current members again.
|
||||||
- **How:** The schedule slot becomes a list of 1 to 3 timetables plus a per-caste counter. Each membership stores its shift index. Rebalance sorts members by ThingID and assigns index i mod n, so the result is the same on every machine. Needs the 1.2 schedule slot.
|
- **How:** The schedule slot becomes a list of 1 to 3 timetables plus a per-caste counter. Each membership stores its shift index. Rebalance sorts members by ThingID and assigns index i mod n, so the result is the same on every machine. Builds on the 1.0 schedule slot.
|
||||||
- **Settings:** `allowShifts` (on).
|
- **Settings:** `allowShifts` (on).
|
||||||
- **Replaces:** 1trickPwnyta's Defaults (75,424 subs): round-robin default schedules. Work Manager (2029596262, 14,211 subs): shift schedules, partly.
|
- **Replaces:** 1trickPwnyta's Defaults (75,424 subs): round-robin default schedules. Work Manager (2029596262, 14,211 subs): shift schedules, partly.
|
||||||
- **Effort:** S (0.5 days).
|
- **Effort:** S (0.5 days).
|
||||||
|
|
@ -429,27 +516,28 @@ Starter castes, manager tools, overlap warnings moved to 1.0 (2026-11-29).
|
||||||
#### Default prisoner interaction
|
#### Default prisoner interaction
|
||||||
|
|
||||||
- **Players get:** A prisoner caste can set the interaction mode on capture, such as Reduce resistance, Enslave or Convert, plus Biotech's bloodfeed and hemogen farm toggles.
|
- **Players get:** A prisoner caste can set the interaction mode on capture, such as Reduce resistance, Enslave or Convert, plus Biotech's bloodfeed and hemogen farm toggles.
|
||||||
- **How:** An exclusive `PrisonerInteractionModeDef` defName written with `Pawn_GuestTracker.SetExclusiveInteraction`, plus non-exclusive defNames written with `ToggleNonExclusiveInteraction`, each checked against the active DLCs and the def's exclusive flag. Applied on join only, because `SetGuestStatus(Prisoner)` resets the mode first. Existing members change only through "Apply to all members".
|
- **How:** An exclusive `PrisonerInteractionModeDef` defName written with `Pawn_GuestTracker.SetExclusiveInteraction`, plus non-exclusive defNames written with `ToggleNonExclusiveInteraction`, each checked against the active DLCs and the def's exclusive flag. Applied on join only, because `SetGuestStatus(Prisoner)` resets the mode first. Existing members change only through "Apply to all members". DLC modes, from the `MayRequire` attributes on `PrisonerInteractionModeDefOf`: Enslave, ReduceWill and Convert need Ideology, Bloodfeed and HemogenFarm Biotech, Study and Interrogate Anomaly; MaintainOnly, AttemptRecruit, ReduceResistance, Release and Execution are core. The picker offers only modes whose def exists. A stored mode whose DLC is off stays in the caste, is not applied, and shows "Needs <DLC>".
|
||||||
- **Settings:** `prisonerModeSlot` (on). The slot defaults off when Prison Labor or Custom Prisoner Interactions is active.
|
- **Settings:** `prisonerModeSlot` (on). The slot defaults off when Prison Labor or Custom Prisoner Interactions is active.
|
||||||
- **Replaces:** Custom Prisoner Interactions (2841231775): default action for new prisoners, partly. Prison Labor (1899474310): default interaction mode, partly.
|
- **Replaces:** Custom Prisoner Interactions (2841231775): default action for new prisoners, partly. Prison Labor (1899474310): default interaction mode, partly.
|
||||||
- **Effort:** S (0.5 days).
|
- **Effort:** S (0.5 days).
|
||||||
- **Tests:** A Prisoner caste with Enslave: after `CapturedBy`, the exclusive mode is Enslave. The hemogen farm toggle applies only with Biotech.
|
- **Tests:** A Prisoner caste with Enslave: after `CapturedBy`, the exclusive mode is Enslave (skips without Ideology). The hemogen farm toggle applies only with Biotech. In a -NoDlc run the picker lists only the core modes, and a caste holding Enslave keeps it without applying it or logging an error.
|
||||||
- **Risks:** Prison Labor sets its own mode on capture. Castes runs a tick later and overrides it, hence the detection.
|
- **Risks:** Prison Labor sets its own mode on capture. Castes runs a tick later and overrides it, hence the detection.
|
||||||
|
|
||||||
#### DLC switches
|
#### DLC switches
|
||||||
|
|
||||||
- **Players get:** Castes can also set Royalty room and apparel requirements, psyfocus target and entropy limit, hemogen pack use and deathrest auto-wake.
|
- **Players get:** Castes can also set Royalty room and apparel requirements, psyfocus target and entropy limit, hemogen pack use and deathrest auto-wake.
|
||||||
- **How:** Each is a nullable slot, shown only when its DLC is active and applied only when the pawn has the tracker or gene. Royalty: `allowRoomRequirements`, `allowApparelRequirements`. Psycasters: `limitEntropyAmount`, `SetPsyfocusTarget`. Genes: `Gene_Hemogen.hemogenPacksAllowed`, `Gene_Deathrest.autoWake`, found with `pawn.genes?.GetFirstGeneOfType<T>()`, never by cast.
|
- **How:** Each is a nullable slot, applied only when its DLC is active and the pawn has the tracker or gene. Its manager row shows when its DLC is active; without the DLC it shows disabled with "Needs Royalty" or "Needs Biotech" while the caste holds a value, and is left out otherwise. Royalty: `allowRoomRequirements`, `allowApparelRequirements`. Psycasters: `limitEntropyAmount`, `SetPsyfocusTarget`. Genes: `Gene_Hemogen.hemogenPacksAllowed`, `Gene_Deathrest.autoWake`, found with `pawn.genes?.GetFirstGeneOfType<T>()`, never by cast.
|
||||||
- **Settings:** `allowDlcSlots` (on).
|
- The tracker alone is no DLC check: every humanlike gets `pawn.royalty` and `pawn.genes` with or without the DLC (`PawnComponentsUtility`), so the Royalty slots check `ModsConfig.RoyaltyActive` and the gene slots `ModsConfig.BiotechActive` first. `psychicEntropy` exists only with Royalty. A stored value whose DLC is off stays in the caste, is not applied, and works again once the DLC is back.
|
||||||
|
- **Settings:** `allowDlcSlots` (on). With neither Royalty nor Biotech it shows disabled with "Needs Royalty or Biotech".
|
||||||
- **Replaces:** none.
|
- **Replaces:** none.
|
||||||
- **Effort:** S (0.5 days).
|
- **Effort:** S (0.5 days).
|
||||||
- **Tests:** Each slot is set on a pawn with the tracker or gene and skipped without errors on one without. Slots for a missing DLC are hidden; those tests skip when the DLC is absent.
|
- **Tests:** Each slot is set on a pawn with the tracker or gene and skipped without errors on one without; those tests skip when the DLC is absent. In the `-Dlc Royalty` and `-Dlc Biotech` runs the other DLC's rows are left out for a caste with no value for them, and show disabled with their "Needs <DLC>" note for a caste that holds one. The -NoDlc run shows only those disabled rows, keeps the stored values and applies none, with no errors.
|
||||||
- **Risks:** Xenotype mods vary the gene classes, hence the type check.
|
- **Risks:** Xenotype mods vary the gene classes, hence the type check.
|
||||||
|
|
||||||
#### Trade-row caste picker support
|
#### Trade-row caste picker support
|
||||||
|
|
||||||
- **Players get:** Nothing visible yet. Once Blax Slaves adds its trade-row picker (in its backlog), you pick a caste for each pawn you buy, next to the buy-as-slave toggle.
|
- **Players get:** Nothing visible yet. Once Blax Slaves adds its trade-row picker (in its backlog), you pick a caste for each pawn you buy, next to the buy-as-slave toggle.
|
||||||
- **How:** `CastesApi.PrePick(Pawn, string casteId)`, API Version 2. It writes into the 1.3 pre-pick store under the bought reasons. Blax Slaves owns the picker in its trade row; Castes adds no trade dialog patch.
|
- **How:** `CastesApi.PrePick(Pawn, string casteId)`, API Version 3. It takes the token-prefixed id from `CasteLabels` and writes into the 1.3 pre-pick store under the bought reasons. Blax Slaves owns the picker in its trade row; Castes adds no trade dialog patch.
|
||||||
- **Settings:** covered by `enableApi`.
|
- **Settings:** covered by `enableApi`.
|
||||||
- **Replaces:** none.
|
- **Replaces:** none.
|
||||||
- **Effort:** S (0.5 days).
|
- **Effort:** S (0.5 days).
|
||||||
|
|
@ -461,12 +549,12 @@ Starter castes, manager tools, overlap warnings moved to 1.0 (2026-11-29).
|
||||||
#### Caste templates across saves
|
#### Caste templates across saves
|
||||||
|
|
||||||
- **Players get:** Export a caste, together with the policies it uses, and import it into another colony. New games can start from your saved castes instead of the starter set.
|
- **Players get:** Export a caste, together with the policies it uses, and import it into another colony. New games can start from your saved castes instead of the starter set.
|
||||||
- **How:** Export writes the caste plus deep copies of its policies with `Scribe.saver` to `GenFilePaths.ConfigFolderPath/BlaxCastes/<name>.xml`. Import creates new policies through each database's `MakeNewOutfit`, `MakeNewFoodRestriction`, `MakeNewDrugPolicy` or `MakeNewReadingPolicy` plus `CopyFrom` (label kept, suffixed if taken), then the caste. "Seed new games from templates" replaces the starter castes in `StartedNewGame`. Game data stays in the save; files are read only on an explicit action.
|
- **How:** Export writes the caste plus deep copies of its policies with `Scribe.saver` to `GenFilePaths.ConfigFolderPath/BlaxCastes/<name>.xml`. Import creates new policies through each database's `MakeNewOutfit`, `MakeNewFoodRestriction`, `MakeNewDrugPolicy` or `MakeNewReadingPolicy` plus `CopyFrom` (label kept, suffixed if taken), then the caste. "Seed new games from templates" replaces the starter castes in `StartedNewGame`. Game data stays in the save; files are read only on an explicit action. Import reads the filters' defNames itself with `GetNamedSilentFail`, because `ThingFilter.ExposeData` logs a red error for every def the game lacks (`ScribeExtractor.DefFromNode`), such as Ideology's slave apparel in a game without Ideology. Meditate hours and Childcare are handled as on load.
|
||||||
- **Settings:** `seedFromTemplates` (off).
|
- **Settings:** `seedFromTemplates` (off).
|
||||||
- **Replaces:** Better Policies (3400923070, 3,857 subs): saving policies across saves, partly. Save My Settings (3,827 subs), partly. Export Agency (1467209473, 16,333 subs): policy export, partly.
|
- **Replaces:** Better Policies (3400923070, 3,857 subs): saving policies across saves, partly. Save My Settings (3,827 subs), partly. Export Agency (1467209473, 16,333 subs): policy export, partly.
|
||||||
- **Effort:** M (2 days).
|
- **Effort:** M (2 days).
|
||||||
- **Tests:** Export the Slave caste to a temp folder, delete it, import: the caste and its three policies come back with equal filters (compare allowed defs). Importing twice suffixes the labels.
|
- **Tests:** Export the Slave caste to a temp folder, delete it, import: the caste and its three policies come back with equal filters (compare allowed defs). Importing twice suffixes the labels. Without Ideology the same runs on the Prisoner caste. A template file made with all three DLCs (kept in the test data) imports in a -NoDlc run without errors and reports what it dropped.
|
||||||
- **Risks:** Filters that reference defs from removed mods drop entries on load. Report the count.
|
- **Risks:** Filters that reference defs from removed mods or missing DLCs drop entries on load. Report the count.
|
||||||
|
|
||||||
#### Caste colour and inspect line
|
#### Caste colour and inspect line
|
||||||
|
|
||||||
|
|
@ -482,23 +570,26 @@ Starter castes, manager tools, overlap warnings moved to 1.0 (2026-11-29).
|
||||||
|
|
||||||
### Detection and binding
|
### Detection and binding
|
||||||
|
|
||||||
- Package ids: `blax.slaves`, `blax.castes`, `blax.zones`. No hard dependencies. Siblings appear in About.xml only as loadAfter entries.
|
- Package ids: `blax.slaves`, `blax.castes`, `blax.zones`, `blax.defaults`. No hard dependencies. Siblings appear in About.xml only as loadAfter entries. Defaults lists no sibling and no sibling lists Defaults, so its position doesn't matter.
|
||||||
- Detection: `ModLister.GetActiveModWithIdentifier(id, ignorePostfix: true)` in one shared Compat helper per mod, so a dev copy next to a Workshop copy still matches.
|
- Detection: `ModLister.GetActiveModWithIdentifier(id, ignorePostfix: true)` in one shared Compat helper per mod, so a dev copy next to a Workshop copy still matches.
|
||||||
- Sibling APIs are bound by reflection (`AccessTools.TypeByName` / `AccessTools.Method`) into cached delegates at startup. A missing sibling or method is a silent no-op.
|
- Sibling APIs are bound by reflection (`AccessTools.TypeByName` / `AccessTools.Method`) into cached delegates at startup. A missing sibling or method is a silent no-op.
|
||||||
- APIs change additively only and carry an int Version.
|
- APIs change additively only and carry an int Version.
|
||||||
- Castes uses neither ZonesApi nor SlavesApi. The others reach Castes only through `BlaxCastes.CastesApi`.
|
- Castes uses neither ZonesApi nor SlavesApi. Zones, Slaves and Defaults reach Castes only through `BlaxCastes.CastesApi`.
|
||||||
- Load order is Castes, Zones, Slaves. Each mod loads after the APIs it calls: Castes lists no sibling, Zones lists `blax.castes`, Slaves lists `blax.castes` and `blax.zones`. No two mods list each other, so RimWorld reports no cycle.
|
- Load order is Castes, Zones, Slaves. Each mod loads after the APIs it calls: Castes lists no sibling, Zones lists `blax.castes`, Slaves lists `blax.castes` and `blax.zones`. No two mods list each other, so RimWorld reports no cycle.
|
||||||
|
|
||||||
### CastesApi (static class)
|
### CastesApi (static class)
|
||||||
|
|
||||||
| Member | What it does | Since |
|
| Member | What it does | API version | Since |
|
||||||
|---|---|---|
|
|---|---|---|---|
|
||||||
| `Version` | int, raised on every addition | 1.3 |
|
| `Version` | static int property, raised on every addition | 1 | 1.1 |
|
||||||
| `HintJoinReason(Pawn pawn, string reason)` | Consumed by that pawn's next join classification. Expires at the end of the current tick. | 1.3 |
|
| `Active` | static bool; false with no game loaded or with `enableApi` off | 1 | 1.1 |
|
||||||
| `NotifyJoined(Pawn pawn, string reason)` | For joins Castes cannot see itself. Called one tick after the status is final. | 1.3 |
|
| `CasteIdOf(Pawn)` | `"<token>:<id>"`, or null (no record, casteless by choice, or not Active). Allocates nothing | 1 | 1.1 |
|
||||||
| `CasteIdOf(Pawn)` | Caste id as a string, or null | 1.3 |
|
| `CasteLabels()` | `List<KeyValuePair<string, string>>` of (id, label), ids in the same `"<token>:<id>"` form, sorted by label; null while not Active | 1 | 1.1 |
|
||||||
| `CasteLabels()` | List of (id, label) | 1.3 |
|
| `HintJoinReason(Pawn pawn, string reason)` | Consumed by that pawn's next join classification. Expires at the end of the current tick. | 2 | 1.3 |
|
||||||
| `PrePick(Pawn, string casteId)` | Pre-pick for Blax Slaves' trade-row picker | 1.4 |
|
| `NotifyJoined(Pawn pawn, string reason)` | For joins Castes cannot see itself. Called one tick after the status is final. | 2 | 1.3 |
|
||||||
|
| `PrePick(Pawn, string casteId)` | Pre-pick for Blax Slaves' trade-row picker; takes a token-prefixed id | 3 | 1.4 |
|
||||||
|
|
||||||
|
Blax Slaves binds `HintJoinReason` and `NotifyJoined` by name and reads `Version` only for display (its Siblings.cs:50-52, 73), so numbering the read-only members first changes nothing there.
|
||||||
|
|
||||||
### Join reasons from Blax Slaves
|
### Join reasons from Blax Slaves
|
||||||
|
|
||||||
|
|
@ -511,32 +602,40 @@ Starter castes, manager tools, overlap warnings moved to 1.0 (2026-11-29).
|
||||||
| `blax.slaves.contractReturned` | Keeps the current caste |
|
| `blax.slaves.contractReturned` | Keeps the current caste |
|
||||||
|
|
||||||
- Buying needs no API call. Blax Slaves' buy mode only sets `guest.joinStatus` before vanilla `Pawn.PreTraded`, and Castes classifies by the final status in its own PreTraded scope (1.0).
|
- Buying needs no API call. Blax Slaves' buy mode only sets `guest.joinStatus` before vanilla `Pawn.PreTraded`, and Castes classifies by the final status in its own PreTraded scope (1.0).
|
||||||
- Before 1.3 there is no API. Purchases and returned runaways still work: runaways end in `SetGuestStatus(player, Slave)` and land in the new-slave row.
|
- Before 1.3 there is no join API. Purchases and returned runaways still work: runaways end in `SetGuestStatus(player, Slave)` and get their previous caste from the 1.0 former-caste record, or the new-slave row without one.
|
||||||
- Blax Slaves ships no policy defaults. Its README points slave outfit, food and drug automation to Castes.
|
- Blax Slaves ships no policy defaults. Its README points slave outfit, food and drug automation to Castes.
|
||||||
|
|
||||||
### Blax Zones
|
### Blax Zones
|
||||||
|
|
||||||
- Zones' sleeping-zone filter gains "caste: X" entries when Castes is active, using `CasteLabels` and `CasteIdOf`. Zones stores the caste ids per save.
|
- Zones 1.5 limits people sleeping zones by caste when Castes is active, reading `Active`, `CasteLabels` and `CasteIdOf` (API version 1, Castes 1.1). Zones stores the token-prefixed ids per save and keeps them while Castes is missing.
|
||||||
- Castes has no bed or sleep slot.
|
- Castes has no bed or sleep slot.
|
||||||
- The caste area slot writes the vanilla allowed area, so Zones would need no API to read it. Zones has no area check planned.
|
- The caste area slot writes the vanilla allowed area, so Zones would need no API to read it. Zones has no area check planned.
|
||||||
|
|
||||||
|
### Blax Defaults
|
||||||
|
|
||||||
|
- Defaults 1.2 reads `Active` and `CasteIdOf` (API version 1, Castes 1.1) to skip any animal or mech that has a caste. Today none can; the guard keeps Castes in charge if it ever adds animal or mech castes.
|
||||||
|
- Animals and mechs get their join defaults from Defaults: area, follow flags and training per species, and auto-repair, work mode and area per mech kind. Defaults never writes to a humanlike pawn; Castes' join hooks take only humanlike pawns (`JoinHooks.Watching`). Both mods postfix `Pawn.SetFaction`, and neither writes the other's pawns.
|
||||||
|
- Defaults' forbid rules see any pawn that dies or drops its gear, colonists and slaves included, but write only the forbidden flag on the corpse and the dropped things, never a caste slot.
|
||||||
|
- Defaults never creates, edits or assigns a policy, so Castes' starter castes still find the Slave outfit and Simple food by their starting labels.
|
||||||
|
|
||||||
### Ownership
|
### Ownership
|
||||||
|
|
||||||
- Castes: every per-pawn policy default (apparel, food, drug, reading, medical care, schedule, area, hostility, self-tend, carried medicine).
|
- Castes: every per-pawn policy default (apparel, food, drug, reading, medical care, schedule, work priorities, weapon loadout, area, hostility, self-tend, carried medicine, fire at will, prisoner interaction).
|
||||||
- Zones: sleeping spots, beds by zone and every friendly drop location.
|
- Zones: sleeping spots, beds by zone and every friendly drop location.
|
||||||
- Slaves: slave status, trade, prices, suppression, rebellion, slave medicine and the slave economy. Slaves routes its silver payouts through `ZonesApi.TryFindDropSpot`, with `DropCellFinder.TradeDropSpot` as fallback. Pawns are never routed into zones.
|
- Slaves: slave status, trade, prices, suppression, rebellion, slave medicine and the slave economy. Slaves routes its silver payouts through `ZonesApi.TryFindDropSpot`, with `DropCellFinder.TradeDropSpot` as fallback. Pawns are never routed into zones.
|
||||||
|
- Defaults: starting settings of vanilla stockpiles and growing zones, storage buildings, production bills, workbenches, buildings, animals and mechs, and what the game forbids when pawns drop gear or die. It writes when something is made or joins, and through its opt-in forbid rules when a pawn drops gear or dies. It keeps nothing in the save.
|
||||||
|
|
||||||
### Shared conventions
|
### Shared conventions
|
||||||
|
|
||||||
- Patches are applied one class at a time from a `[StaticConstructorOnStartup]` class, logging "[Blax Castes] N patches applied". One broken patch class does not take the others down.
|
- Patches are applied one class at a time from a `[StaticConstructorOnStartup]` class, logging "[Blax Castes] N patches applied". One broken patch class does not take the others down.
|
||||||
- Every feature has a ModSettings toggle. Reviewers wanted toggles that change the simulation in the save for multiplayer; the shared contract puts them in ModSettings, so they stay there until multiplayer is built.
|
- Every feature has a ModSettings toggle. Reviewers wanted toggles that change the simulation in the save for multiplayer; the shared contract puts them in ModSettings, so they stay there until multiplayer is built.
|
||||||
- Tests use the headless in-game test mod from `blax-slaves/Tests` (`BlaxSlavesTests` harness, `run-tests.ps1`), copied into this repo as `BlaxCastesTests`. Phase 1 runs in a fresh game, phase 2 after save and reload. -Compat adds the sibling mod and the installed mods Castes is tested next to (Weapons Tab Reborn among them), without Trade as Slave or Colonist; -Tasoc adds that mod; -NoDlc (or -Dlc with a list) leaves DLCs out. The overlap mods and work managers are not installed on the test machine, so their detection is tested with an injected id.
|
- Tests use the headless in-game test mod from `blax-slaves/Tests` (`BlaxSlavesTests` harness, `run-tests.ps1`), copied into this repo as `BlaxCastesTests`. Phase 1 runs in a fresh game, phase 2 after save and reload. -Compat adds the sibling mod and the installed mods Castes is tested next to (Weapons Tab Reborn among them), without Trade as Slave or Colonist; -Tasoc adds that mod; -NoDlc (or -Dlc with a list) leaves DLCs out, and a release runs all 8 DLC combinations (see "DLC support"). The overlap mods and work managers are not installed on the test machine, so their detection is tested with an injected id.
|
||||||
|
|
||||||
## Backlog
|
## Backlog
|
||||||
|
|
||||||
- Multiplayer support: needs a 1.7 build of the Multiplayer mod, and real sync needs two clients. The groundwork is in place (tick-based apply, every write through `CasteManager`). The Workshop page says "Multiplayer: not supported yet" until then.
|
- Multiplayer support: needs a 1.7 build of the Multiplayer mod, and real sync needs two clients. The groundwork is in place (tick-based apply, every write through `CasteManager`). The Workshop page says "Multiplayer: not supported yet" until then.
|
||||||
- Colony bar grouped by caste, like [LTO] Colony Groups (231k subs, no 1.7 build): L and UI-heavy, only as a late optional release.
|
- Colony bar grouped by caste, like [LTO] Colony Groups (231k subs, no 1.7 build): L and UI-heavy, only as a late optional release.
|
||||||
- Animal and mech castes: a different set of settings (master, follow, training, control groups) and different tables.
|
- Animals and mechs: Blax Defaults (per-species join defaults). Its species and mech kind rows cover follow, training, area and control group work modes, so animal and mech castes are not planned here.
|
||||||
- A custom 64x64 gizmo icon: polish only, the vanilla icon works.
|
- A custom 64x64 gizmo icon: polish only, the vanilla icon works.
|
||||||
|
|
||||||
## Cut
|
## Cut
|
||||||
|
|
@ -550,7 +649,7 @@ Starter castes, manager tools, overlap warnings moved to 1.0 (2026-11-29).
|
||||||
- A single "other" fallback row: it filed slave-born children, quest prisoners and returned runaways as colonists. Three status rows replace it.
|
- A single "other" fallback row: it filed slave-born children, quest prisoners and returned runaways as colonists. Three status rows replace it.
|
||||||
- `RegisterJoinReason` in the API: not in the shared contract. Castes maps the Blax Slaves reasons itself.
|
- `RegisterJoinReason` in the API: not in the shared contract. Castes maps the Blax Slaves reasons itself.
|
||||||
- Colony-wide presets or emergency mode: a different model (colony modes, not roles). BPC Forked has it on 1.7, and AAAA covers threat areas.
|
- Colony-wide presets or emergency mode: a different model (colony modes, not roles). BPC Forked has it on 1.7, and AAAA covers threat areas.
|
||||||
- Defaults' non-pawn defaults (storyteller, world, bills, shelves, zones, policy locks): out of scope, and that bulk is why players find Defaults too big.
|
- 1trickPwnyta's Defaults' non-pawn defaults (storyteller, world, bills, shelves, zones, policy locks): out of scope, and that bulk is why players find that mod too big. Bills, shelves and zones are now Blax Defaults.
|
||||||
- Ideology roles in a caste: roles are for free colonists only and mostly have one holder, so bulk assignment makes no sense.
|
- Ideology roles in a caste: roles are for free colonists only and mostly have one holder, so bulk assignment makes no sense.
|
||||||
- A caste picker in the trade dialog owned by Castes: Blax Slaves owns the trade row, and Castes offers `PrePick` instead.
|
- A caste picker in the trade dialog owned by Castes: Blax Slaves owns the trade row, and Castes offers `PrePick` instead.
|
||||||
- A sleeping-zone or bed slot: beds by zone belong to Blax Zones, which filters by caste instead.
|
- A sleeping-zone or bed slot: beds by zone belong to Blax Zones, which filters by caste instead.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue