tModLoader

tModLoader

TerRoguelike
A Bored Man's Guide to Making a Music Mod for TerRoguelike
[[[Minor Spoilers... I guess?]]]

I'm just going to put it out there. I was bored one day, so I devoted some time into trying to see how I could replace music in the mod.
The process was a simple case of: try > cry > try again > cry harder
Until eventually... I found out how to do it. But then it hit me. I felt like Megamind once he had Metro City in his palm: completely unsure of what to do next.

So, with that said... instead of keeping it to myself for another two months, I'd like to bestow how to do so by sharing an example mod, alongside where to look when wanting to replace music, and how to do what. Whether it's for those who maybe might want to compose a UST for the mod, or those who just want to add their own little tunes in some parts of the game.

I would HIGHLY recommend an IDE such as Visual Studio (highly recommend) or Visual Studio Code for mod development if you so choose to do so (I would suggest looking at the development guides from the tModLoader documentation regarding Visual Studio [github.com] and Visual Studio Code [github.com] to set it up properly).

Secondly: here's the repo [github.com] of my example mod.

And one last thing: you're also going to want the repo for the mod open at this [github.com] file.

Alright. Now let's get to the fun part.
A quick disclaimer is that the guide here is solely on the MUSIC. For code, you can check the comments I've put in the example mod that go into that.
There are some things worth noting when you're adding in music, and by far the most important one is the fact that it's dynamic , so you can't just slide a song in there and call it a day (I mean, you can, but it's going to sound bad).

For all level themes, there is a calm track accompanied by a combat track (Like ULTRAKILL, and likely some other games, but I mention it because it quite literally uses music from that), so both songs need to be the same, just one more intense than the other.
As for boss themes, there's a beginning, main loop, and end.

Level themes are easy, so long as it can loop seamlessly (and if both calm and combat tracks are of the same length). Boss themes need a bit more care and attention, with the main one being the start snippet. Most, if not all, music in the mod are cropped in a way that fits well with how the mod is ran, so you'll have to try your best to crop a certain part of your song (in Audacity) to make it fit as well. I would suggest popping in said start snippet into Audacity alongside your own start snippet of the song you want to add in.
(NOTE: AquaSG does NOT have the tracks in the GitHub repo. I would suggest extracting the mod and acquiring them that way.)

There are some other (small) outliers too, such as the Escape theme having a similar dilemma of keeping it a solid 5 minutes (is what I assume; I'm unsure if the escape theme can loop), and probably the prelude to the second phase of the final boss, aka, the last sanctuary room you'll get in your run.

Uhm... I think that's it, really. This is first time I've ever made any kind of guide, or discussion post for that matter, so I apologize if it's all over the place and looks/sounds odd.
If there's anything that needs clarifying, feel free to leave a comment.
Catch ya later.