Star Fuel OXZ

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

Moderators: another_commander, winston

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Star Fuel OXZ

Post by Redspear »

Based on ideas I first discussed here, I present a new expansion that offers extra incentive to sun-skim for fuel at some stars.

Quick Summary:

What?
  • Double injector speed bonus for scooped fuel from systems with the larger main planets

How?
  • Scoop fuel as normal, if the system main planet is big enough then a message will confirm you are scooping 'premium' fuel and subsequent injector use will be boosted
  • On purchasing fuel or scooping from an unsuitable star the 'premium' fuel will be diluted and the bonus lost

Why?
  • Fuel scooping is an underused element of gameplay IMO and largely because the risk and time required are not balanced by the reward
  • Bonus only applied at some stars rather than all - bonus should not become mundane I think
  • Uses planet radius rather than stars as it is less commonly manipulated by oxps and additionally it is visible on the galactic charts
  • Larger main planets tend to 'orbit' the larger stars and they are the most dangerous to scoop from

Gameplay Posibilites:
  • Before heading into a dangerous system, a pilot may wish to make a detour in order to scoop from a particular star
  • Pilots of slower or more vulnerable ships may wish to look for routes that include the relevant stars
  • Motivation to sun-skim in the first place (outside of a mission)

In future I may wish to vary the bonus based on star colour or similar.
Double bonus may be a touch on the generous side however this version should be quite playable IMHO.

Available from the download manager.
User avatar
Damocles Edge
---- E L I T E ----
---- E L I T E ----
Posts: 256
Joined: Thu Mar 30, 2017 9:57 pm

Re: Star Fuel OXZ

Post by Damocles Edge »

Sounds like a great idea to promote sun skimming and I look forward to trying it out:D

Can I ask a few questions before I do so please?

1. Will this work with fuel tweaks oxp so that collected and stored fuel will retain premium benefits?

2. Will this work with Extra Fuel Tanks oxp so that fuel in additional tank gains benefit?

3. Would this oxp mean that you would have 2 separate fuel market prices on F8 screen (regular & premium) ?
O.C.T.D (Oolite Crash Test Dummy) Hmm Hmm Hmm Hmm......
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Star Fuel OXZ

Post by Redspear »

Without being overly familiar with regards to the exact working of thise two oxps...

1. Bonus is maintained until you either buy fuel or scoop from an unsuitable star.
There is no test for purity or storage, it's all about your last source.

2. For the same reason, if you've just scooped from the right kind if star then ALL of your ship's fuel now has the bonus. This might seem unrealistic but on some level all of your fuel has now been exposed to the atmosphere of such a star.

3. No. If you sell it then it becomes 'regular' as soon as it leaves your tanks. It's important that this stuff isn't for sale (in at least most circumstances) or else it no longer becomes appealing to skim for it.

Hope that helps. If you need any further clarifucation the just ask.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4619
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Star Fuel OXZ

Post by phkb »

Without looking at how this OXP works, my guess is that any scooped fuel that doesn’t go directly into your tank will not have premium benefits. So, with Fuel Tweaks, any fuel container you fill up will only ever be normal fuel. I’m okay with this mechanic, as the handwavium would be that the overhead of checking the quality of fuel in each container is too high, based on the likely price difference the premium fuel would have.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Star Fuel OXZ

Post by Redspear »

Bonus is applied directly to ship and not to fuel per se.

Code: Select all

this.shipScoopedFuel = function()
{
	if (system.info.radius > 6000) {	//	based on planet rather than sun radius (former visible on galactic chart)
		player.ship.awardEquipment("EQ_STAR_FUEL");
		player.ship.injectorSpeedFactor = _SFtrue;
		player.consoleMessage ("Now Scooping PREMIUM Fuel");
		}
		else{
		player.ship.removeEquipment("EQ_STAR_FUEL");
		player.ship.injectorSpeedFactor = _SFfalse;
		}
}

The 'Star Fuel' equipment is just being used as a non-visible marker in order to check fuel state on loading a saved game.
(This is probably not the best way to do things but I'm learning as I go...)
User avatar
Damocles Edge
---- E L I T E ----
---- E L I T E ----
Posts: 256
Joined: Thu Mar 30, 2017 9:57 pm

Re: Star Fuel OXZ

Post by Damocles Edge »

That answers all - many thanks Redspear.

Just realised that I will need to remove Fuel Collector oxp as the two wouldn't play well together - on a side note, it scares me how many oxp's I instinctively think of as an integral part of the game rather than an oxp due to using them for so long.

Would I be correct in saying that this is just a bonus applied solely to the player ship?

I appreciate how daft asking this question probably makes me sound :? as it would almost certainly eliminate the reason for the oxp in the first place if other ships had this bonus too.

But ... I'd only be kidding myself if I claimed not to be daft :wink:

:lol:
O.C.T.D (Oolite Crash Test Dummy) Hmm Hmm Hmm Hmm......
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Star Fuel OXZ

Post by Redspear »

I'd need to check Fuel Collector but I don't expect a direct conflict. I don't think fuel is truly scooped with that one, I think it is just added. However, there's a strong case for saying that there should be conflict or else sometimes there'd be premium fuel just lying around allover the place...

Yes, it's a player only bonus at present.
The main reason for this is that should there be an instance where player tries to escape adversary that also has bonus then it would appear useless or (even worse) broken.
If a non-player ship had the bonus when the player didn't then that would not be so bad ("how the hell is that python keeping up with my asp?" etc.)

I could change exhaust colour to make it more apparent but I have plans for that cosmetic element with one of my other oxps. Meanwhile I think it's important that when the player goes to the trouble of scooping at one of the more dangerous stars there should be a reliable reward. When I stop being regularly outnumbered by pirates in the safer systems then I might start worrying about non-player ships not having the bonus.

So, fair question methinks... or is it just that I'm daft too? :P
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: Star Fuel OXZ

Post by montana05 »

As much as I can remember "Black Monk Monasteries" had some kind of premium fuel as well, I think it lasted as long as the amount you bought got totally used, independent if you refueled in the meanwhile. Maybe some idea for this OXP as well ;)
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Star Fuel OXZ

Post by Redspear »

Thanks montana05.

I didn't see any mention on the wiki page, presumably it's a later addition to that oxp.
Anyone know what sort of benefit it grants (or it it just the monks charging extra)?

Doubt there'll be any real conflict beyond confusion but I may have to consider rewording.
Then again if the monastaries are rare enough then maybe they've monopolised the supply...
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: Star Fuel OXZ

Post by montana05 »

I got this OXP now in use in one of my test environments, actually only to watch the balance between defense ships and mercenaries attacking the monastery. However, tomorrow after my (most likely) hangover is gone I will be happy to have a look at the code and provide you with more details.

You are able to buy within the monastery premium fuel for a higher price and, as much as I remember, it was very useful. Details, as mentioned before, tomorrow. :wink:
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Damocles Edge
---- E L I T E ----
---- E L I T E ----
Posts: 256
Joined: Thu Mar 30, 2017 9:57 pm

Re: Star Fuel OXZ

Post by Damocles Edge »

Just thought I'd give some feedback from my short use of this oxp so far.

So far I'm really enjoying this oxp.

I removed fuel collector as it could on some planets give an unfair advantage (as the small 0.1LY top of gained whilst flying normally could render the entire tank as premium) whilst premium fuel gathered from sun skimming in another system would be turned into normal fuel by the same top up collection in a non premium fuel system.
Hope that the above made sense (and that I have understood the logic by which Star Fuel oxp works).

The scooping works fine with a nice alternating prompt whilst scooping to inform that fuel is premium fuel being collected.

I'm a little uncertain as to what constitutes the main planet being big enough to supply premium fuel from it's sun?
I am making the assumption that this relates to the average radius of the planet (although I could be barking up the wrong tree completely). So far a planet with radius 5105 seemed to be too small but another with radius 6652 was enough to yield the premium fuel.
My concern is that at present there is no indication whether or not a sun will yield premium fuel until you start to sun skim. This would make planning for someone in a slow ship impossible at present, maybe the planets F7 page could have an entry to show whether premium fuel is present or not.
I think the idea of a different exhaust colour whilst injectors being used would be really good.
It may also be a nice idea if the fuel gauge used a different colour when premium fuel is active (although I appreciate that this is down to the HUD rather than this oxp).
Another thing which could be considered is that if premium fuel gives double the speed when used with injectors, could it also yield some benefit in witchspace travel.
I'm not suggesting that it should allow you to travel further than 7.0 LY but that maybe less fuel is used - this would help larger, slow ships as more fuel would be kept after coming out of witchspace to help keep them out of trouble (especially on longer jumps).
At present the Advanced Nav Comp https://bb.oolite.space/viewtopic.php?f=4&t=13526 uses this effect and so works well in tandem with this oxp.
But I am thinking more of pilots that don't have the Adv Nav Comp - who after a long witchspace jump may have very little or no fuel left with which to gain an advantage in injector speed.

Hope my comments / ideas / ramblings are of some use.

Keep up the good work.
O.C.T.D (Oolite Crash Test Dummy) Hmm Hmm Hmm Hmm......
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Star Fuel OXZ

Post by Redspear »

montana05 wrote:
Details, as mentioned before, tomorrow. :wink:
Thanks! and good luck with the hangover :D

Damocles Edge wrote:
Just thought I'd give some feedback from my short use of this oxp so far.

So far I'm really enjoying this oxp.
Awesome! :D

Damocles Edge wrote:
I removed fuel collector as it could on some planets give an unfair advantage (as the small 0.1LY top of gained whilst flying normally could render the entire tank as premium) whilst premium fuel gathered from sun skimming in another system would be turned into normal fuel by the same top up collection in a non premium fuel system.
Hope that the above made sense (and that I have understood the logic by which Star Fuel oxp works).
I think so... So the fuel collector awards fuel as if it were from the system star?
As opposed to buying from the station (as I deliberately coded that not to).

Damocles Edge wrote:
I'm a little uncertain as to what constitutes the main planet being big enough to supply premium fuel from it's sun?
I am making the assumption that this relates to the average radius of the planet (although I could be barking up the wrong tree completely). So far a planet with radius 5105 seemed to be too small but another with radius 6652 was enough to yield the premium fuel.
Yep, if you peek at the code snippet above you can probably find the threshold value.
I realise not everyone can 'read' javascript (I can barely manage it myself) but I think it's quite clear in this instance.

Damocles Edge wrote:
My concern is that at present there is no indication whether or not a sun will yield premium fuel until you start to sun skim. This would make planning for someone in a slow ship impossible at present, maybe the planets F7 page could have an entry to show whether premium fuel is present or not.
Yeah... I was unsure whether or not to make it explicit as a bit of experimentation or even blind luck could be rewarding.
But now that the relevant bit of code is up on the first page it's there for everyone to see.
Deliberately it is based upon planet radius as that shows up numerically on f7 and graphically on f6.

Damocles Edge wrote:
I think the idea of a different exhaust colour whilst injectors being used would be really good.
Saving that for Equipment by Ship Class, which I am still working on, honest! :wink:

Damocles Edge wrote:
Another thing which could be considered is that if premium fuel gives double the speed when used with injectors, could it also yield some benefit in witchspace travel.
I'm not suggesting that it should allow you to travel further than 7.0 LY but that maybe less fuel is used - this would help larger, slow ships as more fuel would be kept after coming out of witchspace to help keep them out of trouble (especially on longer jumps).
I thought about this but there are, to my mind at least, too many reasons not to:
  • Double injector bonus is already not too shabby
  • There are other oxp's that do this
    and crucialy...
  • It would further reduce the need to sunskim in the first place, defeating the main purpose of the oxp

Damocles Edge wrote:
Hope my comments / ideas / ramblings are of some use.

Keep up the good work.
Definitely, and thanks :)
User avatar
Damocles Edge
---- E L I T E ----
---- E L I T E ----
Posts: 256
Joined: Thu Mar 30, 2017 9:57 pm

Re: Star Fuel OXZ

Post by Damocles Edge »

Redspear wrote: Mon Dec 31, 2018 4:18 pm
I think so... So the fuel collector awards fuel as if it were from the system star?
As opposed to buying from the station (as I deliberately coded that not to).
I must confess as it seems I haven't made myself clear as my understanding of coding is practically nil and my thoughts are based mainly upon how I assume / imagine that it may work - please accept my apologies if I have mislead you into thinking I actually know what I am talking about :oops:
Redspear wrote: Mon Dec 31, 2018 4:18 pm
Yep, if you peek at the code snippet above you can probably find the threshold value.
I realise not everyone can 'read' javascript (I can barely manage it myself) but I think it's quite clear in this instance.
You know I actually just read this again and couldn't see it :?
I then realised that yet again it was down to my failure to read things properly :oops: Save me Specsavers :lol:

I think you're absolutely right regarding the other random ideas I had concerning fuel save and for premium fuel and knowing for sure whether it is available.
Oolite after all is about choosing your own path, exploring the unknown and enjoying unknown / unforeseen events / challenges (such as running low or out of fuel).
All of my most enjoyable play sessions in Oolite have been when I have in a ship with weaker specs than the opposition and having to find a new way of playing rather than relying on superior specs.
Indeed running and just barely getting away from an enemy by the skin of your teeth is often the most rewarding feeling.
O.C.T.D (Oolite Crash Test Dummy) Hmm Hmm Hmm Hmm......
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Star Fuel OXZ

Post by Redspear »

Damocles Edge wrote: Mon Dec 31, 2018 5:36 pm
Redspear wrote: Mon Dec 31, 2018 4:18 pm
I think so... So the fuel collector awards fuel as if it were from the system star?
As opposed to buying from the station (as I deliberately coded that not to).
I must confess as it seems I haven't made myself clear as my understanding of coding is practically nil and my thoughts are based mainly upon how I assume / imagine that it may work - please accept my apologies if I have mislead you into thinking I actually know what I am talking about :oops:
In that case, I doubt fuel collecter does anything to change the fuel state, rather I suspect it just ups the quantity.

Damocles Edge wrote:
All of my most enjoyable play sessions in Oolite have been when I have in a ship with weaker specs than the opposition and having to find a new way of playing rather than relying on superior specs.
Indeed running and just barely getting away from an enemy by the skin of your teeth is often the most rewarding feeling.
Exactly... Many of my oxps are actually intended to make the 'weaker' or slower ships more playable, hopefully (at least in combination) without just pushing the 'stronger' ships further out in front.
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: Star Fuel OXZ

Post by montana05 »

As promised yesterday here the relevant script:

Code: Select all

"use strict";

this.name               = "blackmonk_fuel";

this.startUp = function() {
	this.$fillSound = new SoundSource;
	this.$fillSound.sound = "blackmonk_fill.ogg";
	if (missionVariables.blackmonk_fuel) {
		this.$condensedFuel = missionVariables.blackmonk_fuel;
	} else this.$condensedFuel = 0;
}

this.playerWillSaveGame = function() {
	missionVariables.blackmonk_fuel = this.$condensedFuel;
}

this.playerBoughtEquipment = function(equipment) {
	if (equipment === "EQ_HOLY_FUEL") {
		player.ship.removeEquipment(equipment);
		player.ship.fuel = 7;
		this.$condensedFuel = 10.5;//1.5*7 = 10.5
	}
	else if (equipment === "EQ_FUEL") this.$condensedFuel = 0;
}

this.shipWillLaunchFromStation = function() {
	if (this.$condensedFuel > 7) {
		this.$fuelMonitor = new Timer(this, this._fuelMonitor, 0, 1);
	}
}

this.shipWillDockWithStation = function() {
	if (this.$fuelMonitor) {
		this.$fuelMonitor.stop();
		delete this.$fuelMonitor;
	}
}

this._fuelMonitor = function() {
	if (player.ship.fuel < 7 && this.$condensedFuel > player.ship.fuel && !this.$fuelAnimation) {
		this.$fuelAnimation = addFrameCallback(this._fuelAnimation.bind(this));
	}
}

this._fuelAnimation = function() {
	if (player.ship.fuel < 7 && this.$condensedFuel > player.ship.fuel) {
		player.ship.fuel += 0.1;
		this.$condensedFuel -= 0.1;
		if (!this.$fillSound.isPlaying) this.$fillSound.play();
	}
	else {
		removeFrameCallback(this.$fuelAnimation);
		delete this.$fuelAnimation;
		//all gone?
		if (player.ship.fuel < 7) {
			this.$condensedFuel = 0;
			this.$fuelMonitor.stop();
			delete this.$fuelMonitor;
		}
	}
}

The "Holy Fuel" is basically more dense in a ratio of 1.5 but saved in a missionVariables to control the usage.
Scars remind us where we've been. They don't have to dictate where we're going.
Post Reply