Project Zomboid

Project Zomboid

Not enough ratings
[B42] PAZ - Shops and Traders Save Fix
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
19.892 KB
Oct 4 @ 1:09pm
1 Change Note ( view )

Subscribe to download
[B42] PAZ - Shops and Traders Save Fix

In 1 collection by ApplePie
Polska Apokalispa Zomboid 5 Edycja
83 items
Description
Persistence fix addon for Shops and Traders
Requires the original Shops and Traders by Chuckleberry Finn. Keep both mods enabled.

Addresses an omitted store ID in the manage-mode update path. This can corrupt store-table iteration, causing only the first shop to appear in saves or exports. After that first shop is deleted, the same issue can produce an empty export even when later shops still exist in memory.

What this addon does
  • Supplies the existing store ID when the original update caller omits it.
  • Rejects updates without a usable store ID.
  • Clears an invalid nil-key entry before shop updates and saves, where supported by the Lua runtime.

Contains only addon code. Original Shops and Traders files are not included. The original mod remains required and unchanged.
This addon cannot recreate shop offers already lost from both server memory and saved files.

Validation
Tested with the original mod's Lua functions in an isolated Kahlua harness: 15 shops, manage-mode changes, JSON save/load and export, deleting the first shop, deleting all shops and creating a new one. Testing used a null-key-capable ordered table model; it was not a live B42.21 multiplayer server test.

Credits
Original mod: Chuckleberry Finn. Shops and Traders was originally commissioned by MrAtomicDuck.
Community addon prepared for Polska Apokalipsa Zomboid. This is an independent addon and is not an official update from the original author.

Mod ID: PAZ_SAT_SaveFix
Required original Workshop ID: 2853615523

Workshop ID: 3813637726
Mod ID: PAZ_SAT_SaveFix