Project Zomboid

Project Zomboid

56 ratings
Loot Luck Equalizer
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
55.250 KB
Feb 20, 2023 @ 9:59pm
Apr 28 @ 4:28am
6 Change Notes ( view )

Subscribe to download
Loot Luck Equalizer

Description
Important
Tested on b41 and b42.
Should work on multiplayer.
Can be added or removed mid-game. (But wont fill containers you already explored by being within about 50 square tiles).

What it does
If the game fills a container with too few items, this mod gives the container a second chance to fill again.
This makes each identical run feel less luck dependant.

Intro
  • Tired of Luck determining the success of your runs, rather than skill?
  • Want to compare your skill more competitively?
  • Want only "light touch" mods that stay true to the base game?
  • Do the RNG gods hate you?

Then this mod is for you!


Description
If a container is empty or under-filled, there is a ~65% chance the container will (essentially) "re-roll" adding loot to itself. (The exact same "fillContainer" function is run again).
This makes each run more balanced while still feeling random, realistic and true to the base game.



That's all you really need to know.
-------------------------------------------------------------------------------------


Extra Details
1) If a container has 3 or less items in it, there is a 65% chance the container will once more run the "fillContainer" function.

2) If your character has the "lucky" trait, it's 75% chance and "unlucky" gives you 55% chance.
So the lucky/unlucky trait changes this mod by (+/- 10%).
In multiplayer, whoever first approaches a container within 50 square tiles is the one who triggers the container filling.

3) You will still encounter randomly empty containers, just not as often.

4) The mod is tested and tuned for the loot rate of both "rare" (default) and "extremely rare" (CDDA challenge). Yes, this mod will make loot slightly more common overall, but it mainly effects runs where you would have been finding very little loot so it moreso balances runs / sessions out rather than make the game much easier.

5) Even with this mod, some rare houses will have all containers empty or filled with unusual items because they are "themed" to be empty or unusual (e.g. "cops and robbers", "party", "moving in/out", "burned down" or "survivor" houses).


Background
I created this mod because I often replay the same self-imposed challenge runs and noticed a pattern: some runs felt consistently unlucky, finding almost no useful items, while others were filled with loot. This led me to suspect there might be a hidden mechanic set at the start of a run that affects loot quality and quantity.
While I couldn't fully confirm this, looking at the game's code, it does seem that an uncontrollable zombie population variable—set at game start and not visible in sandbox settings—may influence loot rates, which could explain the inconsistency.


ALSO CHECK OUT:
Less Fire at start of CDDA challenge:
https://steamcommunity.com/sharedfiles/filedetails/?id=2937011330

Fire Damage Re-balance:
https://steamcommunity.com/sharedfiles/filedetails/?id=2908846234

Fire Ignites Player Slower:
https://steamcommunity.com/sharedfiles/filedetails/?id=2908902180


IDs:
Workshop ID: 2936635985
Mod ID: JCD_LLE
30 Comments
AnimeTiddyFan  [author] May 21 @ 9:55pm 
Oh thanks! I didn't realise it didn't have the b42 tag.
Metropunk2033 May 21 @ 8:53pm 
this is a fantastic mod, but could you add the b42 tag?
AnimeTiddyFan  [author] Apr 28 @ 5:22am 
Finally tested my mods in both b41 and b42. Sorry if they were causing issues before!
AnimeTiddyFan  [author] Apr 26 @ 8:34pm 
This mod is all well and updated. Should work well for 42 and 41.
AnimeTiddyFan  [author] Apr 26 @ 1:42am 
@esteban88
Sorry for the long time off! I'm updating now :)
esteban88 Jan 12 @ 1:31pm 
pls updating for b42 you mod is great and phenomenal
suzinistherealjuno Nov 13, 2024 @ 5:52pm 
dope!
AnimeTiddyFan  [author] Nov 13, 2024 @ 4:54pm 
Done! The mod now uses the game's own container filling function rather than a hard-coded list of items.
Now this mod should be compatible with every mod that changes the loot in containers! :)
Zanthyn Nov 7, 2024 @ 4:47pm 
I'm interested in this mod but I need it to be a dynamic list not hard coded. In the thread and your last comment you used the transposed function. It should be ItemPickerJava rather than ItemJavaPicker.
AnimeTiddyFan  [author] Jun 22, 2024 @ 4:17pm 
Oh! I forgot I had a post on the Indie Stone forums. I replied there now. Unfortunately my game/debugger thinks ItemJavaPicker is null apparently so I'm not able to use ItemJavaPicker.fillContainer(container, player); as you suggested.


Did you manage to test this function by spawning in a bunch of items in a container? If so, I wonder why I'm not able to use ItemJavaPicker.