docs: forbid rules decision and 1.1 status

Ticking a rule without a filter applies its suggested setup.
This commit is contained in:
Fabian @ Blax Software 2026-11-30 22:33:42 +01:00
parent 69a5def282
commit 4f08c30f66
1 changed files with 7 additions and 7 deletions

View File

@ -2,7 +2,7 @@
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 built; 1.1 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 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.
Changes on 2026-11-29, after two review rounds:
@ -23,7 +23,7 @@ Changes on 2026-11-29, forbid rules reworked:
- 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 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. The gear rules take 2.5 days instead of 2, and 1.1 stays at 4.
- 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.
@ -58,7 +58,7 @@ Change if you disagree.
- "Where" defaults to anywhere. Inside the home area the game already leaves dropped food and medicine allowed and forbids only weapons and an enemy's loot, so a home-area rule would not reach the food left forbidden outdoors.
- Everything a rule allows waits until no enemy that can still fight is on the map, so no rule sends a hauler into a fight. No switch for it.
- A downed colonist's main weapon stays forbidden only while the colonist lies where it fell, for it to pick up after getting up, as vanilla does. Once the colonist is rescued, carried off or dies, it has forgotten the weapon, and the rule decides.
- A rule can't be turned on until it has a filter, saved with Edit or the suggested setup. Forgetting the filter turns the rule off.
- Ticking a rule that has no filter yet saves its suggested setup first and turns the rule on in one click (decided 2026-11-30); Edit changes it from there. Forgetting the filter turns the rule off.
- Suggested setups, applied only when you press the button: enemies get every item, but hit points 50 to 100% and Normal or better, anywhere, stripping on, so a Poor rifle or one below 50% stays forbidden while food, medicine, drugs and silver are allowed. Your colony gets every item, full ranges, anywhere, stripping off.
- Butchering strips corpses too but stays vanilla under the strip switch: what a butcher strips lands next to the bench, where a burn bill or a dumping stockpile takes it.
- Defaults are global, shared by every save, in their own file in the game's Config folder. Not in mod settings: a mod settings file that fails to load is replaced by fresh settings on the next write, which is how Defaults' users lost theirs. No per-colony layer yet.
@ -207,7 +207,7 @@ Setup, S (half a day): the repo with About.xml, the csproj and the `[StaticConst
- 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.3 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 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.
- **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.
- **Tests:** The menu builder `StorageDefaultsMenu.OptionsFor(parent)` runs on a stockpile, a dumping stockpile, a shelf, a shelf blueprint and two linked shelves.
@ -344,7 +344,7 @@ Per pawn kind:
#### Gear rules for your colony and for enemies
- **Players get:** Two rules on the settings page, "Gear your colony drops" and "Gear enemies drop", each off until you turn it on. When one of the group's pawns goes down or dies, everything the game forbids that matches the rule's filter is allowed again once the fight is over (next feature); what doesn't match stays forbidden, as in vanilla. A rule never forbids a dropped thing the game left allowed. Your colony is colonists, slaves (Ideology), colony mechs (Biotech), colony animals and prisoners, also while they break out; enemies are everyone else hostile to you when they go down or die. Neutral visitors, traders and quest lodgers keep the game's rules, and a line under the rules says so. A downed colonist's main weapon stays forbidden while the colonist lies where it fell, so it picks the weapon up after getting up, as vanilla does; once the colonist is rescued, carried off or dies, the rule decides. Each rule has:
- a filter: Edit opens the vanilla item filter with the hit points and quality sliders stockpiles have and its special filters (tainted, biocoded, rotten, smeltable). The row says what it allows ("all items, hit points 50 to 100%, Normal or better"). Until a filter is saved, by Edit or the suggested setup, the rule's checkbox and its strip switch are disabled and say "Edit the filter or use the suggested setup first". Forget on the row asks first, deletes the filter and turns the rule and its strip switch off;
- a filter: Edit opens the vanilla item filter with the hit points and quality sliders stockpiles have and its special filters (tainted, biocoded, rotten, smeltable). The row says what it allows ("all items, hit points 50 to 100%, Normal or better"). Ticking the rule while it has no filter saves the suggested setup (below) as its filter, strip switch included, and turns it on; a message says so ("Using the suggested setup: ..."). The strip switch stays disabled until the rule has a filter. Forget on the row asks first, deletes the filter and turns the rule and its strip switch off;
- "Where": anywhere (the default) or only inside the home area;
- "Stripping forbids what doesn't match" (see below);
- "Use the suggested setup", which asks first. Enemies: every item, hit points 50 to 100%, Normal or better, anywhere, stripping on, so a Poor rifle or one below 50% stays forbidden while food, medicine, drugs and silver are allowed. Your colony: every item, full ranges, anywhere, stripping off.
@ -369,7 +369,7 @@ Per pawn kind:
- Forced Rearmament (3232549170, 22,494, 1.7) and Where is my weapon? (1539028008, 201,950, no 1.7) make colonists fetch their dropped weapon; the remembered weapon waiting while its owner lies where it fell suits both.
- Allow Tool (761421485, 1,388,637, no 1.7; its changelog lists an option to unforbid the items next to a downed pawn you finish off) and Keyz' Allow Utilities (3524716849, 91,139, 1.7) allow by hand and compose. Pick Up And Haul (1279012058, 1,784,724, no 1.7) hauls what is allowed. Hospitality (753498552, 768,458, no 1.7): guests stay vanilla.
- No Workshop mod found that allows dropped things by quality or condition (searched 2026-11-29).
- The overlap warnings gain this category: KilledEnemyAutoAllowed (Continued) and its 1.0 original (1858219355, 291), Allow Everything, Non uno Pinata and, for the corpse rules, Allow Dead Animals. Package ids are read from each mod's About.xml before shipping.
- 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.
- **Tests:** No hostile pawn on the test map unless a test says so.
@ -662,7 +662,7 @@ Castes owns every humanlike player pawn: colonists, slaves and prisoners, their
- Zone beds are spawned by Zones' `AddCell`, not by a frame, so the build scope (1.2) 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.6) 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.
- 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.
### Blax Slaves