The Binding of Isaac: Rebirth

The Binding of Isaac: Rebirth

Jukebox [AB+]
 This topic has been pinned, so it's probably important
theserenitysystem  [developer] 30 Mar, 2020 @ 11:12am
How to Add Jukebox Support to a Soundtrack Menu-Compatible Mod
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)
Last edited by theserenitysystem; 2 Apr, 2020 @ 8:22am
< >
Showing 1-1 of 1 comments
TeSLaSP2 14 Apr, 2020 @ 12:30pm 
I tried and I couldn't do it. The Persona 5 Mod now has 4 soundtracks, but I can't add any Titles to the Jukebox even following this tutorial nor Hades as an example.

Can someone point out what is wrong with my code?
https://pastebin.com/Dfqmm3Nw

Thank you in advance
< >
Showing 1-1 of 1 comments
Per page: 1530 50