Project Zomboid

Project Zomboid

55 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://steamhost.cn/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://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3412040570 TEMPLATE FOR 42 BUILD
30 Comments
centralprocessingunit 7 Jul @ 2:25am 
the pre-existing addyourmusictothemod.exe wasn't working because it was only compatible with windows 8 and below, so this new tutorial (and its template) is an absolute godsend 🙏
REAL STEEL AMERICAN DEAL 31 May @ 8:06am 
mod.info missing even though I have it?
(trying to make a b42 mod)
FuneeMonke3e 19 Feb @ 8:24pm 
@DJ Jester spawn it in debug mode in a solo world
FuneeMonke3e 19 Feb @ 8:23pm 
@thumb twiddler make sure you have the files in the cassette and vinyl sections in .ogg format
also make sure you give the .exe file around 10 seconds to finish even after it says press any key to continue
Dead 7 Feb @ 9:20am 
everything seems to be adding correctly in the game, however when i try to play a cassette it just makes radio chatter as if there is no audio file available. any suggestions?
Devin  [author] 6 Dec, 2024 @ 5:26pm 
mp3 files can be deleted later
YELLOW_MEOW 28 Nov, 2024 @ 11:49pm 
after i run the AddYourMusicToTheMod.exe can i delete the MP3 file.
Melon Head 28 Nov, 2024 @ 8:37pm 
I know this is a pretty old thread, but I used it to create my own addon today. Do you need to do anything special to get the cassettes and vinyls to spawn in item containers? I made my own custom Addon, put it up in the Steam workshop, and have it enabled on my server, but I can't find any of my cassettes. I can only find cassettes from other addons.
Jimmy Condom 28 Oct, 2024 @ 1:48am 
is there any reason that the mod wont show up in the mods list?
Shtrudel.182 14 Sep, 2024 @ 2:40am 
Всё сделал как надо и опубликовал и как бы должно всё работать но в игре ни следа моей музыки :DSTskull: