Page 1 of 1

BGS and adding background sounds to mission screens

Posted: Sun Dec 06, 2015 2:55 am
by phkb
In BGS there is code to allow the various contract mission screens to have the background sound effects continue playing. For all other mission screens the sound effects basically stop while the screen is active. It looks like the method BGS uses to work out the contract screens are active is to look at the screen ID, split the string based on a "-" separator character, check the first element for "oolite", then check the last element for either "summary", "map" or "none".

If I want to apply the same rules to a mission screen, the most obvious way to achieve it would be to just give my mission screens a screen ID that conforms with the above specification. But is there a more "official" way of doing it? I checked the documentation on the Wiki but couldn't seem to find anything that covered this situation. Have I missed something? Actually I think I must have missed something so any pointers would be greatly appreciated.

Re: BGS and adding background sounds to mission screens

Posted: Mon Dec 07, 2015 4:42 pm
by Svengali
phkb wrote:
But is there a more "official" way of doing it?
screenID only has to be a String. There's no other rule or another way to identify a specific missionscreen.

Re: BGS and adding background sounds to mission screens

Posted: Mon Dec 07, 2015 6:41 pm
by phkb
I'm sorry, I wasn't clear enough. I mean official from a BGS point of view. What's the best way to get BGS to continue playing the background ambient sounds on a mission screen, without giving it a screen ID that looks like "oolite-blah-blah-map" etc. I'm trying to make my mission screens more integrated, and the sound component is one I've ignored for a while. At the moment there is a jarring halt to all sounds when one of my mission screens open, so I'd like to get BGS to continue to play ambient sounds while they're running.

Re: BGS and adding background sounds to mission screens

Posted: Mon Dec 07, 2015 7:41 pm
by Svengali
Ah, ok. At least Tricky's github-repo doesn't contain anything beyond the v1.77.1 handling you've described above. The ship registering screens are not handled as well.