Project Zomboid

Project Zomboid

Not enough ratings
Dynamic Material Weight Adjustment
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
208.281 KB
26 Dec, 2024 @ 5:30pm
6 Jan @ 10:52pm
6 Change Notes ( view )

Subscribe to download
Dynamic Material Weight Adjustment

Description
This mod provides the ability to dynamically adjust the weight of items based on their material types via sandbox options.
How it works is by getting ALL objects in the game, applying the below logic to categorize them, and then modify their ActualWeight based on the set sandbox options.

Features:
1. Three main categories of materials are supported:
- Wood: Items tagged with "IsFireFuel".
- Metal: Items tagged with "HasMetal" (takes precedence if not tagged as "IsFireFuel").
- Other: Any items not falling into the above categories.

2. Category assignment logic:
- Items tagged with "IsFireFuel" are automatically classified as "Wood".
- Items tagged with "HasMetal" or it's MetalValue > 0 but not "IsFireFuel" are classified as "Metal".
- Items not tagged with either "IsFireFuel" or "HasMetal" are classified as "Other".

3. Exclusions:
Items with the type "Drainable" are excluded from adjustments. Modifying this weight causes problems.
Items with the following tags are excluded from adjustments:
- Sharpenable
- HeavyItem
- ToolHead

4. Weight adjustment rules:
- Players can configure weight multipliers for Wood, Metal, and Other categories via sandbox options.
- Default settings keep weights unchanged from the vanilla game.
- Adjustments are applied during game initialization and are logged for debugging.

5. Priority rules:
- Items tagged as "Wood" always take precedence over "Metal" and "Other".
- If an item is tagged as both "IsFireFuel" and "HasMetal", it is classified as "Wood".
- The "Other" category serves as a fallback for items that do not match any specific material type.

This mod is designed for Build 42 and supports solo play only at the moment.

Workshop ID: 3392869096
Mod ID: Xaviors_DynamicMaterialWeight
13 Comments
Tidurian 9 Feb @ 7:44am 
Hey There Fellow mod author. we kinda had the same idea :) there is a problem with firefuel and the item weight (length is now linked to the weight of the item.) i fixed this in my mod. i suggest you apply a similiar fix (i can send you the snippet or you just check out my Customizable Weight Multiplier mod. (mine dosnt differentiates between item types it just applies it to everything)
Garret  [author] 6 Jan @ 10:12pm 
Should be fixed
Garret  [author] 6 Jan @ 7:06pm 
Thank you. I think I figured out the issue.
Give me a minute to test this fix and I'll push an update.
A Terrible Modder 6 Jan @ 1:05pm 
slight problem, nails now weigh 1kg each
Garret  [author] 6 Jan @ 11:56am 
Hey everyone. Thank you for your support!

I've made a couple updates to this. I wasn't happy with how it was including the items. This should now include a lot more items. Please see the description for details on how the logic works.
Should modify all mod items too, load after mod which add new items.

Also, I'm working on adding textile/hide/leather/fabric category but getting it to work dynamically is difficult as some are missing the needed tags. Currently looking at using recipes to help pull in all the items.

If you have any other categories you would like me to separate out from other, please let me know what they are and I'll look into the logic of separating them.
NeonScreams 6 Jan @ 12:00am 
@Crashdown, @GabeDaGoat; You're absolutely right! Thank you both for volunteering to make free graphics that surpass DALL-E's abilities!

... Gabe has a blank PFP. Crash has a Game's PFP. That sums up their right to an opinion.
[12FN]Night Monkey 30 Dec, 2024 @ 1:13am 
I get that AI mod images or art leave a sour taste ones mouth, but if the mod’s good... well, then it’s like ‘Who cares really. It might not even steer people away, Everyone knows of Click bait, But anyone hear of RageClick before?
Garret  [author] 27 Dec, 2024 @ 8:50pm 
<3
Nikt 27 Dec, 2024 @ 8:42pm 
And important is that mod works right?? not image is so important
Seven 27 Dec, 2024 @ 4:38pm 
@GabeDaGoat, that seems a bit unnecessary. Not everyone is a graphic designer...