Re: YouTube playthroughs
Posted: Fri Dec 10, 2021 1:17 am
Listened to a couple of tracks...I like it. Certainly would work as background music, as long as the levels are kept low enough to avoid clashing with the sound effects.
For information and discussion about Oolite.
https://bb.oolite.space/
Best of British. I found that HyperRadio did diddly-squat for me...
This can be done like that:
Code: Select all
worldScripts.Lib_Music._addEventMusic({
aegis:{
enter:[
{snd:"lib_orch_aegis_enter03_0.ogg",dur:98},
{snd:"lib_orch_aegis_enter03_1.ogg",dur:100},
{snd:"lib_orch_aegis_enter03_3.ogg",dur:35}// in case of this event (entering aegis) one of these sound files is played
]
},
...
},
a
);
worldScripts.Lib_Music._toggleGroup(a); // Turn them on
worldScripts.Lib_Music._addChannel({name:"fight",sounds:[
{snd:"lib_orch_radio_fight05_0.ogg",dur:91},
{snd:"lib_orch_radio_fight05_1.ogg",dur:55},
{snd:"lib_orch_radio_fight05_2.ogg",dur:94} // same here: for fighting situations these are played in a random order with some random pause in between
]});
_addChannel
functionality, which basically behaves like a radio.The fact that it does not work for me means nothing. I run an ornery old AppleMac which jibs at semicolons and throws a fit. Not that I know what I'm doing half the time, either...
Feel free to ask any small or big questions (maybe in another thread?). By the way, I tried multiple formats, and only .ogg files seem to work, so perhaps that saves you some hassle.
So from that it looks like the "generic" media element plays both in space and in stations. I was hoping I could keep the space music separate, since I plan to make that music very specifically ambient/environmental/creepy (not sure the best way to describe it...tracks that sound like this: https://soundimage.org/wp-content/uploa ... bience.mp3 ) but that doesn't really fit for being on station. Unless you want Oolite to turn into a horror game.tsoj wrote: ↑Fri Dec 10, 2021 1:46 amFor all the possible events you can find a list here.
Important to note may be, that for each event, only one song is played, so for example, only when the alert changes to red, a new song will be played. After that, even if the alert stays red, you have to rely on the_addChannel
functionality, which basically behaves like a radio.
Yes, as far as I can see, this is currently not possible. However, I think this could be changed quite easily, so that you not only have the radio channels "generic" and "fight", but also "docked". Unfortunately, it doesn't look like the Library OXP is currently maintained, so I would create a new version with the necessary changes myself, that I can upload sometime this weekend.arquebus wrote: ↑Fri Dec 10, 2021 8:53 pmSo from that it looks like the "generic" media element plays both in space and in stations. I was hoping I could keep the space music separate, since I plan to make that music very specifically ambient/environmental/creepy, but that doesn't really fit for being on station. Unless you want Oolite to turn into a horror game.
The orchestral oxp has something separated out for "Rock Hermit" which apparently is a sufficiently specific station name. So perhaps there are generic station names that I can use? The wiki page says you need to have the name of the station to play music specific to it rather than generic, and I was just thinking about the multiple galaxy maps and reeling in horror....tsoj wrote: ↑Fri Dec 10, 2021 9:16 pmYes, as far as I can see, this is currently not possible. However, I think this could be changed quite easily, so that you not only have the radio channels "generic" and "fight", but also "docked". Unfortunately, it doesn't look like the Library OXP is currently maintained, so I would create a new version with the necessary changes myself, that I can upload sometime this weekend.
You could have specific music for each station type. So, for example, you could also use "Coriolis Station" instead of "Rock Hermit" to have specific music for when being docked at a Coriolis station. For the stations of the core game this would probably be manageable, but as soon as you start including OXP stations, which all have different names, this could become difficult.arquebus wrote: ↑Fri Dec 10, 2021 9:23 pmThe orchestral oxp has something separated out for "Rock Hermit" which apparently is a sufficiently specific station name. So perhaps there are generic station names that I can use? The wiki page says you need to have the name of the station to play music specific to it rather than generic, and I was just thinking about the multiple galaxy maps and reeling in horror....
Code: Select all
stationSounds:[
{snd:"musicForStations01.ogg",dur:180},
{snd:"musicForStations02.ogg",dur:234},
{snd:"musicForStations03.ogg",dur:67}
...
]
var shipKeys = Ship.keys();
for(let i in shipKeys){
var shipdata = Ship.shipDataForKey(shipKeys[i]);
// here we could also check if this is actually a station or not by looking at 'shipdata.roles' for the word "station" or "carrier"
// but as we can just dock at stations anyway, it will "only" waste some memory
// so we basically add a channel for each ship. which means that these sounds will be played whenever we dock at any station
// 'shipdata.name' is the property that Lib_Music looks at to decide where we docked
worldScripts.Lib_Music._addChannel({name: shipdata.name, stationSounds});
}