Go to file
Timothy c426ca7b57 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).
2026-12-01 17:20:01 +01:00
1.7/Assemblies feat: Blax Defaults 1.1: forbid rules 2026-11-30 22:33:42 +01:00
About feat: Blax Defaults 1.1: forbid rules 2026-11-30 22:33:42 +01:00
Languages/English/Keyed feat: Blax Defaults 1.1: forbid rules 2026-11-30 22:33:42 +01:00
Source feat: Blax Defaults 1.1: forbid rules 2026-11-30 22:33:42 +01:00
Tests feat: Blax Defaults 1.1: forbid rules 2026-11-30 22:33:42 +01:00
Tools chore: 1.1.0 published to the Workshop 2026-11-30 22:34:43 +01:00
docs docs: plan Blax Defaults by area 2026-12-01 17:20:01 +01:00
.gitignore feat: Workshop page and art 2026-11-29 20:49:48 +01:00
CHANGELOG.md feat: Blax Defaults 1.1: forbid rules 2026-11-30 22:33:42 +01:00
README.md docs: plan Blax Defaults by area 2026-12-01 17:20:01 +01:00

README.md

Blax Defaults

Blax Defaults

RimWorld 1.7 Steam Workshop Needs Harmony Any DLC combination Status: 1.1

RimWorld mod (1.7) from Blax Gaming: your own starting settings for new stockpiles, shelves and bills, and rules for what stays forbidden when pawns go down, die or are stripped. Set up one shelf, click "Make default for new shelves", and every new shelf starts like it. Nothing changes until you save a default or turn a rule on, the things you already have keep their settings, and nothing goes into your save, so the mod can be added to or removed from a running colony. Needs Harmony. Works with any DLC combination, core only included. Colonists, slaves and prisoners are Blax Castes' job; Blax Defaults never changes a pawn.

Features

Storage

  • 📦 New stockpiles start from your default. Drag a stockpile or a dumping stockpile and it gets the filter and priority you saved for that type. A modded stockpile designator that subclasses the vanilla one shows up as a type of its own; its default applies only when the designator runs the vanilla zone maker, which no test covers with a real mod yet. An Expand drag that grows a zone leaves its filter alone. Source/BlaxDefaults/StockpileHooks.cs
  • 🗄️ New storage buildings start from your default. Shelves, small shelves, bookcases and hoppers, and modded storage with a storage blueprint such as the racks from Weapon Racks, get your default from the moment the blueprint is placed. Changes you make on the blueprint still win. A shelf or hopper that auto-rebuild puts back keeps its old settings; a rebuilt bookcase starts from your default. Ruins, map generation, trader stock and things spawned without a blueprint keep the game's settings, and a default never makes a building take items it can't hold. Source/BlaxDefaults/StorageBuildingHooks.cs
  • 🔘 "Defaults" button in the storage tab of stockpiles and covered storage buildings, or a small icon where the tab has no priority button: "Make default for new shelves", "Load your default", "Load the game's default" and "Forget the default for new shelves", which asks first. On a stockpile each entry opens a menu of stockpile types. On linked shelves it reads and writes the group's settings. The tooltip says whether new ones start from your default. Source/BlaxDefaults/StorageTabButton.cs, StorageDefaultsMenu.cs
  • 🧹 Quick setup. The settings page button "New shelves start empty at Normal" lists every covered storage building with a checkbox. General-purpose shelves are ticked; hoppers, bookcases and storage limited to one kind of item start unticked, and kinds that already have a default are marked and start unticked. Confirming saves an empty default at Normal for each ticked kind, one that also refuses items mods add later. Source/BlaxDefaults/QuickSetup.cs
  • A storage default stores every item it allows and every item it refuses, plus a rule for items it lists in neither: follow the game's default (what "Make default" saves), refuse them or allow them. Source/BlaxDefaults/StorageTemplate.cs

Bills

  • 📜 Values for every new bill: repeat mode, count, target, pause when satisfied and resume at, ingredient radius, allowed skill range, where products go (best stockpile or drop on floor), count equipped, count tainted, and the hit points and quality ranges used for counting. Each value starts at "Game's default", and only values you change are applied. "Do until you have X" falls back to "do X times" where the bill can't count its products. Source/BlaxDefaults/BillDefaults.cs
  • 🩺 Surgery, mech gestation, mech resurrection and forming bills, pasted bills and loaded bills are never touched.

Forbid rules

A "Forbid rules" section on the settings page. Every rule ships off. Source/BlaxDefaults/ForbidRules.cs, ForbidHooks.cs, ForbidRulesSection.cs

  • 🛡️ Gear rules for your colony and for enemies. When one of the group's pawns goes down or dies, what the game forbids is allowed again if it matches the rule's filter: the vanilla item filter with the hit points and quality ranges stockpiles have and the special filters (tainted, biocoded, rotten, smeltable). What doesn't match stays forbidden, and a rule never forbids a dropped thing the game left allowed. Your colony is colonists, slaves, colony mechs, colony animals and prisoners, also while they break out or rebel; enemies are everyone else hostile to you. Neutral visitors, traders and quest lodgers keep the game's rules.
  • Each rule has Edit, Forget (asks first, turns the rule off), "Where" (anywhere, or only inside the home area) and "Use the suggested setup" (asks first). Ticking a rule that has no filter yet saves its suggested setup. Enemies: every item, but hit points 50 to 100% and Normal or better, stripping on, so a Poor rifle or one below 50% stays forbidden while food, medicine, drugs and silver are allowed. Your colony: every item, any hit points and quality, stripping off.
  • ⚔️ Once the fight is over. What a rule allows waits while an enemy that can still fight is on the map. Changing a waiting thing's flag yourself takes it off the list; a save and reload forgets the list, so things still waiting stay forbidden.
  • 🔫 A downed colonist's own weapon stays forbidden while the colonist lies where it fell, so it picks the weapon up after getting up, as in vanilla. Once the colonist is rescued, carried off or dies, the rule decides.
  • 👕 Stripping forbids what doesn't match, a switch per rule: stripping one of the group's pawns or corpses forbids each dropped thing the filter refuses. This is how the rules reach apparel. Butchering strips too, but what a butcher strips stays allowed.
  • 🦴 Corpses outside the home area stay allowed, with one switch each for animals (manhunters and predators included), enemies and everyone else. They wait for the fight to end too.
  • Not reached: trading a pawn away, capturing it, and anything other mods forbid after the game's own drop.

Your defaults stay

  • 📁 One file for every save. Defaults live in Config/BlaxDefaults/Defaults.xml in the game's save data folder, shared by every save, never in a save or in the mod settings. Every write goes to a temporary file first, is read back and checked, and only then replaces the file, with the previous version kept as Defaults.xml.bak. A file that fails to load is kept as a broken copy under its own name and never rotated into the backup; the backup loads instead, and the settings page says so. A file from a newer version is read but never overwritten. Source/BlaxDefaults/DefaultsFile.cs
  • 🔌 Removed a mod? Names from a mod or DLC that is not active stay in the file, are skipped and counted on the settings page, and work again when the mod comes back.
  • 📋 Settings page (Mod settings > Blax Defaults): the master switch "Apply saved defaults to new things", a status line, and the sections Stockpiles, Storage buildings, Every new bill and Forbid rules, each with its own switch. Every saved default has a row saying what it sets, with Edit and Forget; Forget asks first. Edit opens the item filter with the priority and the rule for unlisted items. It all works from the main menu. Source/BlaxDefaults/SettingsPage.cs
  • ⚠️ Overlap warnings. The settings page names active mods that do some of the same things, and the first game loaded in a session opens a window listing them, with "Don't remind me" per mod. Source/BlaxDefaults/OverlapWarnings.cs

Planned

Not built yet. The plan by area and its order are in docs/features.md, the specs in docs/design.md.

  • 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

Blax Defaults works with any combination of DLCs, core only included, and lists none as a dependency. No feature needs a DLC. The forbid rules count slaves (Ideology) and colony mechs (Biotech) with your colony when that DLC is loaded; mechs destroy their weapon instead of dropping it in any DLC set.

  • The defaults file is shared by every DLC set. A DLC item inside a default, such as wastepack in a dumping stockpile default saved with Biotech, is skipped while that DLC is off, counted with the names from inactive mods, and works again when the DLC is back.
  • A save made with a DLC loads without it: Blax Defaults keeps nothing in the save, and the vanilla fields it wrote are the game's to load.
  • Not covered: Anomaly's corpse stockpile, Odyssey's fishing zones and gravship stockpiles. They keep the game's settings.

Compatibility

Replaces, so you can unsubscribe them (the settings page names them while they are active):

  • ♻️ [FSF] No Default Shelf Storage: the quick setup empties new shelves per kind and leaves hoppers and single-purpose storage alone.
  • ♻️ Default Ingredient Radius and Default Bill Ingredient Radius: "Ingredient radius" under Every new bill.
  • ♻️ KilledEnemyAutoAllowed (Continued): both gear rules with every item, anywhere, and the corpse switches on. Neutral pawns' drops stay vanilla.
  • ♻️ Allow Dead Animals: the animal corpse switch.
  • ♻️ Allow Everything, for what pawns drop when they go down or die: both gear rules with every item. Everything else keeps the flag the player or the game gave it.

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, 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.

Works next to:

  • ✔️ Weapon Racks: its racks get defaults like shelves; the quick setup leaves them unticked.
  • ✔️ RimFridge (no 1.7 build yet, loads its 1.6 files): its fridges are covered storage kinds. The quick setup leaves them unticked, because RimFridge makes fridges act as hoppers.
  • ✔️ Replace Stuff: replacing a shelf's material keeps its settings.
  • ✔️ Preset Filtered Zones: its zones keep their preset filters and show no Defaults button.
  • ✔️ Hospitality: guests keep the game's rules, and with its option to keep friendly pawns' gear on them a downed visitor drops nothing. Hospitality drops a downed pawn's weapon without remembering it, so with Hospitality a downed colonist doesn't go back for its weapon and the colony rule decides it once the fight is over.
  • ✔️ Pick Up And Haul: what a forbid rule allows gets hauled like anything else.
  • 🧩 Other Blax mods: Blax Castes handles colonists, slaves and prisoners. Blax Slaves and Blax Zones don't overlap with Blax Defaults; Zones' delivery zones keep their own tab and get no Defaults button. Load order between them doesn't matter.
  • ❌ Multiplayer: not supported yet (the defaults file differs per player).

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):

New-Item -ItemType Junction -Path "E:\SteamLibrary\steamapps\common\RimWorld\Mods\BlaxDefaults" -Target (Get-Location).Path

Build (needs the .NET 10 SDK; output goes to 1.7/Assemblies/BlaxDefaults.dll):

dotnet build Source\BlaxDefaults\BlaxDefaults.csproj -c Release

RimWorldDir and HarmonyDir in the csproj point at the Steam install and the Harmony mod; override them with -p:RimWorldDir=... elsewhere.

Tests

Tests/BlaxDefaultsTests is a separate test mod. Tests/run-tests.ps1 builds both projects and starts RimWorld headless with its own save data folder in %TEMP%\BlaxDefaultsTest, so your mod list, saves, settings and defaults file stay untouched. Every run starts with an empty defaults library. The suite saves and reloads the game, checks that the save holds nothing of Blax Defaults, writes BlaxDefaultsTestResults.txt and quits. It needs Steam running.

.\Tests\run-tests.ps1
.\Tests\run-tests.ps1 -NoDlc
.\Tests\run-tests.ps1 -Dlc Royalty,Biotech
.\Tests\run-tests.ps1 -Compat

A release runs all 8 combinations of Royalty, Ideology and Biotech. Each run also leaves a copy of the results per DLC set next to the results file: BlaxDefaultsTestResults.all.txt (every installed DLC), .nodlc.txt or .dlc-<names>.txt. The Workshop upload checks the all and nodlc copies. -Compat also loads the installed mods Blax Defaults is tested next to (the list is at the top of run-tests.ps1). Exit code 0 means all passed, 1 failures or errors the mod logged between tests, 2 the run didn't finish.

Workshop art

Source/Art/ renders the preview, the mod icon and the Workshop section headers; Source/Art/README.md has the commands. The Workshop description is docs/workshop-description.txt (Steam BBCode), and docs/workshop-media.md lists the in-game clips worth recording.

Workshop upload

Tools/workshop-upload.ps1 creates or 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. Name, package id, version and supported versions come from About/About.xml.

.\Tools\workshop-upload.ps1                                              # dry run: build, stage, check the Steam login and ownership
.\Tools\workshop-upload.ps1 -Check                                       # release check: lists everything -Publish would refuse
.\Tools\workshop-upload.ps1 -Publish                                     # upload
.\Tools\workshop-upload.ps1 -Publish -DescriptionFile docs\workshop-description.txt   # also replace the description

Without About/PublishedFileId.txt, -Publish creates a new item. It writes the new id to About/PublishedFileId.txt right away, 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. A new item needs a description: until something has been published from here, the script takes docs/workshop-description.txt by default. -Visibility public|friends|private|unlisted sets who sees the item; left out, an existing item keeps its visibility and a new item is created Public (Steam's own default for a new item is Private). The Workshop item is 3848261264.

It stages only what players need (About, 1.7, Defs, Patches, Languages, Textures, Sounds) in %TEMP%, sets the tags the game would (Mod plus the supported versions), and writes every CHANGELOG.md entry since the version in Tools/workshop-published.txt as the change note. The title is About.xml's name and the preview is About/Preview.png, set on every upload like the in-game uploader does. -Publish refuses unless the shipped files are committed and pushed, the top CHANGELOG entry matches modVersion, About/Preview.png is under 1 MB, and two test runs passed after the last build: one with every installed DLC and one with -NoDlc (the all and nodlc result copies, see Tests). -Check runs every -Publish check and the dry run and lists each problem; exit code 0 means none. The in-game route still works: Tools/workshop-stage.ps1 swaps the junction for a clean copy, upload from Mods > Blax Defaults > Advanced... > Upload to Steam Workshop (dev mode), then workshop-stage.ps1 -Done copies About/PublishedFileId.txt back into the repo.

The Workshop description is docs/workshop-description.txt (Steam BBCode, at most 8000 bytes). Once something was published from here, an update replaces the description only when -DescriptionFile docs\workshop-description.txt is passed, so pass it on every release that changed the file. -DescriptionOnly -DescriptionFile docs\workshop-description.txt replaces just the text, with no build, no content upload and no change note. Steam loads description images as cross-origin requests, so every [img] host must send an Access-Control-Allow-Origin header or the image shows broken; the script checks each one and -Publish refuses otherwise. Forgejo's raw URLs send no such header, so the Steam images are served from cdn.blax.at/blax-gaming/, which does. The section headers must be on cdn.blax.at/blax-gaming/defaults/ before -Publish passes. Every forgejo.blax.at link in the description must also open without a login, so the repo has to be public first. Source/Art/README.md has the render commands.


Made by Blax

Blax Software Open Source Initiative

🛠️ Blax Gaming is a project of Blax Software, 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