Project Zomboid

Project Zomboid

Not enough ratings
Fast & Dirty Updating 41-to-42 Mods
By Omega
This Guide aims to walk users through the process of converting some v41 mods to v42. User mileage may vary, not all mods are created equally and not all of them are so simple to make work.
   
Award
Favorite
Favorited
Unfavorite
Introduction
Turning v41 mods into v42 mods
Goal
By the end of this guide you should be able to both update (somewhat) v41 to v42 on a simple scale, as well as upload to the workshop. Both of which are very useful for making your own simple mods or updating simple v41 mods to v42.

Limitations
Not all mods maybe so simple to convert to a v42 mod. For the simpler ones, with even absolutely no modding experience, this guide should help you get some working.

Not-My-Mod
Please do not re-publish someone else's mod as your own. If re-published to v42, and the Original Author updates to v42 and/or requests you remove something, please remove what you've published. Remember, we all want proper credit to go where it belongs. If you re-publish a v42 update to another mod, ensure you give ALL relevant information and links to the v41 source so the community can browse the Author's workshop and original works.

Disclaimer
I have done this with several mods locally and they have all worked fine thus far. Nothing crashes, however this is a quick and dirty technique for simpler mods. Complex mods and mods that use features that have had updates from v41 to v42 may have changed fundamentally and may require a full update from the Author regardless.

If it's v41, and it's simple enough, try it out. If it works, congratulations. If you feel like everyone else may benefit from the mod, the last portion of the guide (as well as mentions throughout) covers uploading to the workshop.

Disclaimer #2
I can't stress this enough, I have very little .lua modding knowledge and this is very dirty hack&paste to make v41 mods work for me in v42 that I've had success with. Success/Failure is 110% NOT a guarantee.

My game plays fine. My game loads up with [6 Errors] every time.... but I have noticed nothing broken. Your mileage may vary.

When I *aim* with one or two items I've held at some point I generate [1 Errors] per FPS.... I topped [300 Errors] VERY quickly... Nothing crashed, all my mods seem to function fine... Life goes on. Your mileage may vary.

Disclaimer #3
I also can't stress this enough, please do not take credit for others' mods. If you re-publish for v42, make EVERY POSSIBLE EFFORT to credit the Author and their content, and disclaim your intent for the publication using this guide because it's possible the v41-to-v42 process may break some things with the mod in the process that may not be part of the Author's v41 mod's intent. If you used this guide to hack/slash/copy/paste it into the v42 community, everyone deserves to know it may be buggy or how it came to be v42.
Example
What a re-upload should look like
This is one such example of an update-to-42 published giving all credit and links to the original v41 Author and his content. The content depicted below may or may not be available anymore, this is just for example purposes.

The File Locations
Based on: Windows-11 64-bit

Where can I find the mods I've subscribed to?
C:\*Users\Public\Games*\Steam\steamapps\workshop\content\108600\3399367994\mods\Wallet Fix [B42]
"3399367994\mods\Wallet Fix [B42]" Will differ from mod-to-mod. This is the Steam Mod ID# (& mod name) and can be found in the image below if you have a lot of mods and can't find it.


Where can I find ProjectZomboid original files for a reference?
C:\*Users\Public\Games*\Steam\steamapps\common\ProjectZomboid\media\scripts\clothing >clothing_bags.txt
The *Users\Public\Games* will differ from one PC to the next based on where you installed Steam.
This is an example if you wanted to make a mod that modifies backpacks. You could copy the original content from here and make modifications for your mods.

What if I want to change the mod, but don't want to modify the subscribed item content?
C:\Users\*username*\Zomboid\mods
The *username* will differ from one PC to the next.
This is where any mods on your local PC should be. Copy any subscribed content here for modding.

Where does a mod need to be in order to upload to the workshop?
C:\Users\*username*\Zomboid\Workshop
The *username* will differ from one PC to the next.
Mods need to be in this folder for them to show up in-game for uploading.

It is recommended to have 3+ file browser windows/tabs open to quickly go back and forth.
v41 and v42 File Structure
How the v41 and v42 folders are different
The difference in file structure between v41 and v42 is largely responsible for them not working with one-another. This will clear up how they differ.

v41 Mod File Structure
\108600\*##########*\mods\*ModName*


*ModName*\media\lua\server\Items >ModFile.lua
*ModName*\media\scripts >ModFile.txt
*ModName* >mod.info
*ModName* >poster.png

v42 Mod File Structure
*ModName*\42\media\lua\server\Items >ModFile.lua
*ModName*\42\media\scripts >ModFile.txt
*ModName*\42\common >ModFiles.(png/txt/etc)
*ModName* >icon.png
*ModName* >mod.info
*ModName* >preview.png
The quick & dirty update
This is the fast and ugly way of getting v41 to work on v42
Now that you know where everything is and how it is structured you can start your copy-pasta adventures. --Remember to copy your v41 mod to your local mods folder; if you re-subscribe to the v41 mod it will redownload and update all content in the subscribed (\108600\*##########*\mods\*ModName*) folder.

You need to start from the v41 mod folder in the location below.

\108600\*##########*\mods\*ModName*

Step 1
Create 2 new folders in your v41 mod folder.
\108600\*##########*\mods\*ModName*\42 --New \108600\*##########*\mods\*ModName*\common --New \108600\*##########*\mods\*ModName*\media \108600\*##########*\mods\*ModName* >mod.info \108600\*##########*\mods\*ModName* >poster.png
Step 2
Create 2 copies of poster.png and rename them icon.png & preview.png
\108600\*##########*\mods\*ModName*\42 \108600\*##########*\mods\*ModName*\common \108600\*##########*\mods\*ModName*\media \108600\*##########*\mods\*ModName* >icon.png --New \108600\*##########*\mods\*ModName* >mod.info \108600\*##########*\mods\*ModName* >poster.png --Copy this \108600\*##########*\mods\*ModName* >preview.png --New --You can keep or remove poster.png. I tend to keep the originals so I just leave it there.
Step 3
Copy your media folder and paste the copy into your 42 folder.
\108600\*##########*\mods\*ModName*\42 --Put copy in this folder (\108600\*##########*\mods\*ModName*\42\media) --All media content should be copied here. \108600\*##########*\mods\*ModName*\common \108600\*##########*\mods\*ModName*\media --Copy this \108600\*##########*\mods\*ModName* >icon.png \108600\*##########*\mods\*ModName* >mod.info \108600\*##########*\mods\*ModName* >poster.png \108600\*##########*\mods\*ModName* >preview.png
Step 4
Copy icon.png & preview.png and put the copies into your common folder.
\108600\*##########*\mods\*ModName*\42 \108600\*##########*\mods\*ModName*\common --Put copies here \108600\*##########*\mods\*ModName*\media \108600\*##########*\mods\*ModName* >icon.png --Copy this \108600\*##########*\mods\*ModName* >mod.info \108600\*##########*\mods\*ModName* >poster.png \108600\*##########*\mods\*ModName* >preview.png --Copy this

Now you need to update the relevant "mod.info" file
There maybe multiple of these at this point, that's fine. However, we are only going to edit 1 and overwrite the rest with it.

This is example content taken from my SheetsToNails mod: --content is exact and complete
name=[B42]OmegaDude101's Sheets To Nails id=Om_SheetsToNails poster=poster.png icon=icon.png author=OmegaDude101 modversion=1 description=This mod allows you to craft nails using Metal & Small Metal Sheets.

We're going to run through this one line at a time and explain why.
name=[B42]OmegaDude101's Sheets To Nails
As it suggests, this is the name your mod will have. I add [B42] to mine because I've made/updated them for v42. Adding [B42] seems to make them appear at the bottom of the mod list since it is alphabetically descending.

id=Om_SheetsToNails
This differentiates your mods with an ID. I tend to abbreviate Omega with "Om_" followed by the mod name. If it's just a quick&dirty v42 update, I keep the name and change the abbreviation so it maintains a unique mod ID. (I assume keeping it unique prevents mod conflicts)

poster=poster.png icon=icon.png
You shouldn't have to touch these. It simply points the game at what files to use for poster and icon. Since we previously just copied/renamed, these are unaffected. --NOTE: These are exceptionally easy to make. Icons can be easily used in M.S.-Paint in a matter of minutes from the PZWiki. I will not be covering that process, but you can see how simple the ones I made are here: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3409004675 And this is where I get my icons from:


author=OmegaDude101
Obviously this is to indicate the Author of the mod. I use my Steam ID since it's tied to my profile on Steam anyway. I recommend using yours as well, that way any users of the mod may reach out, or if it's a temporary upload until an Author updates their mod to v42 officially then they may reach out to you. (please do this. Authors are owed proper credit, and the ability to communicate with you about your mod/upload)

modversion=1
Simply indicates the version you consider your mod to be at. I generally bug-test my mods before release so my start at 1.0, you may start wherever you like and update however you like. I just feel a 1.0 release is nice to have and 1.0.1, 1.0.2, etc. is a nice way to go about.

description=This mod allows you to craft nails using Metal & Small Metal Sheets.
This is the meat and potatoes of where you explain your mod. This is what will show up in-game on the mods page when selected.

Next we do some more copy/paste
After saving your changes to mod.info, you're going to need to copy, paste, and overwrite any of the other mod.info files for the mod located in these folders:
\108600\*##########*\mods\*ModName* >mod.info \108600\*##########*\mods\*ModName*\42 >mod.info

Finished...
At this point, most relevant changes have been made and the mod should now visibly show up in your mods list. If it's a simpler or not-very-complex mod it should work.

This is a.... not-too-complex mod that using the steps in this guide was able to make v41 work in v42:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3412255197
Uploading A Mod
This is where we will get into uploading a mod to the workshop for subscribing
The file structure for this is a bit different than just copy/paste, and the location is different also which is why several locations were mentioned in the beginning of this guide.

The below example is what the file structure is like:
C:\Users\*username*\Zomboid\Workshop\*ModName*\contents\mods\*ModName*

Now we're going to break it down a little, and it might start to look familiar.
C:\Users\*username*\Zomboid\Workshop\*ModName*\contents\mods\*ModName*\42 C:\Users\*username*\Zomboid\Workshop\*ModName*\contents\mods\*ModName*\common C:\Users\*username*\Zomboid\Workshop\*ModName*\contents\mods\*ModName*\media C:\Users\*username*\Zomboid\Workshop\*ModName*\contents\mods\*ModName* >icon.png C:\Users\*username*\Zomboid\Workshop\*ModName*\contents\mods\*ModName* >mod.info C:\Users\*username*\Zomboid\Workshop\*ModName*\contents\mods\*ModName* >poster.png C:\Users\*username*\Zomboid\Workshop\*ModName*\contents\mods\*ModName* >preview.png

You see where it got familiar? It's more-or-less the same as your mod folder itself, it just has a couple more folders deep. Your steps should be the following:

Step 1
Create the following folder, replacing *ModName* with the name of your mod.
C:\Users\*username*\Zomboid\Workshop\*ModName* --New folder

Step 2
Create the following folder.
C:\Users\*username*\Zomboid\Workshop\*ModName*\contents --New folder

Step 2
Create the following folder.
C:\Users\*username*\Zomboid\Workshop\*ModName*\contents\mods --New folder

Step 4
Copy/Paste your *ModName* folder into the \contents\mods folder
C:\Users\*username*\Zomboid\Workshop\*ModName*\contents\*ModName* --Copied folder

Step 5
Now go to the following location and paste the preview.png file. This will be another copy/paste from your mod, just take any of the preview.png that are in your mod.
C:\Users\*username*\Zomboid\Workshop\*ModName* >preview.png --Paste

Everything should be ready
At this point, everything should be prepared to upload. All that should be left is to start the game and upload it to the workshop, following the prompts and instructions from the menus. Once uploaded it will be given it's ID and any relevant information generated during upload.

If you make any changes after this point for upload, REMEMBER: Changes should be made to your local mods folder files, and once ready copy/paste/overwrite into the workshop folder files. This way you can test them before re-upload. Once ready, follow the in-game upload process. It already has an ID and such, it will update it. (don't forget to look over your mod's Steam page and make sure it's proper also.)
2 Comments
Omega  [author] 11 Feb @ 1:57am 
@GabeXx546 you're somewhat correct, even 41>42 aside, there's practically no documentation I could nor did I find related to the subject. It took opening, tinkering, and cannibalizing several basic-betty mods to see how things work and are structured... and a lot of wtf-am-I-doing moments just getting it upload-capable. I was sure my trials and errors would help others here.

I've seen a fair few 41>42 imports since making this also, so I'm glad it's helping folks. Still, it's fairly useless for the more complex mods. Try as I might, Tire Racks mod to 42, I could not make. It is one solid example of a more complex mod which would require complex rewrites.

Keep on modding on, friends!
GabeXx546 10 Feb @ 3:52pm 
This guide helped me actually make a custom voice mod since apparently there's no documentation of this anywhere (I probably didn't look hard enough) so thank you for this! :FC5_Boomer: