Craft Output Sanitizer
[b]300 mods and you don't know why are you producing 10 Pants instead of 1?![/b]
[i]Stop surprise duplicates when crafting weapons & apparel.[/i]
[b]What it does[/b]
[list]
[*] Guarantees that recipes declaring 1 weapon/apparel produce exactly [b]one[/b].
[*] Neutralizes accidental extra stacks from mod interactions (e.g., stack size edits).
[*] Decides what to do with extras: [b]Destroy[/b] or [b]Drop (forbidden)[/b].
[*] 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.
[/list]
[b]Settings[/b]
- 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)
[b]Why I made this mod?[/b]
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!.
[img]https://images.steamusercontent.com/ugc/13972782284516319170/2A49EC0BAA37FDE1E00FEFF71E0DF048872BCE8D/?imw=5000&imh=5000&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false[/img]
[b]How it works[/b]
[list]
[*] 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.
[/list]
[b]Compatibility[/b]
[list]
[*] 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).
[/list]
[b]Performance[/b]
[list]
[*] 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.
[/list]
[b]FAQ[/b]
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. [b]Turn OFF as soon as you done, this option adds several time to startup if left on[/b]
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.
[url=https://steamcommunity.com/sharedfiles/filedetails/?id=3550135089][img]https://storage.ko-fi.com/cdn/useruploads/display/8bb0a3d2-eff8-4da8-b580-a71cca1a4c5f_ourcollection.png[/img][/url]
Credits & translations
Code/design: ToxicYui. Translations welcome!
[list]
Translation made with AI:
[*] 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
[/list]
License
[list]
[*] Creative Commons BY-NC-SA 4.0
[*] [url=https://steamcommunity.com/linkfilter/?u=https%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby-nc-sa%2F4.0%2F]https://creativecommons.org/licenses/by-nc-sa/4.0/[/url]
[/list]
[url=https://steamcommunity.com/linkfilter/?u=https%3A%2F%2Fko-fi.com%2Ftoxicyuidev][img]https://imgs.search.brave.com/dfLd9GxmgH_Oa4oQTYACtXLV0LQZo--PUSrhj9huD0w/rs:fit:860:0:0:0/g:ce/aHR0cHM6Ly9jZG4u/cHJvZC53ZWJzaXRl/LWZpbGVzLmNvbS81/YzE0ZTM4N2RhYjU3/NmZlNjY3Njg5Y2Yv/NjcwZjVhMDFjMDFl/YTkxOTE4MDkzOThj/X3N1cHBvcnRfbWVf/b25fa29maV9ibHVl/LnBuZw[/img][/url][ko-fi.com]