Craft Output Sanitizer
300 mods and you don't know why are you producing 10 Pants instead of 1?!
Stop surprise duplicates when crafting weapons & apparel.
What it does
- Guarantees that recipes declaring 1 weapon/apparel produce exactly one.
- Neutralizes accidental extra stacks from mod interactions (e.g., stack size edits).
- Decides what to do with extras: Destroy or Drop (forbidden).
- Per-bench opt-out (Settings → Exclusions) with search + checkboxes.
- Optional in-world toasts and detailed action logs for quick testing.
- Lightweight: by default it runs only during crafting, not on map load.
Settings
- Force single output for Weapons/Apparel (when recipe declares 1)
- Destroy extras (instead of dropping them forbidden)
- Only sanitize during crafting (recommended)
- Log actions
- Show action toasts
- Revert logging to defaults (quiet)
- Exclude specific workbenches (search + checkboxes)
Why I made this mod?
I play with many efficiency/speed/mastery mods (EG, Quality Bionics, Archotech Expanded, plus Vanilla Expanded Skills). In that setup, crafting “1” sometimes produced 2–4 items (e.g., pants duplicating), this error made me quit Rimworld for a time (this was an error I faced in 1,6). Now that I'm experienced, COS fixes that edge case. You can see the involved mods in my log screenshot—the lines starting with [COS], and now I'm back on the game to play it!.
How it works
- Hooks into RimWorld’s crafting pipeline (MakeRecipeProducts → PostProcessProduct).
- If a recipe declares one weapon/apparel, the mod enforces a single output.
- Extras (stacks or duplicates) are either destroyed or dropped forbidden—your choice.
- You can exclude any workbench; excluded benches are never touched.
- Optional spawn-time guard exists, but is disabled by default for performance.
Compatibility
- RimWorld 1.6, Harmony-based, no XML overrides.
- Compatible with most crafting/stack mods. If something still duplicates, enable logs/toasts to see exactly what was sanitized.
- Safe to add/remove mid-save (does not write permanent data).
Performance
- Minimal overhead: bench catalog is built lazily (when opening settings).
- “Only sanitize during crafting” is enabled by default to avoid load-time costs.
- Logging can slow things down; use “Revert logging to defaults (quiet)” to mute.
FAQ
Q: I crafted 1 item and saw no message. Did it work?
A: Yes—no message means no extras existed; nothing needed to be sanitized.
Q: How do I verify it’s running?
A: Turn on “Log actions” (and “Show action toasts”) in settings, then craft. Turn OFF as soon as you done, this option adds several time to startup if left on
Q: A specific bench shouldn’t be affected.
A: Exclude it in settings (search by label or defName, then check it).
Q: Does it affect traders, loot, or quests?
A: No—this targets player crafting outputs only.
Credits & translations
Code/design: ToxicYui. Translations welcome!
- English — Languages/English/Keyed/COS.xml
- Español (España) — Languages/Spanish/Keyed/COS.xml
- Español (Latinoamérica) — Languages/SpanishLatin/Keyed/COS.xml
- Русский (Russian) — Languages/Russian/Keyed/COS.xml
- 中文(简体)Chinese (Simplified) — Languages/ChineseSimplified/Keyed/COS.xml
- 中文(繁體)Chinese (Traditional) — Languages/ChineseTraditional/Keyed/COS.xml
- 日本語 (Japanese) — Languages/Japanese/Keyed/COS.xml
- 한국어 (Korean) — Languages/Korean/Keyed/COS.xml
- Português (Portuguese Brazilian) — Languages/PortugueseBrazilian/Keyed/COS.xml
- Português (Portuguese Portugal) — Languages/Portuguese/Keyed/COS.xml
License
- Creative Commons BY-NC-SA 4.0
- https://creativecommons.org/licenses/by-nc-sa/4.0/
