pz-zmod icon indicating copy to clipboard operation
pz-zmod copied to clipboard

Support for modular mod structure

Open matshou opened this issue 4 years ago • 11 comments

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.

matshou avatar Feb 10 '21 20:02 matshou

To reiterate mod structure: /Users/<username>/Zomboid/Workshop/<main_mod_dir>/Contents/mods/<modular_mod_dir>

  • workshop.txt and a preview.png files are in main_mod_dir alongside Contents.
  • preview.png has to be named preview, 256x256, and in png format.

Note: workshop.txt can be modified during the in-game upload process.

Chuckleberry-Finn avatar Feb 10 '21 21:02 Chuckleberry-Finn

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.

matshou avatar Feb 10 '21 21:02 matshou

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.

Chuckleberry-Finn avatar Feb 10 '21 21:02 Chuckleberry-Finn

For reference, here is the modular mod structure example you provided on Discord:

2021-02-10_15-30-01 2021-02-10_15-30-15 2021-02-10_15-29-33

matshou avatar Feb 10 '21 22:02 matshou

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.

matshou avatar Feb 10 '21 23:02 matshou

2021-02-10_18-09-51

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.)

Chuckleberry-Finn avatar Feb 10 '21 23:02 Chuckleberry-Finn

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.

matshou avatar Feb 10 '21 23:02 matshou

@ChuckTheSheep Are we still going to work on this now that we agreed we are moving away from Steam?

matshou avatar Mar 07 '21 05:03 matshou

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?

Chuckleberry-Finn avatar Mar 07 '21 14:03 Chuckleberry-Finn

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.

matshou avatar Mar 08 '21 07:03 matshou

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.

Chuckleberry-Finn avatar Mar 08 '21 15:03 Chuckleberry-Finn