YouTube playthroughs

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: YouTube playthroughs

Post by arquebus »

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.
Here is my YouTube channel, where I play poorly: Arquebus X
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: YouTube playthroughs

Post by Cholmondely »

There you go! You can now write your very first .oxp!

My first attempts were all disasters, complete and unmitigated... I tried to add a couple of books to the Ship's Library (for which you've delivered so many enthusiastic encomia!) - rejected as gibberish by my awesome and admirable AppleMac. Then I had a stab at HDBG-B (ditto), attempts to add markets to old stations (BioSphere & DisoB) met a similar fate, etc., etc. The only thing which worked was when NiteOwl held my hand and I was then able to add automatic docking capability to Liners & Dredgers. And several of the things I got to work, lapsed into gibberish & gobbledegook in no time flat...
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: YouTube playthroughs

Post by arquebus »

I'm fairly confident I could just rip the guts out of the orchestral OXP and put in the new music, keeping the script as-is. But that's the extent of it. What I'd love to do is be able to have multiple variations for each event, but I don't know if that's possible. The orchestral OXP currently has 12 tracks that are all assigned to specific events.
Here is my YouTube channel, where I play poorly: Arquebus X
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: YouTube playthroughs

Post by arquebus »

And now I'm just having crazy ideas like having an options setup in F4 where you could toggle between the orchestral stuff and other music sets....

Waaaaay beyond my skillset.

I really need to try out HyperRadio, that might already be the thing.
Here is my YouTube channel, where I play poorly: Arquebus X
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: YouTube playthroughs

Post by Cholmondely »

arquebus wrote: Fri Dec 10, 2021 1:40 am
And now I'm just having crazy ideas like having an options setup in F4 where you could toggle between the orchestral stuff and other music sets....

Waaaaay beyond my skillset.

I really need to try out HyperRadio, that might already be the thing.
Best of British. I found that HyperRadio did diddly-squat for me...
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
tsoj
Deadly
Deadly
Posts: 199
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Re: YouTube playthroughs

Post by tsoj »

arquebus wrote: Fri Dec 10, 2021 1:37 am
What I'd love to do is be able to have multiple variations for each event, but I don't know if that's possible.
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
]});
For 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.
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: YouTube playthroughs

Post by arquebus »

Great!

Caveat, "I have no idea what any of that means," but I'm sure I'll be able to trial and error my way through it.
Here is my YouTube channel, where I play poorly: Arquebus X
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: YouTube playthroughs

Post by arquebus »

So it sounds like HyperRadio is effectively deprecated - I'm guessing it's more like a hammer than a scalpel?
Here is my YouTube channel, where I play poorly: Arquebus X
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: YouTube playthroughs

Post by Cholmondely »

arquebus wrote: Fri Dec 10, 2021 3:41 pm
So it sounds like HyperRadio is effectively deprecated - I'm guessing it's more like a hammer than a scalpel?
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...
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
tsoj
Deadly
Deadly
Posts: 199
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Re: YouTube playthroughs

Post by tsoj »

arquebus wrote: Fri Dec 10, 2021 3:39 pm
Great!

Caveat, "I have no idea what any of that means," but I'm sure I'll be able to trial and error my way through it.
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.

If you're totally new to programming, it'll potentially help to take a quick look at a short introduction into JavaScript, for example, JavaScript basics - Language basics crash course (everything after (and including) the section "Events" is not so important in the Oolite context. There are some moderately essential things missing in this short summary: arrays and for-loops). I don't think all that it is really necessary in this case, but understanding a bit more what all of this means, makes it probably easier to work with.

If you want to really learn JavaScript, this YouTube video might be helpful.

In case you just want to get this working, you could give me a list of music files with associated events, and I could put a script together. Finding good music for the events is from my perspective the hardest part :P.
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: YouTube playthroughs

Post by arquebus »

tsoj wrote: Fri Dec 10, 2021 4:24 pm
If you're totally new to programming

I'm not *totally* new, but new enough. I have a touch of python and a lot of Neverwinter Nights 2 scripting.

The format of the orchestral demo OXP and the stuff on the wiki look straightforward enough that I think I could copy what's necessary to make things work.

The first thing I'm going to do, though, is scrounge for the music. I have copious amounts of downtime at work.
Here is my YouTube channel, where I play poorly: Arquebus X
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: YouTube playthroughs

Post by arquebus »

tsoj wrote: Fri Dec 10, 2021 1:46 am
For 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.
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.
Here is my YouTube channel, where I play poorly: Arquebus X
User avatar
tsoj
Deadly
Deadly
Posts: 199
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Re: YouTube playthroughs

Post by tsoj »

arquebus wrote: Fri Dec 10, 2021 8:53 pm
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, but that doesn't really fit for being on station. Unless you want Oolite to turn into a horror game.
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
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: YouTube playthroughs

Post by arquebus »

tsoj wrote: Fri Dec 10, 2021 9:16 pm
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.
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....
Here is my YouTube channel, where I play poorly: Arquebus X
User avatar
tsoj
Deadly
Deadly
Posts: 199
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Re: YouTube playthroughs

Post by tsoj »

arquebus wrote: Fri Dec 10, 2021 9:23 pm
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....
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.

As I am thinking about it, there might be a workaround:

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});
}
I haven't tried it, but I think it could work. Problem is that it might keep the music files once for each ship in memory. So instead of maybe 20 MB of songs, we need to store possible 100 times as much (basically multiply it with how many OXP ships and stations you have installed).
Post Reply