RimWorld

RimWorld

352 ratings
Deconstruct Return Fix
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.0
File Size
Posted
Updated
86.880 KB
19 Oct, 2018 @ 5:15pm
28 Sep, 2019 @ 10:20am
3 Change Notes ( view )

Subscribe to download
Deconstruct Return Fix

Description
Integrated into D9 Framework for 1.1+.

The base game has a bug where the maximum number of drops for a given resource cost when deconstructing a building is one less than the actual cost, which is all well and good except when you have buildings which need one of a resource - in which case they can never drop. This mod fixes that.

Non-Steam download available here.[github.com]

Technical Details
This mod consists of a Harmony prefix which overrides GenLeaving.DoLeavingsFor() in the case that the specified DestroyMode is DestroyMode.Deconstruct. It acts nearly the same, but the calculated drop rate has maximum be Count, not Count-1. Mod conflicts are not expected, since DestroyMode is an enum and to my knowledge cannot be modified without recompiling the base game, but this is a moderately hacky fix.

Incredibly Frequently Asked Question

> You're not supposed to get everything back when constructing. This isn't a bug!

The game lets you set the amount a building should return when deconstructing. However, if you set a building to return 100% when deconstructed, the game will instead return one less item than is required to construct it. This is a problem when you have buildings which require a single item and are expected to drop that item.

If you ask that question, I'm just going to delete your comment instead of relitigating this point I've made too many times already.
71 Comments
dninemfive  [author] 21 Jan, 2021 @ 9:58am 
@Moonlightfox You can load both, but you'll need to disable the D9 Framework carry capacity patch for the time being as both mods patch the same parts of the game. This mod's change was actually implemented in the base game in 1.2, so you don't need my mod for that.
Moonlightfox 21 Jan, 2021 @ 1:30am 
I want to install https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1906760965
It lists D9 framework as incompatible, but by bundling it you made installing D9 framework the only way to get this mod...
FlorestNerd 10 Sep, 2020 @ 5:25am 
I did, it's just that i have ADHD and sometimes my brain just skips words and sentences. It would be horrible, but would catch atention. And i already downloaded D9 framework
dninemfive  [author] 8 Sep, 2020 @ 10:31pm 
I mean, I can't add them, and I wouldn't either because that's horrible color theory. You should just read the description before asking for things which have already happened.
FlorestNerd 8 Sep, 2020 @ 8:13pm 
that's lame Steam.
dninemfive  [author] 8 Sep, 2020 @ 9:28am 
@FlorestNerd No.
FlorestNerd 8 Sep, 2020 @ 8:03am 
Can't you choose a more atention collor like yelow or red?
FlorestNerd 8 Sep, 2020 @ 8:02am 
Ma Bad. Sorry for this
dninemfive  [author] 6 Sep, 2020 @ 11:59am 
@FlorestNerd I can't choose a larger font size than h2. Please read the first line of the mod description again.
FlorestNerd 6 Sep, 2020 @ 8:45am 
How about a 1.2 updateplz?