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
I don't think you can control the music player with scripts, though I'd be glad to learn otherwise. The only instance I know of that does something like that, is ... allegedly ... the solar sail archaeology site plays a music clip if the excavator is an aquatic species. I've never seen it implemented in the code I've looked at or discussed in specs that I've looked at.
I'll dig around a moment to see if I've missed something. You can manually set the tracks that will play from inside the game, though. That might be a bit more hassle than you're up for, setting your tune manually for each occasion, but it'd be the shortest route to your goal, I think.
EDIT 1: It looks like nobody's gotten to this part of the wiki yet: https://stellaris.paradoxwikis.com/Modding#Stellaris/sound/
Just a bunch of "do it someday" links.
However, I did go to look at some of the events I noticed that every time an event is invoked it calls a sound by key:
So... I know with the pictures that the GFX folder has a file that corresponds event picture keys to files in the event_pictures folder.
Looking in the "stellaris/sounds" folder there's a bunch of .asset files. Opening up sound.asset with a text editor reveals:
So, it should be doable, I'd guess. You'd map the sounds you want to hear to an event that you'd call from the "on_action" file.
You might need to convert them from .ogg to .wav files... which is outside my ken. I don't really know much about sound files. Music files are kept in a separate folder from sound files, so that might be a thing too.You might need to build a parallel folder structure in the sounds folder, if the filename pointer doesn't want to point outside the sounds folder.
I'd imagine there are probably size/duration limits and you'd need avoid invoking too many sounds simultaneously. So, I dunno. But that's some stuff that might get you or someone else pointed in the right direction.