Project Zomboid

Project Zomboid

Not enough ratings
PhunLewt Reducer
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
1.330 MB
4 Jul @ 12:14am
30 Jul @ 10:17pm
8 Change Notes ( view )

Subscribe to download
PhunLewt Reducer

Description
This is a B41/B42 mod designed to allow admins to reduce the probability of loot spawning (and respawning) in containers depending on admin defined areas.

To illustrate, say I want to reduce the global spawning of ammo by 50%, except I don't want any ammo spawning in Rosewood and I want normal spawning in Louisville. To do this I would:
  • Set the Default zone for ammo to 50 (to reduce the global respawn of all ammo by 50%)
  • Set the ammo rate for Rosewood to 100 (to reduce respawn by 100%)
  • Set the ammo rate for Louisville to 0 (to reduce respawn by 0%, effectively overwriting the default setting)

IMPORTANT

This mod can only reduce the item quantities in a container after the game has stocked the container. If the game doesnt stock/restock the container (depending on your settings), this code will not run for that container!

This mod Requires the PhunZone and PhunLib mods

Quick Start

Right click in the world and choose PhunZones from the menu (you must be in Admin mode), then select the region you wish to change (the Default region is where you edit the "global" values). Click "Edit Region" and scroll to the bottom of the settings window to click the Lewt button.

Choose the items and/or categories by clicking the "Edit Item Selection" button.

Find the item and/or category of items you wish to change. Double click to adjust. Use a whole number between 0 and 100. 0 will not reduce the item (or category), effectively making it behave as normal (this is so you can override a parent zone, eg the Default zone). 10 will reduce respawn by 10% and 100 will reduce the spawn rate 100% (in other words, it won't spawn)

then click OK to save

Other settings per zone:
  • Hours Till Full. This is the amount of hours that need to pass until your reduction comes into full effect. For example, lets say you have Aviator Glasses set to 50 and you set this value to 240 (10 game days). For the first hour, the spawn rate will be unchanged, however by day 5, the effective reduction of the glasses will be 25%. Finally, by day 10, the full reduction will take effect (in this case, -50%).
  • On Empty Add Item: In instances where everything in the container gets removed after a restock, add this item. This can at least give a visual cue to a player that the container in fact restocked. It needs to be the full name, eg PhunLewt.Dust or Base.Money
  • Inherit. Untick if you want this zone to ignore any parent or default values.
Sandbox settings:
  • Default Reduction. Reduce all loot spawns by this percentage unless otherwise specified in the zones settings. Requires restart if changed.
  • Debug: Tick this box to see verbose feedback when PhunLewt is removing stuff from containers. Requires restart.
[discord.gg]
Coded with love for our awesome PhunZoid[discord.gg] community. Repo and more info[github.com]

Workshop ID: 3516092704
Mod ID: phunlewt
6 Comments
UburGeek  [author] 11 Jul @ 9:10am 
No, this only reduces loot when the server restocks a container. However this is how I would approach accomplishing what you're after: Increase the loot settings of your server in the Sandbox_Vars file, then in this mod's default zone, reduce everything by 90% (do this at category level). Then in the rosewood zone, reduce by 0% (which would override the 90% default setting).
七夜向日葵 11 Jul @ 3:34am 
Hello author, can you add a function to increase supplies in a certain area? For example, I want Rosewood to increase all supplies by 10% based on the sandbox settings.
UburGeek  [author] 10 Jul @ 10:50pm 
You can now port your lua/PhunLewt file around - meaning you can share/backup/move about the configuration between servers.
stepbro 10 Jul @ 4:12pm 
Appreciate you, UburGeek. This is probably the only zone-based loot settings mod and thank you for sharing it to the community. Now I can push people to loot in LV lol
UburGeek  [author] 10 Jul @ 10:39am 
Hey Stepbro... You can port your lua/PhunZones file around but the lewt settings are not stored there. Ill look to add it in tho as its a good idea
stepbro 10 Jul @ 3:44am 
This looks promising man! and will definitely use it on my server. Is it possible to export/import zone settings for server wipes?