How to create a mod [B42]
Introduction
Project Zomboid is a home to almost 50 thousand modifications from users, all is very likely to be unique or addon-like or maybe ports to newer versions from other users. If you have your own idea of mod, that will improve your or maybe even everyone's game expierence - this guide will help you with basis.
Project Zomboid was created using both Java and Lua languages. For mod creation you need to know only Lua. Tho it can be daunting to navigate the complexities of modding, especially on the Lua aspect when you have no programming experience. A lot is possible and your main limitation is knowing how to achieve things and the best course of actions, which you will learn after practicing more and more. Get used to the environment, learn the various tools available and how modding works, and don't discourage if your first mod doesn't do great or doesn't work too well because you will learn from it.
It is clear that AI tools will usually bring you more problems than solutions if you blindly trust it, and you will end up directly going back to square one most of the time. The list below are a few tips to help you get started with modding Project Zomboid:
- Start Small: Begin with simple mods and gradually increase complexity as you become more comfortable with the process of making mods.
- Utilize Resources: Take advantage of available resources such as the JavaDocs[pzwiki.net], community forums, and the few tutorials to learn more about the modding practices. Make sure to read the wiki pages of the modding fields[pzwiki.net] you are working with.
- Experiment: Don't be afraid to experiment with code snippets and test them in a controlled environment. This will help you understand how different functions and methods work.
- Learn from others: It is likely what you are trying to achieve has already been done or something similar was already done. Look for existing mods that achieve similar goals and study their implementation to reverse engineer the method used and create your own. You can access the files of mods you have downloaded with the method explained in the game files[pzwiki.net] page.
Folder Structure
Individual pages for the modding fields also explain the important folders they use.
Programming Environment
Visual Studio Code is the norm for programming Project Zomboid mods thanks to many extensions made by the community. These extensions are the following:
- Umbrella - syntax highlight for the Lua API.
- Project Zomboid Script Support - syntax highlight for the Scripts.
- Zed Script - another syntax highlight for the Scripts.
IntelliJ IDEA is also another IDE which is often used to parse the Java files easily after decompiling the game code.
Notepad++ is not recommended as other editors with a bit more if not equal setup provide a better working environment for programming while also having extra tools for Project Zomboid modding. It is especially limited as it can't be used as an IDE to easily navigate a mod project files.
Image Editing
- GIMP- a free and open-source image editor that is powerful and versatile.
- Photoshop - a professional image editing software with advanced features but paid.
- Krita - a free and open-source digital painting software that is great for illustrations and concept art.
- Canva - image-design editor built-in browser
3D Modelling
There are no specific tutorials for Project Zomboid modeling, but you can find many general tutorials on how to use Blender and how to create 3D models.
Mapping
Video Guide
My mod
This guide was created by its original author on the Steam Community. Are you the author and want it removed? Request removal.