RimWorld mod (1.7) by Blax Gaming. Drag a delivery zone and what you buy from orbital traders lands in it, sorted by item filter and priority: medicine by the hospital, steel by the workshop. Trader caravans camp next to a zone you pick. Needs Harmony. Works with any DLC combination, core only included.
## Features
### Delivery zones
- 📦 **Delivery zone.** "Delivery zone" sits in the Zone menu right after "Growing zone" and is dragged like a stockpile. It draws amber and grows with "Expand zone". Like every zone, it extends the home area 4 cells around itself while auto home area is on. `Source/BlaxZones/Designator_ZoneAdd_Delivery.cs`
- 🔽 **Delivery tab.** A priority from Low to Critical, "Orbital trade lands here" (on), "Caravans camp here" (off) and an item filter that allows every item. Corpses and, with Biotech, Wastepack never land in a zone and are hidden from the filter. "Copy settings" and "Paste settings" move the filter, the priority and both checkboxes to another delivery zone. `Source/BlaxZones/ITab_Delivery.cs`
- 🛰️ **Orbital purchases land in the zone.** Every item bought from an orbital trader, plus the silver from selling, drops into the best matching delivery zone instead of next to the trade beacon. The filter decides what fits, then the highest priority wins, then the oldest zone. Pods use the 400 cells nearest the middle of a zone: the free ones first, from the middle out, then a matching stack. `Source/BlaxZones/DeliveryRouter.cs`
- 👣 **Overflow you can reach.** When every fitting zone is full, pods land next to the top one, on a cell your colonists can reach, within 16 cells (5 to 30). Overflow from a zone your colonists can't reach lands at the vanilla spot, and so does all overflow with "Overflow lands next to the zone" off.
- 🟥 **Unusable cells marked.** While a delivery zone is selected, red outlines mark the cells drop pods can't use: roofed, water, inside an enclosed animal pen, blocked by a building, fogged, or out of your colonists' reach. The inspect pane counts them. `Source/BlaxZones/DeliveryRules.cs`
- 🛡️ **Nothing is lost.** Bought people and animals, raids, colonists you ransom back and lent colonists coming home land as before. With no fitting zone the pod lands at the vanilla spot, and so does it if anything in Blax Zones goes wrong. A mod that moves the vanilla drop spot keeps working as the fallback.
### Caravan camps
- ⛺ **Caravans camp at a zone.** With "Caravans camp here" ticked, visiting trader caravans and, with Royalty, tribute collectors gather within 6 cells of the zone, on open ground they can all reach. Goods bought from them drop at their pack animals' feet, next to the zone. Visitor groups and Hospitality guests pick their own spot. `Source/BlaxZones/CampScope.cs`
- 🤝 **Trading-spot mods win.** Camping stands down, with one log line, while Trading Spot Rewritten, [KV] Trading Spot, [GMT] Trading Spot or Trading Control is active. `Source/BlaxZones/Compat.TradingSpots.cs`
### Save and settings
- 💾 **Save-safe.** Delivery zones are saved with Blax Zones' own map data, never in the game's zone list. Blax Zones can be added to a running save. Unsubscribing leaves a save that loads: the delivery zones are gone, vanilla zones stay, and the log shows two errors per map. `Source/BlaxZones/ZoneStore.cs`
- ⚙️ **Mod settings.** "Delivery zones" (hides the designator; existing zones stay and still receive deliveries), "Route orbital trade", "Overflow lands next to the zone" with its overflow radius, "Caravans may camp at zones", "Reset to defaults".
### For other mods
- 🔌 `BlaxZones.ZonesApi` version 1: `int Version` and `bool TryFindDropSpot(Map map, Thing thing, out IntVec3 cell)`. It returns a cell for one drop pod holding that thing: in a delivery zone, picked by the zones' filters and priorities, their "Orbital trade lands here" checkboxes and the drop pod rules, or next to the top zone when every fitting zone is full and overflow is on. It returns false when no zone fits, always false for a pawn, and never throws. Spawn the pod exactly at the cell (`TradeUtility.SpawnDropPod` or `DropPodUtility.MakeDropPodAt`) and call again for the next thing after spawning, because a falling pod is what marks its cell as taken. Bind it by reflection; members are only ever added, each with a higher `Version`. Blax Slaves binds it for its planned silver payouts.
## Planned
Later releases, in order (details in `docs/design.md`):
- 🎁 **1.1 Quest rewards and caravan purchases.** Item rewards from quests drop into the zone. Goods bought from trader caravans and Hospitality guests appear in the zone, even a roofed one.
- 🐔 **1.2 Animal sleeping zones.** Every cell is a sleeping spot, with species and body-size filters, so big stalls stay free of chickens. A button in the mod settings strips Blax Zones from a save first, for a removal with no errors.
- 🗄️ **1.3 Storage, roofs and selling.** Stockpiles, shelves, racks and fridges receive deliveries directly, also under a roof. Orbital traders buy from flagged storage (needs a powered trade beacon). Random cargo pod events land in a zone you pick. All optional, off by default.
- 🛏️ **1.4 People sleeping zones.** Dorms and prisons for colonists, slaves (needs Ideology) and prisoners, one cell per sleeper. Medical and shared zones.
- 🏷️ **1.5 Castes.** With Blax Castes, people sleeping zones can be limited by caste.
- 🧹 **1.6 Work rule areas.** Paint named areas over anything, stockpiles and fields included, and tick rules per area: No cleaning, No firefighting, No repairs, Don't haul from here, Clean first, Haul first. A barn nobody cleans still gets its fires fought, and a hospital is cleaned first. Work rules never change work priorities or allowed areas, and right-click orders work in every area.
## DLC support
Blax Zones works with any combination of DLCs, core only included, and lists none as a dependency. Nothing in 1.0 needs a DLC.
- **Royalty** adds tribute collectors, who camp at the zone like trader caravans.
- **Biotech** adds Wastepack, which never lands in a zone and is hidden from the filter.
- **Ideology**, **Anomaly** and **Odyssey**: 1.0 uses none of their content. Slave sleeping zones (planned for 1.4) will need Ideology.
- **A save made with a DLC** loads without it. Delivery zone filters drop the missing items, with the same "Could not load reference" error per missing def that vanilla stockpile filters log, and the zone keeps working.
## Compatibility
- ✔️ Hospitality guests pick their own spot and never camp at the zone.
- ✔️ Trading Spot Rewritten, [KV] Trading Spot, [GMT] Trading Spot and Trading Control: while one is active, caravan camps stand down and leave caravans to it.
- ✔️ A mod that moves vanilla's trade drop spot stays the fallback: a fitting zone wins, everything else lands at that mod's spot.
- ✔️ The `-Compat` test run loads Hospitality, Pick Up And Haul, Haul to Stack, RimFridge, Weapon Racks, Prison Labor, Prisoner Realism, Replace Stuff, Vanilla Expanded Framework, Vanilla Furniture Expanded with its Medical Module, Dubs Skylights, Vanilla Events Expanded, Blax Castes, Blax Defaults and Blax Slaves, and every test passes. Prison Labor logs one error of its own when a test makes a prisoner.
- ♻️ Replaces the orbital trade part of Trade Ships Drop Spot, the orbital trade and caravan spot parts of Trading Control, and [KV] Trading Spot and [GMT] Trading Spot. The quest reward part of Trade Ships Drop Spot and Trading Control follows in 1.1.
- ❌ Multiplayer: not supported.
Load order: Harmony, Blax Castes, Blax Zones, Blax Slaves. No Blax mod needs another.
## Development
The repo is the mod folder. Link it into the game with a directory junction, run from the repo root (adjust the RimWorld path):
Build (needs the .NET 10 SDK; output goes to `1.7/Assemblies/BlaxZones.dll`). `RimWorldDir` and `HarmonyDir` in the csproj point at the Steam install and the Harmony mod; override them with `-p:RimWorldDir=...` elsewhere.
`Tests/run-tests.ps1` builds the mod and the test mod in `Tests/BlaxZonesTests`, starts RimWorld headless with its own save data folder in `%TEMP%\BlaxZonesTest`, runs the suite, saves and reloads, then loads the save with the mod's map data removed. Your mod list, saves and settings stay untouched. It needs Steam running. The script's header lists every switch.
```powershell
.\Tests\run-tests.ps1 # every installed DLC
.\Tests\run-tests.ps1 -NoDlc # core only
.\Tests\run-tests.ps1 -Dlc Royalty # only the DLCs named
.\Tests\run-tests.ps1 -Compat # next to the mods listed under Compatibility
```
Things only a real game can show are in `docs/ingame-check.md`. Design and roadmap: `docs/design.md`.
### Workshop upload
`Tools/workshop-upload.ps1` creates and updates the Workshop item from the command line. A small tool (`Tools/WorkshopUpload`) uses the Steamworks.NET build and `steam_api64.dll` that ship with RimWorld and attaches to the running, logged-in Steam client as RimWorld, so it needs no password, no game window and no dev mode.
```powershell
.\Tools\workshop-upload.ps1 # dry run: build, stage, check the Steam login and the item
.\Tools\workshop-upload.ps1 -Check # release check: every -Publish gate, then the list of problems
.\Tools\workshop-upload.ps1 -Publish -DescriptionFile docs\workshop-description.txt # upload and replace the description
```
The dry run and `-Check` upload nothing. The script stages only what players need (About, 1.7, Patches, Languages) in `%TEMP%`, sets the tags the game would (Mod plus the supported versions), the title from About.xml and the preview from `About/Preview.png`. The change note is every CHANGELOG.md entry newer than the version in `Tools/workshop-published.txt`.
The first `-Publish` creates the item and writes its id to `About/PublishedFileId.txt` before the content upload, so a failed upload is retried as an update and never makes a second item. After a successful upload it writes `Tools/workshop-published.txt`. Commit both files.
`-Publish` refuses unless:
- the shipped files are committed and pushed, and the top CHANGELOG.md entry matches `modVersion` in About.xml;
- two `Tests/run-tests.ps1` runs passed after the last build, one with every installed DLC and one with `-NoDlc` (`BlaxZonesTestResults.all.txt` and `BlaxZonesTestResults.nodlc.txt` in `%TEMP%\BlaxZonesTest`);
-`About/Preview.png` is under 1 MB;
- the description fits Steam's 8000-byte limit, every forgejo.blax.at link in it opens without a login, and every `[img]` host sends an `Access-Control-Allow-Origin` header. Steam loads description images cross-origin and shows a broken image otherwise. Forgejo's raw URLs send no such header, so the images are served from `cdn.blax.at/blax-gaming/zones/`, which does.
The Workshop page is `docs/workshop-description.txt` (Steam BBCode). Its art is rendered from `Source/Art` (see `Source/Art/README.md`), and `docs/workshop-media.md` lists the in-game clips worth recording. `-DescriptionOnly -DescriptionFile docs\workshop-description.txt` replaces just the text, with no build, no content upload and no change note.
The in-game route still works: `Tools/workshop-stage.ps1` swaps the junction for a clean copy, upload from Mods > Blax Zones > Advanced... > Upload to Steam Workshop (dev mode), then `Tools/workshop-stage.ps1 -Done` copies `About/PublishedFileId.txt` back into the repo and restores the junction.
[](https://www.blax.at)
🛠️ **Blax Gaming** is a project of **[Blax Software](https://www.blax.at)**, an Austrian software practice. We write Austrian-quality code in many fields: web platforms, mobile apps, backends, infrastructure, and the mods we play in our own colonies. Need something built? 👉 [www.blax.at](https://www.blax.at)