-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Konijima edited this page Jul 13, 2022
·
12 revisions
BaseMod can be used as an example or template to structure a Project Zomboid LUA mod.
Proper usage of the require function to manage file load order and prevent usage of globals.
- Quick-start a new PZ mod.
- Easily use Custom Events and GlobalModData in your mod.
- Neat base structure to start and grow your project into.
- Modularize and reload scripts efficiently during development.
First of all, fork/clone or download this project and copy the lua/ directory into your mod media/ directory.
Go to lua/shared/MyModName/Config.lua and edit the configuration of the mod.
- Change the
ModNamefor the name of your mod. - Change the
ModInfowith your own and add anything you want to it. - Define the GlobalModData table names your mod will use.
- Define the Custom Events your mod will use.
- Use a text-editor to rename all instance of
MyModNameby your own mod name. - Rename the 3 directories
MyModNameby your own mod name.
If you need to, add new fields to the config object and access it using
Client.Config.MyFieldandServer.Config.MyField.