About this mod
My initial findings for how the combat music seems to work in Starfield in the hopes that others can utilise this info and expand on what I've found
- Permissions and credits
Audio Formatting
Audio files for combat music seem to accept different quality audio files from that of the Main Menu Theme. The following will probably mean nothing to you unless you understand audio.
Whilst the main menu music worked fine with a 48k sample rate and 32 bit depth WAV (converted to WEM), combat music did not like this quality, instead opting to play nothing at all. Changing the bit depth to 16 and keeping a 48k sample rate is what allowed the music replacement to play, at least for me. I also needed to change the project source settings to "Vorbis Auto Detect High" in WWise. Keep in mind that different sfx might need or accept different quality files or conversion settings. I cannot help you with specifics unless I've personally tried to replace said file.
I also highly recommend changing your track's audio level to hover around -6dB, as anything louder completely overpowers the base game sounds, especially since Starfield's tracks don't have a whole lot going on compared to what you might be replacing it with, an example being a track from HALO or a more extreme example being anything hardstyle. The level you set your tracks to will vary depending on the perceived volume of the track, so use your own judgement.
Changing a track's dB can be done pretty easily in most audio programs, hell even video editing software can do it.
How Combat Music Works in Starfield
I conducted a short test in my 1st playthrough and have created a video you can find here showing the test results. I have not touched NG+ yet.
Now, this is where it gets fun as I've only done some brief testing with this. Please note that anything in italics is simply my own theory, if you would like to test it yourself, please do so. Anything you find out about how this works, please let me know so I can update this page!
Starfield's combat music appears to be semi dynamic or adaptive. If you have a look in the txt file (combat music codes), you can see it's split into 4 main categories or tiers. Low, Medium (Med), Medium High (MedHigh) and High, each with their own respective "finale" track. This finale track is nothing new, it's simply a short piece that plays when combat ends so that the music ends smoothly rather than abruptly stopping or cutting back to ambience.
Each category or tier is labelled based on the "intensity" of the music. I say this as listening to each combat track you can hear similarities between each category, but they are a bit more subdued each time (High-Low). I have no clue what triggers each "intensity". I briefly tested it in a space station and in a POI on a random planet, it seemed kinda random. My thoughts are it changes based on how many enemies are alive and possibly if they were aware of your presence. But it can also change based on if there is a boss around, or the type of enemy (creature, humanoid etc.) and also the enemy's level relative to yours. I've conducted a few tests at this point both in an interior location and exterior.
The game will pick a tier that it determines is best for the current situation. It will then change the tier based on how many enemies are left, what kind of enemy (regular grunt or boss) and also possibly the level of the enemy relative to yours (higher level enemies = higher tier music). When it changes is inconsistent at best and I have not been able to replicate results from one test once. The number of each file (Med 1, Med 2, Med 3 etc.) does not correlate to a higher intensity for the individual tier, it's just a numbering system.
Unfortunately, it will not cycle through a specific number (low 2, med 2 etc.) instead it will just pick a random track in the tier that it chooses. This means that if your plan (like me) was to split a single track up into each tier so that it switches between parts of the same track (kind of like how the music in HALO: Infinite campaign will slowly intensify as you progress through a Banished base) then you will not get the result you were hoping for, as the game could just switch in another track entirely in it's place. This means you will more than likely have jarring music switches depending on the music that you decide to use. Maybe this can be changed, but I don't know anything about coding.
Keep in mind, players probably won't notice the switch, or will subconsciously ignore it if they're concentrating on the fight so it's not a massive deal.
There are a few other unique tracks that seem to be tied to faction or main story quests, however I have not played much of the MQ or faction quests so I cannot confirm where specifically they're played other than what looks to be the quest ID (such as CF08 which I believe to be the final mission in the Crimson Fleet questline). There are also some labelled as Combat_Starborn, which I have no idea what that's linked to. Maybe it's NG+. I don't know.
TLDR: Making a combat music replacer mod that is smooth...or dare I say it...immersive, doesn't seem to be as simple as I initially hoped. The tier select trigger is inconsistent and the track it chooses is random, so at this point, just throw in the songs you want and make sure they're all at a good volume. My best advice is just maybe 2 or 3 songs for each tier and, then duplicate them and name them accordingly.
These are my initial findings which I thought I'd share so that others could get involved and possibly solve how it works. Maybe I missed something super obvious, maybe someone's already figured all this out. I haven't really done any work with modding before, I'm just using my brief knowledge of file structures and my knowledge of audio and sound with a pinch of common sense and slamming it all together to work this out and put this info out there to help others!