Music SwitcherWith sample custom music from Honkai: Star Rail This mod allows you to mix and match custom music with vanilla music using LunaLib's options (startup menu screen, top left corner). Different tracks will be played depending on your standing with the faction you are interacting with, and what you are doing to them (combat/visiting market/encountering fleets).
Dependencies:
LunaLib and
LazyLibOnly modifies what music to play, okay to add/remove mid-save.
Compatible with other music packs, but not mods that modify the music plugin(currently the only known one is
Custom Battle Music).
Sample music included is generally more upbeat/less menacing than vanilla alternatives, also the Gacha track is used for surveying/looting, see if they suit you.
If you already know how to change music with sounds.json, what this mod adds is the option to
1 Customize combat music
2 Differentiate music for Luddic Church/Path (they share the same tracks in vanilla), also Player Faction, independent and [REDACTED] (all use the default faction music in vanilla).
Note that Sindrian Diktat is left vanilla by default because I couldn't find fitting HSR tracks for their custom use, but feel free to use some of your own. See the in-game instructions in Lunasettings on how to add your custom music.
Thanks to ruddygreat, Lukas04, Histidine and other members of the Galatia Academy for fixing my Java illiteracy.
For the sample music and logo,
©All rights reserved by miHoYo. Other properties and any right, title, and interest thereof and therein (intellectual property rights included) not derived from Honkai: Star Rail belong to their respective owners. Please do not use or redistribute any part of this mod commercially. Find Hoyo's guide on using their stuff here.For players interested in using self-provided tracks:
Spoiler
You can replace sample custom music in this mod with anything you like (file must be in .ogg format), or add them into the shuffle.
To replace:
Simply navigate to the /Starsector/mods/Music Switcher/sounds folder, find whatever .ogg file you want to replace, delete it, rename your own .ogg file to what it used to be and paste in its place.
To add multiple tracks to a shuffle:
1 Do the same as above, but since only one file can use the old file's name, you need to rename the rest into for example MyMusicFile2.ogg
2 Open /Starsector/mods/Music Switcher/data/config/sounds.json with a notepad, Ctrl+F to search for the first file name, for example
"CustomDiktatEncounterHostile.ogg",
and add
"MyMusicFile2.ogg",
one line below it (inside the overarching "files":[ ] bracket)
Don't lose the comma at the end of each line, tweak the volume if you want to.
Restart the game to take effect.
If you fiddled with sounds.json and the game refuses to start and gives you an error message, you probably missed/duplicated a comma or a bracket.
For modders interested in adding combat music for your mod's faction:
Spoiler
You can add customized combat music and let Music Switcher play it when the player fights your mod's faction:
1 Add the following to your myfaction.faction file
"music": {"combat": "Custom_music_myfaction_combat"}
2 Add the following to your mod's sounds.json
"music":
{
"Custom_music_myfaction_combat":
[
{
"source":"sounds/Combat/",
"volume":0.80,
"file":"MyMusicFile2.ogg",
}
]
}
3 Create a sounds/Combat/ folder in your mod's base directory if you don't have one already, put MyMusicFile2.ogg inside.
4 Instruct the player to use Music Switcher if they want to hear custom music while fighting your faction. This would be a soft dependency, meaning that they can choose not to use Music Switcher, and other functions of your mod will be unaffected.
Changelog:
Spoiler
v1.2a: 17/05/2024-Forgot to update the download link, if you downloaded v1.2 it was probably still v1.1.
v1.2: 17/05/2024-Slightly tweaked sample music - add the new HSR boss theme as the hostile mysterious encounter music.
v1.1: 19/04/2024-Added Github download and version checker support. Fixed some options not working.
v1.0: 15/04/2024-Official release. Fixed crash due to arcade/simulation having no music.
v0.9: 14/04/2024-Added (a lot of) combat music, trimmed existing music, rewrote code.
v0.1b: 27/03/2024-You don't need to download unless you want to change player faction music into a non-vanilla faction using Nexerelin's music option: Fixed compatibility. Also added a readme file & Changed the menu icon.
v0.1a: 21/03/2024-Fixed crash upon arriving at dead-drop target location due to having no music
v0.1: 21/03/2024-New Mod Created
Old mod changelog (before mod name change from HSR Music Pack):
v0.1.1: 11/03/2024-Added Simulated Universe menu tracks for exploration, tweaked volumes
v0.0.1: 09/03/2024-Mod Created