RimWorld

RimWorld

Stuff Mass Matters
69 Comments
Mlie  [author] 24 Oct, 2024 @ 2:30am 
@Limfjorden No, it only affects items/buildings that are stuffable
Limfjorden 24 Oct, 2024 @ 2:26am 
Does this mod also change the weight of minified, non-stuffable buildings?
Velvet 16 Dec, 2023 @ 2:45pm 
@Alexander Zagirov it does show if you examine an item that's already been made, it just doesn't show if you're using the change material view.

Can confirm I've got the same thing though, despite the items definitely having different speed penalties once made.
HKO2006 (no mic) 31 Aug, 2023 @ 5:52am 
Updated CE and tested, got normal cloth/devilstrand flak pants, no more bugged steel flak pants
Mlie  [author] 2 Jul, 2023 @ 11:17pm 
@HKO2006 What is the question?
HKO2006 (no mic) 2 Jul, 2023 @ 7:17pm 
I use combat extended and using this mod gives me "steel flak pants" with 48kg.
Alexander Zagirov 23 Feb, 2023 @ 5:43pm 
Same as with mass changes reported by neontech1 movement speed penalty also static and doesn't change when viewing item information.
submeg 17 Jan, 2023 @ 1:27am 
Geez @Mile, this is amazing! Fantastic work once again!
neontech1 20 Dec, 2022 @ 2:23pm 
Brilliant, thanks!
Mlie  [author] 20 Dec, 2022 @ 1:03pm 
@neontech1 Should be fixed now!
neontech1 15 Dec, 2022 @ 1:19pm 
On bills when using view information (i) -> change material the mass changes this mod makes aren't shown, is it possible to have them reflected there?
Mlie  [author] 28 Nov, 2022 @ 8:29pm 
@robopitek Yes, I saw your mod when I had made this but since your mod uses patches I thought there were room for a generic one that works on any modded stuff.
robopitek 28 Nov, 2022 @ 3:23pm 
Hi! Looks like we had a similar idea, I also did something similar some time ago - https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1908867964

Not saying you should remove anything or I have a problem with it, just letting you know.
kp-beeferella 9 Oct, 2022 @ 7:37pm 
Absolute machine, thanks Mlie!
Nameless 9 Oct, 2022 @ 3:15am 
Thank you so much @Mlie! You're a legend!
Mlie  [author] 8 Oct, 2022 @ 11:07pm 
@Nameless Im updating all my publish mods, it will take a while. Done about 200 of 750 now
Nameless 8 Oct, 2022 @ 4:22pm 
Hi @Mlie, my sincere gratitude and respect for maintaining huge collection of great mods! Your work makes so many people happier :) Do you have any plans updating this mod for 1.4 and the new DLC?
Mlie  [author] 18 Jul, 2022 @ 10:55am 
@IPTO Again, that would not work as the better weight mod has settings were you decide what buildings should be affected. So this mod cannot just assume that all buildings or all minifiable things should be excluded.
Perhaps the other mod can check if this mod is active and use the vanilla values in its calculations instead of the modified of this mod. They can just add their own patch with a higher priority and if the thing thats being checked is one of the buildings their settings define then they can just override the output.
IPTO 18 Jul, 2022 @ 10:45am 
Part 2:
So here is a comparision of the mass difference for a jade large sculpture:
It's 7 kg with your mod and 43 kg with BetterWeight in my configuration.
Both mods would complement each other very well if one did wearables and the other structures (that was my first impression).
Unfortunately I don't know a lot about modding rimworld but maybe it's possible to check if BetterWeight is installed and then exclude the <minifiedDef>MinifiedThing</minifiedDef> or <category>Building</category> or add a config option to disable it.

(And now I know there is a length limit for comments :D)
IPTO 18 Jul, 2022 @ 10:45am 
Part 1:
@Mlie Thank you for taking the time to look at the other mod. There is quite a big difference in the calculation and gameplay effect, so I'll try to explain it a bit better.
In my opinion some objects have a unrealistic base mass (should be the vanillaMass in your code). I use the other mod to fix the base mass of buildings that are too light (e.g. a workbench or statue with a default weight of 1 kg where it's just unrealistic that a 2 meter height marble statue or a workbench with mashines has this mass).
The other mod calculates a new base weight from all materials used to produce the object and set's it as new base mass.
The difference is that you calculate the ratio between a default ingredient e.g. cloth and devilstrand and multiply the base weight by it. That works very well for apparel where the base mass is already realistic but doesn't work well if the base mass is already far to low.
Mlie  [author] 17 Jul, 2022 @ 11:23am 
@IPTO Had a look at that mod and I think the simplest solution would be for that mod to not apply its own mass-values if this mod is loaded. Since the options of that mod allows for specifying exactly what buildings it should work on there is no way for this mod to know what items it changes.
TBH I dont really see the point of that mod if this is loaded as you will get roughly the same result using either.
IPTO 17 Jul, 2022 @ 4:42am 
Thank you for this nice mod. I like the realism it adds.
Unfortunately I have a small compatibility issue with the mod BetterWeight. It allows to compute the mass of objects that can be uninstalled based on their material. If I combine it with this mod the mass multiplication is included 2 times and some things will be ridiculously heavy (I noticed it on marble pottery that should weight around 27kg with BetterWeight (27*1,25kg*factor). Unfortunately this mod multiplies it by 2.5 again probably because of the weight difference between wood and marble).
Would it be possible to exclude all buildings that can be uninstalled or that have their mass changed by BetterWeight?
Caz 20 Jun, 2022 @ 2:49pm 
Cool concept! But with the way I make things? Hell to the naw naw! My pawns would never be able to carry anything at all. lmao
Mlie  [author] 14 Jun, 2022 @ 11:16am 
@Wiri @ModZero Should behave better now, thanks for the detailed report and the suggested solution!
Wiri 14 Jun, 2022 @ 3:46am 
I do, indeed create some fake things for displaying the stats. Here: https://github.com/simplyWiri/Loadout-Compositing/blob/main/Source/Utility/Utility.cs#L74-L88 .

I suspect that the cache on your end should be by a pair of (def, stuff) then with multipliers by quality, or whatever other components ontop, not by Thing. Happy to make a change on my end if you think that would be an easier fix.

(You could probably precompute the cache for all items aot too, probably not worth the time investment though, caching def, stuff should be enough).
Mlie  [author] 13 Jun, 2022 @ 6:47am 
@ModZero What it could be is if that mod does some kind of generation of items for displaying. That way they will never be cached as they have unique ids every tick. But Id have to look at their source to verify, ill add it to the todo-list.
ModZero 13 Jun, 2022 @ 6:12am 
Ah no, ignore the last bit - it's because enabling the postfix (that gives me the stack traces) makes things even worse , which isn't really surprising, that's why it's a toggle. Anyway, I'll link the screenshots in the other mod's comments - I think that's a better place for it.
ModZero 13 Jun, 2022 @ 5:45am 
Also while testing, I just noticed: over time this gets _worse_ - once I keep the window open for a while, FPS dropped to _6_, and that persisted through opening/closing. Your patch is invoked _300 times per update_, and _growing_ - I don't think any amount of caching can help that (and therefore I don't really think the issue is on your side - as I said, I'm mentioning it here FYI, not because I expect you to fix it - not that I would complain if you did, but it's not your mod, and the other one is slowly (which is fair) - but actively - developed).
ModZero 13 Jun, 2022 @ 5:45am 
I need one more things to show the issue, because it does _not_ show in the logs. Here's a screenshot of this in a save as minimal as I could get [imgur.com], and here's the log from the same save [gist.github.com].

Looking at the log myself, I don't see anything other than complaints about inactive mods not having download URLs (grumble, grumble, who cares about that, why is that even a warning, but I digress).
Mlie  [author] 13 Jun, 2022 @ 4:40am 
@ModZero This mod caches all items mass so consecutive calls will not cause any additional computations. I dont see any references in your log, please confirm with just those two mods loaded
ModZero 13 Jun, 2022 @ 4:07am 
Hi @Mlie, I just noticed a performance conflict with Compositable Loadouts - opening its UI causes a huge frame rendering spike, and a call to something from this mod seems to be the culprit. I'm not sure if that's your fault (thus any details went into that mod's comments, not here), but I thought I'd mention this on your side as well.

But, just to save you one click, here's the log [gist.github.com].
Mlie  [author] 4 Jun, 2022 @ 10:27pm 
@XGEM This works with all items
XGEM 4 Jun, 2022 @ 4:24pm 
Hello, I didn’t understand a bit, I’m not a native speaker, which is better, does your mod help with the weight of items in other mods and the vanilla game, or not?
Mlie  [author] 26 May, 2022 @ 9:59pm 
@Shadow Wolf No, that mod uses patches to support other mods, this mod uses c# so it will work with any added stuff.
Mlie  [author] 2 May, 2022 @ 10:14pm 
@Andraus I dont see why I shouldnt
Andraus 2 May, 2022 @ 3:58pm 
just to make sure, this works with CE?
Dr. Beta★雞湯 27 Apr, 2022 @ 6:38pm 
it is fixed!! thank you for fast response
Mlie  [author] 27 Apr, 2022 @ 12:17pm 
@Dr. Beta★garlic shampoo Should be fixed now
Dr. Beta★雞湯 27 Apr, 2022 @ 4:54am 
This mod makes pawns have a completely blank inventory tab when they equip an item that's made of a material that no longer exists (via mod removal). I am aware that removing mods mid-game is a terrible thing to do. Is there a contingency for "nothing"-material items?

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced
Computica 26 Apr, 2022 @ 4:29pm 
Oh wow... this is clever...
Mlie  [author] 16 Apr, 2022 @ 9:15am 
@ZzZombo Yes, it uses patches instead of existing-mass values from what I can see. I think I commented on this earlier
ZzZombo 16 Apr, 2022 @ 7:03am 
Man, are you aware "Massivity" is already a thing: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1908867964?
Duck56 14 Apr, 2022 @ 5:37am 
Sure, i ll post it on ur discord server
Mlie  [author] 14 Apr, 2022 @ 4:31am 
@Duck56 I have this mod active with hauling mods with no issues.
Can you share a log of the errors perhaps?
Duck56 14 Apr, 2022 @ 2:45am 
Oh and i see there is a problem with certain items, such as CE: combat shields. They lack any mass causing errors.
Duck56 14 Apr, 2022 @ 2:39am 
There seem to be a lot of problems with hauling mods such as pick up and haul, while your up. I ll see if putting this mod last in the order will fix it or not.
Mlie  [author] 7 Apr, 2022 @ 10:29am 
@chazwhiz This mod only does one calculation per item as it caches the result. Try Dubs performance monitor-mod if you want to find out what operation is causing a slowdown
chazwhiz 7 Apr, 2022 @ 9:31am 
Combined with Compostable Loadouts brings the game to a crawl. Like it’s doing calculations for every material at once? Any ideas? https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2679126859
Maya 5 Apr, 2022 @ 5:47am 
I have a suggestion, a single mod that makes stuff affect every relevant stat, perhaps with the option to change which stats are affected in the mod's settings