pz-zmod
pz-zmod copied to clipboard
Support for modular mod structure
Project Zomboid supports modular mod structures for Steam workshop mods. Each mod uploaded to the workshop can contain other mods that can then be toggled on and off in the game mod menu.
Currently zmod
does not support this modular structure and some features will not work.
To reiterate mod structure:
/Users/<username>/Zomboid/Workshop/<main_mod_dir>/Contents/mods/<modular_mod_dir>
-
workshop.txt
and apreview.png
files are inmain_mod_dir
alongside Contents. -
preview.png
has to be named preview,256x256
, and inpng
format.
Note: workshop.txt can be modified during the in-game upload process.
We should start off with implementing support for simple features.
@ChuckTheSheep Do you know how is the mod.info
handled? Does each modular mod directory contain it's own mod.info
or is there a single master info
file in the main mod directory. Currently the writeModInfo
task updates the mod.info
file in the project root directory and would need to be configured if there are mod info
files.
Each modular mod directory has it's own mod.info
, as well as a poster.png
(again has to be png
format and is expected to be sized to 512x512
but I believe the game allows for it to be stretched if needed), and of course the media
folder.
For reference, here is the modular mod structure example you provided on Discord:
Do you by any chance know exactly what files from Workshop/<mod>
does Steam uploads to workshop? Is it just Contents
, preview.png
and workshop.txt
or does it upload anything it finds in root directory?
We would want to avoid deploying project build files to workshop.
This is the error I get when I try to upload my current directory. (There are similar errors if any of the files have an issue.)
This is the error I get when I try to upload my current directory. (There are similar errors if any of the files have an issue.)
I don't follow, what are you trying to upload and where?
EDIT: Okay, it was clarified on Discord.
@ChuckTheSheep Are we still going to work on this now that we agreed we are moving away from Steam?
Modular mod structure is still needed for mods which have optional features. I assume the modloader will make this less of a headache to implement?
Modular mod structure is still needed for mods which have optional features
Isn't this strictly a feature offered by Steam workshop, or the PZ integration with workshop?
I assume the modloader will make this less of a headache to implement?
We would need to think about the details of how we want to implement that feature with modloader.
I would have to double check how the local directory functions, but I believe there is still a <mod>/mods/<option1>
structure even locally. I know steam downloads simply replaces the name of <mod>
with the steam workshop ID. In any case, "support for modular mod structure" should still be something worth looking into I imagine.