[WIP] Contextual Jukebox OXP

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

User avatar
tsoj
Deadly
Deadly
Posts: 199
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by tsoj »

hiran wrote: Wed Dec 15, 2021 3:47 pm
For now we chould have chungs of music. One of the chunk is the repetitive section in the middle. Not too long. Then another one fading in and another one fading out. Plus all the chunks run through a compressor so they should have the same volume. This does nto have to be done on the fly in the game.

Maybe the effects can still be finetuned later - but we could run our first experiments to see if that enhances gameplay at all.
Turned out I was wrong: There already exists a way to change the volume during a song, and it also works as a fade out. Here is a small example that plays a song after undocking, while fading it in and out (it's just an example, the timer isn't properly disposed of which should be done for a serious OXP):

Code: Select all

this._volume = 1.0;
this._addition = -0.05;
this._timer = null;

this._changeVolume = function() {
	this._volume += this._addition;

	if(this._volume >= 1.0)
		this._addition = -0.05;
	if(this._volume <= 0.0)
		this._addition = 0.05;
	
	this._volume = Math.min(Math.max(this._volume, 0.0), 1.0);
	
	Sound.musicSoundSource().volume = this._volume;
}


this.shipLaunchedFromStation = function(stationLaunchedFrom)
{
	Sound.playMusic("mysong.ogg", false, 1.0);
	this._timer = new Timer(this, this._changeVolume.bind(this), 5, 0.25); // call this._changeVolume every 0.25 seconds
}
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 512
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by arquebus »

Great! Is there a way to attach this to the format in orchestral demo and the jukebox? Perhaps an additional parameter that specifies a fade-out length. (I'm assuming that the format in orchestral demo is from a custom function in the library oxp.)

^- please note that I'm a baboon trying to speak words here, I have a smidge of python and Neverwinter Nights 2 scripting, my brain was bleeding just typing the above.
Here is my YouTube channel, where I play poorly: Arquebus X
User avatar
Cholmondely
Archivist
Archivist
Posts: 5006
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by Cholmondely »

Regarding your comments on YouTube, our wiki can handle an upload of an .oxz anywhere up to 150Mb in size.

Better to publish it as an .oxz, then everybody will see it when they play and look at the Expansions Manager. Putting oxp's elsewhere usually consigns them to obscurity...

And maybe title it: Music: Contextural Jukebox (so that even our Uzbekistani players can easily work out what it is!)

If you can't get a log-in for the wiki to upload it, one of us can do it for you. The log-in for the back end of the Expansions Manager is much easier to arrange (Phkb, Montana05 or Hiran can all arrange one for you).
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: 512
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by arquebus »

I haven't gotten back to working on the OXP and I probably won't have time for it in the near future, so might as well just call it 1.0 for now.

I'll fiddle with the manifest info etc. and then work on the next step of getting it put somewhere.
Here is my YouTube channel, where I play poorly: Arquebus X
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 512
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by arquebus »

Ok, what do I need to do to get this thing in the manager?
Here is my YouTube channel, where I play poorly: Arquebus X
User avatar
Cholmondely
Archivist
Archivist
Posts: 5006
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by Cholmondely »

arquebus wrote: Sat Feb 12, 2022 9:32 pm
Ok, what do I need to do to get this thing in the manager?
1) Reference: OXP howto (see details for .oxz's)

2) With your new Arquebus log-in for the wiki (lurking in your PM's), select Upload file (otherwise invisible) and upload the OXZ (with accurate details in its manifest.plist)

3) Ask Phkb for a log-in for the oolite.org Expansion Packs page

4) Create a wiki page for your new .oxz / do what you want with your new user:page (User:Arquebus) with whatever appeals

5) With your second log-in, On the oolite.org Expansion Packs page select "upload your manifest files"

6) Fill in the glorious and exhilarating minutiae (a manifest file is not the same as the manifest.plist)

7) Bask in well-deserved glory!
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
Cholmondely
Archivist
Archivist
Posts: 5006
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by Cholmondely »

Wiki page now up: Contextual Jukebox OXP
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: 512
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by arquebus »

Ok I am finally FINALLY getting off my butt and creating the OXZ for this and then step two is...? Has anything changed since the switch to oolite.space? Also it looks like I'll need to require/force-download Library OXP. Where do I go for info on how to do that? Is it part of the manifest.plist?
Here is my YouTube channel, where I play poorly: Arquebus X
User avatar
Cholmondely
Archivist
Archivist
Posts: 5006
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by Cholmondely »

arquebus wrote: Mon May 29, 2023 8:50 pm
Ok I am finally FINALLY getting off my butt...
Just thinking.

If you have not concluded this already, it should be possible to split up the massive oxz into smaller chunks and then make them dependent on each other through their manifest.plists - that way you could upload them onto the Expansions Manager.

Additional Planets does this. So does Planetary Systems with its Texture Packs. And you can sneak a peek at all the javascript here: https://ooliteproject.github.io/oolite- ... index.html
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: 512
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by arquebus »

Cholmondely wrote: Mon May 29, 2023 11:04 pm
arquebus wrote: Mon May 29, 2023 8:50 pm
Ok I am finally FINALLY getting off my butt...
Just thinking.

If you have not concluded this already, it should be possible to split up the massive oxz into smaller chunks and then make them dependent on each other through their manifest.plists - that way you could upload them onto the Expansions Manager.

Additional Planets does this. So does Planetary Systems with its Texture Packs. And you can sneak a peek at all the javascript here: https://ooliteproject.github.io/oolite- ... index.html
I haven't done it yet. Not even started. Too many steps! The file isn't all that big - only 100MB.
Here is my YouTube channel, where I play poorly: Arquebus X
Post Reply