Page 37 of 50

Re: BGS - The BackgroundSet

Posted: Wed Oct 15, 2014 3:04 am
by Diziet Sma
Tricky wrote:
Is this how it is supposed to be?
It's supposed to be overlaid directly over the relevant systems.. problem is, as cool as the new zoom feature is, zooming in or out generally messes this up.

Re: BGS - The BackgroundSet

Posted: Wed Oct 15, 2014 11:37 am
by Cody
Tricky wrote:
Is this how it is supposed to be?
No, which is why I've moaned about the core changes to the long-range chart (and sought a way to disable the BGS mapping).
As Diz says, the zoom is cool - but it ain't really very functional. I hardly ever use it, tbh - whereas I did use the BGS mapping.

Re: BGS - The BackgroundSet

Posted: Thu Oct 16, 2014 9:01 pm
by Tricky
Fixed the QBomb issue for Oolite v1.79+

Download 1.10.6 from the in game OXZ update manager or from:

Re: BGS - The BackgroundSet

Posted: Mon Nov 10, 2014 7:18 pm
by spara
I'm trying to define a new station music for Hoopy Casinos like this:

Code: Select all

		"script_info" = {
			bgs_music = "hoopy_theme.ogg";
		};
As a result the music plays just as it should when I dock and move around the various interfaces. And naturally stops when viewing mission screens as it should. However, when I have the same ogg defined as a mission screen music, it plays for a very short time and then stops. This does not happen when I leave that bgs_music definition out. In that case the music plays in the mission screen as it should. Is it a bug or a feature?

Re: BGS - The BackgroundSet

Posted: Mon Nov 10, 2014 11:10 pm
by Svengali
spara wrote:
I'm trying to define a new station music for Hoopy Casinos like this:

Code: Select all

		"script_info" = {
			bgs_music = "hoopy_theme.ogg";
		};
As a result the music plays just as it should when I dock and move around the various interfaces. And naturally stops when viewing mission screens as it should. However, when I have the same ogg defined as a mission screen music, it plays for a very short time and then stops. This does not happen when I leave that bgs_music definition out. In that case the music plays in the mission screen as it should. Is it a bug or a feature?
It's a bug, but nothing BGS could handle properly and fast, because it is the same music file and handling music is like a blind flight for OXPs.

And if you think about it - even if BGS wouldn't stop the music when the missionscreen gets created (with music property set) it will be stopped by Oolite when it ends. BGS will restart it then, but the result is a gap + rewind.

What you can do is to declare it via script_info key (as you've done already) and when you're creating your missionscreen don't use the music property and use screenID "oolite-" (e.g. "oolite-hoopycasino"). This allows any playing music to continue in BGS. But please note - it is really only a temporary workaround until Tricky has found a better way or Oolite exposes more stuff. No OXP should ever (ab)use Oolites IDs.

Edit: (https://bb.oolite.space/viewtopic.php?f= ... &start=101) Nice idea, spara :D

Re: BGS - The BackgroundSet

Posted: Tue Nov 11, 2014 7:11 am
by cim
Svengali wrote:
handling music is like a blind flight for OXPs.
Yeah, it's not great. The problem is that the zip library doesn't easily do "seek within file", which is needed by the OGG library to get information like "length of track" out of it. There are various potential solutions (the cleanest being "implement seek within file", of course) none of which I've had time to implement yet.

Re: BGS - The BackgroundSet

Posted: Tue Nov 11, 2014 10:57 pm
by streb2001
If I may change the topic a bit? Does BGS manage to load itself early in the OXP loading list? I am trying, successfully, to override some BGS sounds in my own OXP by defining my own customsounds.plist thus:

Code: Select all

{
//
// BGS sound overrides: needed for new engine sound
//
	"[bgs_ambiEngine]" = "sprSilence.ogg";
	"[bgs_fxEngineDown]" = "sprSilence.ogg";
	"[bgs_fxEngineUp]" = "sprSilence.ogg";
//
// Some beefier combat sounds: my personal preference, delete if not wanted
//
	"[alert-condition-red]" = "sprRedAlert.ogg";
	"[player-laser-hit]" = "spr_laserhits.ogg";
	"[player-laser-miss]" = "spr_lasermiss.ogg";
	"[energy-bomb-fired]" = "spr_bigbang.ogg";
}
However, I have read elsewhere that the OXP loading order is not defined so presumably my custom sounds stand a chance of being overridden by BGS if the loading order changes. So what is the deal here? Is this the wrong way to go about this?

Thanks, s2k1

Re: BGS - The BackgroundSet

Posted: Tue Nov 11, 2014 11:58 pm
by Lone_Wolf
streb2001 wrote:
If I may change the topic a bit? Does BGS manage to load itself early in the OXP loading list? I am trying, successfully, to override some BGS sounds in my own OXP by defining my own customsounds.plist thus:

<snip>

However, I have read elsewhere that the OXP loading order is not defined so presumably my custom sounds stand a chance of being overridden by BGS if the loading order changes. So what is the deal here? Is this the wrong way to go about this?

Thanks, s2k1
Check out [wiki]Handling_OXP_Dependencies_with_JavaScript[/wiki] , s2k1 .

Re: BGS - The BackgroundSet

Posted: Wed Nov 12, 2014 6:40 am
by Diziet Sma
Lone_Wolf wrote:
streb2001 wrote:
If I may change the topic a bit? Does BGS manage to load itself early in the OXP loading list? I am trying, successfully, to override some BGS sounds in my own OXP by defining my own customsounds.plist thus:

<snip>

However, I have read elsewhere that the OXP loading order is not defined so presumably my custom sounds stand a chance of being overridden by BGS if the loading order changes. So what is the deal here? Is this the wrong way to go about this?

Thanks, s2k1
Check out [wiki]Handling_OXP_Dependencies_with_JavaScript[/wiki] , s2k1 .
I've had my own tussles with BGS sounds along similar lines.. see my series of posts beginning here: https://bb.oolite.space/viewtopic.php?p=192014#p192014

Basically, OXP loading order is entirely dependent on the particular filesystem in use. Since the changes introduced with the Linux Ext3 and Ext4 filesystems, to improve performance, in Linux machines using those filesystems, load order is totally unpredictable. In the end, I had to edit the BGS customsounds.plist directly, to ensure my changes loaded properly. Probably, Lone_Wolf's link above would present a better solution.

Re: BGS - The BackgroundSet

Posted: Wed Nov 12, 2014 6:54 am
by cim
streb2001 wrote:
However, I have read elsewhere that the OXP loading order is not defined so presumably my custom sounds stand a chance of being overridden by BGS if the loading order changes.
If it's just for your personal use, OXPs or OXZs you place in the AddOns folder will always load later than OXZs placed in the ManagedAddOns folder by Oolite. (This is by design to make it easier to apply local customisations)

The Javascript methods are effective but won't work for plist loading like customsounds.

Re: BGS - The BackgroundSet

Posted: Wed Nov 12, 2014 7:14 am
by Diziet Sma
So that's two things that are good to know.. thanks, cim!

Re: BGS - The BackgroundSet

Posted: Wed Nov 12, 2014 1:33 pm
by streb2001
So the only way to change BGS sounds reliably is to wade into the OXP sounds folder and actually replace the OGGs. That is easy for me but would not make for a releasable OXP or OXZ. Annoying and, I suspect, a can of worms. :(

Re: BGS - The BackgroundSet

Posted: Wed Nov 12, 2014 2:07 pm
by Svengali
streb2001 wrote:
So the only way to change BGS sounds reliably is to wade into the OXP sounds folder and actually replace the OGGs. That is easy for me but would not make for a releasable OXP or OXZ. Annoying and, I suspect, a can of worms. :(
I'm not sure what you want to achieve. Usually there's no need to touch the default engine sounds unless your OXP wants to handle them on its own. And even then it would be better to implement a simple switch in BGS to skip the handling in BGS-M.js .-)

BGS ships two simple ways to declare engine sounds. If you are using a custom script for your player.ship declare the properties bgs_engine, bgs_engineUp and bgs_engineDown or - equally simple - declare them as script_info key in shipdata.plist (see [wiki]BGS_Doc[/wiki]). Both ways provide the ability to use soundsets based on entities, means that different playerships can use a 'personal' soundset.

What is missing in BGS is reverting to the default sounds if no own set is defined. This was on my list for quite some time, but it had a very low priority, because no other OXPer used them at all.

Re: BGS - The BackgroundSet

Posted: Wed Nov 12, 2014 2:23 pm
by streb2001
I want to silence

[bgs_fxEngineDown]
[bgs_fxEngineUp]

and replace the ambient engine sound with my own sound.

I need to do this inside my own OXP because I am doing other non-BGS engine sound stuff using JS.

I will have a look at your player.ship idea and see if this helps, thanks.

Re: BGS - The BackgroundSet

Posted: Wed Nov 12, 2014 6:55 pm
by Norby
There is a bigger problem here: the BGS Soundset by P.A. Groove, which is downloaded more than 900 times, use the same customsounds.plist to redefine many sounds, but the only thing which cause to working in most cases is the alphabet: placed below than the main BGS in the expansion list so usually downloaded later than the BGS and in this case filesystems usually place later into the directory list,

A workaround if the customsounds.plist or at least the clashing lines are separated from BGS into a "BGS Sounds" oxz, so BGS leave the default sounds untouched without this and surely got the another soundset if BGS and "BGS Soundset by P.A. Groove" is installed but "BGS Sounds" is not.

In this way other sound oxzs are possible like "Soundset by streb2001 with silent engines".