The Binding of Isaac: Rebirth

The Binding of Isaac: Rebirth

[Rep] Jukebox
 This topic has been pinned, so it's probably important
TeSLaSP2  [developer] 4 Jun, 2021 @ 7:22am
How to Add Jukebox Support to a Soundtrack Menu-Compatible Mod
Copy of the original discussion of the original mod, the new tracklist order is in the bottom of the page

Originally posted by theserenitysystem:
In your main.lua, add a track list as an array. It must be in this order:
TrackList = { "Basement", "Cellar", "Burning Basement", "Caves", "Catacombs", "Flooded Caves", "Depths", "Necropolis", "Dank Depths", "Womb/Utero", "Scarred Womb", "Blue Womb", "Sheol", "Cathedral", "Dark Room", "Chest", "Void", "Library", "Devil Room", "Angel Room", "Shop", "Arcade", "Secret Room", "Boss Room (Empty)", "Challenge Fight", "Boss Fight", "Boss (Alternate)", "Boss (Mom)", "Boss (Mom's Heart)", "Boss (Isaac)", "Boss (Satan)", "Boss (The Lamb)", "Boss (??? - Blue Baby)", "Boss (Hush)", "Boss (Ultra Greed)", "Boss (Delirium)", "Boss (Mega Satan)", "Devil Room Appear Jingle", "Angel Room Appear Jingle", "Secret Room Find Jingle", "Treasure Room Entry 1 Jingle", "Treasure Room Entry 2 Jingle", "Treasure Room Entry 3 Jingle", "Treasure Room Entry 4 Jingle", "Challenge Start Jingle", "Challenge Finish Jingle", "Boss Intro Jingle", "Boss Death Jingle", "Boss Death (Alternate) Jingle", "Boss Death (Hush) Jingle", }

Each track should have the title of the song inside quotation marks, followed by a comma.

Note: If your soundtrack does not include a certain track, use one of these special codes:

"[Rebirth]",

will automatically insert the Rebirth track title for that track
OR

"[Silent]",

will automatically disable the jukebox for as long as that track is playing. Use this if you've purposefully set a blank track in the music.xml

Then, inside the startGame function where you add the soundtrack to the Soundtrack Menu, insert a new block under the AddSoundtrackToMenu function:

if Titles then AddTitlesToJukebox("ModRef", "Title", "DisplayTitle", "TrackList") end

This function has four arguments:

ModRef: A string to use as a reference variable where the jukebox will store all the information about your mod and its tracks. It must be one word, no special symbols, and it must be unique! If it's the same as someone else's, the two will conflict.

Title: This string is the title you use to add the soundtrack to Soundtrack Menu mod. It must match the title you use for that, and your music.xml file, or else the jukebox won't be able to find your songs to know when they're playing.

DisplayTitle: This is the title the jukebox will actually show in game for your soundtrack. It can be a longer version of the Title, or it could be the same. Up to you. This is a string, it can be whatever.

TrackList: This is the table you set up earlier in the mod file with all the titles for your songs

All together, a mod completely set up for the Soundtrack Menu and the Jukebox Mod would look something like this:

local Mod = RegisterMod("Mod", 1) local ModTrackList = { "Basement", "Cellar", "Burning Basement", "Caves", "Catacombs", "Flooded Caves", "Depths", "Necropolis", "Dank Depths", "Womb/Utero", "Scarred Womb", "Blue Womb", "Sheol", "Cathedral", "Dark Room", "Chest", "Void", "Library", "Devil Room", "Angel Room", "Shop", "Arcade", "Secret Room", "Boss Room (Empty)", "Challenge Fight", "Boss Fight", "Boss (Alternate)", "Boss (Mom)", "Boss (Mom's Heart)", "Boss (Isaac)", "Boss (Satan)", "Boss (The Lamb)", "Boss (??? - Blue Baby)", "Boss (Hush)", "Boss (Ultra Greed)", "Boss (Delirium)", "Boss (Mega Satan)", "Devil Room Appear Jingle", "Angel Room Appear Jingle", "Secret Room Find Jingle", "Treasure Room Entry 1 Jingle", "Treasure Room Entry 2 Jingle", "Treasure Room Entry 3 Jingle", "Treasure Room Entry 4 Jingle", "Challenge Start Jingle", "Challenge Finish Jingle", "Boss Intro Jingle", "Boss Death Jingle", "Boss Death (Alternate) Jingle", "Boss Death (Hush) Jingle", } function Mod:StartGame() if SoundtrackSongList then AddSoundtrackToMenu("ModTitle") if Titles then AddTitlesToJukebox("ModRef", "ModTitle", "Display Title", ModTrackList) end end end Mod:AddCallback(ModCallbacks.MC_POST_GAME_STARTED, Mod.StartGame)

The new strings you need to add into the array after "Boss Death (Hush) Jingle" are, in this exact order:
"Utero", "Downpour", "Dross", "Mines", "Ashpit", "Mausoleum", "Gehenna", "Corpse", "Home", "Abandoned Mineshaft", "Mineshaft Escape", "Planetarium", "Secret Room Alt", "Secret Room Alt Alt", "Boss Rush", "Boss Room (empty, twisted)", "Mom's Shadow Intro", "Strange Door (jingle)", "Echoes Reverse", "Boss (alternate alternate)", "Boss (Mother)", "Dogma Intro", "Boss (Dogma)", "Boss (Beast)", "Boss Death Alternate Alternate (jingle)", "Boss Mother Death (jingle)", "Boss Dogma Death (jingle)", "Boss Beast Death (jingle)", "Downpour (reversed)", "Dross (reversed)", "Genesis (reversed)",

If you want to make your mod compatible with the old version you sould check this disscusion:
EDIT: nvm it seems to break everything
Last edited by TeSLaSP2; 5 Jun, 2021 @ 11:54am
< >
Showing 1-1 of 1 comments
Ray 25 Mar, 2022 @ 11:31pm 
Hey I was working real hard on my mod to work with this and I noticed a line missing for Repentance.

I think "Boss Rush (Jingle) Should be added in lines between "Boss Rush" and "Boss Room (empty, twisted)",

Please check out my soundtrack mod too and thanks for this awesome mod! :D
< >
Showing 1-1 of 1 comments
Per page: 1530 50