139 lines
16 KiB
Markdown
139 lines
16 KiB
Markdown
|
|
# Blax Zones feature plan
|
||
|
|
|
||
|
|
Blax Zones decides where things arrive, where animals and people sleep, and how colonists treat a place. Complete, it routes every friendly arrival (trade, quest rewards, cargo, aid) into zones and storage you pick, beds a whole barn, dorm or prison with one drag, and lets you paint areas where nobody cleans, everything is hauled first or pawns walk around. Every part has its own toggle, works with any DLC combination and leaves a loadable save when you unsubscribe.
|
||
|
|
|
||
|
|
Status: 1.0 (delivery zones, caravan camps) and 1.1 (quest rewards, caravan purchases) are on the Workshop as item 3848261160. Everything else below is designed or proposed, with no code yet.
|
||
|
|
|
||
|
|
Planned 2026-12-01. This file says what the mod covers, grouped by what belongs together, and in which order it gets built. How each feature works is in [design.md](design.md).
|
||
|
|
|
||
|
|
Status values:
|
||
|
|
|
||
|
|
- **Shipped x.y**: on the Workshop.
|
||
|
|
- **Designed**: specified in design.md and checked against the RimWorld 1.7.5021 code.
|
||
|
|
- **New**: proposed in this plan. Not checked against the code unless the line says so.
|
||
|
|
- **Idea**: kept on the list; it waits for player demand or for content that uses it.
|
||
|
|
|
||
|
|
## Scope
|
||
|
|
|
||
|
|
Zones covers three things:
|
||
|
|
|
||
|
|
- every friendly drop location: where bought goods, quest rewards, cargo and friendly aid land, and where trader caravans camp;
|
||
|
|
- sleeping spots and beds by zone, for animals and people;
|
||
|
|
- per-cell work rules (work rule areas).
|
||
|
|
|
||
|
|
What it leaves to the other Blax mods:
|
||
|
|
|
||
|
|
- **Blax Castes**: every per-pawn setting, including work priorities and the allowed area. Work rule areas apply to everyone on a cell and never change a pawn.
|
||
|
|
- **Blax Defaults**: starting settings of vanilla stockpiles, growing zones, storage, bills, animals and mechs, and what gets forbidden when pawns go down, die or are stripped. A new stockpile starts unflagged for deliveries; Zones' flags live in Zones.
|
||
|
|
- **Blax Slaves**: slave status, trade, prices and how much a payout is. Zones only hands Slaves a cell for its silver pods.
|
||
|
|
- **Blax Laws** (designed, not built): the lawbook, arrests, jail, court places and courtrooms. Laws' jail takes any prisoner bed, so prisoner sleeping zones serve it with no code on either side. Court places and courtrooms are Laws' own, stored by ThingID; Zones adds no jail, court or courtroom zone.
|
||
|
|
|
||
|
|
Pawns are never routed into zones. Bought people and animals, refugees, quest pawns, ransomed and lent colonists arrive as in vanilla.
|
||
|
|
|
||
|
|
## Arrivals: deliveries and caravan camps
|
||
|
|
|
||
|
|
Vanilla drops everything next to the first trade beacon, quest rewards included, and caravans camp at a random spot outside the base. The mods that fixed this (Trade Ships Drop Spot 206k, Trading Control 111k, the Trading Spot mods) are dead or stop at 1.6. Zones makes a delivery zone the landing pad and the meeting point, then extends it to storage and to every other friendly source.
|
||
|
|
|
||
|
|
1. **Delivery zones and caravan camps**: Shipped 1.0.
|
||
|
|
- Delivery zone with item filter, priority, source checkboxes and unusable cells marked red. Shipped 1.0 ([spec](design.md#delivery-zone)).
|
||
|
|
- Orbital purchases and sale silver land in the best zone, overflow next to it. Shipped 1.0 ([spec](design.md#orbital-purchases-land-in-the-zone)).
|
||
|
|
- Trader caravans and tribute collectors camp next to a zone you pick. Shipped 1.0 ([spec](design.md#trader-caravans-camp-at-a-zone)).
|
||
|
|
2. **Quest rewards and caravan purchases**: Shipped 1.1.
|
||
|
|
- Item rewards land in the zone and the letter points there. Shipped 1.1 ([spec](design.md#quest-rewards-land-in-the-zone)).
|
||
|
|
- Goods bought from caravans and Hospitality guests appear in the zone, roofed or not. Shipped 1.1 ([spec](design.md#caravan-purchases-appear-in-the-zone)).
|
||
|
|
3. **Storage as a delivery target**: Designed. These three share one flag set in the map component, one storage-group rule and one gizmo family. Most freezers and hospital shelves are roofed, so the delivery flag is worth little without delivery under a roof.
|
||
|
|
- A "Receive deliveries" gizmo on stockpiles, shelves, racks and fridges: medicine straight onto the hospital shelf, by the shelf's own filter and priority. Designed ([spec](design.md#stockpiles-and-shelves-receive-deliveries)).
|
||
|
|
- Delivery under a roof: goods appear in place, no drop pod, off by default. Designed ([spec](design.md#delivery-under-a-roof)).
|
||
|
|
- Sell zone: orbital traders buy from flagged storage and take payment from it while a powered beacon stands, off by default. Designed ([spec](design.md#sell-zone)).
|
||
|
|
4. **More arrival sources**: independent of step 3, it needs only the reward routing from 1.1.
|
||
|
|
- Random cargo pod events land in a zone with "Cargo pods" ticked, off by default. Designed ([spec](design.md#cargo-pod-events-land-in-the-zone)).
|
||
|
|
- Vanilla Events Expanded's apparel and weapon pods join the cargo pods. Idea ([backlog](design.md#backlog)). Needs that mod.
|
||
|
|
- Ally reinforcements and aid drop next to a chosen zone, never hostile drops. Idea; Allies Spot (2067847359, 3,678 subs) shows small demand.
|
||
|
|
- Returning player caravans unload into a delivery zone. Idea; UnloadHere (522) and Homecoming (207) show small demand.
|
||
|
|
- Royal title rewards land in the zone. Idea, waits for content: no vanilla title and no mod in the active list defines title rewards. Needs Royalty.
|
||
|
|
5. **Polish and small extensions**: each stands alone.
|
||
|
|
- Unusable cells counted by reason in the inspect pane (roof, water, pen, building). Idea.
|
||
|
|
- Fewer drop pods by batching stacks. Idea; the only such mod has 1.8k subscribers and nobody asked.
|
||
|
|
- "Visitors gather here" next to "Caravans camp here", for visitor groups. New, Idea. Smarter Visitors (3012491521, 137,980 subs, alive on 1.7) has a visitor spot building, so this would stand down while it is active. Hook: visitor groups already call the patched `TryFindRandomSpotJustOutsideColony` overload (design, "Trader caravans camp at a zone"); a second scope on `IncidentWorker_VisitorGroup.CreateLordJob`. Not checked against the code.
|
||
|
|
|
||
|
|
Why this order: 1.0 built the zone, the router and the API that everything else calls; 1.1 added the delivery context the reward, cargo and aid paths share. Storage targets come before more sources because they change where every existing source can land.
|
||
|
|
|
||
|
|
## Work rule areas
|
||
|
|
|
||
|
|
The home area switches cleaning, firefighting and repairs on and off together, an allowed area restricts a pawn for every job, and nothing orders work by place. CleaningArea (114k, last 1.4) and Cleaning Area Relaunched (23k, 1.6 only) were the usual fix, and neither runs on 1.7. Fabian asked for "No cleaning" and "Priority zones" on 2026-11-29. Work rule areas are one painted layer of named areas that lie over anything, up to 10 per map, each with rule checkboxes.
|
||
|
|
|
||
|
|
1. **Areas and the six rules**: Designed. One step: Fabian's request covers both kinds of rule, and they share the layer, the mask and the manage window.
|
||
|
|
- Paint, name and manage work rule areas over stockpiles, fields and other zones. Designed ([spec](design.md#paint-and-manage-work-rule-areas)).
|
||
|
|
- "No cleaning", "No firefighting", "No repairs", "Don't haul from here". Right-click orders still work everywhere. Designed ([spec](design.md#no-cleaning-firefighting-repairs-or-hauling)).
|
||
|
|
- "Clean first" and "Haul first", within the pawn's own work priorities and allowed area. Designed ([spec](design.md#clean-first-and-haul-first)).
|
||
|
|
2. **Home-area work outside the home area**: New. Three inverse rules, "Clean here", "Repair here" and "Fight fires here", for a field, a mine entrance or an outpost wall outside the home area, without growing the home area, which would also forbid what pawns drop there and auto-rebuild. The backlog had "Clean here" alone; repairs and firefighting sit behind the same home checks (design: WorkGiver_Repair.cs:35, WorkGiver_FightFires.cs:55, WorkGiver_FixBrokenDownBuilding.cs:56). Demand is thin so far: vanilla ignores fires outside the home area (RimWorld wiki, Firefighting), and a small mod, Repair Outside the Home Area, exists for repairs (subscriber count not read). Hook: a postfix can't tell why vanilla said no, so this likely needs a transpiler on the home check in each `HasJobOnThing`, plus the cleaning job driver's home jumps (JobDriver_CleanFilth.cs:31, 70). Not checked against the code. It comes after step 1 because it adds bits to the same mask and rows to the same window.
|
||
|
|
3. **Path rules**: New. "Walk around" per area, so pawns path around a killbox, a nursery or a freezer door unless there is no other way. It never blocks a path; the allowed area stays the hard limit. Demand: [KV] Path Avoid (1180719857, 44,501 subs) stopped at 1.5; Pathfinding Avoidance (1.6) does it by treating allowed areas with fixed names as costly, so those names also show up in every allowed-area picker. Hook: 1.7 builds path costs in `PathFinderMapData` from `IPathFinderDataSource` sources (both names are in the 1.7.5021 reference assembly), so a source fed from the area mask. Behaviour not checked against the code. Needs the ownership change in the open questions.
|
||
|
|
4. **More rules, each waiting for demand**: Ideas ([backlog](design.md#backlog)).
|
||
|
|
- "Build first": frame order has build-order effects, and Smarter Construction (1M subs, 1.7) already reorders construction.
|
||
|
|
- "Plant work first": growing zones already split fields, and Growing Zone Priorities (Continued) ranks them.
|
||
|
|
- "Don't haul from here" with an item filter, for example leave weapons, haul corpses.
|
||
|
|
- "No auto-rebuild", for killbox barricades the player wants left broken.
|
||
|
|
- Hide the "Fire in home area" alert for fires in "No firefighting" areas.
|
||
|
|
|
||
|
|
## Sleeping zones
|
||
|
|
|
||
|
|
Animal sleeping spots and dorm sleeping spots are placed one at a time. Designator Shapes and BuilderTweaksReplica help place them in bulk, and the spots then clutter the map (Hidden Spots exists for that). A zone whose every cell is a bed does both jobs. The beds are real but invisible, so ownership, prisoner capture, patients and the bed alerts keep working with vanilla code.
|
||
|
|
|
||
|
|
1. **Animals**: Designed. Zone beds are built on the simplest sleepers first: no owner types, no prison rules.
|
||
|
|
- Animal sleeping zone: one drag over the barn beds every chicken. Designed ([spec](design.md#animal-sleeping-zones)).
|
||
|
|
- Species checkboxes and a body-size range, so big stalls stay free of chickens. Designed ([spec](design.md#which-animals-may-sleep-here)).
|
||
|
|
- Needs the removal button (Zone tools) at the latest here, because zone beds make a plain unsubscribe noisy.
|
||
|
|
2. **People**: Designed. The same zone beds with an owner type.
|
||
|
|
- Sleeping zones for colonists, slaves (Ideology) and prisoners; a prisoner zone makes its room a prison cell, and vanilla beds are never flipped without asking. Designed ([spec](design.md#sleeping-zones-for-colonists-slaves-and-prisoners)).
|
||
|
|
- Medical zones (people and animals), shared zones where nobody keeps a cell, sleeping-spot comfort. Designed ([spec](design.md#medical-shared-and-comfort)).
|
||
|
|
- Zone tint by type and claimed and free counts in the inspect pane. Designed ([spec](design.md#visible-zone-state)).
|
||
|
|
3. **By caste**: Designed. With Blax Castes, a people zone can be limited to castes, medical zones included. Needs Castes' read-only API (CastesApi version 1) ([spec](design.md#sleeping-zones-by-caste)).
|
||
|
|
4. **Ideas**:
|
||
|
|
- Age limits on people zones, for example a nursery. Needs Biotech. Nobody asked yet.
|
||
|
|
- Animals sleep on a stockpile, so the barn's hay stockpile is also the sleeping area. Zone beds can't overlap zones today; two zones in one barn work.
|
||
|
|
|
||
|
|
Why this order: people zones reuse the animal zone beds and add owner types; the caste filter is one more check in the same bed postfix and waits for Castes' API, so it can move up as soon as Castes ships that.
|
||
|
|
|
||
|
|
## Zone tools and removal
|
||
|
|
|
||
|
|
What every zone, bed and area needs: a save that survives removing the mod, and setup that doesn't repeat.
|
||
|
|
|
||
|
|
- Save-safe zone storage: zones live in Zones' own map data, never in the game's zone list. Shipped 1.0 ([spec](design.md#save-safe-zone-storage)).
|
||
|
|
- "Remove Blax Zones from this game" button: strips zone beds, work rule jobs and areas, so the save loads with no errors after unsubscribing. Designed ([spec](design.md#remove-blax-zones-from-a-game)). Ships with whichever of work rule areas or animal sleeping zones comes first.
|
||
|
|
- "Make default" for new delivery and sleeping zones, kept in Zones' own file, as Blax Defaults does for vanilla zones. Idea.
|
||
|
|
- Blax zones and work rule areas fly with Odyssey gravships. Idea; Odyssey isn't on the test machine, so it can't be built or tested yet.
|
||
|
|
- A full removal test that relaunches the game without Zones. Idea, test-only.
|
||
|
|
|
||
|
|
## For other mods
|
||
|
|
|
||
|
|
- `ZonesApi` version 1, `TryFindDropSpot`: a cell for one drop pod in or next to a delivery zone. Shipped 1.0. Blax Slaves binds it for its silver payouts.
|
||
|
|
- Whether API drops follow the global "Route orbital trade" switch: open question below.
|
||
|
|
- A member for sleeping zones, added once a sibling needs one. Idea.
|
||
|
|
|
||
|
|
## Order
|
||
|
|
|
||
|
|
1. **Work rule areas, step 1, with the removal button.** Fabian's own request, no cleaning-area mod runs on 1.7, and it needs only the shipped map component. The removal button ships here because the two work givers leave one error per job after a plain unsubscribe.
|
||
|
|
2. **Sleeping zones, animals then people.** Zone beds are the base both share; people add owner types and the prison rules on top.
|
||
|
|
3. **Arrivals, storage as a delivery target, then cargo pods.** They extend paths that already work, so they matter less than the missing features above.
|
||
|
|
4. **Sleeping zones by caste** as soon as Castes ships its read-only API. It can jump ahead of step 3.
|
||
|
|
5. **The new steps** (home-area work outside the home area, path rules) and the ideas, as players ask.
|
||
|
|
|
||
|
|
## Left out
|
||
|
|
|
||
|
|
The reasons are in design.md's [Cut](design.md#cut). In short:
|
||
|
|
|
||
|
|
- pack animals walking purchases to the zone, roof-punching pods, and patching the vanilla trade drop spot globally, which would let raiders drop into the zone;
|
||
|
|
- sleeping zones without beds, and people and animals in one zone;
|
||
|
|
- work rules as vanilla zones or areas, one layer per rule, "first" rules for firefighting, repairs, doctors or wardens (Repairing Priority, 2,188 subs on 1.7, covers repair order for those who want it), and blocking right-click orders;
|
||
|
|
- routing ransom returns, lent colonists, quest pawns, wastepacks and royal permit drops;
|
||
|
|
- Trading Control's marketplace stall and per-cell spot graphics, which need art;
|
||
|
|
- anything Castes, Defaults, Slaves or Laws owns (see Scope);
|
||
|
|
- multiplayer, until a 1.7 build of the Multiplayer mod exists to test against.
|
||
|
|
|
||
|
|
## Open questions for Fabian
|
||
|
|
|
||
|
|
1. **Work rule areas before sleeping zones?** On 2026-11-30 animal sleeping zones stayed first and work rule areas moved up to second. Grouped by area, sleeping zones are now one chunk with people and castes, which would push work rule areas behind all of it. Recommendation: build work rule areas first, with the removal button.
|
||
|
|
2. **Do other mods' drops follow "Route orbital trade"?** Today `ZonesApi.TryFindDropSpot` follows each zone's orbital checkbox but ignores the global switch (`ZonesApi.cs` calls the router directly; only `DeliveryRouter.Orbital.cs:23` reads `routeOrbital`). Recommendation: follow it. One switch then means "orbital pods go to zones", and its tooltip names Blax Slaves' payouts while Slaves is active.
|
||
|
|
3. **Path rules widen Zones' ownership line** from "per-cell work rules" to "per-cell work and path rules", in all five docs. No sibling owns pathing, and Castes' allowed area stays the hard limit. Recommendation: yes, and build it after the home-area rules.
|
||
|
|
4. **Bought animals land in a zone**, for example outside the pen gate. It needs the shared rule "pawns are never routed into zones" narrowed to people. Recommendation: no for now; nobody asked, and that rule is what keeps refugees and raiders out of delivery zones.
|