BGS - The BackgroundSet

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

Moderators: winston, another_commander

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: BGS - The BackgroundSet

Post 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.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: BGS - The BackgroundSet

Post 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.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: BGS - The BackgroundSet

Post by Tricky »

Fixed the QBomb issue for Oolite v1.79+

Download 1.10.6 from the in game OXZ update manager or from:
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: BGS - The BackgroundSet

Post 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?
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post 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
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: BGS - The BackgroundSet

Post 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.
User avatar
streb2001
Competent
Competent
Posts: 53
Joined: Sat Aug 16, 2014 12:06 pm

Re: BGS - The BackgroundSet

Post 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
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: BGS - The BackgroundSet

Post 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 .
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: BGS - The BackgroundSet

Post 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.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: BGS - The BackgroundSet

Post 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.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: BGS - The BackgroundSet

Post by Diziet Sma »

So that's two things that are good to know.. thanks, cim!
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
streb2001
Competent
Competent
Posts: 53
Joined: Sat Aug 16, 2014 12:06 pm

Re: BGS - The BackgroundSet

Post 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. :(
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post 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.
User avatar
streb2001
Competent
Competent
Posts: 53
Joined: Sat Aug 16, 2014 12:06 pm

Re: BGS - The BackgroundSet

Post 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.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: BGS - The BackgroundSet

Post 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".
Post Reply