More actions
- This article is about an overview about modding. For PZwiki project, see PZwiki:Project Modding.
Terms & Conditions
By playing Project Zomboid, you agree to the Terms & Conditions.
By modding Project Zomboid, you also agree with the Modding Policy.
Key restrictions
- The Indie Stone reserves the right to implement any features in the game irrespective of whether mods exist that accomplish the same goal.
- Modders are solely responsible for their mod, including (but not limited to compliance with any hosting platforms (such as Steam Workshop). They are also responsible for obtaining third party consents for any third party materials in the mod. Legally, we have to ask that modders to ‘represent and warrant’ (i.e., promise legally) that their mod is their own original work and any third party contents are fully and properly licensed by the modder.
- Creation of mods is subject to our modding policy, which may be updated from time to time with any technical requirements regarding how PZ mods must work.
- Project Zomboid modders are free to receive monetary/gift donations from the players who use their releases, and appreciate the time and effort put into them. However, having mods created exclusively for those who choose to donate (or separate ‘in-mod’ content and bonuses) is not allowed. Mod creators cannot sell modifications to Project Zomboid.
Installing and using mods
- Installing mods - how to install mods for Steam or GOG version of the game.
- Using mods - how to enable and configure mods.
- Mod problems solution - what to do if mods do not work well or break the game.
- Testing mods in multiplayer - guide about setting up the mod to work on the server.
Tip: join The Indie Stone Discord server to get access to #mod_support channel, where you can ask question about using mods.
To start a mod up, first make sure the mod is installed in the correct directory. Once you have done this, start up Project Zomboid. Once you get to the main menu, down at the bottom of the screen when you see menu options, you will also find a menu option called MODS. Click on it, which will then lead you to the mod menu.
In there you should see the list of mods that you have installed. Double-click on the mod you wish to start, and a green tick should appear next to the mod.
The next thing to do is shut down Project Zomboid and start it up again. Once started, your mod should now be ready to go. Instructions on using the mod are usually contained in README's or information in the thread.
Current mods
- Main article: Mods
Creating mods
In modding for PZ, there are several main directions:
- Changing scripts - scripts in the game describe the parameters of items, recipes, and vehicles. Making a mod that changes the values of items, vehicles, a recipe, or adds a new item is not a difficult task. This does not require programming knowledge; any text editor may be used. Scripts are in .txt files and have a specific structure.
- Writing Lua code - the main direction in PZ modding. Most mods contain Lua code. PZ is developed mainly in Java and Lua, so using Lua code in mods is closely related to the exploration of Java and Lua game code. When creating more complex mods, you will have to dive into the decompiled Java code of the game. We will cover the basics of the Lua language, but you should be familiar with the basics of programming. A general understanding of the syntax of the Java language is also desirable, as it may be necessary to explore the game code to figure out how some functions work.
- Creating 3D models - at the moment, with the help of mods, you can add new models of vehicles, weapons, ordinary items, and clothes to the game. The game uses 2 model formats - .X and .FBX. For us to create mods with models, the .FBX format will be enough.
- Creating animations - creating animations for the character. Includes creating an animation file and integrating it into the game.
- Creating textures, pictures and icons - this direction complements the others. Models will need textures, items will need icons, the interface will need certain images, and maps will need textures for new tiles (new objects to be placed on the map).
- Map creation - creating locations, buildings, and general environments for the game. See #Mapping.
- Translations - translating the game to various languages, see Translations.
Tip: Join The Indie Stone Discord server to access the #mod_development channel, where you can ask any question about creating Project Zomboid mods.
Working tools
- Text editor - used to edit scripts and write code. Preferably, use editors with Lua syntax highlighting - like Notepad++ or VS Code.
- Image editor - used to create icons, textures for items and tiles. For example: GIMP.
- 3D modeling - used to work on 3D models. For example: Blender.
- Latest TileZed, WorldEd, and tilesets – TileZed can also be downloaded and compiled from the source code on GitHub, or they can be installed (currently only for Windows), as Project Zomboid Modding Tools if the game is owned on Steam.
Modding tools
- Decompiling & setting up auto-complete/intellisense in IDEA IntelliJ
- Free Online GUID Generator: for making GUIDs for modded clothing and outfits.
Resources
- Lua - introduction and guide to using Lua language.
- Debug mode - explanation how to run the game in the debug (developer) mode and how to use it.
- Startup parameters - startup parameters to launch the game with.
- Mod structure - explanation how the mod works and how to create a template for it.
- Folders structure - description of files and folders that will be useful when developing mods.
- File formats - documentation of file formats.
- Tile properties - explanation of tile properties.
- Room definitions and item spawns - explanation of room definitions, used mainly for loot distribution.
- Vehicle zones - explanation of vehicle zones.
- Procedural distributions – list of procedural distributions.
- Game time - explanation about how time in game works and GameTime class.
- Decompiling game code - guide how to study the Java source code of the game.
- Adding new tiles - guide to making new tiles.
- Scripts guide - guide for scripts (.txt files) for items, recipes, and translations.
- How to make a clothing mod - guide on how to add clothing mods.
- Tiledefs used by mods
Mapping
- Main article: Mapping
Tutorial | Author | Last updated |
---|---|---|
The One Stop TileZed Mapping Shop | RingoD123 | January 30, 2017 |
How to Combine Map Mods | RingoD123 | June 11, 2017 |
Full list of current Room Definitions | RingoD123 | February 7, 2014 |
Making new room definitions | RingoD123 | June 10, 2017 |
Mapping Tutorial's and Videos | Thuztor | April 20, 2015 |
Mapping Tutorial's and Videos (Outdated) | Thuztor | September 12, 2017 |
VegMap to Testing Custom Map | Cpt_Paradox | January 28, 2017 |
Making rooms with the place wall tool, item spawns, ortho and more! | Cpt_Paradox | November 30, 2017 |
Sliding Glass Doors, New Textures, Here's How! | Cpt_Paradox | November 30, 2017 |
How to make a map Start to Finish Full Video Tutorial | BlackBeard | January 30, 2017 |
All player made Building Archives | BlackBeard | May 31, 2019 |
Custom texture packs and tile definitions | EasyPickins | June 5, 2014 |
Card's Tutorial for Terrain Generation | Cardenaglo | February 22, 2017 |
Video Tutorials mapping | Atoxwarrior | June 26, 2016 |
Mapping resources
- PZ Tiles and a comprehensive selection of other mapping and tile making resources.
- The build 41 base and vegetation maps for PZ.
- The build 40 base and vegetation maps for PZ.
- An app for replacing the zombie layers on cells.
- An app for moving the cells in maps.
- A more recent base map for PZ.
- Distribution Explorer. Super "early access"
Notes
A note regarding optimization and timestamps
This numerical information in the console.txt output log is a timestamp, such as in "LOG : General , 1669904231941" If you need to evaluate the runtime impact of code it is a good metric.
A note regarding updating and/or changing mods
Removing .txt and .lua files from a mod before updating them to the steam workshop may result in file mismatch errors etc. on account of steam not automatically removing said files from clients and/or servers. One solution is manually deleting these files from the installation directories of the server and/or clients. As well modders can avoid this issue by keeping those files, instead of removing them, but editing those files so they are empty instead of having any functional content. Including commented text explaining the reason for this in the files is also a good practice.
A note regarding Mac, Linux and case sensitivity
Note that, unlike Windows, Mac and Linux OS are case-sensitive regarding file and directory names. Although people playing PZ on Linux is uncommon, it's far more common with server hosting services. To avoid issues, make sure and follow the vanilla PZ capitalization conventions for file and directory names.
For example: with clothing mods fileguidtable.xml works for Windows and Mac, but will cause serious issue for Linux as it will be looking for "fileGuidTable.xml", as that is how the vanilla PZ file is capitalized. Although Client, Server, and Shared will work for the lua directories for non-Linux systems. it won't work for Linux; consequently use the vanilla capitalization, "client", "server" and "shared" for those.
See also
- Mods
- Talk:Modding – for some raw guides to extracting images. The text needs to be cleaned up.
External resources
Tutorial | Author | Last updated |
---|---|---|
Project Zomboid Modding Guide (WIP) | Fenris Wolf | January 22, 2023 |
RoboMat's Tutorials | RoboMat | July 24, 2013 |
Mod Resources (Official Discord - Thread The Under Mod Development Channel) | July 21, 2024 |
Javadoc reference to Project Zomboid codebase
Important additional modding resources
- Setting up the mod.info file: a link to a post on TIS Discord explaining how.
- Variables to use when creating an item.
- Guide for adding a new Skill/Perk, add XP and find all perks names.
- Guide for adding a custom trait.
General additional modding resources
- How To Create an Animation.
- Guide to make a hair mod.
- A YouTube playlist with Blackbeard's modding tutorials.
- Photoshop Masks used for making and editing tile sprites, a link to a post on TIS Discord with the file.
- Global Mod Data: How to use this powerful tool for tracking global mod data.
- Guide to make a custom Timed Action.
- A list of all the animation variables used in timed actions.
- A flow chart for the Timed Actions
- SpawnerAPI: Allows for pending the spawns of vehicles, items, zombies in order to spawn things anywhere in the world. Upon loading the cell in question the item becomes spawned in.
- Guide to how PZ loot distribution works on TIS Discord.
- Spawning a tile from it's name: a link to a post on TIS Discord explaining how.
- How to spawn loot on specific zombie outfit corpses: a link to a post on TIS Discord explaining how.
- Item spawning examples that work: a link to a post on TIS Discord explaining how.
- A tool for dumping distro table contents to console.txt: a lint to a post on TIS Discord with the code.
- How to use read/write with files in mods, useful for server ini files: a link to a post on TIS Discord explaining how.
- A post on TIS discord with code to serialize lua table into json and vice versa.
- A guide on how to change Zomboid's in-game music and sound effects.
- Looking for Error messages in the console log, a short guide on TIS Discord.
- Candle - EmmyLua Support for PZ's Java API.
- WordZed tutorial on YouTube.
- Complete Vehicle Modding Tutorial on TIS forum.
- Useful links.
- How To Mod The Loot Distribution System.
- An up-to-date (41.78) reference to events and hooks.
- PZEventStubs: Lua stubs for events and hooks.
- A reference for adding custom sandbox options.
- GameTime and deltas: An explanation of time deltas and their applications in modding.
- Documentation on functions linked to item/recipe/vehicle scripts.
- PZ Keycode references.
Clothing modding resources
- Guide for adding new clothing items with modding for build 41.
- A list of Blood Locations used for Clothing Modding; a post on TIS Discord.
- A list of Mask IDs used for Clothing Modding; a post on TIS Discord.
- A Graphic to explain the masking system for clothing in PZ; a post on TIS Discord.
Old and more specific additional modding resources
- isoRangeScan: This is an utility function meant for large scale scans of isoGridSquares around a given IsoObject. The scans are done fractally - that is to say from a center (or centers) outward to fill a larger area.
- ItemZed: for editing Item scripts and distribution files (out of date, needs to be updated to work properly with build 41)
Typescript modding
You can now use Typescript language to write your mods which are then compiled into lua. However it is not necessary to use Typescript to write mods.