Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Planet Search Overhaul (07/13/24)

Pages: [1] 2

Author Topic: [0.97a] Music Switcher - V1.2a - 17/05/24  (Read 8957 times)

Emanon6

  • Ensign
  • *
  • Posts: 13
  • Read more Liu Cixin
    • View Profile
[0.97a] Music Switcher - V1.2a - 17/05/24
« on: March 09, 2024, 02:05:43 AM »

Music Switcher
With 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 LazyLib

Only 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.
[close]

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.
[close]

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
[close]
« Last Edit: May 17, 2024, 02:20:16 AM by Emanon6 »
Logged

Pagan Pope

  • Ensign
  • *
  • Posts: 12
  • Local lobster smuggler
    • View Profile
Re: [0.97a] HSR Music - V0.0.1 - 09/03/24
« Reply #1 on: March 09, 2024, 04:11:53 AM »

I hope Wildfire is theme you hear when you run into remenants
Logged

Emanon6

  • Ensign
  • *
  • Posts: 13
  • Read more Liu Cixin
    • View Profile
Re: [0.97a] HSR Music - V0.0.1 - 09/03/24
« Reply #2 on: March 09, 2024, 09:31:38 AM »

I hope Wildfire is theme you hear when you run into remenants
Too many good boss music, too few bosses!

I tried to put Wildfire somewhere but the vocals didn't really fit in.

Sam's boss theme was used instead for hostile [REDACTED] encounters.

Logged

Espiovvv

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.97a] HSR Music - V0.0.1 - 09/03/24
« Reply #3 on: March 09, 2024, 07:06:20 PM »

WE'VE MADE A CHOICE, GO FIGHT AGAINST YOUR FATE!
Logged

Aldazar

  • Lieutenant
  • **
  • Posts: 80
    • View Profile
Re: [0.97a] Music Switcher - V1.0 - 15/04/24
« Reply #4 on: April 17, 2024, 01:43:45 PM »

As the game gets more popular with steam potential future this framework is a godsend to add multiple/ease of use for custom ost compared to before. I've been waiting for such a framework for 5 years.
Logged

Zone51alex

  • Ensign
  • *
  • Posts: 10
    • View Profile
Re: [0.97a] Music Switcher - V1.1 - 19/04/24
« Reply #5 on: April 19, 2024, 08:19:30 PM »

this mod is actually quite nice tho, its both a godsend but also this is Almost what i was looking for, basically loading different combat music for each faction but not touch the vanilla music systems it seems to just crash on null for me after a massive Edit of the files to get it to load like i want.
Logged

Emanon6

  • Ensign
  • *
  • Posts: 13
  • Read more Liu Cixin
    • View Profile
Re: [0.97a] Music Switcher - V1.1 - 19/04/24
« Reply #6 on: April 20, 2024, 12:03:05 AM »

this mod is actually quite nice tho, its both a godsend but also this is Almost what I was looking for, basically loading different combat music for each faction but not touching the vanilla music systems it seems to just crash on null for me after a massive Edit of the files to get it to load like I want.
If you were changing sounds.json, existing entries must not be left empty (or you'll get the null point exception), same for .ogg files, one must exist for each  corresponding entry defined by sounds.json

I can try to do some tweaks for easier customization, depending on what functions you're looking for
Logged

Zone51alex

  • Ensign
  • *
  • Posts: 10
    • View Profile
Re: [0.97a] Music Switcher - V1.1 - 19/04/24
« Reply #7 on: April 20, 2024, 01:30:44 PM »

i only need the custom_music_combat tho on your case you can set it up as a toggle for each Group

one for Combat music, Title Menu music, Survey/scavenge music, Campaign music, Exploration Music, market music, Encounter music. to turn on or off each in a ModSettings.json.

preventing a Null crash that way and adding customization too.
Logged

Emanon6

  • Ensign
  • *
  • Posts: 13
  • Read more Liu Cixin
    • View Profile
Re: [0.97a] Music Switcher - V1.1 - 19/04/24
« Reply #8 on: April 22, 2024, 02:33:01 AM »

i only need the custom_music_combat tho on your case you can set it up as a toggle for each Group

one for Combat music, Title Menu music, Survey/scavenge music, Campaign music, Exploration Music, market music, Encounter music. to turn on or off each in a ModSettings.json.

preventing a Null crash that way and adding customization too.

The options are already there in Luna settings at the startup menu screen (top left corner "mod settings")
yeah I should also make master switch for each group
Logged

Zone51alex

  • Ensign
  • *
  • Posts: 10
    • View Profile
Re: [0.97a] Music Switcher - V1.1 - 19/04/24
« Reply #9 on: April 25, 2024, 12:02:22 PM »

yes but its turning on and off Combat music for each faction and that's the opposite of what i need ,i need to turn off custom music for everything EXCEPT combat.
also i wouldn't mind faction music playing if you're in their star system.
Logged

Aldazar

  • Lieutenant
  • **
  • Posts: 80
    • View Profile
Re: [0.97a] Music Switcher - V1.1 - 19/04/24
« Reply #10 on: April 26, 2024, 04:07:33 PM »

Option for a force shuffle or restart? Not sure why but sometimes music will cut off unless I go to menu when adding tracks.
Logged

Emanon6

  • Ensign
  • *
  • Posts: 13
  • Read more Liu Cixin
    • View Profile
Re: [0.97a] Music Switcher - V1.1 - 19/04/24
« Reply #11 on: April 29, 2024, 09:55:16 AM »

yes but its turning on and off Combat music for each faction and that's the opposite of what i need ,i need to turn off custom music for everything EXCEPT combat.
also i wouldn't mind faction music playing if you're in their star system.

There's a [Faction Encounter and Market Music] tab next to combat, you can switch everything in it to vanilla, and leave combat in custom

Star-system-specific music probably won't be coming any time soon, since most systems are being contested (including by the player, if not pirates and Nexerelin's invasions)
Logged

Wallshrabnic

  • Ensign
  • *
  • Posts: 6
    • View Profile
Re: [0.97a] Music Switcher - V1.1 - 19/04/24
« Reply #12 on: May 06, 2024, 12:30:10 PM »

Music works really strange, especially with vanilla turned on. Always chooses the first track from many, and has a priority for vanilla
Logged

Aldazar

  • Lieutenant
  • **
  • Posts: 80
    • View Profile
Re: [0.97a] Music Switcher - V1.1 - 19/04/24
« Reply #13 on: May 07, 2024, 02:28:03 AM »

Nvm I fixed it.
« Last Edit: May 07, 2024, 07:47:22 AM by Aldazar »
Logged

Zone51alex

  • Ensign
  • *
  • Posts: 10
    • View Profile
Re: [0.97a] Music Switcher - V1.1 - 19/04/24
« Reply #14 on: May 15, 2024, 03:22:48 PM »

yes but its turning on and off Combat music for each faction and that's the opposite of what i need ,i need to turn off custom music for everything EXCEPT combat.
also i wouldn't mind faction music playing if you're in their star system.

There's a [Faction Encounter and Market Music] tab next to combat, you can switch everything in it to vanilla, and leave combat in custom

Star-system-specific music probably won't be coming any time soon, since most systems are being contested (including by the player, if not pirates and Nexerelin's invasions)

??? i just see campaign music and combat music tabs and the campaign music tab just has a explanation.
nvm that stuff got commented out somehow,thanks, i'l see myself out.
« Last Edit: May 15, 2024, 04:08:26 PM by Zone51alex »
Logged
Pages: [1] 2