Project Zomboid

Project Zomboid

49 ratings
[GUIDE] How create addon to True Music
By Devin
In this guide I will try to explain how to create your own addon to True Music mode and publish it in workshop.
I apologize in advance for my English
6
   
Award
Favorite
Favorited
Unfavorite
Step one
To begin with, you need True Music mod itself:
https://steamcommunity.com/sharedfiles/filedetails/?id=2613146550
In the description of the mod there is comprehensive information on creating your own music pack, but I want to explain it in more detail and will update template for those who do not know how to properly prepare the mod for unloading.

Now that the main mod is installed, you need a template
Link list

Next:
Unzip archive to path folder - C:\Users\*your profile name*\Zomboid\Workshop
Step two
Now let's add tracks to the addon:
  • Place audio files in mp3, wav, ogg format in the TCBoombox and TCVinylplayer folders.
  • (optional) Place vinyl cover photos in TCVinylplayer folder in jpg format. They should be named the same as the music track file. Each music file can have its own cover.
    For example, the file with the track is called "AC DC - Highway To Hell (1979).mp3", the file with the cover should be called "AC DC - Highway To Hell (1979).jpg".
  • Run AddYourMusicToTheMod.exe. Depending on which folder the files is placed in, either a cassette or vinyl will be generated.

Important!
How do I check if music has been added?
In these folders you should have .lua .txt files:
Tracks will not appear in the game without these files
media\lua\server\Items\TCGLoadingTCBoombox.lua
media\lua\server\Items\TCGLoadingTCVinylplayer.lua
media\lua\shared\TCGMusicDefenitionsTCBoombox.lua
media\lua\shared\TCGMusicDefenitionsTCVinylplayer.lua
media\scripts\TCGMusicScriptTCBoombox.txt
media\scripts\TCGMusicScriptTCVinylplayer.txt
media\scripts\TCGSoundsTCBoombox.txt
media\scripts\TCGSoundsTCVinylplayer.txt

Now let's makemusic pack compatible with other addons for True Music from the workshop
Each .txt .lua file from list needs to be renamed - a unique ID must be added to the beginning or end of the name.
For example:

Thus we get the final list of files:
media\lua\server\Items\283TRM2TCGLoadingTCBoombox.lua
media\lua\server\Items\283TRM2TCGLoadingTCVinylplayer.lua
media\lua\shared\283TRM2TCGMusicDefenitionsTCBoombox.lua
media\lua\shared\283TRM2TCGMusicDefenitionsTCVinylplayer.lua
media\scripts\283TRM2TCGMusicScriptTCBoombox.txt
media\scripts\283TRM2TCGMusicScriptTCVinylplayer.txt
media\scripts\283TRM2TCGSoundsTCBoombox.txt
media\scripts\283TRM2TCGSoundsTCVinylplayer.txt

If you create/install 2 addons with the same ID, only one of them will work!
Therefore, for compatibility, are .lua .txt files names in each addon should be different.
Step three
Prepare addon for game and upload to workshop
You will need to delete folders and files after all music has been added:
\media\yourMusic\audioConverter
\media\yourMusic\pictureConverter
\media\yourMusic\AddYourMusicToTheMod.exe
\media\yourMusic\DeleteYourMusicFromTheMod.exe


Next:
  1. Give a name to your addon (for example: MyTMAddon)
    I do not advise using long names or symbols in them (dashes and so on)
  2. Open workshop.txt ( general Template folder) and change title=

  3. preview.png (only 256x256) change to your image, but don't change the preview name
  4. Open mod.info (with notepad or Notepad++) in folder \Template\Contents\mods\Template
  5. Change
    name=
    id=
  6. poster.png change to your image, but don't change name
  7. Rename main Template folder and second Template folder \Contents\mods\Template
Final. Checking and publish
After everything is done - you need to start game and check that mod is displayed in the general list and it can be enabled.


Start a new game with enabled mod, and if it works correctly - in main menu, select Workshop and start publish mod
Don't forget to add a description and tags




Now your addon is available in steam workshop for everyone, and compatible with other music packs.

P.S. https://steamcommunity.com/sharedfiles/filedetails/?id=3412040570 TEMPLATE FOR 42 BUILD