WENOPAL

Common Project Zomboid mod errors and how to fix them

Where to look when something breaks, how to read errors, and a list of real problems with their fixes.

Level intermediate · Updated

Every modder spends more time fixing things than making them. The difference is knowing where to look.

Where the errors are

  1. Zomboid/console.txt: the log from the last time you launched the game. Search for your mod's name, ERROR or Exception.
  2. Zomboid/Logs/: one folder per session with more complete logs. If the game crashes while loading a save, console.txt sometimes gets cut off and the real error is here, in the file ending in DebugLog.txt.
  3. Debug mode (-debug) shows Lua errors on screen as soon as they happen.

Typical problems

SymptomLikely causeFix
The mod doesn't show up in the mod listWrong folder structure or mod.infoCheck Contents/mods/<id>/42/mod.info and that id= matches the folder name
"World loading could not proceed, there are script load errors"An item in a recipe written without its moduleWrite MiMod.MiItem, not MiItem, in craftRecipe
The item shows up with a question markMissing icon or the name doesn't matchIcon = X looks for textures/Item_X.png
You see Tooltip_MiMod_Algo on screen instead of the textTranslation in .txt or broken JSONB42 only reads .json; check the commas and that the key is exact
attempted index of non-table or tried to call nilA function or table that doesn't exist (often from Build 41)Search for it in the game's .lua files before using it
The item doesn't show up in any containerMisspelled loot list name, or containers already openedCheck the name in ProceduralDistributions.lua and test in a new game
Worn clothing has holesBody masks applied over a custom UV<m_MasksFolder>none</m_MasksFolder> (Clothing)
The vehicle is just a shadowModel without a module in the vehicle scriptfile = MiMod.MiModelo (Vehicles)
The item isn't visible in the hand when equippedMissing grip poseprimaryAnimMask / secondaryAnimMask (Items)

A method that works

  1. Change one thing at a time. If you change ten and something breaks, you won't know which one it was.
  2. Reproduce the error with the bare minimum: disable your other mods. A lot of the time the problem is a clash between two of them.
  3. Look for an example in the base game. If the game does something similar, copy how it does it.
  4. Read the whole error. The first line that mentions your file usually gives the exact line number.
  5. Before publishing, test in a new game and in an existing save if you say it can be added mid-playthrough.

Before calling a mod finished

  • The "vanilla" models and textures you use actually exist in the base game, not in another mod.
  • The loot code checks that the list exists and runs inside pcall.
  • Recipes use names with their module.
  • There's a translation in at least English and Spanish, in JSON.
  • If it can be equipped in the hand, it shows up in the hand.
  • Clothing with a custom model was tested worn, with pants and socks on top.
  • console.txt shows no errors with your mod's name.