Project Zomboid

Project Zomboid

Not enough ratings
Making VMZ Compat
By Пупсич
To be honest, I'm a little tired of making compatibility for mods, so I decided to write a guide that will allow you to create compatibility yourself.
   
Award
Favorite
Favorited
Unfavorite
Making your own compat (B42)
If the mod already has military zones and you just want to have some variety in the zones, all you need to do is rename them.
To do this, you need to create a lua file in 42/media/lua/server or common/media/lua/server
I called mine example_compat.lua



But if you suddenly lack those zones that are in the mod or they are not there at all, then you can add them yourself.

This is done in 2 steps.
First you need to register a table with new zones.
This is done in 42/media/lua/shared or common/media/lua/shared
So i made example_compat_zones.lua



Then you need these zones to appear in the game later, so go back to the folder server
For convenience I created a separate file example_compat_reg_zones.lua , but this is generally not necessary.



Making your own compat (B41)
The logic of actions on B41 is approximately the same as in B42, but you only need to place files directly in the media:



Also, in the B41 version, the names of the functions are different.



Creating zones table in B41 is exactly the same as in B42, so I will skip this part, and I'll go straight to registration.

If you are creating your own map mod
If you want to add compatibility to your map mod, just rename the zones if the player uses VMZ.

B42:
File in 42/media/lua/server or common/media/lua/server



B41:
File in media/lua/server