Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
To add a callback, use the following function
callbackFn is the function that is called everytime a track is about to play.
For callbackFn:
The music ID is given as the first argument.
You can find some examples here.
The function can:
Any arguments given after the callback function are required track IDs. If any are given, then the music about to play must be one of the track IDs for the function to be called. (eg, you give all treasure room jingles as required track IDs, your function will only be called when one of these is about to play)
Callbacks added first will take priority.
If a callback does not return nil, no other callbacks will be run.
Callbacks are guaranteed to be called at the beginning of each room, even if the music isn't supposed to change.
WARNING!
Mods that register with identical names are classed as the same mod by this script.
Main menu music, cutscenes (excluding boss intro), and endings do not trigger callbacks.
To remove a callback, use the following function
This will remove all callbacks associated with the table.
WARNING! Callbacks are not automatically removed when your mod is reloaded with the luamod command. It is recommended you use this function at the beginning of your script to prevent old callbacks from taking priority.
WARNING!
Using this in an uncleared boss room will return ONLY the boss jingle. If you want the intended boss music, use:
WARNING!
The function always returns the entry music, not the current one. For example in Hush's boss room, the ID returned will always be ???'s theme, even if Hush is in his final form.
Currently all other variables are hidden and/or localised within the script. If you want access to something via a function or directly, leave a comment on the mod page.
Using raw track IDs are not recommended. This mod prevents the game's internal code from running by ejecting the game tracks from their normal slots and readding them beyond NUM_MUSIC. The Music enum has been redefined to fit the new music slots.
Raw track IDs are allowed when using Music API Callbacks or when using MMC.Manager instead of MusicManager as they are automatically corrected, but just to be safe, you should get your music ID from the enums or via Isaac.GetMusicIdByName.
Workarounds for no music.xml
Right now it is impossible to add or remove intros or layers from tracks. It you need to remove an intro use a silent short music file. If you need to add one, you should add the track in content instead of replacing and use a callback. In the future I may add silent intros to all tracks for easy replacement.
You can remove layers by adding musicmgr:DisableLayer() to your script where necessary where musicmgr is MusicManager() or MMC.Manager(). Or use MMC.DisableMusicLayers to prevent all layers.