From c426ca7b5768907a245d7ab4f801c10808d7fbea Mon Sep 17 00:00:00 2001 From: "Timothy (timothy-vps)" Date: Tue, 1 Dec 2026 17:20:01 +0100 Subject: [PATCH] docs: plan Blax Defaults by area docs/features.md is the new plan of record: the scope of the finished mod, ten areas with their steps and status, the order of the areas, what is left out and one open question (new colonies). New features: your own stockpile types, materials no new bill uses, medical care per species, young animals learn what they outgrew, areas every new map starts with, Build copy carries the source's settings. docs/design.md drops release numbers after 1.1 and every day count. At a glance is a table by area, and the specs sit under their area: the rest of storage next to 1.0's storage, recipe and workbench bills next to the bill values, mech auto-repair next to work modes and areas. Per-colony override and multiplayer move to Cut (they need state in the save). Blax Laws gets its section. README and the Workshop text list the planned areas without version numbers (7995 bytes). --- README.md | 15 +- docs/design.md | 462 +++++++++++++++++++--------------- docs/features.md | 183 ++++++++++++++ docs/workshop-description.txt | 11 +- 4 files changed, 459 insertions(+), 212 deletions(-) create mode 100644 docs/features.md diff --git a/README.md b/README.md index a94e8b7..245cba3 100644 --- a/README.md +++ b/README.md @@ -46,12 +46,15 @@ A "Forbid rules" section on the settings page. Every rule ships off. `Source/Bla ### Planned -Designed, not built yet (details and the release table in `docs/design.md`): +Not built yet. The plan by area and its order are in `docs/features.md`, the specs in `docs/design.md`. -- 1.2: graves, sarcophagi, mortars, growth vats (Biotech), biosculpter pods (Ideology) and other storage; defaults per recipe from the bill window; the bills a new workbench comes with. -- 1.3: animals per species (area, follow flags, training), born animals copy their mother, auto-slaughter limits; auto-repair for new mechs (Biotech). -- 1.4: crops for new growing zones and hydroponics basins; settings for new doors, tables, traps, heaters, coolers and lamps. -- 1.5: mech work modes and areas (Biotech). +- Storage: graves, sarcophagi, mortars, growth vats (Biotech), biosculpter pods (Ideology) and other storage; your own stockpile types in the Zone menu. +- Bills: defaults per recipe from the bill window, the bills a new workbench comes with, materials no new bill uses. +- Animals: area, follow flags, training and medical care per species, born animals copy their mother, auto-slaughter limits, young animals learn what they outgrew. +- Mechs (Biotech): auto-repair, the work mode of the control group a new mech joins, and its area. +- New maps: the named areas every new map starts with. +- Growing: crops for new growing zones and hydroponics basins. +- Buildings: settings for new doors, tables, traps, heaters, coolers and lamps; Build copy carries the source's settings. ### DLC support @@ -73,7 +76,7 @@ Replaces, so you can unsubscribe them (the settings page names them while they a Overlaps, named by the overlap warning: -- ⚠️ 1trickPwnyta's Defaults and Set my Defaults set starting settings for stockpiles and shelves too, and 1trickPwnyta's sets values for every new bill. Blax Defaults covers those, so set each in one mod. Their bill lists per recipe or per workbench are not in Blax Defaults yet (planned for 1.2), so keep those mods for that and for their other defaults. The unofficial Defaults 1.7 repack is not detected yet. +- ⚠️ 1trickPwnyta's Defaults and Set my Defaults set starting settings for stockpiles and shelves too, and 1trickPwnyta's sets values for every new bill. Blax Defaults covers those, so set each in one mod. Their bill lists per recipe or per workbench are not in Blax Defaults yet (planned, see Bills in `docs/features.md`), so keep those mods for that and for their other defaults. The unofficial Defaults 1.7 repack is not detected yet. - ⚠️ [FSF] FrozenSnowFox Tweaks: its "No Default Storage Settings" option empties the starting filter of storage buildings, like the quick setup. Use one of the two. - ⚠️ Better Workbench Management sets where the products of new bills go. Set that in one mod only. - ⚠️ Non uno Pinata keeps gear on pawns that go down or die, so little drops for the forbid rules to sort. diff --git a/docs/design.md b/docs/design.md index e4accd2..fba4a5d 100644 --- a/docs/design.md +++ b/docs/design.md @@ -2,46 +2,55 @@ Every new shelf starts at Preferred and pulls meals out of the freezer, every new bill searches the whole map to make one item, and every tamed husky starts with no area and no training. Blax Defaults lets you tune one stockpile, shelf, bill, crop, building or animal, click "Make default", and every new one you make starts like it. Its forbid rules decide what stays forbidden when pawns go down, die or are stripped: the good weapons, the food and the medicine get allowed, the junk stays forbidden. Colonists, slaves and prisoners stay with Blax Castes. -Status: 1.0 is on the Workshop; 1.1 (forbid rules) is built (2026-11-30); 1.2 to 1.5 are designed, no code yet. Checked against the RimWorld 1.7.5021 game code on 2026-11-29. RimWorld 1.7, package id `blax.defaults`. It keeps nothing in the save, so it can be added to or removed from a running colony at any time. +Status: 1.0 and 1.1 (forbid rules) are on the Workshop, 1.1.0 since 2026-11-30. The other areas are designed, no code yet. [features.md](features.md) is the plan of record for scope and order and lists the features new in it. Checked against the RimWorld 1.7.5021 game code on 2026-11-29. RimWorld 1.7, package id `blax.defaults`. It keeps nothing in the save, so it can be added to or removed from a running colony at any time. + +Changes on 2026-12-01, planned by area (Fabian: plan the whole mod, chunked by what belongs together, never by time or size): + +- [features.md](features.md) is new: the scope of the finished mod, its areas with their steps and status, the order of the areas, what is left out and the open questions. New features there: your own stockpile types, materials no new bill uses, medical care per species, young animals learn what they outgrew, areas every new map starts with, and Build copy carries the source's settings. The last three come from the backlog. New colonies waits for Fabian's call. +- Release numbers after 1.1 and every day count are gone. "At a glance" is a table by area, and "Releases" became "Features by area": the rest of storage sits next to 1.0's storage, recipe defaults and workbench bills next to 1.0's bill values, and mech auto-repair next to mech work modes and areas, which now ship together. Shipped features say which release they shipped in. The older notes below use the release numbers of their day. +- Spec text is unchanged apart from references to unshipped releases, which now name the feature, and the effort marks, which keep S, M and L without days. The 1.0 setup line is gone; the setup is done. +- Backlog: the three promoted items say so. Per-colony override and multiplayer moved to Cut, since both need state in the save; storyteller and world presets joined them. +- "Works with the other Blax mods" gains Blax Laws (designed on its branch `design/act-catalogue`), and "Sibling doc changes" lists the sibling lines that still name Defaults' old release numbers. Changes on 2026-11-29, after two review rounds: -- Releases re-cut: values for every new bill ship in 1.0 next to storage, because storage already has working 1.7 mods and the bill values don't. 1.0 covers only storage with a storage blueprint; the build scope, graves, sarcophagi, mortars and other storage move to 1.1. Corpse rules and mech auto-repair move to 1.2. The plan is 22 days instead of 19, with repo and harness setup now budgeted. +- Releases re-cut: values for every new bill ship in 1.0 next to storage, because storage already has working 1.7 mods and the bill values don't. 1.0 covers only storage with a storage blueprint; the build scope, graves, sarcophagi, mortars and other storage move to 1.1. Corpse rules and mech auto-repair move to 1.2. - Fixed what would have broken features or tests: mortar storage sits on the turret's gun, so the tab and the made hook both resolve it there; "Load the game's default" rebuilds settings from scratch instead of adding categories; a new mech's work mode never repurposes group 1; orbital purchases get their slaughter limits on arrival; recipes a bench can't take are skipped like research. - Replace Stuff's revival is described as it works: it spawns the new building and copies bills (plain workbenches only), temperatures, the plant and shelf settings. Rebuilt stoves get the bench set, rebuilt bookcases, graves and sarcophagi start from the default, and a revival guard keeps a revived grower's crop. - Storage defaults gain a rule for items they don't list, so an empty default stays empty when a mod adds items. The quick setup leaves single-purpose storage (chemfuel pumps, weapon racks) unticked. - The defaults file never rotates a broken file into its backup, keeps every broken copy under its own name, and replaces the file only after a read-back matches. - Animal rows get a "not set" state that falls through to the every-animal row; young animals skip training they are too small for; born animals copy only what their own species can learn. Doors, lamps, and heaters and coolers get "every" rows. Vents are dropped: they have no target temperature. - Preset Filtered Zones is not reached and its zones show no Defaults button. The forbid rules are named as the one exception to "only what you make or acquire", and the enemy rule gets an "anywhere" switch. -- DLC support: every feature works with any DLC combination, core only included, and About.xml names no DLC. What needs one switches off cleanly without it: growth vats and the mech rows (Biotech), biosculpter pods (Ideology), and the "slaves only", "mechs only" and "non-mechs only" parts of recipe defaults. The mech rows now show disabled with "Needs Biotech" instead of being hidden. Each release runs the tests in all 8 combinations of Royalty, Ideology and Biotech; Anomaly and Odyssey are guarded in code only. Day counts don't change. +- DLC support: every feature works with any DLC combination, core only included, and About.xml names no DLC. What needs one switches off cleanly without it: growth vats and the mech rows (Biotech), biosculpter pods (Ideology), and the "slaves only", "mechs only" and "non-mechs only" parts of recipe defaults. The mech rows now show disabled with "Needs Biotech" instead of being hidden. Each release runs the tests in all 8 combinations of Royalty, Ideology and Biotech; Anomaly and Odyssey are guarded in code only. - Matched with the Castes and Zones docs: the ownership sentence and the Castes section now say that the forbid rules write outside creation and see humanlike pawns' corpses and gear. A saved default for a DLC building shows disabled with "Needs Biotech" (or Ideology) instead of counting as a name from an inactive mod. The Needs column uses the format the three docs share. Changes on 2026-11-29, forbid rules reworked: -- The forbid rules get their own release, 1.1, right after 1.0, and the other releases shift by one: more storage and bills 1.2, animals 1.3, growers and buildings 1.4, mechs 1.5. The plan is 25 days instead of 22. +- The forbid rules get their own release, 1.1, right after 1.0, and the other releases shift by one: more storage and bills 1.2, animals 1.3, growers and buildings 1.4, mechs 1.5. - The two plain switches for dropped gear become two rules, your colony and enemies, each a vanilla item filter with the hit points and quality ranges stockpiles have. Going down and dying share one rule, because gear drops once: when the pawn goes down, or when it dies without going down, as raiders downed by violence often do. What doesn't match keeps the game's flag. - The rules reach apparel: an opt-in strip switch per rule forbids what stripping drops when the filter refuses it. Butchering stays vanilla. - Everything the rules allow, corpses included, waits until no enemy that can still fight is on the map. - A downed colonist's main weapon stays forbidden only while the colonist lies where it fell, for it to pick up again, as vanilla does. Once the colonist is rescued, carried off or dies, it has forgotten the weapon, and the rule decides. That also covers a kidnapped colonist's weapon, so its backlog item goes. -- After review: escaping prisoners stay in your colony, like rebelling slaves; a rule without a filter takes its suggested setup when ticked (Fabian's call, 2026-11-30, replacing "can't be turned on before it has a filter"); an animal's corpse follows the animal switch even when the animal was hostile. The gear rules take 2.5 days instead of 2, and 1.1 stays at 4. +- After review: escaping prisoners stay in your colony, like rebelling slaves; a rule without a filter takes its suggested setup when ticked (Fabian's call, 2026-11-30, replacing "can't be turned on before it has a filter"); an animal's corpse follows the animal switch even when the animal was hostile. - Hooks: scopes on `Pawn.Kill` and `Pawn_HealthTracker.MakeDowned` with a recorder on the `CompForbiddable.Forbidden` setter replace the postfix on `Pawn.DropAndForbidEverything`. That catches stacks a drop merges into and leaves trades, captures and map generation alone. - Matched with the Castes, Zones and Slaves docs: all four carry the "go down, die or are stripped" sentence and Zones' work rule areas (its 1.6) in their ownership lines, and say "allowed area" for Castes' area slot. The Zones section says how work rule areas and the forbid rules compose, and the release numbers each doc cites of the others follow this re-cut. ## At a glance -| Version | What players get | Needs | Replaces | Days | -|---|---|---|---|---| -| 1.0 | Storage defaults: new stockpiles, dumping stockpiles, shelves, bookcases, hoppers, fridges and weapon racks start with the filter and priority you saved, set from a "Defaults" button in the storage tab. One click makes new shelves start empty. Values for every new bill: radius, drop on floor, repeat mode. A defaults file that never resets itself. Overlap warnings | None | [FSF] No Default Shelf Storage (93k), Better Workbench Management's default store mode (452k, no 1.7), Default Ingredient Radius (11.6k), the storage half and the bill values of 1trickPwnyta's Defaults (75k, no 1.7) and of Set my Defaults (116) | 6 | -| 1.1 | Forbid rules for your colony and for enemies: what the game forbids when one of their pawns goes down or dies is allowed when it matches a filter with hit points and quality ranges (for example every item, but weapons only at 50 to 100% and Normal or better), once the fight is over. Stripping can forbid what doesn't match. Corpses outside the home area can stay allowed | None (slaves: Ideology, colony mechs: Biotech) | KilledEnemyAutoAllowed (Continued) (5.2k), Allow Dead Animals (67k, no 1.7), Allow Everything (3.8k, no 1.7) for drops, partly Auto Strip on Haul's tainted forbid (18k) | 4 | -| 1.2 | Graves, sarcophagi, mortars, growth vats, biosculpter pods and modded storage start from your default too; defaults per recipe saved from the bill window; the bills a new workbench comes with | None (growth vats: Biotech, biosculpter pods: Ideology, "slaves only": Ideology, "mechs only" and "non-mechs only": Biotech) | The per-recipe and per-workbench bills of Defaults and Set my Defaults, Auto Bill Restore (1.1k, no 1.7) | 5 | -| 1.3 | Animal defaults per species: area, follow flags and training when an animal joins; born animals copy their mother; auto-slaughter limits for a species you own for the first time and for new maps. Auto-repair for new mechs (Biotech) | None (mech auto-repair: Biotech) | Animal Controls' join defaults (57k, no 1.7), Auto-repair On (61k, no 1.7), Auto Training (1.2k), the newborn copy of Assign Animal Food (25k, no 1.7) | 4 | -| 1.4 | Crops for new growing zones and hydroponics basins; settings for new doors, tables, traps, heaters, coolers and lamps, per building or for every door, lamp, heater or cooler | None | No Default Gather Spot (8.4k, no 1.7), Default White Lights (656), Always Auto-Rearm (67), Default Plant Selector (7) | 4 | -| 1.5 | Mech defaults per kind (Biotech): the work mode of the control group a new mech joins, its area, and a Defaults gizmo on mechs | Biotech | The mech work modes of 1trickPwnyta's Defaults | 2 | -| Total | | | | 25 | +| Area | What players get | Needs | Replaces | +|---|---|---|---| +| Defaults file and settings page | Shipped in 1.0: one defaults file shared by every save that never resets itself, a settings page that works from the main menu, overlap warnings. Designed: "Add a default" from the main menu and dropping names of removed mods | None | The self-resetting settings of 1trickPwnyta's Defaults (75k, no 1.7) | +| Storage | Shipped in 1.0: new stockpiles, dumping stockpiles, shelves, bookcases, hoppers, fridges and weapon racks start with the filter and priority you saved, set from a "Defaults" button in the storage tab; one click makes new shelves start empty. Designed: graves, sarcophagi, mortars, growth vats, biosculpter pods and modded storage too. New: your own stockpile types in the Zone menu | None (growth vats: Biotech, biosculpter pods: Ideology) | [FSF] No Default Shelf Storage (93k), the storage half of 1trickPwnyta's Defaults (75k, no 1.7) and of Set my Defaults (116); new stockpile types partly cover Preset Filtered Zones (16k) and Simple Stockpile Presets (16k) | +| Bills | Shipped in 1.0: values for every new bill (radius, drop on floor, repeat mode and more). Designed: defaults per recipe saved from the bill window, the bills a new workbench comes with. New: materials no new bill uses | None ("slaves only": Ideology, "mechs only" and "non-mechs only": Biotech) | Better Workbench Management's default store mode (452k, no 1.7), Default Ingredient Radius (11.6k), the bill values and per-recipe and per-workbench bills of 1trickPwnyta's Defaults and Set my Defaults, Auto Bill Restore (1.1k, no 1.7) | +| Forbid rules | Shipped in 1.1: what the game forbids when one of your colony's or an enemy's pawns goes down or dies is allowed when it matches a filter with hit points and quality ranges, once the fight is over. Stripping can forbid what doesn't match. Corpses outside the home area can stay allowed | None (slaves: Ideology, colony mechs: Biotech) | KilledEnemyAutoAllowed (Continued) (5.2k), Allow Dead Animals (67k, no 1.7), Allow Everything (3.8k, no 1.7) for drops, partly Auto Strip on Haul's tainted forbid (18k) | +| Animals | Designed: area, follow flags and training per species when an animal joins; born animals copy their mother; auto-slaughter limits for a species you own for the first time and for new maps. New: medical care per species, young animals learn what they outgrew | None | Animal Controls' join defaults (57k, no 1.7), Auto Training (1.2k), the newborn copy of Assign Animal Food (25k, no 1.7) | +| Mechs | Designed: auto-repair, the work mode of the control group a new mech joins and its area, per mech kind, and a Defaults gizmo on mechs | Biotech | Auto-repair On (61k, no 1.7), the mech work modes of 1trickPwnyta's Defaults | +| New maps | New: named areas every new map starts with (no spec yet) | None | The default areas of 1trickPwnyta's Defaults | +| Growing | Designed: crops for new growing zones and hydroponics basins | None | Default Plant Selector (7), the crop defaults of 1trickPwnyta's Defaults | +| Buildings | Designed: settings for new doors, tables, traps, heaters, coolers and lamps, per building or for every door, lamp, heater or cooler. New: Build copy carries the source's settings | None | No Default Gather Spot (8.4k, no 1.7), Default White Lights (656), Always Auto-Rearm (67) | +| New colonies | Idea, waits for Fabian's call (features.md, "Open questions"): play settings and the medical defaults for animals and other factions' pawns at game start | None | The play settings of 1trickPwnyta's Defaults | -Effort: S = 0.5 days, M = 2, L = 5, summed per release and rounded up. Workshop numbers are current subscribers from the Steam Web API (GetPublishedFileDetails), read on 2026-11-29; "no 1.7" means the item has no 1.7 tag. 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"). A DLC alone, as for 1.5, means the whole release switches off without it. - -Total: 25 working days, up from 22: the forbid rules grew from two half-day switches into filters with a strip switch and a wait for the fight to end (4 days instead of 1), and the animal release drops from 5 days to 4 without the corpse rules. 1.0 is built. 1.1 takes 4 working days, so it fits in one week. +Workshop numbers are current subscribers from the Steam Web API (GetPublishedFileDetails), read on 2026-11-29 and, for the rows new on 2026-12-01, that day; "no 1.7" means the item has no 1.7 tag. Needs: "None" means the area runs on the core game, and a DLC in brackets marks the parts that switch off without it (see "DLC support"). A DLC alone, as for mechs, means the whole area switches off without it. The order of the areas is in [features.md](features.md). Each spec's effort mark (S, M or L) says how big the feature is; it decides nothing about what ships together. ## Defaults I picked @@ -66,7 +75,7 @@ Change if you disagree. - Surgery bills and pasted bills are never touched. Pawn restrictions, a specific target stockpile, custom names, styles and xenogerms belong to one save and are left out of a bill default; "take to stockpile X" becomes "best stockpile". - Born animals copy their mother's training wishes and follow flags and keep the mother's area, as vanilla already does for the area. The species default applies to tamed, bought, wanderer, quest and starting animals. - Colonists, slaves and prisoners belong to Blax Castes. Defaults never writes to a humanlike pawn, with or without Castes. -- Values for every new bill ship in 1.0 next to storage; recipe defaults and workbench bill sets follow in 1.2. Storage already has working 1.7 mods ([FSF] No Default Shelf Storage, [KV] Save Storage, Adaptive Storage - Global Settings), while the default store mode of Better Workbench Management (452k) has no 1.7 build and is asked for on Defaults' page (2026-02-16). Bills also come up more often than storage in the comments on both builds of 1trickPwnyta's Defaults: 36 comments mention bills or workbenches, 24 shelves, storage or stockpiles (about 650 comments, read 2026-11-29). +- Values for every new bill ship in 1.0 next to storage; recipe defaults and workbench bill sets follow in the bills area. Storage already has working 1.7 mods ([FSF] No Default Shelf Storage, [KV] Save Storage, Adaptive Storage - Global Settings), while the default store mode of Better Workbench Management (452k) has no 1.7 build and is asked for on Defaults' page (2026-02-16). Bills also come up more often than storage in the comments on both builds of 1trickPwnyta's Defaults: 36 comments mention bills or workbenches, 24 shelves, storage or stockpiles (about 650 comments, read 2026-11-29). - Name: Blax Defaults, always with the subtitle "Starting settings for storage, bills, crops, buildings, animals and mechs". The Workshop description's first line is "Colonists, slaves and prisoners: Blax Castes." - Any DLC combination works, core only included. A feature that needs a DLC shows disabled on the settings page with "Needs Biotech" (or Ideology), and everything else keeps working. - Not supported: multiplayer (the file differs per client), Anomaly corpse stockpiles, Odyssey fishing zones and gravship starts (neither DLC is installed here to test). @@ -75,11 +84,11 @@ Everything below is for the modder building it. ## Data model -Three parts carry everything. The library and the designation and blueprint hooks ship in 1.0, the build scope in 1.2 and the join funnel in 1.3; later releases only add kinds and hooks. The forbid rules of 1.1 keep their filters in the library and use their own unsaved scopes. Game code references are to the decompiled 1.7.5021 assembly (namespace folder, file, line); XML references are to the game's `Data` folder. +Three parts carry everything. The library and the designation and blueprint hooks shipped in 1.0; the build scope arrives with graves, mortars and other storage, and the join funnel with the animal defaults; later features only add kinds and hooks. The forbid rules of 1.1 keep their filters in the library and use their own unsaved scopes. Game code references are to the decompiled 1.7.5021 assembly (namespace folder, file, line); XML references are to the game's `Data` folder. ### Defaults library, a file of names -- `DefaultsLibrary` (static) holds one entry per kind, keyed by a string: `stockpile:Stockpile`, `stockpile:Dumping`, `stockpile:`, `storage:` and `bill:*` in 1.0; `forbid:colony` and `forbid:enemies` (the forbid rules' filters) from 1.1; `bill:` and `bench:` from 1.2; `animal:*`, `animal:`, `slaughter:`, `mech:*` and `mech:` (auto-repair) from 1.3; `grower:Zone_Growing`, `grower:`, `building:`, `building:*door`, `building:*lamp` and `building:*temperature` from 1.4; work mode and area fields on the `mech:` entries from 1.5. +- `DefaultsLibrary` (static) holds one entry per kind, keyed by a string: `stockpile:Stockpile`, `stockpile:Dumping`, `stockpile:`, `storage:` and `bill:*` since 1.0; `forbid:colony` and `forbid:enemies` (the forbid rules' filters) since 1.1; `bill:` and `bench:` with the bills area; `animal:*`, `animal:` and `slaughter:` with animals; `mech:*` and `mech:` (auto-repair, work mode and area) with mechs; `grower:Zone_Growing` and `grower:` with growing; `building:`, `building:*door`, `building:*lamp` and `building:*temperature` with buildings. - File: `Config/BlaxDefaults/Defaults.xml` under the game's save data folder (`GenFilePaths.ConfigFolderPath`, Verse/GenFilePaths.cs:178). - Writing, in this order: 1. `Scribe.saver.InitSaving` on `Defaults.xml.tmp`, the library inside a try. On an exception: `Scribe.saver.ForceStop()` (Verse/ScribeSaver.cs:213), delete the `.tmp`, one error in the log, both files untouched. @@ -87,7 +96,7 @@ Three parts carry everything. The library and the designation and blueprint hook 3. Only then `File.Replace(tmp, file, file + ".bak")`, or `File.Move(tmp, file)` when there is no main file. A crash at any step leaves the old file. - Why not ModSettings: `LoadedModManager.ReadModSettings` catches any exception, logs a warning and returns fresh settings (Verse/LoadedModManager.cs:553-561), and the next `WriteModSettings` overwrites the old file, flushing whatever its `finally` has (:566-576). Mod settings (`BlaxDefaultsSettings`) keep only the toggles and the dismissed overlap warnings. - Strings only: defNames, enum names, numbers. Nothing uses `Scribe_Defs`, and no `ThingFilter` is deep-saved (its `ExposeData` resolves `allowedDefs` as defs, Verse/ThingFilter.cs:290-299). Loading can never throw over a missing def. The file is read in the `[StaticConstructorOnStartup]` class, after defs exist. -- Names resolve at apply time with `DefDatabase.GetNamedSilentFail`. A name that doesn't resolve is skipped and stays in the file. The settings page shows "N names from mods that are not active" per entry; a "Drop them" button follows in 1.2. +- Names resolve at apply time with `DefDatabase.GetNamedSilentFail`. A name that doesn't resolve is skipped and stays in the file. The settings page shows "N names from mods that are not active" per entry; a "Drop them" button comes with "Add a default and drop inactive names". - Loading: main file, then `.bak`. A file that fails to load is renamed at once to a name of its own, `Defaults.broken-.xml` for the main file and `Defaults.bak.broken-.xml` for the backup, with "-2", "-3" appended if that name exists. The main file is renamed even when the `.bak` loads, so the next write can't rotate the broken file into `.bak` over the only good copy: with no main file, that write is a `File.Move` and the `.bak` stays. If both fail: an empty library, one warning in the log and a red line on the settings page naming the broken copies. Renaming is the only file operation at load; nothing is written until the player saves or forgets a default. - A format version in the root node. Changes are additive only. - StorageTemplate: `priority` (enum name), `allowed` and `refused` (ThingDef names), `unlisted` (`Game`, `Refuse` or `Allow`), `allowedSpecial` and `refusedSpecial` (SpecialThingFilterDef names), the hit points range and the quality range. "Make default" fills `allowed` and `refused` from every def that is `EverStorable(willMinifyIfPossible: true)` (Verse/ThingDef.cs:1394) and passes the kind's parent filter, and saves `unlisted = Game`. Applying starts from the game's default for the kind (on a new thing, what vanilla just set), writes the priority through the `Priority` setter, calls `filter.SetAllow` per resolved def, then handles every storable def the parent allows that is in neither list: `Game` leaves it, `Refuse` and `Allow` set it. The edit window shows the rule as a dropdown under the filter. The forbid rules (1.1) reuse the template as a filter: the priority is unused, and `unlisted` is `Refuse` (stays forbidden) or `Allow`. @@ -96,16 +105,16 @@ Three parts carry everything. The library and the designation and blueprint hook Every write happens at one creation hook, apart from the forbid rules (1.1), which write the forbidden flag when a pawn goes down, dies or is stripped (`Pawn_HealthTracker.MakeDowned`, `Pawn.Kill`, `Pawn.Strip`). All of them go through vanilla setters onto vanilla fields. Nothing marks a thing as handled, so nothing needs saving. -- Designation hooks: postfixes on the zone designators' `MakeNewZone` (stockpiles in 1.0, growing zones in 1.4). +- Designation hooks: postfixes on the zone designators' `MakeNewZone` (stockpiles since 1.0, growing zones with the growing area). - Blueprint hook (1.0): a postfix on `Blueprint_Storage.PostMake`, see "New storage buildings start from your default". -- Build scope (1.2): a prefix on `Frame.CompleteConstruction(Pawn)` (RimWorld/Frame.cs:262) opens a `[ThreadStatic]` scope when the frame's type is exactly `Frame` and its faction is the player's. It records the frame's map, cell, `entityDefToBuild` and `glowerColorOverride` (:17), because the frame destroys itself inside the method (:280). A Harmony finalizer closes the scope, even on an exception. +- Build scope (arrives with graves, mortars and other storage): a prefix on `Frame.CompleteConstruction(Pawn)` (RimWorld/Frame.cs:262) opens a `[ThreadStatic]` scope when the frame's type is exactly `Frame` and its faction is the player's. It records the frame's map, cell, `entityDefToBuild` and `glowerColorOverride` (:17), because the frame destroys itself inside the method (:280). A Harmony finalizer closes the scope, even on an exception. - Made hook: a postfix on `ThingMaker.MakeThing(ThingDef, ThingDef)` (Verse/ThingMaker.cs:8) while the scope is open and the def is the frame's. It records the new thing and applies the defaults that must be in place before spawn (storage parents without a storage blueprint, temperature targets, door hold-open, gather spot). The postfix runs after the thing's own `PostMake`, so a turret's gun already exists (RimWorld/Building_TurretGun.cs:164-169). Nested `MakeThing` calls inside it, such as `MakeGun` making the gun (:684-688), have another def and are skipped. For every other `MakeThing` call the cost is one static field read. - Built hook: a postfix on `Frame.CompleteConstruction` applies the defaults that spawn code would overwrite (bills, crops, trap rearm, lamp colour) to the recorded thing, only if that thing is spawned. - Replace Stuff (3526354009, 539,443, 1.7) revives a destroyed building by spawning the new building and then copying a few settings from the destroyed one it kept: its `Source/DestroyedRestore/ReviveBuilding.cs` wraps this method's `GenSpawn.Spawn` call and calls `DestroyedBuildings.ReviveBuilding` right after it. Its handlers are keyed by exact class (`BuildingReviver.cs`, `CanDo` uses `thing.GetType()`): bills for `Building_WorkTable`, the target temperature for `Building_Heater` and `Building_Cooler`, the plant for `Building_PlantGrower` and the settings for `Building_Storage`. `DestroyedBuildings.SaveBuilding` keeps no other building. The same names are in its 1.7 `Replace_Stuff.dll`. So the built hook runs on every revived building, and everything revival doesn't copy gets the default, as on any rebuild. Temperatures set by the made hook are overwritten by revival afterwards, so the old value wins. - Revival guard: the scope's prefix reads Replace Stuff's `DestroyedBuildings` map component by reflection (`AccessTools.TypeByName("Replace_Stuff.DestroyedRestore.DestroyedBuildings")`, field `destroyedBuildings`, a dictionary keyed by cell) and notes whether it holds a building at the frame's position. Revival removes the entry later in the same call. When the prefix saw one, the built hook adds no bills and sets no crop, since revival restores those. Without Replace Stuff the guard is a null check. - Exact `Frame` only: Replace Stuff's stuff replacement uses `ReplaceFrame : Frame` and completes through its own method (its `Source/Replace/ReplaceFrame.cs`, a prefix on `Frame.CompleteConstruction` that skips the vanilla body for it). That building keeps its settings. - Not covered, on purpose: god-mode instant builds, map generation, minified reinstalls, gravship landings. -- Join funnel (1.3, animals, and mechs for auto-repair): animals and colony mechs entering the player faction. Collected in postfixes on `Pawn.SetFaction(Faction, Pawn)` (Verse/Pawn.cs:2702, a prefix snapshots the old faction) and `PawnGenerator.GeneratePawn(PawnGenerationRequest)` (Verse/PawnGenerator.cs:139). Applied when the outermost known caller returns: prefix and finalizer scopes on `Hediff_Pregnant.DoBirthSpawn`, `CompHatcher.Hatch`, `RecruitUtility.Recruit`, `Pawn.PreTraded` and `Bill_ProductionMech.CreateProducts` push and pop a depth counter, and the outermost finalizer applies the collected pawns. That way the defaults land after each caller's own writes. Outside any scope they apply at the end of the collecting postfix. Humanlike pawns never enter: `RaceProps.Animal` or `IsColonyMech` is the first check. +- Join funnel (arrives with the animal defaults; mechs reuse it): animals and colony mechs entering the player faction. Collected in postfixes on `Pawn.SetFaction(Faction, Pawn)` (Verse/Pawn.cs:2702, a prefix snapshots the old faction) and `PawnGenerator.GeneratePawn(PawnGenerationRequest)` (Verse/PawnGenerator.cs:139). Applied when the outermost known caller returns: prefix and finalizer scopes on `Hediff_Pregnant.DoBirthSpawn`, `CompHatcher.Hatch`, `RecruitUtility.Recruit`, `Pawn.PreTraded` and `Bill_ProductionMech.CreateProducts` push and pop a depth counter, and the outermost finalizer applies the collected pawns. That way the defaults land after each caller's own writes. Outside any scope they apply at the end of the collecting postfix. Humanlike pawns never enter: `RaceProps.Animal` or `IsColonyMech` is the first check. - Unsaved transient state only: the scope fields, the collected pawn list, the new growing zones of one drag, and for pawns that join without a map a `ConditionalWeakTable` applied when they first spawn. A pawn bought into a caravan has no map, and neither has one bought from an orbital trader: `TradeShip.GiveSoldThingToPlayer` splits it off the ship, calls `PreTraded` and only then drops it in a pod (RimWorld/TradeShip.cs:199-208). `PendingJoin` carries the area label and the auto-slaughter first-animal check. The forbid rules (1.1) add their scope stack with the things recorded in it, the butchering flag and the wait list; a save and reload starts with all of them empty. ### Save safety @@ -123,45 +132,45 @@ Every Blax mod works with any DLC combination, core only included (rule of 2026- - About.xml lists no DLC as a dependency. - A feature that needs a DLC switches off cleanly without it: its section or row on the settings page shows disabled with "Needs Biotech" (or the DLC it needs), its hooks do nothing, and everything else keeps working. No feature needs Royalty. - DLC defs only through `MayRequire`: a DefOf field for DLC content carries `[MayRequireBiotech]` (or its DLC's attribute), and XML that names one carries `MayRequire="Ludeon.RimWorld.Biotech"`. So far none is needed: the DLC kinds below are reached through their class or storage parent, and saved names resolve with `GetNamedSilentFail`. -- DLC code behind `ModsConfig.Active`, checked before a hook touches DLC content. The patch on `Bill_ProductionMech.CreateProducts` (1.3) is applied in every combination: the class is in the game's own assembly and never runs without Biotech. +- DLC code behind `ModsConfig.Active`, checked before a hook touches DLC content. The patch on `Bill_ProductionMech.CreateProducts` (mechs) is applied in every combination: the class is in the game's own assembly and never runs without Biotech. - The forbid rules (1.1) need no DLC. Slaves (Ideology) and colony mechs (Biotech) belong to your colony through `Faction == Faction.OfPlayer` when their DLC is loaded, with no DLC call. Every mechanoid kind destroys its weapon instead of dropping it in any DLC set (`destroyGearOnDrop` on Core's `BaseMechanoidKind`, `Races_Mechanoid.xml:59`). The special filters for tainted and biocoded things are Core defs (Core `Misc/SpecialThingFilterDefs/SpecialThingFilters.xml:149-203`). The chips superheavy mechs leave exist only with Biotech and reach the enemy rule like any other drop. - The defaults file is shared by every DLC set. A saved default for a DLC kind that isn't loaded, such as a growth vat default without Biotech, stays in the file and shows on the settings page as a disabled row with "Needs Biotech" (or its DLC). A DLC name inside an entry, such as Wastepack in a stockpile filter, baby food in a bench set or toxipotato in a crop list, is skipped and counts with the names from inactive mods. Both work again when the DLC is back. The DLC of a kind that isn't loaded comes from the `[MayRequire]` attribute of the vanilla DefOf field with its name (`ThingDefOf.GrowthVat` is `[MayRequireBiotech]`, ThingDefOf.cs:976-977; `ThingDefOf.BiosculpterPod` is `[MayRequireIdeology]`, :917-918), the way Castes' `DlcSupport` reads it. A kind with no such field, from a removed mod, counts as an inactive name. - A save made with a DLC loads without it. Defaults keeps nothing in the save (see "Save safety"); the vanilla fields it wrote are the game's to load. - Anomaly and Odyssey are not installed here, so they are guarded in code only. Defaults names none of their defs. Their content meets checks that are false without them: `RaceProps.Animal` excludes Anomaly entities (`IsAnomalyEntity` checks `ModsConfig.AnomalyActive`, Verse/RaceProperties.cs:265-275, :342), `Pawn.IsMutant` (Verse/Pawn.cs:662) skips mutants, and Odyssey's six trainables (`AttackTarget` to `SludgeSpew`, all `[MayRequireOdyssey]`, RimWorld/TrainableDefOf.cs:12-28) show in the species rows only when Odyssey loads them. The Harbinger tree's corpse stockpile, gravship stockpiles and grow zones, and fishing zones are not reached. -- Effort: no release grows. Each guard is one check inside a feature already estimated, the harness copied from Castes already takes -NoDlc and -Dlc, and the eight runs are machine time. +- Each guard is one check inside its feature, and the harness copied from Castes already takes -NoDlc and -Dlc. - Tests: - `run-tests.ps1 -NoDlc` runs the suite on the core game; `-Dlc Royalty,Biotech` loads only the named installed DLCs. A test that needs a DLC logs "skipped: needs Biotech" (or its DLC) without failing. Each feature that touches DLC content names its DLC-off test. - A release runs all 8 combinations of Royalty, Ideology and Biotech: -NoDlc, each alone, each pair and all three, each with phase 1 and phase 2. All must pass. - Anomaly and Odyssey get no run here; their guards are checked by reading the code. - Phase 2's check that the .rws holds no "BlaxDefaults" covers "a save made with a DLC loads without it", so there is no cross-DLC load test. -| Feature | Release | Needs | Without it | +| Feature | Area | Needs | Without it | |---|---|---|---| -| Defaults library and settings page | 1.0 | None | Works. Names of DLC defs stay in the file, skipped and counted | -| Defaults button in the storage tab | 1.0 | None | Works | -| New stockpiles | 1.0 | None | Works. The game's dumping default has no wastepack, which is Biotech | -| New storage buildings | 1.0 | None | Works | -| Quick setup | 1.0 | None | Works | -| Overlap warnings | 1.0 | None | Works | -| Values for every new bill | 1.0 | None | Works. Mech gestation bills don't exist | -| Gear rules for your colony and enemies | 1.1 | None | Works. Slaves (Ideology) and colony mechs (Biotech) don't exist; mechs drop no weapon in any set | -| Waiting until the fight is over | 1.1 | None | Works | -| Strip switch | 1.1 | None | Works. The tainted and biocoded filters are Core | -| Corpse rules | 1.1 | None | Works | -| Graves, sarcophagi, mortars and modded storage | 1.2 | None | Works | -| Growth vats | 1.2 | Biotech | Not offered in the tab, the quick setup or "Add a default"; a saved default stays in the file and shows disabled with "Needs Biotech" | -| Biosculpter pods | 1.2 | Ideology | Not offered in the tab, the quick setup or "Add a default"; a saved default stays in the file and shows disabled with "Needs Ideology" | -| Add a default and drop inactive names | 1.2 | None | Works | -| Defaults per recipe | 1.2 | None | Works | -| "Slaves only" in a recipe default | 1.2 | Ideology | Skipped when a bill is made; kept in the file, and the default's summary marks it "Needs Ideology" | -| "Mechs only" and "non-mechs only" in a recipe default | 1.2 | Biotech | Skipped when a bill is made; kept in the file, and the default's summary marks it "Needs Biotech" | -| Bills for new workbenches | 1.2 | None | Works. A set entry for a DLC recipe, such as baby food (Biotech), is skipped and counted | -| Species defaults, born animals, Training tab | 1.3 | None | Works. Dryads (Ideology) don't exist | -| Auto-slaughter limits | 1.3 | None | Works | -| Auto-repair for new mechs | 1.3 | Biotech | Mech section disabled with "Needs Biotech"; saved rows stay | -| Crops for growing zones and plant growers | 1.4 | None | Works. A DLC crop in the list, such as toxipotato (Biotech), is skipped and the next one tried | -| Building settings | 1.4 | None | Works | -| Mech work modes, areas and gizmo | 1.5 | Biotech | Disabled with "Needs Biotech", no gizmo; saved rows stay | +| Defaults library and settings page | Defaults file, shipped 1.0 | None | Works. Names of DLC defs stay in the file, skipped and counted | +| Defaults button in the storage tab | Storage, shipped 1.0 | None | Works | +| New stockpiles | Storage, shipped 1.0 | None | Works. The game's dumping default has no wastepack, which is Biotech | +| New storage buildings | Storage, shipped 1.0 | None | Works | +| Quick setup | Storage, shipped 1.0 | None | Works | +| Overlap warnings | Defaults file, shipped 1.0 | None | Works | +| Values for every new bill | Bills, shipped 1.0 | None | Works. Mech gestation bills don't exist | +| Gear rules for your colony and enemies | Forbid rules, shipped 1.1 | None | Works. Slaves (Ideology) and colony mechs (Biotech) don't exist; mechs drop no weapon in any set | +| Waiting until the fight is over | Forbid rules, shipped 1.1 | None | Works | +| Strip switch | Forbid rules, shipped 1.1 | None | Works. The tainted and biocoded filters are Core | +| Corpse rules | Forbid rules, shipped 1.1 | None | Works | +| Graves, sarcophagi, mortars and modded storage | Storage | None | Works | +| Growth vats | Storage | Biotech | Not offered in the tab, the quick setup or "Add a default"; a saved default stays in the file and shows disabled with "Needs Biotech" | +| Biosculpter pods | Storage | Ideology | Not offered in the tab, the quick setup or "Add a default"; a saved default stays in the file and shows disabled with "Needs Ideology" | +| Add a default and drop inactive names | Defaults file | None | Works | +| Defaults per recipe | Bills | None | Works | +| "Slaves only" in a recipe default | Bills | Ideology | Skipped when a bill is made; kept in the file, and the default's summary marks it "Needs Ideology" | +| "Mechs only" and "non-mechs only" in a recipe default | Bills | Biotech | Skipped when a bill is made; kept in the file, and the default's summary marks it "Needs Biotech" | +| Bills for new workbenches | Bills | None | Works. A set entry for a DLC recipe, such as baby food (Biotech), is skipped and counted | +| Species defaults, born animals, Training tab | Animals | None | Works. Dryads (Ideology) don't exist | +| Auto-slaughter limits | Animals | None | Works | +| Auto-repair for new mechs | Mechs | Biotech | Mech section disabled with "Needs Biotech"; saved rows stay | +| Crops for growing zones and plant growers | Growing | None | Works. A DLC crop in the list, such as toxipotato (Biotech), is skipped and the next one tried | +| Building settings | Buildings | None | Works | +| Mech work modes, areas and gizmo | Mechs | Biotech | Disabled with "Needs Biotech", no gizmo; saved rows stay | Where the content lives, checked in the 1.7 `Data` folder and the decompiled DefOf classes on 2026-11-29: @@ -170,22 +179,24 @@ Where the content lives, checked in the 1.7 `Data` folder and the decompiled Def - Ideology: the biosculpter pod (`Buildings_Ideo.xml:410`; `ThingDefOf.BiosculpterPod`, `[MayRequireIdeology]`, ThingDefOf.cs:918), dryads (`animalType` Dryad, `Races_Animal_Special.xml:92`; `RaceProps.Dryad`, Verse/RaceProperties.cs:279), nutrifungus (`Plants_Special.xml:5`), the bill menu's "slaves only" (Dialog_BillConfig.cs:550) and slaves themselves (`Pawn.IsSlaveOfColony`, Verse/Pawn.cs:648). - Royalty: nothing Defaults touches. -## Releases +## Features by area -### 1.0 Storage defaults and bill values (6 days) +Specs grouped by area, in the order of [features.md](features.md), which is the plan of record for scope and order. Shipped features say which release they shipped in. The areas New maps and New colonies, and the features new in that plan, have no spec here yet. -Setup, S (half a day): the repo with About.xml, the csproj and the `[StaticConstructorOnStartup]` patch class, and the headless test harness with its -Compat, -NoDlc and -Dlc runs (see "Shared conventions" and "DLC support"). +### Defaults file and settings page #### Defaults library and settings page -- **Players get:** Mod settings > Blax Defaults lists every saved default by section (Stockpiles, Storage buildings and Every new bill; later Forbid rules, Recipes, Workbenches, Animals, Growers and buildings, Mechs). Each row says what it sets ("Shelf: Normal, allows 14 of 1,903 items, refuses unlisted items") and has Edit and Forget; Forget asks first. Edit opens the vanilla item filter with a priority dropdown and the rule for unlisted items. It all works from the main menu. A status line shows the entry count and any names from inactive mods. In 1.0 a default is made from the storage tab or the quick setup; "Add a default" and "Drop them" follow in 1.2. +Shipped in 1.0. + +- **Players get:** Mod settings > Blax Defaults lists every saved default by section (Stockpiles, Storage buildings and Every new bill; later Forbid rules, Recipes, Workbenches, Animals, Growers and buildings, Mechs). Each row says what it sets ("Shelf: Normal, allows 14 of 1,903 items, refuses unlisted items") and has Edit and Forget; Forget asks first. Edit opens the vanilla item filter with a priority dropdown and the rule for unlisted items. It all works from the main menu. A status line shows the entry count and any names from inactive mods. Since 1.0 a default is made from the storage tab or the quick setup; "Add a default" and "Drop them" are the feature "Add a default and drop inactive names". - **How:** The library, file handling and templates from the data model. The window is `Mod.DoSettingsWindowContents`, one section per category, each with its master toggle. The storage edit window draws `ThingFilterUI.DoThingFilterConfigWindow` on a scratch `ThingFilter` built from the template. Its parent filter is the building's `fixedStorageSettings` (RimWorld/BuildingProperties.cs:287), else `StorageSettings.EverStorableFixedSettings()` (RimWorld/StorageSettings.cs:136-146). It needs defs only, not a running game. - A section or saved default whose DLC is off is drawn disabled with "Needs Biotech" (or the DLC it needs) and stays in the file: the mech section, a growth vat or biosculpter pod default, the restriction in a recipe default's summary. DLC names inside an entry count with the names from inactive mods (see "DLC support"). - **Settings:** `enabled` (on; off applies nothing and keeps the file), `stockpileDefaults` (on), `storageDefaults` (on). - **Save and removal:** nothing in the save. The file is a config file. - **Overlaps:** none. - **Replaces:** the failure players report most about 1trickPwnyta's Defaults (3285178686, 75,492, no 1.7): settings that reset themselves (comments 2025-12-07, 2026-01-27, 2026-06-30) and presets naming removed mods that need a full reset (2024-10-01). -- **Effort:** M, 2 days. +- **Effort:** M. - **Tests:** Every run starts with an empty library: run-tests.ps1 deletes `Config/BlaxDefaults` in its own save data folder, so the player's file is never touched. - A template allowing Steel and the made-up name "BlaxTest_Missing" is written and read back: Steel resolves, the missing name is kept and counted, and applying the template logs nothing. - -NoDlc: a stockpile template saved with Biotech (Steel allowed, Wastepack refused) loads, keeps Wastepack in the file, counts it as one inactive name and applies Steel without a log line. @@ -196,20 +207,52 @@ Setup, S (half a day): the repo with About.xml, the csproj and the `[StaticConst - Phase 2: the .rws contains no "BlaxDefaults" outside the meta block's mod list. - **Risks:** a player who edits the XML by hand and breaks it gets the broken-file path, with the file kept. +#### Overlap warnings + +Shipped in 1.0. + +- **Players get:** The settings page names each active mod that sets the same defaults, and what it sets. On the first game loaded in a session, one message lists those not yet dismissed, with "Don't remind me" per mod. +- **How:** Detection only, through a Compat helper (`ModLister.GetActiveModWithIdentifier(id, ignorePostfix: true)`), so a local copy next to a Workshop copy still matches. No patches against those mods. Dismissed ids live in mod settings, not the save. Each area adds the mods of its own category. 1.0 detects 1trickPwnyta's Defaults (`defaults.1trickPwnyta`, read from its About.xml; the Experimental build 3522445452, 2,517, no 1.7, keeps the same id), the unofficial Defaults 1.7 repack (3836680679, 145, 1.7), Set my Defaults, [FSF] No Default Shelf Storage, [FSF] FrozenSnowFox Tweaks and Default Normal Empty Storage for storage, and Better Workbench Management, Default Ingredient Radius, Default Bill Ingredient Radius and Default Until X for the bill values. Package ids other than Defaults' are read from each mod's About.xml before shipping, as Castes did. +- **Settings:** `warnOverlaps` (on). +- **Save and removal:** nothing in the save. +- **Overlaps:** this feature is the overlap handling. +- **Replaces:** nothing. +- **Effort:** S. +- **Tests:** An id injected into the detection list shows in the settings text and in the message, once per session. A dismissed id doesn't. +- **Risks:** a wrong package id misses silently. + +#### Add a default and drop inactive names + +Designed, no code yet. + +- **Players get:** On the settings page, "Add a default" picks a stockpile type or a storage building and opens the edit window on the game's default, so a default can be made from the main menu. Each entry with names from inactive mods gets "Drop them", which asks first. +- **How:** The picker lists the stockpile types and every def with a storage tab that Defaults covers, the same list as the quick setup. "Drop them" removes the unresolved names from that entry and writes the file. +- **Settings:** covered by `storageDefaults`. +- **Save and removal:** nothing in the save. +- **Overlaps:** none. +- **Replaces:** nothing beyond the library. +- **Effort:** S. +- **Tests:** "Add a default" for Shelf creates a template equal to the shelf's def default. "Drop them" on the entry with "BlaxTest_Missing" removes that name, keeps Steel, and the counter shows 0. +- **Risks:** none known. + +### Storage + #### Defaults button in the storage tab -- **Players get:** A "Defaults" button at the top right of the storage tab of stockpiles and of every storage building Defaults covers: in 1.0 shelves, small shelves, bookcases, hoppers, fridges and weapon racks; from 1.2 graves, sarcophagi, mortars, growth vats, biosculpter pods and other storage too. Its menu has "Make default for new shelves" (always naming the kind), "Load your default", "Load the game's default" and "Forget the default for new shelves", which asks first. The tooltip says whether new shelves start from your default. On a stockpile each entry opens a submenu of stockpile types, and the tooltip lists every type that has a default. +Shipped in 1.0. + +- **Players get:** A "Defaults" button at the top right of the storage tab of stockpiles and of every storage building Defaults covers: since 1.0 shelves, small shelves, bookcases, hoppers, fridges and weapon racks; with "Graves, mortars and other storage" also graves, sarcophagi, mortars, growth vats, biosculpter pods and other storage. Its menu has "Make default for new shelves" (always naming the kind), "Load your default", "Load the game's default" and "Forget the default for new shelves", which asks first. The tooltip says whether new shelves start from your default. On a stockpile each entry opens a submenu of stockpile types, and the tooltip lists every type that has a default. - **How:** A postfix on `ITab_Storage.FillTab` (RimWorld/ITab_Storage.cs:104). The tab is 300 by 480, contracted by 10 (`:13`, `:108`), and the priority button takes 160 px of the 35 px top row (`:113`), so ours sits at (180, 10, 110, 29) in tab coordinates. When `IsPrioritySettingVisible` is false (`:87`) the top row is 20 px (`:89`), and the button becomes a 20 px icon at (270, 10). The subclasses `ITab_Shells` and `ITab_BiosculpterNutritionStorage` don't override `FillTab`, so they get it too. - Kind: from the protected `SelStoreSettingsParent` (`:15`, read through an AccessTools delegate). A `Zone_Stockpile` doesn't remember which designator made it: its constructor uses the preset only for the label and `SetFromPreset`, and `ExposeData` saves only the settings (RimWorld/Zone_Stockpile.cs:37-48). So on a stockpile all four entries open the same submenu: "stockpile", "dumping stockpile", and one entry per modded stockpile designator. A thing, or a comp of one, gives its def; a `Blueprint_Storage` gives its `BuildDef` and a `Frame` its `entityDefToBuild`. A `StorageGroup` of linked shelves (`:28-52`) gives its first member's def, and Load writes the group's settings. - - Turrets: `ITab_Shells` falls back to the turret's gun when the selected `Building_TurretGun` has no storage itself (RimWorld/ITab_Shells.cs:5-19), and the gun's `CompChangeableProjectile` reads the gun def's `building.defaultStorageSettings` (RimWorld/CompChangeableProjectile.cs:51-58; Core `Buildings_Security_Turrets.xml:618-640` puts both on `Artillery_Mortar`). When the selected object is a `Building_TurretGun`, the kind is the turret's def (`Turret_Mortar`), the settings are the gun comp's, and the game's default is the gun def's. The made hook in 1.2 uses the same key. - - No button: any parent that is none of the above, such as the `Zone_PresetStockpile` of Preset Filtered Zones (see "New stockpiles start from your default"). In 1.0 also any thing whose def has no storage blueprint, since nothing would apply its default yet; 1.2 lifts that. + - Turrets: `ITab_Shells` falls back to the turret's gun when the selected `Building_TurretGun` has no storage itself (RimWorld/ITab_Shells.cs:5-19), and the gun's `CompChangeableProjectile` reads the gun def's `building.defaultStorageSettings` (RimWorld/CompChangeableProjectile.cs:51-58; Core `Buildings_Security_Turrets.xml:618-640` puts both on `Artillery_Mortar`). When the selected object is a `Building_TurretGun`, the kind is the turret's def (`Turret_Mortar`), the settings are the gun comp's, and the game's default is the gun def's. The made hook of "Graves, mortars and other storage" uses the same key. + - No button: any parent that is none of the above, such as the `Zone_PresetStockpile` of Preset Filtered Zones (see "New stockpiles start from your default"). Until "Graves, mortars and other storage" ships, also any thing whose def has no storage blueprint, since nothing would apply its default yet. - Load your default first loads the game's default for the kind, then applies the template, so it gives the same settings as a new one. The `Priority` setter notifies haul destinations and haulables while playing (RimWorld/StorageSettings.cs:23-56). - The game's default is built on a scratch `new StorageSettings()` and written with `StorageSettings.CopyFrom` (:90-95), whose `ThingFilter.CopyAllowancesFrom` replaces the allowed defs, special filters and ranges (Verse/ThingFilter.cs:634-665). For stockpiles the scratch gets `SetFromPreset` with the type's preset and Priority Normal, as the vanilla constructor does (RimWorld/Zone_Stockpile.cs:37-43). `SetFromPreset` alone only adds categories (Verse/ThingFilter.cs:779-800), so on an existing stockpile it would keep everything already allowed. For buildings the scratch copies `def.building.defaultStorageSettings` (RimWorld/BuildingProperties.cs:289), or keeps the empty filter at the priority a fresh `StorageSettings(parent)` takes when the def has none, as `PostMake` leaves it. Defaults never edits that field, so it always holds the loaded value. - **Settings:** covered by `enabled`. - **Save and removal:** writes only the selected thing's own storage settings. -- **Overlaps:** Blax Zones 1.4 adds "Receive deliveries" and sell gizmos to the same stockpiles and shelves; a button inside the tab keeps the gizmo bar short. Adaptive Storage - Global Settings (3530785055, 61,986, 1.7) applies filters to many buildings on demand; the last click wins. +- **Overlaps:** Blax Zones' planned deliveries into stockpiles and shelves add "Receive deliveries" and sell gizmos to the same stockpiles and shelves; a button inside the tab keeps the gizmo bar short. Adaptive Storage - Global Settings (3530785055, 61,986, 1.7) applies filters to many buildings on demand; the last click wins. - **Replaces:** for one preset per kind, the manual save and load of [KV] Save Storage, Outfit, Crafting, Drug and Operation Settings (3222246658, 109,174, 1.7) and Simple Stockpile Presets (Continued) (2189006791, 16,278, 1.7). -- **Effort:** S, half a day. +- **Effort:** S. - **Tests:** The menu builder `StorageDefaultsMenu.OptionsFor(parent)` runs on a stockpile, a dumping stockpile, a shelf, a shelf blueprint and two linked shelves. - Labels name the kind; on a stockpile, Make default, Load, Load the game's default and Forget each offer the type submenu. - Make default stores a template equal to the current settings. Load writes it back after a change. @@ -222,6 +265,8 @@ Setup, S (half a day): the repo with About.xml, the csproj and the `[StaticConst #### New stockpiles start from your default +Shipped in 1.0. + - **Players get:** Drag a stockpile or a dumping stockpile and it starts with the filter and priority you saved for that type. A modded designator that subclasses the vanilla stockpile designator is a type of its own. - **How:** A postfix on `Designator_ZoneAddStockpile.MakeNewZone` (RimWorld/Designator_ZoneAddStockpile.cs:29). `Designator_ZoneAdd.DesignateMultiCell` calls it before `RegisterZone` and before the zone has cells (RimWorld/Designator_ZoneAdd.cs:149, :182). The postfix applies the template to `((Zone_Stockpile)__result).settings`. - Type: the protected `preset` field (`:8`, read with `AccessTools.FieldRefAccess`) for the vanilla designators. `Designator_ZoneAddStockpile_Resources` and `_Expand` give "Stockpile" (DefaultStockpile), `_Dumping` gives "Dumping stockpile". An Expand drag that touches no existing zone makes a new stockpile (`:182`), which gets the Stockpile default just as vanilla gives it the Stockpile preset. Any other subclass is its own type, keyed by type name and labelled with its `NewZoneLabel`. @@ -233,13 +278,15 @@ Setup, S (half a day): the repo with About.xml, the csproj and the `[StaticConst - **Save and removal:** the zone saves its settings as vanilla (`Zone_Stockpile.ExposeData`, RimWorld/Zone_Stockpile.cs:45-49). - **Overlaps:** 1trickPwnyta's Defaults and Set my Defaults (3737034968, 116, 1.7) set the same thing; warned. - **Replaces:** the stockpile part of both. -- **Effort:** S, half a day. +- **Effort:** S. - **Tests:** With "Stockpile: Important, simple meals only", `DesignateMultiCell` over an empty 3x3 area gives a zone at Important that allows MealSimple and refuses Steel. Two disjoint blocks in one drag give two zones, both with the template. A dumping drag with no template stays vanilla (Corpses and Chunks allowed). An Expand drag next to an existing zone grows it without touching its filter. Phase 2: the zone's settings persist. - **Risks:** none known. #### New storage buildings start from your default -- **Players get:** Place a shelf, small shelf, bookcase, hopper, fridge or weapon rack and it starts with the default you saved for that building. Changes you make on the blueprint before it's built still win. A shelf, small shelf, hopper or other `Building_Storage` that auto-rebuild puts back keeps its old settings; a rebuilt bookcase starts from your default like a new one. Ruins, map generation and trader stock keep the game's settings. Graves, sarcophagi, mortars and other storage without a storage blueprint follow in 1.2. +Shipped in 1.0. + +- **Players get:** Place a shelf, small shelf, bookcase, hopper, fridge or weapon rack and it starts with the default you saved for that building. Changes you make on the blueprint before it's built still win. A shelf, small shelf, hopper or other `Building_Storage` that auto-rebuild puts back keeps its old settings; a rebuilt bookcase starts from your default like a new one. Ruins, map generation and trader stock keep the game's settings. Graves, sarcophagi, mortars and other storage without a storage blueprint follow with their own feature. - **How:** Every def whose `building.blueprintClass` is `Blueprint_Storage` or a subclass (RimWorld/BuildingProperties.cs:45). In vanilla that is the shelves, the bookcases (`Blueprint_StorageWithRoomHighlight`, a subclass) and the hopper (`Core/Defs/ThingDefs_Buildings/Buildings_Furniture.xml:1550` and `:1670`, `Buildings_Production.xml:1809`). In the installed mods, RimFridge's fridges (its 1.6 `Defs/ThingDefs_Buildings/Fridge_Base.xml:33`) and Weapon Racks' racks (parent `StorageShelfBase`, its 1.7 `Defs/ThingDefs/ThingDefs_Buildings.xml:5`). - A postfix on `Blueprint_Storage.PostMake` (RimWorld/Blueprint_Storage.cs:60-68) applies the template after vanilla copied the def's default. The blueprint hands its settings to the frame (`MakeSolidThing`, `:92-100`), and `Frame.CompleteConstruction` copies them onto every `IStorageGroupMember` after it spawns (RimWorld/Frame.cs:326-330), bookcases included. That replaces the def default the building's own `PostMake` set (RimWorld/Building_Storage.cs:142-150). - Auto-rebuild: a destroyed frame hands its settings to the new blueprint for any `Blueprint_Storage` (RimWorld/Frame.cs:192-204), but a destroyed building only when it is a `Building_Storage` (Verse/Building.cs:322-327). `Building_Bookcase` isn't one (RimWorld/Building_Bookcase.cs:8), so a rebuilt bookcase keeps the new blueprint's `PostMake` settings, which are now the template. @@ -254,14 +301,16 @@ Setup, S (half a day): the repo with About.xml, the csproj and the `[StaticConst - Replace Stuff (3526354009, 539,443, 1.7, `Memegoddess.ReplaceStuff`): a stuff replacement completes through its own frame class and is skipped. Building a different def over an old one copies `Building_Storage` settings one tick after spawn (its `Source/NewThing/NewThingFrame.cs`, `TransferStorageSettings`), after ours, so its copy wins. Its revival of a destroyed shelf copies the old settings after spawn, and vanilla's frame copy then writes the same settings, carried in the rebuild blueprint. - Pick Up And Haul (1279012058, 1,784,724, no 1.7), Haul to Stack (949498803, 77,411, no 1.7) and Haul After Harvest (3834328825, 414, 1.7) read storage settings and write none. - **Replaces:** Default Normal Empty Storage (3779351608, 17, no 1.7), the storage-building part of Defaults and Set my Defaults, and together with the quick setup [FSF] No Default Shelf Storage. -- **Effort:** S, half a day. +- **Effort:** S. - **Tests:** With "Shelf: Normal, Steel only", `GenConstruct.PlaceBlueprintForBuild` places a shelf blueprint at Normal with Steel only. Allowing Wood on the blueprint and completing the frame with `CompleteConstruction(worker)` gives a shelf allowing Steel and Wood. A shelf spawned with `GenSpawn.Spawn(ThingMaker.MakeThing(Shelf, WoodLog))` keeps Preferred. A built shelf narrowed to Silver and destroyed with auto-rebuild on leaves a blueprint allowing only Silver. With "Bookcase: Normal, novels only", a built bookcase narrowed to textbooks and destroyed with auto-rebuild on leaves a blueprint with novels only. A template naming Steel never makes a hopper accept Steel. -Compat: a Weapon Racks rack built through a frame takes its template, and Replace Stuff's stuff replacement of a shelf keeps the shelf's settings. - **Risks:** a modded storage building that sets its settings after spawn instead of in `PostMake` overwrites ours. The compat run covers RimFridge and Weapon Racks, the two in the installed set. #### Quick setup: new shelves start empty +Shipped in 1.0. + - **Players get:** A settings-page button "New shelves start empty at Normal" opens a list of every storage building with a checkbox. General-purpose shelves are ticked; hoppers, bookcases and single-purpose storage such as chemfuel pumps and weapon racks start unticked. Confirming saves an empty default at Normal for each ticked kind, one that also refuses items mods add later. Kinds that already have a default are marked and start unticked. -- **How:** The list holds defs with a storage tab that Defaults covers: in 1.0 those with a storage blueprint, from 1.2 every one. A kind is ticked when all of these hold: +- **How:** The list holds defs with a storage tab that Defaults covers: since 1.0 those with a storage blueprint, with "Graves, mortars and other storage" every one. A kind is ticked when all of these hold: - `thingClass` is `Building_Storage` or a subclass; - `building.isHopper` (RimWorld/BuildingProperties.cs:138) is false, since an empty hopper starves the nutrient paste dispenser; - its parent filter (`fixedStorageSettings`, else every storable item) allows things from at least two top-level item categories, the children of `ThingCategoryDefOf.Root`. Each allowed def counts under the top-level category its first `thingCategories` entry leads to; defs without one don't count. @@ -271,25 +320,38 @@ Setup, S (half a day): the repo with About.xml, the csproj and the `[StaticConst - **Save and removal:** nothing in the save. - **Overlaps:** with [FSF] No Default Shelf Storage active, the button's tooltip says the two do the same thing. - **Replaces:** [FSF] No Default Shelf Storage (945085502, 93,146, 1.7) and "No Default Storage Settings" in FrozenSnowFox Tweaks (40,720, 1.7), per kind instead of blanket. -- **Effort:** S, half a day. -- **Tests:** The setup with its preselection creates empty Normal templates for Shelf and ShelfSmall and none for Hopper or Bookcase. A shelf built afterwards allows nothing, at Normal. With the test mod's storable def `BlaxTest_Widget` removed from the template's lists, as if a mod had added it later, that shelf refuses it; the same template with `unlisted = Game` lets it follow the shelf's def default. -Compat: the RimFridge fridge is ticked and a Weapon Racks rack unticked; from 1.2, Rimefeller's ChemfuelHopper and ChemfuelSiphon are listed and unticked. +- **Effort:** S. +- **Tests:** The setup with its preselection creates empty Normal templates for Shelf and ShelfSmall and none for Hopper or Bookcase. A shelf built afterwards allows nothing, at Normal. With the test mod's storable def `BlaxTest_Widget` removed from the template's lists, as if a mod had added it later, that shelf refuses it; the same template with `unlisted = Game` lets it follow the shelf's def default. -Compat: the RimFridge fridge is ticked and a Weapon Racks rack unticked; once "Graves, mortars and other storage" ships, Rimefeller's ChemfuelHopper and ChemfuelSiphon are listed and unticked. - **Risks:** none known. -#### Overlap warnings +#### Graves, mortars and other storage start from your default -- **Players get:** The settings page names each active mod that sets the same defaults, and what it sets. On the first game loaded in a session, one message lists those not yet dismissed, with "Don't remind me" per mod. -- **How:** Detection only, through a Compat helper (`ModLister.GetActiveModWithIdentifier(id, ignorePostfix: true)`), so a local copy next to a Workshop copy still matches. No patches against those mods. Dismissed ids live in mod settings, not the save. Each release adds the mods of its own category. 1.0 detects 1trickPwnyta's Defaults (`defaults.1trickPwnyta`, read from its About.xml; the Experimental build 3522445452, 2,517, no 1.7, keeps the same id), the unofficial Defaults 1.7 repack (3836680679, 145, 1.7), Set my Defaults, [FSF] No Default Shelf Storage, [FSF] FrozenSnowFox Tweaks and Default Normal Empty Storage for storage, and Better Workbench Management, Default Ingredient Radius, Default Bill Ingredient Radius and Default Until X for the bill values. Package ids other than Defaults' are read from each mod's About.xml before shipping, as Castes did. -- **Settings:** `warnOverlaps` (on). -- **Save and removal:** nothing in the save. -- **Overlaps:** this feature is the overlap handling. -- **Replaces:** nothing. -- **Effort:** S, half a day. -- **Tests:** An id injected into the detection list shows in the settings text and in the message, once per session. A dismissed id doesn't. -- **Risks:** a wrong package id misses silently. +Designed, no code yet. + +- **Players get:** Build a grave, sarcophagus, mortar, growth vat or biosculpter pod, or a modded storage building without a storage blueprint such as Rimefeller's chemfuel pump, and it starts with the default you saved for it. The storage tab's Defaults button now shows on them. A grave or sarcophagus that auto-rebuild puts back starts from your default like a new one; vanilla doesn't carry their old filter into the rebuild. Ruins, map generation and trader stock keep the game's settings. Growth vats need Biotech and biosculpter pods Ideology. +- **How:** The build scope from the data model arrives here. These parents take the def default while the thing is made, not from a blueprint: graves and sarcophagi (`Building_CorpseCasket.PostMake`, RimWorld/Building_CorpseCasket.cs:51-58), the growth vat (`Building_GrowthVat.PostMake`, :231-238), the biosculpter pod (`CompBiosculpterPod.Initialize`, :249-256), a `Building_Storage` without a storage blueprint (`Building_Storage.PostMake`, RimWorld/Building_Storage.cs:142-150) and mortar shells (`CompChangeableProjectile.Initialize`, :51-58). + - The made hook applies the template to the thing's `IStoreSettingsParent`: the thing, or its first comp that is one, found the way `ITab_Storage.GetThingOrThingCompStoreSettingsParent` finds it (RimWorld/ITab_Storage.cs:153-170). Skipped for defs that have a storage blueprint, which 1.0 covers. + - Turrets: the mortar's shell storage sits on its gun, not on the turret. Core puts `CompProperties_ChangeableProjectile` and `building.defaultStorageSettings` on the gun def `Artillery_Mortar` (`Buildings_Security_Turrets.xml:618-640`), and `Turret_Mortar` names it as `turretGunDef` (:576). When the made thing is a `Building_TurretGun` and has no storage parent itself, the hook resolves the parent as `ITab_Shells` does, on `turret.gun` (RimWorld/ITab_Shells.cs:5-19), and keys the kind by the turret's def, as the tab does. The gun exists by then, because `PostMake` calls `MakeGun` before `MakeThing` returns. + - Rebuilds: a grave or sarcophagus has no storage blueprint, so auto-rebuild places a plain blueprint and the made hook gives the new one the template, or the def default without one. Vanilla carries settings only for `Building_Storage` (Verse/Building.cs:322-327). + - The quick setup's list widens to every def with a storage tab, with the same preselection rule. + - DLC: the growth vat (`ThingDefOf.GrowthVat`, `[MayRequireBiotech]`) and the biosculpter pod (`ThingDefOf.BiosculpterPod`, `[MayRequireIdeology]`) exist only with their DLC. The hook reaches them through the storage parent, never by def, so without the DLC it never meets one, the tab, the quick setup and "Add a default" don't list them, and a saved default stays in the file and shows disabled on the settings page with "Needs Biotech" or "Needs Ideology". +- **Settings:** covered by `storageDefaults`. +- **Save and removal:** vanilla fields on the building or its comp (`Building_CorpseCasket.ExposeData`, :61-65; `CompChangeableProjectile.PostExposeData`, :44-49). +- **Overlaps:** + - VFE Security (1845154007, 903,230, 1.7) adds `VFES_Turret_Artillery`, a `VFESecurity.Building_Artillery` with `ITab_Shells` and its shell storage on the gun def `VFES_Artillery_ArtilleryGun` (its 1.6 `Defs/ThingDefs_Buildings/Buildings_Artillery.xml:180-333`). The turret path covers it if that class derives from `Building_TurretGun`, which the -Compat run checks. + - Rimefeller (1321849735, 362,163, 1.7): its chemfuel pump, siphon and unloading bay are `Building_Storage` without a storage blueprint, so they become kinds here. +- **Replaces:** the grave and other storage defaults of 1trickPwnyta's Defaults and Set my Defaults. +- **Effort:** S + S, including the build scope. +- **Tests:** With "Grave: Important, animal corpses only", a grave built through a frame takes its template and a grave spawned directly keeps the def default (humanlike corpses). A built grave narrowed by hand to human corpses and destroyed with auto-rebuild on, then rebuilt through the frame, has the template, not the hand filter. With "Mortar: high-explosive shells only", a `Turret_Mortar` completed through a frame has a gun whose `CompChangeableProjectile` allows only `Shell_HighExplosive`, and `StorageDefaultsMenu.OptionsFor` on the selected turret names "mortars" and stores under `storage:Turret_Mortar`. With Biotech, a growth vat built through a frame takes its template; with Ideology, a biosculpter pod's nutrition storage does (each skipped without). -NoDlc: the quick setup lists neither, and a saved `storage:GrowthVat` entry is kept, drawn as a disabled row with "Needs Biotech", and not counted as an inactive name. -Compat: a `VFES_Turret_Artillery` built through a frame takes its template; Rimefeller's ChemfuelHopper built through a frame takes its template. +- **Risks:** a storage parent that sets its settings in `SpawnSetup` overwrites ours. + +### Bills #### Values for every new bill -- **Players get:** A settings section "Every new bill": repeat mode (do X times, do until you have X, do forever), the count (1), the target (10), pause when satisfied (off) and resume at (5), ingredient radius (unlimited), allowed skill range (0 to 20), where products go (best stockpile or drop on floor), count equipped (off), count tainted (off), and the hit points and quality ranges used for counting. Each value starts at "the game's default", and only values you change are applied. In 1.0 they are set on the settings page; the bill window's Defaults button follows in 1.2. +Shipped in 1.0. + +- **Players get:** A settings section "Every new bill": repeat mode (do X times, do until you have X, do forever), the count (1), the target (10), pause when satisfied (off) and resume at (5), ingredient radius (unlimited), allowed skill range (0 to 20), where products go (best stockpile or drop on floor), count equipped (off), count tainted (off), and the hit points and quality ranges used for counting. Each value starts at "the game's default", and only values you change are applied. Since 1.0 they are set on the settings page; the bill window's Defaults button comes with "Defaults per recipe from the bill window". - **How:** A postfix on `BillUtility.MakeNewBill` (RimWorld/BillUtility.cs:36-55). Its only vanilla callers are the Bills tab's add menu (RimWorld/ITab_Bills.cs:114) and the dev colony maker. - Applies to `Bill_Production` and `Bill_ProductionWithUft`. `Bill_ProductionMech`, `Bill_ResurrectMech` and `Bill_Autonomous`, also returned there, get only recipe defaults, because gestation and forming bills store no products. - Fields: `repeatMode`, `repeatCount`, `targetCount`, `pauseWhenSatisfied`, `unpauseWhenYouHave`, `includeEquipped`, `includeTainted`, `hpRange`, `qualityRange` (RimWorld/Bill_Production.cs:12-36), `ingredientSearchRadius` and `allowedSkillRange` (RimWorld/Bill.cs:33, :35). @@ -300,13 +362,51 @@ Setup, S (half a day): the repo with About.xml, the csproj and the `[StaticConst - **Save and removal:** vanilla bill fields, saved by `Bill.ExposeData` and `Bill_Production.ExposeData` inside the bench's bill stack. - **Overlaps:** Better Workbench Management (935982361, 452,369, no 1.7) sets the store mode of new bills; Default Ingredient Radius (2909706985, 11,626, 1.7) and Default Bill Ingredient Radius (3789671048, 55, no 1.7) set the radius; Default Until X (3554414830, 27, no 1.7) sets the repeat mode. Warned; whichever patch runs last wins. Nice Bill Tab (3520130671, 356,388, 1.7) redraws the Bills tab; if it adds bills through `MakeNewBill` it is covered, and a compat run decides the README line. - **Replaces:** the default store mode of Better Workbench Management (452k), Default Ingredient Radius (11.6k), Default Bill Ingredient Radius (55), Default Until X (27), and the bill radius, skill range and store mode of 1trickPwnyta's Defaults (75k). -- **Effort:** S + S, 1 day. +- **Effort:** S + S. - **Tests:** With "drop on floor, radius 30, do until 20", `MakeNewBill` for CookMealSimple returns a bill with DropOnFloor, radius 30, TargetCount and target 20. A recipe whose counter can't count products gets RepeatCount. A clone of that bill keeps the source values when the global values change. `CreateSurgeryBill` returns an untouched bill. With Biotech (skipped without), a mech gestation bill keeps vanilla values. - **Risks:** `MakeNewBill` is small and called from a lambda, so the JIT may inline it into the menu. Headless tests call it directly and can't prove the menu path. If a manual check shows the postfix skipped there, the fallback is a postfix on the `Bill_Production(RecipeDef, Precept_ThingStyle)` constructor (Bill_Production.cs:108-111), which runs for new bills only (cloning and loading use the parameterless one) but also for bills other mods create in code; the README then says so. -### 1.1 Forbid rules (4 days) +#### Defaults per recipe from the bill window -What stays forbidden when a pawn goes down, dies or is stripped, set per group with the vanilla item filter. Nothing here is a "Make default": every rule sits in a "Forbid rules" section of the settings page and ships off. +Designed, no code yet. + +- **Players get:** A "Defaults" button in the bill window. "Make these the default for new bills" saves the ingredient filter, repeat and count values, pause, radius, skill range, store mode, "slaves only", "mechs only" or "non-mechs only", the counting options and "limit to allowed stuff". "Make these the values for every new bill" copies the shared values into the global set. "Forget the default for " asks first. New bills of that recipe start from it, at any workbench. Values that match your every-bill values aren't saved for the recipe, so they keep following the every-bill values when you change those. +- **How:** A postfix on `Dialog_BillConfig.DoWindowContents` (RimWorld/Dialog_BillConfig.cs:114) draws a 150 by 30 button at the top right of the 800 by 664 window (`:46`), right of the title, which ends at x 440 (`:117`). The bill is the protected field `bill` (`:16`). + - BillTemplate: the fields from "Values for every new bill" plus ingredient `allowed` and `refused` defNames (built only from defs the recipe's `fixedIngredientFilter` allows, Verse/RecipeDef.cs:33), special filters, `limitToAllowedStuff` and a restriction (any, slaves only, mechs only, non-mechs only). + - Left out, because they belong to one save: pawn restriction, the store and include groups, the custom name, style and xenogerm. A bill set to "take to stockpile X" saves best stockpile; the button's tooltip says so. + - Sparse: "Make default" stores only the fields whose value differs from what a new bill of that recipe gets at that moment, the game's value with the every-bill values on top. The ingredient filter is stored only when it differs from the recipe's `defaultIngredientFilter` (Verse/RecipeDef.cs:35, copied into every new bill at RimWorld/Bill.cs:156), and the restriction only when it isn't "any". Fields not stored follow the every-bill value, so a later change there still reaches this recipe. The settings page shows them as "follows every-bill value". + - Applied in the `MakeNewBill` postfix after the global values, so a stored recipe field wins over the global one. + - Restrictions go through `SetAnySlaveRestriction`, `SetAnyMechRestriction` and `SetAnyNonMechRestriction` (Bill.cs:173-197), under the conditions the vanilla menu uses (Dialog_BillConfig.cs:550-575): slaves only with Ideology, mech restrictions with Biotech and `MechWorkUtility.AnyWorkMechCouldDo(recipe)`. Without the DLC a stored restriction is skipped when a bill is made, the bill takes anyone, and the restriction stays in the file for when the DLC is back. The settings page's summary of that recipe default marks it "Needs Ideology" or "Needs Biotech". + - The settings page lists recipe defaults with a summary and Forget. Editing happens in the bill window: change a bill, make it the default again. +- **Settings:** covered by `billDefaults`. +- **Save and removal:** vanilla bill fields only. +- **Overlaps:** Set my Defaults' bill library and Defaults' bill templates; warned with the bill category. +- **Replaces:** New Game Plus' workbench bill library (2909126210, 23,475, no 1.7), the per-recipe half of Defaults and Set my Defaults, and the manual bill save of [KV] Save Storage (109,174), for one default per recipe. +- **Effort:** M. +- **Tests:** From a CookMealSimple bill with human meat refused, slaves only (Ideology), forever and radius 40, "Make default" stores those values. A new CookMealSimple bill from any stove has them; a CookMealFine bill gets only the global values. With the every-bill radius at 30, a CookMealSimple default saved with radius 30 and forever stores forever but not the radius; after the every-bill radius changes to 50, a new CookMealSimple bill has radius 50 and forever, while a recipe default saved with radius 40 keeps 40. A bill whose store mode was a specific stockpile saves BestStockpile and logs no store mode error. -NoDlc: the slaves-only part is ignored without errors and is still in the file; a mechs-only default saved with Biotech is ignored the same way. A removed recipe's default is kept and skipped. +- **Risks:** an ingredient filter saved before a mod added a new meat lets the new meat follow the recipe's own default filter, which is the intended rule. + +#### Bills for new workbenches + +Designed, no code yet. + +- **Players get:** A "Defaults" button in a workbench's Bills tab. "Make these the bills for new electric stoves" saves the bench's bills, in order, each as a full bill default; "Forget" removes the set. A new bench of that type that you build comes with those bills, and so does a bench auto-rebuild puts back, since vanilla rebuilds benches empty. Benches in ruins, from map generation and reinstalled from a minified bench keep what they have. With Replace Stuff, a bench built over another one keeps the old bench's bills, and a revived bench of the plain workbench class (tailoring benches, smithies, the machining table, the drug lab) gets its old bills back; stoves, the stonecutter's table, the electric smelter and the crematorium come back empty in Replace Stuff too, so they get the set. +- **How:** The button is a postfix on `ITab_Bills.FillTab`: a 24 px icon left of the vanilla paste button, which sits at `WinSize.x - PasteX`, `PasteY` (RimWorld/ITab_Bills.cs:17-40). Building goes through the build scope's built hook: when the new thing is an `IBillGiver` whose `BillStack` is still empty and its def has a set, each entry becomes `recipe.MakeNewBill()` with the global values and then the entry's values. + - An entry is added only where the vanilla add menu would offer it: the recipe is still on the bench (`def.AllRecipes`), `AvailableNow`, and `AvailableOnNow(newBench)` (Verse/RecipeDef.cs:398), the same pair the add menu and paste check (RimWorld/ITab_Bills.cs:43, :86). Skipped entries produce one message ("2 bills skipped: research not done or not possible on this bench"). + - Sets hold up to 15 bills, the vanilla cap (`BillStack.MaxCount`, RimWorld/BillStack.cs:15). + - Replace Stuff's new-thing replacement moves the old bench's bills inside `GenSpawn.Spawn`, before our postfix (its `Source/NewThing/NewThingFrame.cs`, `TransferBills`), so the empty-stack check keeps them. Its revival copies bills only for the exact class `Building_WorkTable`; the stoves, the stonecutter's table, the electric smelter and the crematorium are `Building_WorkTable_HeatPush` (Core `Buildings_Production.xml:676, 770, 864, 1065, 1440`), which its `DestroyedBuildings.SaveBuilding` never keeps. The revival guard skips the set for a revived plain bench even when it had no bills. + - An entry whose recipe isn't loaded, such as baby food without Biotech (Biotech `RecipeDefs/Recipes_Food.xml:5`, on both stoves through `MayRequire`, Core `Buildings_Production.xml:731-732`, `:824-825`), is skipped and counted in the message, and stays in the set. +- **Settings:** `benchBillSets` (on). +- **Save and removal:** the bills are vanilla bills in the bench's stack. +- **Overlaps:** Auto Bill Restore (3542342928, 1,146, no 1.7), Set my Defaults' bills per workbench and Defaults' workbench bills; warned. No Max Bills: Redux (3526216885, 34,055, no 1.7) raises the cap; sets stay at 15. +- **Replaces:** the per-workbench bills of Defaults and Set my Defaults, and Auto Bill Restore's restore after a rebuild where Replace Stuff doesn't revive the bench: a rebuilt bench gets the set. +- **Effort:** S + S. +- **Tests:** With a set for the electric stove (simple meals forever, fine meals until 10), a stove completed through a frame has both bills in order with those values. A stove spawned directly has none. With fine meal research missing, the stove gets one bill and the message. A set entry whose recipe's `AvailableOnNow` is false on the new bench (a test-only recipe worker) is skipped and counted in the message. -NoDlc: a stove set saved with Biotech, holding simple meals and baby food, gives a new stove the simple meal bill and the message, and the set still holds baby food. -Compat, with Replace Stuff: building an electric stove over a fueled stove that has bills keeps the old bills, not the set; an electric stove with bills destroyed with auto-rebuild on and rebuilt through the frame gets the set; an electric tailoring bench with two bills, destroyed and rebuilt the same way, has its two old bills and no set; the same bench with no bills stays empty. +- **Risks:** a bench whose bills another mod adds during spawn gets no set; that matches "the player already has bills there". + +### Forbid rules + +Shipped in 1.1. What stays forbidden when a pawn goes down, dies or is stripped, set per group with the vanilla item filter. Nothing here is a "Make default": every rule sits in a "Forbid rules" section of the settings page and ships off. #### What the game forbids today @@ -371,7 +471,7 @@ Per pawn kind: - No Workshop mod found that allows dropped things by quality or condition (searched 2026-11-29). - The overlap warnings gain this category: KilledEnemyAutoAllowed (Continued) (`Mlie.KilledEnemyAutoAllowed`), Allow Everything (`AndrewRaphaelLukasik.AllowEverything`), Non uno Pinata (`avilmask.NonUnoPinata`) and, for the corpse rules, Allow Dead Animals (`AndrewRaphaelLukasik.AllowDeadAnimals`), each read from the About.xml in the mod's public source on 2026-11-30. Not detected: the 1.0 original of KilledEnemyAutoAllowed (1858219355, 291, 1.0 only), whose About.xml predates package ids; the id the game makes up for it hashes its description. The overlap texts say these mods "do some of the same things", since they set no starting settings. - **Replaces:** KilledEnemyAutoAllowed (Continued) (5.2k) for your colony and enemies: with both rules on, every item allowed, anywhere, and the corpse rules on, what dying pawns drop is allowed everywhere, while neutral pawns' drops stay vanilla. Allow Everything (3.8k) for what downed and dead pawns drop. -- **Effort:** M + S, 2.5 days, including the settings section and the suggested setups; the S is the remembered weapon's wait. +- **Effort:** M + S, including the settings section and the suggested setups; the S is the remembered weapon's wait. - **Tests:** No hostile pawn on the test map unless a test says so. - A colonist downed by damage outside the home area, colony rule on with the suggested setup: its packaged survival meal and herbal medicine on the ground are allowed; its rifle is forbidden, is its `droppedWeapon` and stays forbidden over several checks. Killed afterwards: the rifle is allowed after the next check. With the rule off, all three stay forbidden. - The same downed colonist carried to a bed by a rescuer: its rifle is allowed after the next check. @@ -399,7 +499,7 @@ Per pawn kind: - **Save and removal:** the list is never saved. - **Overlaps:** none. - **Replaces:** nothing. -- **Effort:** S, half a day. +- **Effort:** S. - **Tests:** With a hostile test pawn standing on the map, a raider killed with the enemy rule on leaves its rifle forbidden; after the hostile pawn is downed and 250 ticks pass, the rifle is allowed. A waiting rifle the player allows and forbids again stays forbidden at the end. A waiting rifle a pawn picks up leaves the list without a log line. A waiting rifle the filter no longer allows stays forbidden. Phase 2: a rifle still waiting at save time stays forbidden after the load, and nothing logs. #### Stripping forbids what doesn't match @@ -412,7 +512,7 @@ Per pawn kind: - **Save and removal:** the vanilla forbidden flag. - **Overlaps:** Auto Strip on Haul (2560725133, 18,416, 1.7) strips corpses when they're hauled, through the vanilla strip code (its Workshop page), so its strips follow the switch, and its own option to forbid tainted apparel composes. Cremate Auto Strip (1575458517, 52,813, 1.7) strips before cremation; if its strip runs outside `CalculateIngredients`, it follows the switch, which a compat check settles for the README. Apparel Tainted Only When Corpse Rots (2413156320, 49,913, no 1.7) and Removes Tainted Clothes (2006356192, 22,391, no 1.7) change the tainted flag the filter reads. Non uno Pinata changes what stripping drops. - **Replaces:** partly the tainted-apparel forbid of Auto Strip on Haul (18k). -- **Effort:** S, half a day. +- **Effort:** S. - **Tests:** Enemy strip switch on, suggested setup: stripping a raider corpse wearing a Normal duster at 80% and a Poor tuque at 90% leaves the duster allowed and the tuque forbidden; with the switch off, both are allowed. The same corpse butchered at a butcher table with the switch on: both allowed. A colonist's corpse stripped with only the enemy switch on: both allowed. A raider stripped while down: its shirt isn't tainted and follows the filter. A strip inside a test caravan logs nothing. #### Corpses outside the home area stay allowed @@ -424,80 +524,15 @@ Per pawn kind: - **Save and removal:** the vanilla forbidden flag on each corpse. - **Overlaps:** Allow Dead Animals (2403873031, 67,347, no 1.7) and the corpse half of KilledEnemyAutoAllowed (Continued); warned. Allow Tool is the manual way and composes. - **Replaces:** Allow Dead Animals (67k). -- **Effort:** S, half a day. +- **Effort:** S. - **Tests:** A wild animal killed outside the home area with the animal switch on: its corpse isn't forbidden; off, it is; a corpse a hunter reserved is unchanged. A raider killed outside the home area with the enemy switch on: not forbidden. A manhunter husky killed outside the home area with only the animal switch on: allowed; with only the enemy switch on: forbidden. A corpse inside the home area is never touched. With a hostile test pawn on the map, an enemy corpse waits and is allowed once the hostile pawn is downed. -### 1.2 More storage, recipe defaults and workbench bills (5 days) - -#### Graves, mortars and other storage start from your default - -- **Players get:** Build a grave, sarcophagus, mortar, growth vat or biosculpter pod, or a modded storage building without a storage blueprint such as Rimefeller's chemfuel pump, and it starts with the default you saved for it. The storage tab's Defaults button now shows on them. A grave or sarcophagus that auto-rebuild puts back starts from your default like a new one; vanilla doesn't carry their old filter into the rebuild. Ruins, map generation and trader stock keep the game's settings. Growth vats need Biotech and biosculpter pods Ideology. -- **How:** The build scope from the data model arrives here. These parents take the def default while the thing is made, not from a blueprint: graves and sarcophagi (`Building_CorpseCasket.PostMake`, RimWorld/Building_CorpseCasket.cs:51-58), the growth vat (`Building_GrowthVat.PostMake`, :231-238), the biosculpter pod (`CompBiosculpterPod.Initialize`, :249-256), a `Building_Storage` without a storage blueprint (`Building_Storage.PostMake`, RimWorld/Building_Storage.cs:142-150) and mortar shells (`CompChangeableProjectile.Initialize`, :51-58). - - The made hook applies the template to the thing's `IStoreSettingsParent`: the thing, or its first comp that is one, found the way `ITab_Storage.GetThingOrThingCompStoreSettingsParent` finds it (RimWorld/ITab_Storage.cs:153-170). Skipped for defs that have a storage blueprint, which 1.0 covers. - - Turrets: the mortar's shell storage sits on its gun, not on the turret. Core puts `CompProperties_ChangeableProjectile` and `building.defaultStorageSettings` on the gun def `Artillery_Mortar` (`Buildings_Security_Turrets.xml:618-640`), and `Turret_Mortar` names it as `turretGunDef` (:576). When the made thing is a `Building_TurretGun` and has no storage parent itself, the hook resolves the parent as `ITab_Shells` does, on `turret.gun` (RimWorld/ITab_Shells.cs:5-19), and keys the kind by the turret's def, as the tab does. The gun exists by then, because `PostMake` calls `MakeGun` before `MakeThing` returns. - - Rebuilds: a grave or sarcophagus has no storage blueprint, so auto-rebuild places a plain blueprint and the made hook gives the new one the template, or the def default without one. Vanilla carries settings only for `Building_Storage` (Verse/Building.cs:322-327). - - The quick setup's list widens to every def with a storage tab, with the same preselection rule. - - DLC: the growth vat (`ThingDefOf.GrowthVat`, `[MayRequireBiotech]`) and the biosculpter pod (`ThingDefOf.BiosculpterPod`, `[MayRequireIdeology]`) exist only with their DLC. The hook reaches them through the storage parent, never by def, so without the DLC it never meets one, the tab, the quick setup and "Add a default" don't list them, and a saved default stays in the file and shows disabled on the settings page with "Needs Biotech" or "Needs Ideology". -- **Settings:** covered by `storageDefaults`. -- **Save and removal:** vanilla fields on the building or its comp (`Building_CorpseCasket.ExposeData`, :61-65; `CompChangeableProjectile.PostExposeData`, :44-49). -- **Overlaps:** - - VFE Security (1845154007, 903,230, 1.7) adds `VFES_Turret_Artillery`, a `VFESecurity.Building_Artillery` with `ITab_Shells` and its shell storage on the gun def `VFES_Artillery_ArtilleryGun` (its 1.6 `Defs/ThingDefs_Buildings/Buildings_Artillery.xml:180-333`). The turret path covers it if that class derives from `Building_TurretGun`, which the -Compat run checks. - - Rimefeller (1321849735, 362,163, 1.7): its chemfuel pump, siphon and unloading bay are `Building_Storage` without a storage blueprint, so they become kinds here. -- **Replaces:** the grave and other storage defaults of 1trickPwnyta's Defaults and Set my Defaults. -- **Effort:** S + S, 1 day, including the build scope. -- **Tests:** With "Grave: Important, animal corpses only", a grave built through a frame takes its template and a grave spawned directly keeps the def default (humanlike corpses). A built grave narrowed by hand to human corpses and destroyed with auto-rebuild on, then rebuilt through the frame, has the template, not the hand filter. With "Mortar: high-explosive shells only", a `Turret_Mortar` completed through a frame has a gun whose `CompChangeableProjectile` allows only `Shell_HighExplosive`, and `StorageDefaultsMenu.OptionsFor` on the selected turret names "mortars" and stores under `storage:Turret_Mortar`. With Biotech, a growth vat built through a frame takes its template; with Ideology, a biosculpter pod's nutrition storage does (each skipped without). -NoDlc: the quick setup lists neither, and a saved `storage:GrowthVat` entry is kept, drawn as a disabled row with "Needs Biotech", and not counted as an inactive name. -Compat: a `VFES_Turret_Artillery` built through a frame takes its template; Rimefeller's ChemfuelHopper built through a frame takes its template. -- **Risks:** a storage parent that sets its settings in `SpawnSetup` overwrites ours. - -#### Add a default and drop inactive names - -- **Players get:** On the settings page, "Add a default" picks a stockpile type or a storage building and opens the edit window on the game's default, so a default can be made from the main menu. Each entry with names from inactive mods gets "Drop them", which asks first. -- **How:** The picker lists the stockpile types and every def with a storage tab that Defaults covers, the same list as the quick setup. "Drop them" removes the unresolved names from that entry and writes the file. -- **Settings:** covered by `storageDefaults`. -- **Save and removal:** nothing in the save. -- **Overlaps:** none. -- **Replaces:** nothing beyond the library. -- **Effort:** S, half a day. -- **Tests:** "Add a default" for Shelf creates a template equal to the shelf's def default. "Drop them" on the entry with "BlaxTest_Missing" removes that name, keeps Steel, and the counter shows 0. -- **Risks:** none known. - -#### Defaults per recipe from the bill window - -- **Players get:** A "Defaults" button in the bill window. "Make these the default for new bills" saves the ingredient filter, repeat and count values, pause, radius, skill range, store mode, "slaves only", "mechs only" or "non-mechs only", the counting options and "limit to allowed stuff". "Make these the values for every new bill" copies the shared values into the global set. "Forget the default for " asks first. New bills of that recipe start from it, at any workbench. Values that match your every-bill values aren't saved for the recipe, so they keep following the every-bill values when you change those. -- **How:** A postfix on `Dialog_BillConfig.DoWindowContents` (RimWorld/Dialog_BillConfig.cs:114) draws a 150 by 30 button at the top right of the 800 by 664 window (`:46`), right of the title, which ends at x 440 (`:117`). The bill is the protected field `bill` (`:16`). - - BillTemplate: the fields from "Values for every new bill" plus ingredient `allowed` and `refused` defNames (built only from defs the recipe's `fixedIngredientFilter` allows, Verse/RecipeDef.cs:33), special filters, `limitToAllowedStuff` and a restriction (any, slaves only, mechs only, non-mechs only). - - Left out, because they belong to one save: pawn restriction, the store and include groups, the custom name, style and xenogerm. A bill set to "take to stockpile X" saves best stockpile; the button's tooltip says so. - - Sparse: "Make default" stores only the fields whose value differs from what a new bill of that recipe gets at that moment, the game's value with the every-bill values on top. The ingredient filter is stored only when it differs from the recipe's `defaultIngredientFilter` (Verse/RecipeDef.cs:35, copied into every new bill at RimWorld/Bill.cs:156), and the restriction only when it isn't "any". Fields not stored follow the every-bill value, so a later change there still reaches this recipe. The settings page shows them as "follows every-bill value". - - Applied in the `MakeNewBill` postfix after the global values, so a stored recipe field wins over the global one. - - Restrictions go through `SetAnySlaveRestriction`, `SetAnyMechRestriction` and `SetAnyNonMechRestriction` (Bill.cs:173-197), under the conditions the vanilla menu uses (Dialog_BillConfig.cs:550-575): slaves only with Ideology, mech restrictions with Biotech and `MechWorkUtility.AnyWorkMechCouldDo(recipe)`. Without the DLC a stored restriction is skipped when a bill is made, the bill takes anyone, and the restriction stays in the file for when the DLC is back. The settings page's summary of that recipe default marks it "Needs Ideology" or "Needs Biotech". - - The settings page lists recipe defaults with a summary and Forget. Editing happens in the bill window: change a bill, make it the default again. -- **Settings:** covered by `billDefaults`. -- **Save and removal:** vanilla bill fields only. -- **Overlaps:** Set my Defaults' bill library and Defaults' bill templates; warned with the bill category. -- **Replaces:** New Game Plus' workbench bill library (2909126210, 23,475, no 1.7), the per-recipe half of Defaults and Set my Defaults, and the manual bill save of [KV] Save Storage (109,174), for one default per recipe. -- **Effort:** M, 2 days. -- **Tests:** From a CookMealSimple bill with human meat refused, slaves only (Ideology), forever and radius 40, "Make default" stores those values. A new CookMealSimple bill from any stove has them; a CookMealFine bill gets only the global values. With the every-bill radius at 30, a CookMealSimple default saved with radius 30 and forever stores forever but not the radius; after the every-bill radius changes to 50, a new CookMealSimple bill has radius 50 and forever, while a recipe default saved with radius 40 keeps 40. A bill whose store mode was a specific stockpile saves BestStockpile and logs no store mode error. -NoDlc: the slaves-only part is ignored without errors and is still in the file; a mechs-only default saved with Biotech is ignored the same way. A removed recipe's default is kept and skipped. -- **Risks:** an ingredient filter saved before a mod added a new meat lets the new meat follow the recipe's own default filter, which is the intended rule. - -#### Bills for new workbenches - -- **Players get:** A "Defaults" button in a workbench's Bills tab. "Make these the bills for new electric stoves" saves the bench's bills, in order, each as a full bill default; "Forget" removes the set. A new bench of that type that you build comes with those bills, and so does a bench auto-rebuild puts back, since vanilla rebuilds benches empty. Benches in ruins, from map generation and reinstalled from a minified bench keep what they have. With Replace Stuff, a bench built over another one keeps the old bench's bills, and a revived bench of the plain workbench class (tailoring benches, smithies, the machining table, the drug lab) gets its old bills back; stoves, the stonecutter's table, the electric smelter and the crematorium come back empty in Replace Stuff too, so they get the set. -- **How:** The button is a postfix on `ITab_Bills.FillTab`: a 24 px icon left of the vanilla paste button, which sits at `WinSize.x - PasteX`, `PasteY` (RimWorld/ITab_Bills.cs:17-40). Building goes through the build scope's built hook: when the new thing is an `IBillGiver` whose `BillStack` is still empty and its def has a set, each entry becomes `recipe.MakeNewBill()` with the global values and then the entry's values. - - An entry is added only where the vanilla add menu would offer it: the recipe is still on the bench (`def.AllRecipes`), `AvailableNow`, and `AvailableOnNow(newBench)` (Verse/RecipeDef.cs:398), the same pair the add menu and paste check (RimWorld/ITab_Bills.cs:43, :86). Skipped entries produce one message ("2 bills skipped: research not done or not possible on this bench"). - - Sets hold up to 15 bills, the vanilla cap (`BillStack.MaxCount`, RimWorld/BillStack.cs:15). - - Replace Stuff's new-thing replacement moves the old bench's bills inside `GenSpawn.Spawn`, before our postfix (its `Source/NewThing/NewThingFrame.cs`, `TransferBills`), so the empty-stack check keeps them. Its revival copies bills only for the exact class `Building_WorkTable`; the stoves, the stonecutter's table, the electric smelter and the crematorium are `Building_WorkTable_HeatPush` (Core `Buildings_Production.xml:676, 770, 864, 1065, 1440`), which its `DestroyedBuildings.SaveBuilding` never keeps. The revival guard skips the set for a revived plain bench even when it had no bills. - - An entry whose recipe isn't loaded, such as baby food without Biotech (Biotech `RecipeDefs/Recipes_Food.xml:5`, on both stoves through `MayRequire`, Core `Buildings_Production.xml:731-732`, `:824-825`), is skipped and counted in the message, and stays in the set. -- **Settings:** `benchBillSets` (on). -- **Save and removal:** the bills are vanilla bills in the bench's stack. -- **Overlaps:** Auto Bill Restore (3542342928, 1,146, no 1.7), Set my Defaults' bills per workbench and Defaults' workbench bills; warned. No Max Bills: Redux (3526216885, 34,055, no 1.7) raises the cap; sets stay at 15. -- **Replaces:** the per-workbench bills of Defaults and Set my Defaults, and Auto Bill Restore's restore after a rebuild where Replace Stuff doesn't revive the bench: a rebuilt bench gets the set. -- **Effort:** S + S, 1 day. -- **Tests:** With a set for the electric stove (simple meals forever, fine meals until 10), a stove completed through a frame has both bills in order with those values. A stove spawned directly has none. With fine meal research missing, the stove gets one bill and the message. A set entry whose recipe's `AvailableOnNow` is false on the new bench (a test-only recipe worker) is skipped and counted in the message. -NoDlc: a stove set saved with Biotech, holding simple meals and baby food, gives a new stove the simple meal bill and the message, and the set still holds baby food. -Compat, with Replace Stuff: building an electric stove over a fueled stove that has bills keeps the old bills, not the set; an electric stove with bills destroyed with auto-rebuild on and rebuilt through the frame gets the set; an electric tailoring bench with two bills, destroyed and rebuilt the same way, has its two old bills and no set; the same bench with no bills stays empty. -- **Risks:** a bench whose bills another mod adds during spawn gets no set; that matches "the player already has bills there". - -### 1.3 Animals and mech repair (4 days) +### Animals #### Species defaults when an animal joins +Designed, no code yet. + - **Players get:** Per species, plus an "every animal" row, what a new animal starts with: allowed area by name (for example "Barn"), follow when drafted, follow during fieldwork, and which training is wanted. It applies once, when an animal joins: tamed, bought, a wanderer or quest animal, a starting animal. Born animals copy their mother (see below). Animals you already have never change. A young animal skips training it is still too small for (Haul needs body size 0.40, Rescue 0.65); "Load your default" in its Training tab adds it once it has grown. - **How:** The join funnel from the data model. - `Pawn.SetFaction` clears the area through `playerSettings.Notify_FactionChanged` (Verse/Pawn.cs:2766, RimWorld/Pawn_PlayerSettings.cs:336-340) and wants Tameness (Pawn.cs:2770). Both happen before our postfix. @@ -507,17 +542,19 @@ Per pawn kind: - Follow flags: `followDrafted` and `followFieldwork` (Pawn_PlayerSettings.cs:21-23). - Training, read from `DefDatabase`, so modded trainables appear. Every "don't want" entry is applied before any "want" entry, because `SetWantedRecursive(td, false)` also un-wants everything that needs `td`, and wanting `td` also wants its prerequisites (RimWorld/Pawn_TrainingTracker.cs:199-217). Want: `training.SetWantedRecursive(td, true)`, only when `CanAssignToTrain(td).Accepted` (:95). Don't want: `SetWantedRecursive(td, false)`. Tameness is never turned off. Odyssey's six trainables (`[MayRequireOdyssey]`, RimWorld/TrainableDefOf.cs:12-28) show only when Odyssey loads them; a row naming one is kept and skipped without it. The edit window refuses a row that wants a trainable while its prerequisite is "don't want" (Release wanted, Obedience don't want) and says why. - Size: `CanAssignToTrain` checks `td.minBodySize` against the pawn's current body size (:137, :152; Core `Trainables.xml:54` Rescue 0.65, `:74` Haul 0.40), so a juvenile or newborn fails it and the want is skipped. Defaults apply once and keep no state, so nothing re-applies when the animal grows; the backlog has the stateless way to do it. - - Castes guard: when Blax Castes 1.1 or later is active (`CastesApi` version 1), `CastesApi.CasteIdOf(Pawn)` is bound by reflection, and a pawn with a caste is skipped (see "Works with the other Blax mods"). + - Castes guard: when Blax Castes with its read-only API is active (`CastesApi` version 1), `CastesApi.CasteIdOf(Pawn)` is bound by reflection, and a pawn with a caste is skipped (see "Works with the other Blax mods"). - **Settings:** `animalDefaults` (on). - **Save and removal:** vanilla fields (`Pawn_PlayerSettings.ExposeData`, :199; `Pawn_TrainingTracker.ExposeData`, :37). Pending entries aren't saved: an animal bought into a caravan that is saved and reloaded before it arrives lands unrestricted, as in vanilla. - **Overlaps:** Animal Controls (2426119067, 57,471, no 1.7), Assign Animal Food (2520066544, 24,867, no 1.7), Auto Training (3475428845, 1,209, no 1.7), Better Pawn Control (1541460369, 227,579, no 1.7, `VouLT.BetterPawnControl`) and Better Pawn Control Forked (3724294345, 1,335, 1.7, `KyleMHB.BetterPawnControlForked`; both ids verified in Castes' Compat). Warned on the animal section. Blax Castes also postfixes `Pawn.SetFaction`; the two postfixes compose, Castes acting on humanlike pawns and Defaults on animals. - **Replaces:** the joining-animal defaults of Animal Controls (57k) and Better Pawn Control (228k), partly; Auto Training (1.2k). -- **Effort:** M, 2 days, including the funnel and born animals. +- **Effort:** M, including the funnel and born animals. - **Tests:** Husky default: area "BlaxTestBarn", follow drafted on, Obedience and Release wanted. `RecruitUtility.Recruit(husky, Faction.OfPlayer, colonist)` on a wild husky: afterwards the area is BlaxTestBarn, followDrafted is true, and Obedience and Release are wanted. A trader husky bought through `PreTraded(PlayerBuys, ...)` gets the same. A label missing on the map leaves the area null without errors. A species without a row uses the every-animal row. Husky row with Obedience not set and the every-animal row with Obedience wanted: a new husky wants Obedience; with Obedience at leave alone instead, it doesn't. A row with Obedience don't want and Release want is refused by the editor; a row saved by hand that way gives a husky wanting both, whatever order the file lists them in, since wants go last and want their prerequisites. A wild husky pup of body size below 0.40 recruited with Haul wanted doesn't want Haul and logs nothing. A recruited human prisoner is untouched. With Ideology (skipped without), a `Dryad_Basic` generated with the player faction is untouched. A husky bought by a caravan off-map gets the area when it spawns on the home map. Phase 2: the values persist and the .rws contains no "BlaxDefaults" outside the meta block. - **Risks:** a mod that sets animal areas after the join call returns (Animal Controls, Better Pawn Control) overwrites ours, hence the warnings. #### Born animals copy their mother +Designed, no code yet. + - **Players get:** A calf or chick born to one of your animals copies its mother's training wishes and follow flags, and keeps her area as vanilla does. It copies only what it can be assigned itself: a newborn is too small for Haul or Rescue, and a crossbred young of another species skips what that species can't learn. A per-species switch "Born animals use this default instead" gives them the species default, area included. - **How:** Births run inside the `Hediff_Pregnant.DoBirthSpawn` scope (Verse/Hediff_Pregnant.cs:157), which generates the pawn with the mother's faction and copies her area after spawning (:177), and the `CompHatcher.Hatch` scope (RimWorld/CompHatcher.cs:81), which copies `hatcheeParent`'s area (:101). The pawn is collected by the `GeneratePawn` postfix and applied when the scope ends, so it already has the area. The mother is the `mother` argument or the hatcher's `hatcheeParent`; with no mother (a found egg), the species default applies. - Each copied wish goes through the newborn's own `CanAssignToTrain(td)` (RimWorld/Pawn_TrainingTracker.cs:95), which reads its own def and body size, and in the same order as the species default: un-wants first, then wants. @@ -532,18 +569,22 @@ Per pawn kind: #### Defaults button in the Training tab +Designed, no code yet. + - **Players get:** A "Defaults" button in a tame animal's Training tab: "Make this husky's settings the default for new huskies" (its wanted training, follow flags and its area's name), "Make default for every new animal", "Load your default" (applies to this animal now, with the same size checks) and "Forget". The settings page lists species with Edit: a four-state box per trainable (not set, want, don't want, leave alone), a three-state box per follow flag (not set, on, off) and the area (not set, no area, or a name: a dropdown of the current map's areas in a game, free text in the main menu). - **How:** A postfix on `ITab_Pawn_Training.FillTab` (RimWorld/ITab_Pawn_Training.cs:30) draws a 30 px button at (254, 0), right of the vanilla rename button at (220, 0, 30, 30) (RimWorld/TrainingCardUtility.cs:17-29). - **Settings:** covered by `animalDefaults`. - **Save and removal:** "Load your default" writes vanilla fields. - **Overlaps:** none. - **Replaces:** nothing beyond the feature above. -- **Effort:** S, half a day. +- **Effort:** S. - **Tests:** The menu builder on a husky with Obedience wanted and area Pen stores Obedience as want and area "Pen"; "Load your default" on a second husky applies it. - **Risks:** a mod that redraws the training card may cover the button; the settings page still works. #### Auto-slaughter limits for new species and new maps +Designed, no code yet. + - **Players get:** A "Defaults" button in the vanilla auto-slaughter window: "Make this map's limits the default" and "Load the default onto this map" (asks first). The default also applies by itself, per species, the first time an animal of that species joins a map whose limits for it are untouched, and to every new colony map. - **How:** Every map gets one `AutoSlaughterConfig` per tameable species when it is built, all unlimited (Verse/AutoSlaughterManager.cs:215-219, `TryPopulateMissingAnimals` :254-265; fields in Verse/AutoSlaughterConfig.cs:7-19), so the only "new species" moment is the first animal. - Template per species: `maxTotal`, `maxMales`, `maxMalesYoung`, `maxFemales`, `maxFemalesYoung`, `allowSlaughterPregnant`, `allowSlaughterBonded`. Untouched means all five limits at -1 and both flags false. @@ -554,29 +595,57 @@ Per pawn kind: - **Save and removal:** the map's `autoSlaughterManager`, saved by vanilla. - **Overlaps:** Colony Manager Redux (3310027356, 44,730, 1.7) sets culling targets itself; Improved Auto Slaughter (3378091537, 2,913, no 1.7), Better Auto Slaughter (2985501794, 2,029, no 1.7) and Auto Slaughter Plus (3825007923, 183, 1.7) change the slaughter rules. Warned; none of them is installed here. - **Replaces:** nothing; no Workshop mod sets slaughter limits per species ahead of time. Asked for on Defaults' page (2026-01-26). -- **Effort:** S + S, 1 day. +- **Effort:** S + S. - **Tests:** Chicken template with max 10: the first player chicken on the test map sets the chicken config's maxTotal to 10; a second chicken doesn't apply it again; a config the player set to 5 stays at 5. A chicken bought from a test orbital trader through `TradeShip.GiveSoldThingToPlayer` has no map during `PreTraded`; once its drop pod opens on the test map, the chicken config's maxTotal is 10. A fresh `AutoSlaughterManager(map)` passed through the new-map apply takes the template. "Load the default onto this map" overwrites after the confirm. - **Risks:** generating a full map in the headless suite is slow, hence the fresh manager instead of `GenerateMap`. +### Mechs + +Needs Biotech. Without it the mech section of the settings page shows disabled with "Needs Biotech", its rows stay in the file, no hook acts on a mech and the gizmo never appears. Auto-repair, work mode, area and the gizmo share the mech row and the join funnel, so they ship together. + #### Auto-repair for new mechs -Needs Biotech. Without it the mech section of the settings page shows disabled with "Needs Biotech", its rows stay in the file, and no hook acts on a mech. +Designed, no code yet. -- **Players get:** On the settings page, per mech kind plus an "every mech" row: auto-repair not set, on or off. A new colony mech, gestated, hacked or given by a quest, starts with it. Work mode, area and a Defaults gizmo on mechs follow in 1.5. +- **Players get:** On the settings page, per mech kind plus an "every mech" row: auto-repair not set, on or off. A new colony mech, gestated, hacked or given by a quest, starts with it. Work mode, area and a Defaults gizmo on mechs are the next feature and ship with this one. - **How:** The join funnel, extended to `IsColonyMech` (Verse/Pawn.cs:794-808). Gestation runs inside the `Bill_ProductionMech.CreateProducts` scope (RimWorld/Bill_ProductionMech.cs:20-27). The write is `CompMechRepairable.autoRepair` (RimWorld/CompMechRepairable.cs:10). Resurrected mechs come back as the same pawn and keep their settings. - DLC: every mech step checks `ModsConfig.BiotechActive` first. `IsColonyMech` checks it too (Verse/Pawn.cs:798), and the comp exists only with Biotech (`CompProperties_MechRepairable` on Core's `BaseMechanoid` with `MayRequire`, Core `Races_Mechanoid.xml:52`). The `CreateProducts` patch is applied in every combination and never runs without Biotech. - **Settings:** `mechDefaults` (on). - **Save and removal:** vanilla field `autoRepair` (CompMechRepairable.cs:31-34). - **Overlaps:** Auto-repair On (3312319778, 61,014, no 1.7); warned. - **Replaces:** Auto-repair On (61k). -- **Effort:** S, half a day. +- **Effort:** S. - **Tests:** With Biotech (skipped without): with "Militor: auto-repair on", a militor generated with the player faction inside the `CreateProducts` scope helper has `autoRepair` true; a mech given through `SetFaction` gets the every-mech row's value. -NoDlc: a Scyther given the player faction through `SetFaction` is untouched by Defaults, and the Militor row stays in the file, in the mech section drawn disabled with "Needs Biotech", and is not counted as an inactive name. - **Risks:** none known. -### 1.4 Growers and buildings (4 days) +#### New mechs start with your settings + +Designed, no code yet. + +- **Players get:** The mech rows of auto-repair gain the work mode of the control group a new mech joins and an allowed area by name, each not set or set. A gestated mech goes into a control group in that mode when one is free; a mechanitor's group 1 is never switched to another mode for it. A "Defaults" gizmo on a selected colony mech saves its kind's default from it: auto-repair, its group's work mode and its area's name. +- **How:** + - Gestation runs inside the `Bill_ProductionMech.CreateProducts` scope (RimWorld/Bill_ProductionMech.cs:20-27): it generates the mech (:24), then adds the overseer relation (:25), whose `OnRelationCreated` calls `AssignPawnControlGroup` with no work mode (RimWorld/PawnRelationWorker_Overseer.cs:7-18), which puts the mech in group 1, `controlGroups[0]` (RimWorld/Pawn_MechanitorTracker.cs:204). At the scope's end the mech has an overseer. + - Work mode: Defaults picks the target group itself before touching the mech, and doesn't call `AssignPawnControlGroup(mech, mode)`. That method takes the first group with the mode, else switches the first empty group to the mode, else uses group 1 (:185-200). Called after `UnassignPawnFromAnyControlGroup` (:209), it often finds group 1 empty, for example when the new mech is the mechanitor's first, so it would switch group 1 from Work to Escort, and every later mech without a mode lands in group 1 (:204). + - The target: the first group whose `WorkMode` is the wanted mode, group 1 included; else the first group above group 1 with no mechs other than this one (`MechsForReading`, RimWorld/MechanitorControlGroup.cs:31). + - Found: an empty target gets `SetWorkMode(mode)` (:84), then `target.Assign(mech)` (:74-82), which takes it out of its other groups, then `mechanitor.Notify_BandwidthChanged()` (Pawn_MechanitorTracker.cs:268). + - None found: the mech stays in group 1 and no group's mode changes. + - Only for new mechs, never on later reassignments. A mechlink gives two groups (Biotech `Hediffs_Mechanitor.xml:83`). + - Area: as for animals; mechs support areas unless their race sets `disableAreaControl`. Resurrected mechs come back as the same pawn and keep their settings. + - Gizmo: a postfix on `Pawn.GetGizmos` (Pawn.cs:3354) for colony mechs only, so never without Biotech (`IsColonyMech`, :798). Control groups come from the mechlink, also Biotech. +- **Settings:** covered by `mechDefaults`. +- **Save and removal:** vanilla fields: the mechanitor's control groups and the mech's area. +- **Overlaps:** the mech work modes of 1trickPwnyta's Defaults; warned. Mech Work Tab (3268299107, 89,072, 1.7) and Foldable Tabs (3845615729, 506, 1.7) draw these settings and write them only on clicks; they compose. +- **Replaces:** the mech defaults of 1trickPwnyta's Defaults. +- **Effort:** S + S + S. +- **Tests:** With Biotech (skipped without): a mechanitor fixture with two control groups, both empty, both in Work, and a Militor default of Escort. `Bill_ProductionMech.CreateProducts` on a gestator fixture with the mechanitor bound gives a militor in group 2, now set to Escort, while group 1 is still in Work. If that fixture is too heavy for the harness, the test makes the same two calls (generate with the player faction, add the overseer relation) inside the scope helper. With group 2 already holding a mech in Work, the next Escort militor stays in group 1 and group 1 stays in Work. With group 1 set to Escort by hand, the militor stays in group 1. A mech hacked or given by a quest through `SetFaction` gets its area. -NoDlc: with a saved Militor Escort row, the mech section reports "Needs Biotech", the row stays in the file, and nothing logs. +- **Risks:** a mod that reassigns mechs to groups on join overrides ours; none is installed. + +### Growing #### Growing zones and plant growers start with your crop +Designed, no code yet. + - **Players get:** Per grower kind ("growing zone" and each plant grower: hydroponics basin, plant pot, VFE Farming planters), an ordered list of up to three crops, plus allow sowing and allow cutting for zones. A new zone or grower takes the first crop that can grow there right now; if none can, the game picks as before (potato, or toxipotato on polluted ground with Biotech). Right-click the vanilla "Set plant" button for "Make rice the default for new growing zones": rice moves to the top of the list, the other entries keep their order, and a fourth drops off. On a zone it also saves that zone's allow sowing and allow cutting. The settings page edits each kind with three crop dropdowns and, for zones, two checkboxes. A grower revived by Replace Stuff keeps its old crop. - **How:** - Zones: a postfix on `Designator_ZoneAdd_Growing.MakeNewZone` (RimWorld/Designator_ZoneAdd_Growing.cs:57) collects zones of the exact type `Zone_Growing` (custom zone subclasses are left alone) and sets `allowSow` and `allowCut` (RimWorld/Zone_Growing.cs:14, :16). A postfix on `Designator_ZoneAdd.DesignateMultiCell` (RimWorld/Designator_ZoneAdd.cs:104), with a finalizer that clears the list, picks the crop once the zones have cells. It calls `SetPlantDefToGrow` (Zone_Growing.cs:213) before anything reads `PlantDefToGrow`, whose getter otherwise fixes potato or toxipotato on first read (:24-42). @@ -591,12 +660,16 @@ Needs Biotech. Without it the mech section of the settings page shows disabled w - **Save and removal:** vanilla fields (`Zone_Growing.ExposeData`, :53-59). - **Overlaps:** Default Plant Selector (3843503101, 7, 1.7) and the plant type of 1trickPwnyta's Defaults; warned. Haul After Harvest (3834328825, 414, 1.7) and Prison Labor (1899474310, 174,954, 1.7) read growing zones and write no crop. The gravship path (`MoveableGrowZone`) sets its own crop and isn't reached. - **Replaces:** Default Plant Selector (7) and the crop defaults of Defaults and Set my Defaults. -- **Effort:** S + S, 1 day. +- **Effort:** S + S. - **Tests:** With "growing zone: rice, then potato", a new zone on fertile soil grows rice; on soil rice can't use (a sow tag test with a hydroponics-only plant first in the list) it falls to the next entry; with no valid entry the getter still gives potato. A hydroponics basin built through a frame takes its list; one spawned directly keeps vanilla's crop. A zone drag that makes two zones sets both. With the zone list "rice, potato, corn", the right-click entry for strawberry on a zone with sowing off gives "strawberry, rice, potato" and allow sowing off; for potato it gives "potato, rice, corn". -NoDlc: with "growing zone: toxipotato, rice" a new zone grows rice and logs nothing. -Compat, with Replace Stuff: a hydroponics basin growing rice, its def's default, with the list "potato" first, destroyed with auto-rebuild on and rebuilt through the frame, still grows rice. - **Risks:** none known. +### Buildings + #### Building settings for new buildings +Designed, no code yet. + - **Players get:** The settings a new building starts with: hold open for doors, gather spot for tables, auto-rearm for traps, target temperature for heaters, coolers and other buildings with a thermostat, and lamp colour for lamps with a colour picker. Set per building, or once for every door, every lamp, or every heater or cooler; a building's own row wins field by field. A "Defaults" gizmo on a selected building: "Make these the defaults for new " (copies every supported setting), "Make these the defaults for every door" (or lamp, or heater or cooler) where it is one, "Load your default" and "Forget". A rebuilt door, lamp, trap or table gets the default like a new one; a heater or cooler revived by Replace Stuff keeps its old target. - **How:** Through the build scope. - Before spawn (made hook): door hold-open, the protected `holdOpenInt` (RimWorld/Building_Door.cs:15, written with `AccessTools.FieldRefAccess`); gather spot, `CompGatherSpot.Active` (RimWorld/CompGatherSpot.cs:10); target temperature, `CompTempControl.TargetTemperature` (RimWorld/CompTempControl.cs:17-29), clamped to the props' `minTargetTemperature` and `maxTargetTemperature` (RimWorld/CompProperties_TempControl.cs:11, :13). Vanilla only sets the def default on first spawn while the value is still the -99999 placeholder (CompTempControl.cs:35-42), so ours stays. In Core and the installed DLCs only the heater and the cooler carry `CompProperties_TempControl` (Core `Buildings_Temperature.xml`); the vent (`Building_Vent`, :333-385) has only `CompProperties_Flickable` and no target, so it has nothing to default. @@ -608,34 +681,10 @@ Needs Biotech. Without it the mech section of the settings page shows disabled w - **Save and removal:** vanilla fields (`holdOpen` at Building_Door.cs:311, `autoRearm` at Building_Trap.cs:61, the comps' own data). - **Overlaps:** No Default Gather Spot (2901774438, 8,402, no 1.7), Default White Lights (3784067674, 656, 1.7), Default Light Color (3773507545, 100, no 1.7), Always Auto-Rearm (3809500495, 67, 1.7) and the white-lights option of FrozenSnowFox Tweaks; warned. Dubs Central Heating (2619214952, 123,605, 1.7) declares its radiators' comp as `DubsCentralHeating.DBHCompTempControl` on a `CompProperties_TempControl` (its 1.7 `Defs/ThingDefs_Buildings/BuildingsE_Heating.xml`); `GetComp` finds it if it derives from `CompTempControl`, which the compat run checks, and the radiators then fall under "every heater or cooler". Doors from [DG]More Door Variants (3832293718, 24,182, 1.7) derive from `Building_Door` and fall under "every door". - **Replaces:** No Default Gather Spot (8.4k), Default White Lights (656) through "every lamp", Default Light Color (100), Always Auto-Rearm (67), and the heater and cooler targets of 1trickPwnyta's Defaults. -- **Effort:** M + S, 2.5 days, the "every" rows being the S. +- **Effort:** M + S, the "every" rows being the S. - **Tests:** Door default hold open: a door completed through a frame has `HoldOpen` true, a door spawned directly false. Table default gather spot off: `CompGatherSpot.Active` false. Trap outside the home area with rearm on: `autoRearm` true. Heater at 18 C: 18 after spawn; a template of 60 is clamped to the def's maximum. A standing lamp with a colour gets it; a frame from Build copy with its own colour keeps that colour. "Every lamp: white" with no standing-lamp row: a standing lamp built through a frame is white; with a standing-lamp row set to blue, it is blue. "Every door: hold open" gives an autodoor built through a frame `HoldOpen` true. -Compat: a Dubs radiator built through a frame takes the "every heater or cooler" target, or the test logs that the comp isn't a `CompTempControl`; a [DG]More Door Variants door takes the "every door" value; with Replace Stuff, a heater set to 25 C, destroyed with auto-rebuild on and rebuilt through the frame, is at 25 C while the template says 18. - **Risks:** a building that resets these settings in its own spawn code overwrites ours; the tests cover the vanilla classes. -### 1.5 Mech work modes and areas (2 days) - -Needs Biotech. Without it the mech section shows disabled with "Needs Biotech", as in 1.3, the gizmo never appears and saved rows stay in the file. - -#### New mechs start with your settings - -- **Players get:** The mech rows from 1.3 gain the work mode of the control group a new mech joins and an allowed area by name, each not set or set. A gestated mech goes into a control group in that mode when one is free; a mechanitor's group 1 is never switched to another mode for it. A "Defaults" gizmo on a selected colony mech saves its kind's default from it: auto-repair, its group's work mode and its area's name. -- **How:** - - Gestation runs inside the `Bill_ProductionMech.CreateProducts` scope (RimWorld/Bill_ProductionMech.cs:20-27): it generates the mech (:24), then adds the overseer relation (:25), whose `OnRelationCreated` calls `AssignPawnControlGroup` with no work mode (RimWorld/PawnRelationWorker_Overseer.cs:7-18), which puts the mech in group 1, `controlGroups[0]` (RimWorld/Pawn_MechanitorTracker.cs:204). At the scope's end the mech has an overseer. - - Work mode: Defaults picks the target group itself before touching the mech, and doesn't call `AssignPawnControlGroup(mech, mode)`. That method takes the first group with the mode, else switches the first empty group to the mode, else uses group 1 (:185-200). Called after `UnassignPawnFromAnyControlGroup` (:209), it often finds group 1 empty, for example when the new mech is the mechanitor's first, so it would switch group 1 from Work to Escort, and every later mech without a mode lands in group 1 (:204). - - The target: the first group whose `WorkMode` is the wanted mode, group 1 included; else the first group above group 1 with no mechs other than this one (`MechsForReading`, RimWorld/MechanitorControlGroup.cs:31). - - Found: an empty target gets `SetWorkMode(mode)` (:84), then `target.Assign(mech)` (:74-82), which takes it out of its other groups, then `mechanitor.Notify_BandwidthChanged()` (Pawn_MechanitorTracker.cs:268). - - None found: the mech stays in group 1 and no group's mode changes. - - Only for new mechs, never on later reassignments. A mechlink gives two groups (Biotech `Hediffs_Mechanitor.xml:83`). - - Area: as for animals; mechs support areas unless their race sets `disableAreaControl`. Resurrected mechs come back as the same pawn and keep their settings. - - Gizmo: a postfix on `Pawn.GetGizmos` (Pawn.cs:3354) for colony mechs only, so never without Biotech (`IsColonyMech`, :798). Control groups come from the mechlink, also Biotech. -- **Settings:** covered by `mechDefaults`. -- **Save and removal:** vanilla fields: the mechanitor's control groups and the mech's area. -- **Overlaps:** the mech work modes of 1trickPwnyta's Defaults; warned. Mech Work Tab (3268299107, 89,072, 1.7) and Foldable Tabs (3845615729, 506, 1.7) draw these settings and write them only on clicks; they compose. -- **Replaces:** the mech defaults of 1trickPwnyta's Defaults. -- **Effort:** S + S + S, 2 days. -- **Tests:** With Biotech (skipped without): a mechanitor fixture with two control groups, both empty, both in Work, and a Militor default of Escort. `Bill_ProductionMech.CreateProducts` on a gestator fixture with the mechanitor bound gives a militor in group 2, now set to Escort, while group 1 is still in Work. If that fixture is too heavy for the harness, the test makes the same two calls (generate with the player faction, add the overseer relation) inside the scope helper. With group 2 already holding a mech in Work, the next Escort militor stays in group 1 and group 1 stays in Work. With group 1 set to Escort by hand, the militor stays in group 1. A mech hacked or given by a quest through `SetFaction` gets its area. -NoDlc: with a saved Militor Escort row, the mech section reports "Needs Biotech", the row stays in the file, and nothing logs. -- **Risks:** a mod that reassigns mechs to groups on join overrides ours; none is installed. - ## Works with the other Blax mods - Package ids: `blax.slaves`, `blax.castes`, `blax.zones`, `blax.defaults`. No hard dependencies. Defaults lists no sibling in About.xml and no sibling lists Defaults, so the load order doesn't matter. Defaults offers no API in 1.x. @@ -647,27 +696,36 @@ Needs Biotech. Without it the mech section shows disabled with "Needs Biotech", Castes owns every humanlike player pawn: colonists, slaves and prisoners, their apparel, food, drug and reading policies, medical care, schedule, work priorities, weapon loadout, allowed area, hostility, self-tend, carried medicine, fire at will and prisoner interaction. Defaults never sets any of these, and stays out of the way in these ways: - Pawn filter: the join funnel checks `RaceProps.Animal` or `IsColonyMech` first, so Defaults never writes to a humanlike pawn, with or without Castes. The forbid rules (1.1: `Pawn.Kill`, `Pawn_HealthTracker.MakeDowned` and `Pawn.Strip`) see any pawn, colonists and slaves included, but write only the forbidden flag on its corpse and on the things it drops or is stripped of, never a caste slot. Castes' join hooks filter the other way round on `RaceProps.Humanlike` (`JoinHooks.Watching` in blax-castes), so no pawn reaches both join funnels. -- Caste guard: when Castes 1.1 or later is active (`CastesApi` version 1, where `CasteIdOf` arrives), Defaults binds `CastesApi.CasteIdOf(Pawn)`, checks `Active`, and skips 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. +- Caste guard: when Castes' read-only API is active (`CastesApi` version 1, where `CasteIdOf` arrives), Defaults binds `CastesApi.CasteIdOf(Pawn)`, checks `Active`, and skips 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. - Policies: Defaults never creates, edits or assigns an apparel, food, drug or reading policy and adds nothing to the four policy dialogs. Castes' starter castes still find the Slave outfit and Simple food by their starting labels. - Medical care: Defaults never writes `PlaySettings` medical defaults or a pawn's medical care. Animal medical care stays with the vanilla "Default medical care" window. -- Areas: Castes 1.2 gives humanlike pawns an allowed area by name; Defaults gives animals (1.3) and mechs (1.5) an allowed area by name. Neither creates areas in 1.x, and neither can pick one of Zones' work rule areas, which aren't vanilla areas (see "Blax Zones"). The backlog item "areas every new map starts with" would create the named areas both mods then find. +- Areas: Castes' allowed area slot gives humanlike pawns an allowed area by name; Defaults gives animals and mechs one by name. Only Defaults' "Areas every new map starts with" (features.md, New maps) creates areas, the named ones both mods then find. Neither mod can pick one of Zones' work rule areas, which aren't vanilla areas (see "Blax Zones"). - Bills: "slaves only" in a bill default is a bill setting. Castes' work slot decides who does a work type; the bill decides who may take that bill. - Both mods postfix `Pawn.SetFaction`. The postfixes compose, and neither writes the other's pawns. ### Blax Zones - Ownership: Zones owns sleeping spots, beds by zone, every friendly drop location and per-cell work rules (work rule areas); it never changes a pawn's work priorities or allowed area. -- Of the zone designators, Defaults hooks only `Designator_ZoneAddStockpile` (1.0) and `Designator_ZoneAdd_Growing` (1.4). Zones' delivery and sleeping zones subclass `Zone` and `Designator_ZoneAdd` directly and use their own tabs (`ITab_Delivery` for delivery zones, the animal-zone and people-zone tabs for sleeping zones), so no Defaults hook or button reaches them. +- Of the zone designators, Defaults hooks only `Designator_ZoneAddStockpile` (since 1.0) and `Designator_ZoneAdd_Growing` (growing). Zones' delivery and sleeping zones subclass `Zone` and `Designator_ZoneAdd` directly and use their own tabs (`ITab_Delivery` for delivery zones, the animal-zone and people-zone tabs for sleeping zones), so no Defaults hook or button reaches them. - Zones' "Receive deliveries", sell and direct-delivery flags live in Zones' MapComponent, keyed by zone ID and ThingID. "Make default" never reads or copies them, and a new stockpile starts unflagged, as Zones decides. -- Zone beds are spawned by Zones' `AddCell`, not by a frame, so the build scope (1.2) never sees them. +- Zone beds are spawned by Zones' `AddCell`, not by a frame, so the build scope never sees them. - Zones' own zone defaults stay in Zones: its backlog holds "Make default" for new delivery and sleeping zones. - The forbid rules (1.1) act only inside `Pawn.Kill`, `Pawn_HealthTracker.MakeDowned` and `Pawn.Strip`, and the wait list holds only what they recorded there, so goods Zones delivers keep the forbid flag of the vanilla call. -- Work rule areas (Zones 1.3) compose with the forbid rules. A rule decides whether a dropped thing stays forbidden; Zones' "Don't haul from here" decides whether haulers fetch it, and "Haul first" brings it in before other hauling. So a Normal rifle allowed in a killbox painted "Don't haul from here" lies there until the player unticks the rule. "Only inside the home area" reads the vanilla home area (`map.areaManager.Home`), which work rule areas never change. Neither mod hooks the other's code. +- Zones' work rule areas compose with the forbid rules. A rule decides whether a dropped thing stays forbidden; Zones' "Don't haul from here" decides whether haulers fetch it, and "Haul first" brings it in before other hauling. So a Normal rifle allowed in a killbox painted "Don't haul from here" lies there until the player unticks the rule. "Only inside the home area" reads the vanilla home area (`map.areaManager.Home`), which work rule areas never change. Neither mod hooks the other's code. ### Blax Slaves - No overlap. Surgery bills, which Slaves keeps through status changes and uses for hemogen, are `Bill_Medical` and never touched. Trade, prices and slave medicine are Slaves'. -- The forbid rules (1.1) count slaves with your colony, rebelling ones included. Slaves forbids nothing and patches none of their methods. Its sedation relay (its 1.5) downs a rebel with `HealthUtility.TryAnesthetize` (Verse/HealthUtility.cs:533-543), whose `AddHediff` reaches `MakeDowned` (Verse/Pawn_HealthTracker.cs:226, :237, :520, :577). With the colony rule on, the rebel's weapon is then a remembered weapon: it waits while the slave lies where it fell, and the colony rule decides once the slave is carried off. +- The forbid rules (1.1) count slaves with your colony, rebelling ones included. Slaves forbids nothing and patches none of their methods. Its planned sedation relay downs a rebel with `HealthUtility.TryAnesthetize` (Verse/HealthUtility.cs:533-543), whose `AddHediff` reaches `MakeDowned` (Verse/Pawn_HealthTracker.cs:226, :237, :520, :577). With the colony rule on, the rebel's weapon is then a remembered weapon: it waits while the slave lies where it fell, and the colony rule decides once the slave is carried off. + +### Blax Laws + +Laws is designed on its branch `design/act-catalogue` and not accepted yet. Its package id would be `blax.laws`; Defaults would list it nowhere in About.xml. + +- Lawbook templates across saves (Laws' backlog) live in Laws' own file under the game's Config folder, with the write, read-back and backup rules of Defaults' file copied as code. Defaults' file never holds a lawbook, and neither mod reads the other's file. +- Laws' subdue downs a pawn through `Pawn_HealthTracker.MakeDowned`, so with the colony rule on its weapon is a remembered weapon: it waits while the pawn lies where it fell, and the colony rule decides once the pawn is carried off. Laws never touches that weapon. +- An arrest drops the weapon and inventory inside `SetGuestStatus`, which the forbid rules don't see. Laws' "Release gives back what jail took" allows the weapon the arrest dropped again at the release. Neither mod hooks the other. +- When Laws' design is accepted, the ownership line and the Castes paragraph above take the Laws wording from Laws' "Sibling doc changes": Castes' prisoner interaction except the Maintain only and Release modes Laws sets on colonists it jailed. ### Shared conventions @@ -688,26 +746,28 @@ Castes owns every humanlike player pawn: colonists, slaves and prisoners, their - Done (2026-11-29), Zones `docs/design.md`: its Defaults notes name the new releases ("`Designator_ZoneAdd_Growing` (its 1.4)", "Defaults' build scope (its 1.2)") and read "Defaults' forbid rules (its 1.1) act only inside `Pawn.Kill`, `Pawn_HealthTracker.MakeDowned` and `Pawn.Strip`, never on goods Zones delivers". The rest of that note stays true: the recorder only records inside those calls, so drop pods and caravan goods keep the forbid flag of the vanilla call. - Done (2026-11-29), after Zones' work rule areas (its 1.6): Castes `docs/design.md`, Zones `docs/design.md`, Slaves `docs/roadmap.md` and this doc carry the same Zones sentence ("per-cell work rules (work rule areas); it never changes a pawn's work priorities or allowed area") and say "allowed area" for Castes' area slot. Slaves' package ids gain `blax.defaults`. +- Pending (2026-12-01), from the plan by area: Castes `docs/design.md`, its "Blax Defaults" section, "Defaults 1.3 reads `Active` and `CasteIdOf`" becomes "Defaults' animal and mech defaults read `Active` and `CasteIdOf`". Zones `docs/design.md`, its Blax Defaults note, "`Designator_ZoneAdd_Growing` (its 1.4)" becomes "(its growing area)" and "Defaults' build scope (its 1.2)" becomes "Defaults' build scope (with graves, mortars and other storage)". References to shipped releases (1.0, the forbid rules' 1.1) stay. + ## Backlog -- Areas every new map starts with, named and coloured (M): asked for on Defaults' page (2025-06-17, 2025-07-27). Created with `AreaManager.TryMakeNewAllowed` (Verse/AreaManager.cs:147) in a `MapGenerator.GenerateMap` postfix. Castes 1.2 and Defaults' animal areas then resolve on new maps. -- New-colony carry-over (M): storyteller with custom sliders and commitment mode, play settings (auto rebuild, manual priorities, zone visibility), quest reward preferences, world seed and factions. Save Storyteller Settings (3744418945, 31,979, no 1.7) and New Game Plus (23k) show demand, but it pays off once per colony and our colonies run for years. If built, it never carries the medical defaults for colonists, slaves or prisoners, which are Castes'. -- Build copy carries bills and storage settings (S): vanilla copies stuff, style, precept and lamp colour only (RimWorld/BuildCopyCommandUtility.cs:11-14). Needs an unsaved link from the blueprint to the source building. Asked for in the Steam thread "Why does 'build copy' not copy the settings too?" (2021-10-10, https://steamcommunity.com/app/294100/discussions/0/3087772148447673742/). -- Young animals get size-gated training when they grow (S): a postfix on `LifeStageWorker.Notify_LifeStageStarted` (called from `Pawn_AgeTracker.RecalculateLifeStageIndex`, Verse/Pawn_AgeTracker.cs:577) for player animals, skipped when the previous life stage is null, as it is on load. It wants each trainable the species default wants that the animal was too small for at the previous stage and can be assigned now. No saved state; it would reach animals that predate the default, so it needs its own switch. +- Planned in features.md (New maps): areas every new map starts with, named and coloured (M): asked for on Defaults' page (2025-06-17, 2025-07-27). Created with `AreaManager.TryMakeNewAllowed` (Verse/AreaManager.cs:147) in a `MapGenerator.GenerateMap` postfix. Castes' allowed area slot and Defaults' animal areas then resolve on new maps. +- New colonies (M), waits for Fabian's call (features.md, "Open questions"): play settings (auto rebuild, auto home area, manual priorities, zone visibility) and the default medical care for tame animals, wildlife, entities and other factions' pawns, written once when a new game starts. Save Storyteller Settings (3744418945, 31,979, no 1.7) and New Game Plus (23k) show demand for new-game setup, but it pays off once per colony and our colonies run for years. It never carries the medical defaults for colonists, slaves, prisoners or ghouls, which are humanlike player pawns and Castes' side. Storyteller and world presets are cut. +- Planned in features.md (Buildings): Build copy carries bills and storage settings (S): vanilla copies stuff, style, precept and lamp colour only (RimWorld/BuildCopyCommandUtility.cs:11-14). Needs an unsaved link from the blueprint to the source building. Asked for in the Steam thread "Why does 'build copy' not copy the settings too?" (2021-10-10, https://steamcommunity.com/app/294100/discussions/0/3087772148447673742/). +- Planned in features.md (Animals, as "Young animals learn what they outgrew"): young animals get size-gated training when they grow (S): a postfix on `LifeStageWorker.Notify_LifeStageStarted` (called from `Pawn_AgeTracker.RecalculateLifeStageIndex`, Verse/Pawn_AgeTracker.cs:577) for player animals, skipped when the previous life stage is null, as it is on load. It wants each trainable the species default wants that the animal was too small for at the previous stage and can be assigned now. No saved state; it would reach animals that predate the default, so it needs its own switch. - Preset Filtered Zones support (S): a reflection-guarded postfix on its `Designator_PresetZoneAdd.MakeNewZone`, keyed by its `PresetZoneType`, and its zones accepted by the storage tab button. Only worth it if the mod enters the list. - Several named defaults per kind, picked from the Defaults menu (S): asked for on Defaults' page (2026-01-31). - Control groups added later start in a work mode by group number (S): a postfix on the private `Pawn_MechanitorTracker.Notify_ControlGroupAmountMayChanged` (:217). - Beds in a hospital room start as medical beds, refuel targets per building (S each). - Export and import of the defaults file, to share it between players (S). -- A per-colony override, "this colony differs" (M). - Gravship-start shelves (Odyssey) as a setting, since one player wants them included and others don't; fishing zone defaults through `Designator_ZoneAdd_Fishing.MakeNewZone`. Neither DLC is installed here. -- Multiplayer: needs the active defaults in the save, seeded from the file, and a 1.7 build of the Multiplayer mod to test. - Gear of neutral pawns who died or were carried off (S): a third forbid rule for visitors and traders, since nobody comes back for that gear. It would use the colony's remembered-weapon wait, so their gear stays vanilla while they lie where they fell. - "Use this stockpile's filter for a forbid rule" in the storage tab's Defaults menu (S), for players whose stockpiles already say what they want to keep. ## Cut +- A per-colony override ("this colony differs") and multiplayer, moved from the backlog on 2026-12-01: both need the active defaults in the save, and Defaults keeps nothing there. Multiplayer would also need a 1.7 build of the Multiplayer mod to test. +- Storyteller, difficulty, world seed and faction presets for new colonies (2026-12-01): a new-game screen tool, not a starting setting of something the player makes, and the bulk that made players find 1trickPwnyta's Defaults too big (Castes' Cut). Save Storyteller Settings (3744418945, 31,979, no 1.7) covers the storyteller part. - Anything for colonists, slaves or prisoners: policies, medical care, schedule, work priorities, weapon loadout, hostility, self-tend, carried medicine, fire at will, area, prisoner interaction. Those are Castes'. Pregnancy approach and the starting xenotype are per-pawn humanlike settings too; if anyone builds them, Castes' DLC switches are the place. Baby feeding is stored per baby and per feeder, and Castes cut its baby autofeed slot. -- Policy contents and default policies (the starting sets, what a new policy allows): policies are save objects that castes reference, and Castes 1.5 moves policies between colonies as files. +- Policy contents and default policies (the starting sets, what a new policy allows): policies are save objects that castes reference, and Castes' caste templates across saves move policies between colonies as files. - Editing defs at startup (`defaultStorageSettings`, `defaultPlantToGrow`, `defaultTargetTemperature`): it also hits ruins, map generation and trader stock, can't tell what the player built, breaks "Load the game's default", and must match across multiplayer clients. - An animal food policy: 1.7 has none (`Pawn_FoodRestrictionTracker.Configurable` is humanlike only, RimWorld/Pawn_FoodRestrictionTracker.cs:34-44). Adding one is a system, not a default; Animal Controls does it. - Per-animal slaughter, milking or shearing flags: vanilla has only per-map, per-species auto-slaughter limits. diff --git a/docs/features.md b/docs/features.md new file mode 100644 index 0000000..7d7b3f8 --- /dev/null +++ b/docs/features.md @@ -0,0 +1,183 @@ +# Blax Defaults feature plan + +When Blax Defaults is complete, everything you designate, build, tame or gestate starts the way you set it up once: stockpiles and shelves, bills and workbenches, crops, doors, lamps and heaters, animals and mechs, and the named areas of a new map. Its forbid rules decide what stays forbidden after a fight. Colonists, slaves and prisoners stay with Blax Castes, and nothing ever goes into a save. + +Status: 1.0 (storage defaults, values for every new bill) and 1.1 (forbid rules) are on the Workshop as item 3848261264, 1.1.0 since 2026-11-30. Everything else is designed in [design.md](design.md) or new in this plan, with no code yet. + +Planned 2026-12-01. This file is the plan of record for what the mod covers and in which order the areas come. [design.md](design.md) holds the spec of every designed feature. + +## Scope + +Blax Defaults covers: + +- the starting settings of what the player makes or acquires: stockpiles, growing zones, storage buildings, bills, workbenches, other buildings, animals and mechs; +- the named areas every new map starts with; +- what the game forbids when a pawn goes down, dies or is stripped (opt-in forbid rules); +- one defaults file per player, shared by every save. + +Every feature keeps the design's rules: nothing changes until you save a default or turn a rule on; a default applies once, when the thing is made or joins, never to what you already have; nothing goes into the save; any DLC combination works, core only included; every feature has a toggle; no new art. + +Left to the other Blax mods: + +- Blax Castes: every humanlike player pawn and its per-pawn settings (policies, medical care, schedule, work priorities, weapon loadout, allowed area, hostility, self-tend, carried medicine, fire at will, prisoner interaction), and caste templates across saves. Defaults never writes to a humanlike pawn. +- Blax Zones: delivery and sleeping zones, beds by zone, drop spots and work rule areas. "Make default" for its own zones lives in Zones, in its own file. +- Blax Slaves: slave status, trade, prices, suppression, slave medicine and the surgery bills it keeps through status changes. +- Blax Laws (designed on branch `design/act-catalogue`, not accepted yet): lawbook, cases, punishments and court. Its "lawbook templates shared across saves" stay in Laws: Laws keeps its own file under the game's Config folder and copies Defaults' write, read-back and backup rules. Defaults' file never holds a lawbook. Laws' arrests and subdue meet the forbid rules only through vanilla calls (design.md, "Blax Laws"). + +## Areas + +Status words: **Shipped x.y**; **Designed** (spec in design.md); **New** (in this plan, no spec yet; its hook is not checked against the game code unless the line says so); **Idea** (waits for players to ask). + +### Defaults file and settings page + +Defaults are only worth setting up if they survive mod updates, broken files and removed mods, and if you can edit them from the main menu. Every other area adds its rows to this page. + +- **Defaults library and settings page.** One file shared by every save, written through a temporary file, read back and backed up; every saved default with Edit and Forget. Shipped 1.0. +- **Overlap warnings.** Mods that set the same things are named on the settings page and once per session, with "Don't remind me". Shipped 1.0; each area adds the mods of its category. +- **Add a default and drop inactive names.** Make a default from the main menu, and clear the names a removed mod left in an entry. Designed ([spec](design.md#add-a-default-and-drop-inactive-names)). +- **Several named defaults per kind.** "Meals shelf" and "Medicine shelf" for the same shelf kind, loaded from the Defaults menu; new shelves still take the main one. Idea, asked once on 1trickPwnyta's Defaults page (2026-01-31). +- **Export and import of the defaults file.** Share a setup with another player. Idea; 1trickPwnyta's Defaults has backup and restore. + +Steps: "Add a default and drop inactive names" ships with the rest of storage, because its picker lists the storage kinds that step adds. The two ideas follow demand. + +### Storage + +Every new shelf starts at Preferred and pulls meals out of the freezer, and every new stockpile allows nearly everything. + +- **New stockpiles start from your default**, per stockpile type. Shipped 1.0. +- **New storage buildings start from your default**: shelves, bookcases, hoppers, fridges, weapon racks and other storage with a storage blueprint. Shipped 1.0. +- **Defaults button in the storage tab**: make, load, load the game's default, forget. Shipped 1.0. +- **Quick setup: new shelves start empty**, per kind, leaving hoppers and single-purpose storage alone. Shipped 1.0. +- **Graves, mortars and other storage start from your default**: graves, sarcophagi, mortars, growth vats, biosculpter pods and modded storage without a storage blueprint. Designed ([spec](design.md#graves-mortars-and-other-storage-start-from-your-default)). Needs: growth vats Biotech, biosculpter pods Ideology. It brings the build scope, the hook that bills for new workbenches, growers and building settings use. +- **Your own stockpile types.** Save a stockpile setup under a name ("Freezer", "Armory", "Medicine") and it appears in the Zone menu as a stockpile designator of its own; dragging it makes a plain vanilla stockpile with that setup. Removing the mod keeps every stockpile. New. Demand: custom stockpile types in 1trickPwnyta's Defaults (75k, no official 1.7 build), Preset Filtered Zones (Continued) (16k, 1.7), Simple Stockpile Presets (Continued) (16k, 1.7), and the manual save and load of [KV] Save Storage (109k, 1.7). Hook: one `Designator_ZoneAddStockpile` subclass instance per saved type, added to the Zone category's private `resolvedDesignators` list (`DesignationCategoryDef`; the field and the `AllResolvedDesignators` getter are checked in the 1.7.5021 reference assembly). The shipped stockpile hook applies the type's template. Vanilla stockpile icon, no art. +- **Preset Filtered Zones support.** Its zones get the Defaults button and its designators a default. Idea, only if the mod enters the tested list. +- **Gravship-start shelves** (Odyssey). Idea; Odyssey isn't installed on the test machine. + +Steps, in order: + +1. Shipped in 1.0. +2. Graves, mortars and other storage, with "Add a default and drop inactive names". +3. Your own stockpile types. It reuses the editor "Add a default" opens. + +### Bills + +Every new bill searches the whole map, takes any ingredient and sends products to the best stockpile, and a new or rebuilt workbench comes empty. + +- **Values for every new bill**: repeat mode, counts, radius, skill range, where products go, counting options. Shipped 1.0. +- **Defaults per recipe from the bill window.** "Make these the default for new simple meal bills", ingredient filter and restrictions included. Designed ([spec](design.md#defaults-per-recipe-from-the-bill-window)). Needs: "slaves only" Ideology, the mech restrictions Biotech. +- **Bills for new workbenches.** A new or rebuilt electric stove comes with the bills you saved for stoves, in order. Designed ([spec](design.md#bills-for-new-workbenches)). Needs the build scope from storage. +- **Materials no new bill uses.** A list of materials (hyperweave, thrumbofur, gold, jade) that every new bill refuses where its recipe would take them, unless that recipe's own default allows them. A bill never ends up with no allowed ingredient. New. Demand: Material Filter (11k, no 1.7 build) lets players filter bills by material by hand, one bill at a time. Hook: the shipped `MakeNewBill` postfix, after the recipe default, `ingredientFilter.SetAllow(def, false)` for each listed def the recipe's fixed ingredient filter allows. + +Steps, in order: + +1. Shipped in 1.0. +2. Defaults per recipe. It needs no build scope. +3. Bills for new workbenches. Each set entry is a full recipe default, and the bench hook needs the build scope. +4. Materials no new bill uses. Its precedence rule ("unless the recipe default allows it") needs recipe defaults. + +### Forbid rules + +After a raid the good loot lies forbidden all over the map, and allowing it by hand drags the junk in too. + +- **Gear rules for your colony and for enemies**, a vanilla item filter with hit points and quality ranges each. Shipped 1.1. +- **Wait until the fight is over.** Shipped 1.1. +- **Stripping forbids what doesn't match.** Shipped 1.1. +- **Corpses outside the home area stay allowed**, per animal, enemy and other. Shipped 1.1. +- **Gear of neutral pawns who died or were carried off.** A third rule for visitors and traders, whose gear nobody comes back for. Idea. +- **Use this stockpile's filter for a forbid rule**, from the storage tab's Defaults menu. Idea. + +No step is planned. The area is complete for now; the two ideas wait for players to ask. + +### Animals + +Every tamed husky starts with no area and no training, every animal gets the same medical care as a thrumbo, and a species new to a map has no slaughter limits. + +- **Species defaults when an animal joins**: area by name, follow when drafted, follow during fieldwork, training, per species and for every animal. Designed ([spec](design.md#species-defaults-when-an-animal-joins)). It brings the join funnel, which mechs reuse. +- **Born animals copy their mother**, or take the species default per a switch. Designed ([spec](design.md#born-animals-copy-their-mother)). +- **Defaults button in the Training tab.** Designed ([spec](design.md#defaults-button-in-the-training-tab)). +- **Medical care per species.** The species and every-animal rows gain medical care: chickens get no medicine, the thrumbo the best. Born animals copy their mother's. New. Demand: vanilla's "Default medical care" window has one setting for every tame animal, and Animal Controls (57k, no 1.7 build) copies medical care to newborns. Hook: `Pawn_PlayerSettings.medCare` (checked in the 1.7.5021 reference assembly), written in the join funnel after the game's own faction change. +- **Auto-slaughter limits for new species and new maps.** Designed ([spec](design.md#auto-slaughter-limits-for-new-species-and-new-maps)). +- **Young animals learn what they outgrew.** Training the species default wants, which a pup was too small for, is wanted when it reaches the next life stage. Without it, a species default never gives a newborn Haul or Rescue. New (from the backlog). Hook: a postfix on `LifeStageWorker.Notify_LifeStageStarted`, with its own switch, since it also reaches animals that predate the default. +- **New pens start with your settings.** A pen marker you build takes the animal filter and auto-cut setting you saved for pens. Idea. Hook: `CompAnimalPenMarker.AnimalFilter`, `CompAutoCut.autoCut` and `AutoCutFilter` (checked in the reference assembly), through the build scope. + +Steps, in order: + +1. Species defaults, born animals, the Training tab button and medical care per species. They share one species row, one edit window and the join funnel. +2. Auto-slaughter limits. Same funnel, its own window button. +3. Young animals learn what they outgrew. It completes the training wishes step 1 had to skip. + +### Mechs + +Needs Biotech. Every gestated mech starts with auto-repair off and lands in group 1, and the player sets both by hand on each new mech. + +- **Auto-repair for new mechs**, per mech kind and for every mech. Designed ([spec](design.md#auto-repair-for-new-mechs)). +- **New mechs start with your settings**: the work mode of the control group a new mech joins, its area by name, and a Defaults gizmo on mechs. Designed ([spec](design.md#new-mechs-start-with-your-settings)). +- **Control groups added later start in a work mode by group number.** Idea. + +One step: auto-repair, work mode, area and the gizmo share the mech row, the join funnel and the gizmo. The old release plan split them across two releases by size; they ship together. Needs the join funnel from animals. + +### New maps + +Every new map starts with only the home area, so the defaults that pick an area by name (animals, mechs, Castes' allowed area slot) find nothing until you paint one. + +- **Areas every new map starts with.** Named, coloured areas ("Barn", "Inside", "Fields") created empty on every new player home map, ready to paint. New (from the backlog; asked on 1trickPwnyta's Defaults page on 2025-06-17 and 2025-07-27). Hook: `AreaManager.TryMakeNewAllowed` in a `MapGenerator.GenerateMap` postfix. + +One step. + +### Growing + +Every new growing zone and hydroponics basin starts on potatoes. + +- **Growing zones and plant growers start with your crop**: an ordered list of three crops per grower kind, allow sowing and cutting for zones, "Make default" on the vanilla plant button's right-click. Designed ([spec](design.md#growing-zones-and-plant-growers-start-with-your-crop)). Needs the build scope for growers. +- **Fishing zones** (Odyssey). Idea; Odyssey isn't installed on the test machine. + +One step. + +### Buildings + +Every new door, table, trap, heater and lamp starts with the game's setting, and a copied building forgets what its source had. + +- **Building settings for new buildings**: door hold-open, gather spot, trap auto-rearm, target temperature and lamp colour, per building or for every door, lamp, or heater and cooler, with a Defaults gizmo. Designed ([spec](design.md#building-settings-for-new-buildings)). +- **Build copy carries the source's settings.** A building placed with Build copy starts with the copied building's storage filter, bills, crop and building settings instead of your default. New (from the backlog; asked in the Steam thread "Why does 'build copy' not copy the settings too?", 2021-10-10). Needs an unsaved link from the blueprint to its source and every applier above. +- **Beds in a hospital room start as medical beds.** Idea. Hook: the `Building_Bed.Medical` setter (checked in the reference assembly) in the build scope's built hook. Zone beds stay Zones'. +- **Fuel settings for new buildings**: auto-refuel on or off and the target fuel level per building (torches, campfires, generators). Idea. Hook: `CompRefuelable.allowAutoRefuel` and `TargetFuelLevel` (checked in the reference assembly). + +Steps, in order: + +1. Building settings. +2. Build copy carries the source's settings. It comes last of all building work, because it reuses the storage, bill, crop and building appliers. + +### New colonies + +Every new colony starts with the game's play settings and default medical care. This area waits for Fabian's call (see "Open questions"). + +- **Play settings and medical defaults for new colonies**: auto home area, auto rebuild, manual work priorities, zone visibility, and the default medical care for tame animals, wildlife, entities and other factions' pawns, written once when a new game starts. Colonist, slave, prisoner and ghoul care stay as the game sets them, since humanlike player pawns are Castes'. Idea. Demand: 1trickPwnyta's Defaults sets both (75k, no official 1.7 build). Hook: the `PlaySettings` fields (checked in the reference assembly); the game-start hook is not checked. + +## Order + +1. **Storage**, steps 2 and 3, with "Add a default and drop inactive names". It brings the build scope that workbench bills, growers and buildings need, and finishes the storage the README already sells. +2. **Bills.** The most asked-for area: 36 of about 650 comments on 1trickPwnyta's Defaults mention bills or workbenches, 24 storage. Its per-recipe and per-workbench bills are the last reason players keep that mod and Set my Defaults next to Blax Defaults. +3. **Animals.** It brings the join funnel. Animal Controls (57k) has no 1.7 build, and slaughter limits per species were asked for on 1trickPwnyta's Defaults page (2026-01-26). +4. **Mechs.** It reuses the join funnel. Auto-repair On (61k) has no 1.7 build. Biotech only, so after animals. +5. **New maps.** With animals and mechs in place, area names that resolve on a new map make their area defaults and Castes' allowed area slot work from day one. +6. **Growing**, then **Buildings.** The mods they replace are small (8.4k and less). Build copy closes the building work. +7. **New colonies**, if Fabian takes it in. It pays off once per colony. + +The file area's ideas and the forbid ideas come when players ask. + +## Left out + +Reasons in [design.md](design.md#cut): + +- Anything on colonists, slaves or prisoners, policy contents and default policies: Castes. +- An animal food policy: vanilla has none, so it would be a new system, not a default. +- Editing defs at startup, re-applying defaults on load or to things you already have. +- Surgery bill defaults: Slaves keeps those bills. Bills on benches you didn't build. +- Forbid rules for downed visitors, traders and quest lodgers. Forbidding drops the game left allowed (only the strip switch does). +- Stack limits per stockpile: a storage mod's job, not a default. +- Per-colony override and multiplayer: both need state in the save, which this mod never writes (moved here from the backlog on 2026-12-01). +- Storyteller, difficulty and world presets: a new-game screen tool, and the bulk players called too much in 1trickPwnyta's Defaults (Castes' Cut). Save Storyteller Settings (32k) does the storyteller part. + +## Open questions for Fabian + +1. Should Blax Defaults take in "New colonies" (play settings and the medical defaults for animals, wildlife, entities and other factions' pawns at game start)? Recommendation: yes, as the last area, without storyteller or world presets. It is the part of 1trickPwnyta's Defaults with no 1.7 home besides Castes' pawn defaults, and it stays one settings section. Against it: it pays off once per colony, and your colonies run for years. If yes, the subtitle "Starting settings for storage, bills, crops, buildings, animals and mechs" gains "and new colonies". diff --git a/docs/workshop-description.txt b/docs/workshop-description.txt index 74d5b1d..6a70cfe 100644 --- a/docs/workshop-description.txt +++ b/docs/workshop-description.txt @@ -40,10 +40,11 @@ [img]https://cdn.blax.at/blax-gaming/defaults/planned.png[/img] Planned for the next releases: [list] -[*]🪦 Graves, sarcophagi, mortars and other storage, defaults per recipe and the bills a new workbench comes with. -[*]🐄 Animals: area, follow flags and training per species, auto-slaughter limits. -[*]🌱 Crops for new growing zones, settings for new doors, lamps, heaters and coolers. -[*]🤖 Mech work modes and areas (needs Biotech). +[*]🪦 Graves, mortars, other storage, own stockpile types. +[*]📜 Bills per recipe and per workbench, materials no bill uses. +[*]🐄 Animals: area, training, medical care per species, slaughter limits. +[*]🤖 Mechs: auto-repair, work mode, area (Biotech). +[*]🌱 Crops, doors, lamps, heaters, areas on new maps; Build copy keeps settings. [/list] [img]https://cdn.blax.at/blax-gaming/defaults/replaces.png[/img] @@ -58,7 +59,7 @@ Blax Defaults does what these mods do, so you can unsubscribe them. While one is [img]https://cdn.blax.at/blax-gaming/defaults/compatibility.png[/img] [list] -[*]⚠️ 1trickPwnyta's Defaults and Set my Defaults set starting settings for stockpiles and shelves too, and 1trickPwnyta's sets values for every new bill. Set each of those in one mod. Their bill lists per recipe or per workbench come in 1.2, so keep those mods for that and their other defaults. The overlap warning doesn't detect the unofficial Defaults 1.7 repack yet. +[*]⚠️ 1trickPwnyta's Defaults and Set my Defaults set starting settings for stockpiles and shelves too, and 1trickPwnyta's sets values for every new bill. Set each of those in one mod. Their bill lists per recipe or per workbench are planned, so keep those mods for that and their other defaults. The overlap warning doesn't detect the unofficial Defaults 1.7 repack yet. [*]⚠️ [FSF] FrozenSnowFox Tweaks: its "No Default Storage Settings" option does what the quick setup does. Use one of the two. [*]⚠️ Better Workbench Management also sets where the products of new bills go. Set that in one mod only. [*]✔️ Replace Stuff: replacing a shelf's material keeps its settings.