DayZ
DayZ Zombie Loot System
Showing 1-4 of 4 entries
Update: 29 Jun @ 1:34pm

Fixed config.json Loading Logic
Problem: Errors like Expecting map, Expecting int were caused by inconsistent JSON parsing or invalid structure.
Fix: freezes_zombie_loot.c now reliably loads a properly structured map<string, array<FreezeLootItem>> via JsonFileLoader.
Automatically generates config.json on first run if missing.
Validated and cleaned your custom config.json file and made it downloadable.

Reinstated Loot Pouch Mechanism
Restored ZombieLootPouchFZL from ZombieLootPouch.c:
Spawns on zombie death.
Holds randomized loot based on zombie type.
Despawns automatically after it's emptied using a timer check.

Cleaned and Updated freezes_zombie_loot.c
Fixed logic in EEKilled() to:
Pull correct loot type from config (civilian, police, military, default).
Spawn items only based on chance.
Respect wear value and fill magazines.
Added fallback logic if zombie type isn’t categorized.
Ensures safe creation and health settings for items.

MissionServer.c Initialization Hook
On server startup:
ZombieBase.LoadZombieLootConfig_Static();
Ensures loot table is loaded exactly once.

Config.cpp Setup
Declares ZombieLootPouchFZL with:
Hidden visuals
5x5 cargo
No interaction options
Registers scripts/4_World and scripts/5_Mission paths.

Update: 5 Jun @ 12:48pm

New
- Deadloot now despawns after 5 seconds when everything is picked up.
Big Thanks to @steve2112_1970 for the help on this.

Bug Fixes
- [Fixed] Crash on boot due to constructor overloading in FreezeLootItem:
- Replaced overloaded constructor with a safe Init() method to set parameters.
- Updated all FreezeLootItem instantiations to use new + Init() pattern.

Performance Improvements
- [Improved] Config file creation time:
- Moved loot table generation/loading logic from ZombieBase::EEKilled() to MissionServer.OnInit().
- Ensures config JSON is created/loaded at server startup instead of after the first zombie kill.

Update: 2 Jun @ 10:53am

fixed meta.cpp

Update: 2 Jun @ 10:51am

Removed Auto-Despawn Script Logic,
→ All pouch cleanup is now managed through types.xml only
→ No more monitoring loops or inventory checks
→ Ran into too many issues so it's done though types.xml now
Removed All Logging from ZombieLootPouchFZL,
Eliminated console spam and redundant debug output,
Maintained Inventory Restrictions,
Pouch still cannot be moved, picked up, or stored by players,
Still functions as a static loot container