Page 2 of 7

Re: Library

Posted: Tue Oct 11, 2016 3:01 pm
by Cody
Svengali wrote:
It's already gone...
Already Gone? Any excuse for a song! <grins>

Re: Library

Posted: Tue Oct 11, 2016 3:09 pm
by Svengali
Cody wrote:
Svengali wrote:
It's already gone...
Already Gone? Any excuse for a song! <grins>
Till you put me down ... sigh

Re: Library

Posted: Tue Nov 01, 2016 11:26 am
by Svengali
Library1.1 for current trunk is available -> Library1.1.oxp.zip (801.7 KB)

Changes:
- Master volume for Lib_Music settable through Lib_Config.
- Added volume parameter for tracks in Lib_Music.

See Separate Volume Controls

Re: Library

Posted: Tue Nov 01, 2016 3:39 pm
by CaptSolo
I am playing Oolite 1.84. Does this OXP negate the need to have both BGS and CCL in my AddOns folder?

Re: Library

Posted: Tue Nov 01, 2016 3:49 pm
by Cody
Yes - you'll need BGS 2.0, but not CCL, if you install Library.

Re: Library

Posted: Wed Nov 02, 2016 2:12 pm
by Svengali
CCL? It depends on what kind of AddOns you're using.
As Cody already pointed out BGS2.0 doesn't need it and my other AddOns (Snoopers and Vector) will switch to Library as well. Library also replaces OXPConfig and Hyperradio - both were just to limited and Library offers better functionality.

Re: Library

Posted: Thu Nov 03, 2016 11:29 pm
by CaptSolo
With Hyperradio.js I added .ogg filenames to the playList array and moved the .ogg files to the Music folder. How is this handled with Library 1.0?

Re: Library

Posted: Fri Nov 04, 2016 12:56 pm
by Svengali
CaptSolo wrote:
With Hyperradio.js I added .ogg filenames to the playList array and moved the .ogg files to the Music folder. How is this handled with Library 1.0?
To add a radio channel

Code: Select all

this.startUpComplete = function(){
	delete this.startUpComplete;
	worldScripts.Lib_Music._addChannel({name:"MyCustomChannel",radio:1,sounds:[
		{snd:"MyOXPTrack01.ogg",dur:240},
		{snd:"MyOXPTrack02.ogg",dur:223}
	]});
};
Custom channels are not automagically played, but you can activate them through Lib_Config (the setting is saved with your savedgame). It is possible to activate them via script, but this should be done only for missions to take over.

Re: Library

Posted: Fri Nov 04, 2016 8:56 pm
by CaptSolo
So, looking at your music demo, am I correct in assuming I need to code a separate OXP and then use Library's Config AddOn to get back the functionality I had with Hyperradio?

Re: Library

Posted: Fri Nov 04, 2016 10:56 pm
by Svengali
It depends on what you really want .-)

The simplest way would be to add your files to the "generic" channel (as per demo). This channel (and "docking" and "fight") are automagically used and don't have to be activated through Lib_Config. The same is true for entity name channels (e.g. "Rock Hermit").

Custom radio channels on the other hand are meant to be used by music expansions, e.g. a Blues channel. Users can install a few and select what they want through Lib_Config. The activated channels are then cloned+merged into one playlist.

And yes, in all cases it needs an OXP which tells Lib_Music what to do.

Re: Library

Posted: Sun Nov 06, 2016 9:47 pm
by CaptSolo
Doing a little experimenting and I must say, Library and the new version of BGS rock!

Re: Library

Posted: Mon Nov 07, 2016 7:29 pm
by Svengali
.-)

Just as sidenote: I really think that we are in dire need of a community driven library to aid AddOn-developers and players. If you take a look at available AddOns you can see that a lot of code goes into duplicated functionality and attempts to be compatible to other AddOns. What a waste.

Re: Library

Posted: Fri Jul 07, 2017 3:13 pm
by Svengali
Library1.2 for current trunk is available -> Library1.2.oxp.zip (801.9 KB)

Changes:
- Solves issue 225 (thanks a_c and phkb)
- Added temporary freeze for $IDRules in Lib_GUI

Re: Library

Posted: Mon Aug 07, 2017 1:18 pm
by Cody
Latest trunk - 1.85.0.6988-170807-934bd29

Code: Select all

12:44:44.805 [WARNING]: Warning! Global namespace polluted by:
12:44:44.805 [WARNING]: ["getScreenBackgroundForKey","setScreenBackgroundForKey"]

Re: Library

Posted: Mon Aug 07, 2017 5:57 pm
by Svengali
Cody wrote: Mon Aug 07, 2017 1:18 pm
Latest trunk - 1.85.0.6988-170807-934bd29

Code: Select all

12:44:44.805 [WARNING]: Warning! Global namespace polluted by:
12:44:44.805 [WARNING]: ["getScreenBackgroundForKey","setScreenBackgroundForKey"]
Thanks Cody.-) I'll implement the new method names.