Fuel Station OXP

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

Moderators: another_commander, winston

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Fuel Station OXP - v1.31 Update (Code fix)

Post by Thargoid »

Oathbreaker wrote:
Sorry if necro'ing this thread is frowned upon, didn't spot a rule about it in a FAQ or sticky.

Great OXP with some funny issues if like me you end up in a fight around a Fuel Station when you're out of gas and the bad guys are faster/deadlier/stupider than you.

Try it, you won't be disappointed. Fun stuff happens.

Anyway, would love a version of this OXP that always had only one single fuel station (if any), located diametrically opposed to the system's planet always at extreme radar range from the jump point.

I.e.:

[BIG PLANET] - - - - - - - - - - X witchpoint buoy - - O fuel station

Why? Would cut down on 'mass lock' issues both at the jump point (since you always come into a system facing the planet) and just travelling. But to each their own, I suppose there are people who like two per system sometimes.

Cheers much, and don't forget to draw some fire around a station next time you get the chance.

EDIT: On second thought, maybe the above would be *too* convenient. I dunno, do a lot of people use the second station?
OK a little package is available here which offers a replacement populator script that you can replace the existing OXP one with to make them spawn as described above. To use it you just need to replace the script in the OXP with the one in the package (details on how to do it are in the readme also supplied in it).

For the other problem above - the error is triggering as it's trying to check the distance between the station and your ship, but your ship doesn't exist any more as it's died. It's a minor tweak which I'll include in the next update of the OXP to fix that.
User avatar
Oathbreaker
Dangerous
Dangerous
Posts: 85
Joined: Sun Jul 10, 2011 4:37 am
Location: San Diego, CA
Contact:

Re: Fuel Station OXP

Post by Oathbreaker »

Cheers. Your hard work is much appreciated, as the need for fuel for both travel and space combat is a huge weakness of the core game, imho.
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

Re: Fuel Station OXP

Post by Fatleaf »

Oathbreaker wrote:
Cheers. Your hard work is much appreciated, as the need for fuel for both travel and space combat is a huge weakness of the core game, imho.
I think it is one of the great things in Oolite. It requires you to plan your journey not to just jump in with all guns blazing and if it all goes wrong you can just inject out. But with fuel being a factor a 6.8ly jump into an anarchy is something to be thought about. It also adds a bit of realism.
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Fuel Station OXP

Post by Smivs »

What he said. :D
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16060
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Fuel Station OXP

Post by Cody »

What he said!
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
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: Fuel Station OXP

Post by Gimi »

It adds to the original Elite which didn't have injectors. Fuel gets a dual role.
So, conclusion, what Fatleaf said.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: Fuel Station OXP

Post by Gimi »

Javascript exception in Fuel Station 1.32.oxp with the alternative scripting for positioning the stations further out..
Got the following error in my log today. (Had a lot of errors since I stated doing Thargoid plans again.)

Running Trunk Oolite 1.75.4 Rev 4599

Code: Select all

17:22:35.434 [script.javaScript.exception.ooliteDefinedError]: ***** JavaScript exception (FuelSatellite 2.0): Error: Vector3D.distanceTo: Could not construct vector from parameters (undefined) -- expected Vector, Entity or array of three numbers.
17:22:35.866 [script.javaScript.exception.ooliteDefinedError]: ***** JavaScript exception (FuelSatellite 2.0): Error: Vector3D.distanceTo: Could not construct vector from parameters (undefined) -- expected Vector, Entity or array of three numbers.
17:22:36.365 [script.javaScript.exception.ooliteDefinedError]: ***** JavaScript exception (FuelSatellite 2.0): Error: Vector3D.distanceTo: Could not construct vector from parameters (undefined) -- expected Vector, Entity or array of three numbers.
There are 60 of these all together in the log.

Any ideas.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Fuel Station OXP

Post by Thargoid »

I'll update my trunk build and see if I can replicate it (it may be a trunk issue or an OXP one).

Can you give me more details on the circumstances where the errors were occurring? Specifically which system/galaxy, and whether there was anything special about it (nova'd etc).
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: Fuel Station OXP

Post by Gimi »

Thargoid wrote:
I'll update my trunk build and see if I can replicate it (it may be a trunk issue or an OXP one).

Can you give me more details on the circumstances where the errors were occurring? Specifically which system/galaxy, and whether there was anything special about it (nova'd etc).
From what I can remember.

In the Onbige system in Galaxy 3.
I'm doing Thargoid plans, and this happened in the middle of a fire fight with both Thargoids and NPC pirates. I think the the fuel station might have been calling for help after being attacked, but I don't know if it was attacked by Thargoids or NPC's. (I may be mixing things up about the station being attacked, but if it was, I'm pretty sure it wasn't me, but I may have hit it with a stray shot) I was running with the console connected, and the errors come up there as well as in the log obviously. No additional information came up in the Console. I have not seen the error since, but I have not used the console since either. I will try to force the error again. I have kept the whole log just in case, and I'm still at 4599.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: Fuel Station OXP

Post by Gimi »

Gimi wrote:
Gimi reported:

Code: Select all

17:22:35.434 [script.javaScript.exception.ooliteDefinedError]: ***** JavaScript exception (FuelSatellite 2.0): Error: Vector3D.distanceTo: Could not construct vector from parameters (undefined) -- expected Vector, Entity or array of three numbers.
17:22:35.866 [script.javaScript.exception.ooliteDefinedError]: ***** JavaScript exception (FuelSatellite 2.0): Error: Vector3D.distanceTo: Could not construct vector from parameters (undefined) -- expected Vector, Entity or array of three numbers.
17:22:36.365 [script.javaScript.exception.ooliteDefinedError]: ***** JavaScript exception (FuelSatellite 2.0): Error: Vector3D.distanceTo: Could not construct vector from parameters (undefined) -- expected Vector, Entity or array of three numbers.
Fatleaf wrote:
Fatleaf reported:

Code: Select all

16:26:00.503 [script.javaScript.exception.ooliteDefinedError]: ***** JavaScript exception (armoury_interdictorMine.js 1.00): Error: Vector3D.distanceTo: Could not construct vector from parameters (undefined) -- expected Vector, Entity or array of three numbers.
16:26:00.503 [script.javaScript.exception.ooliteDefinedError]:       ../AddOns/Armoury 1.08.oxp/Scripts/armoury_interdictorMine.js, line 63.
Are these in any way related, and if so, looking at both might help nail this one.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Fuel Station OXP

Post by Capt. Murphy »

I've had these errors if I've died within hailing range of a station. The script is trying to locate an invalid ship. Shouldn't cause any ongoing problem.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Fuel Station OXP

Post by Thargoid »

Yes, basically they are the same issue with the entity in question trying to ascertain its distance to the player ship, but as the player has died then his/her ship no longer exists and the code chokes (the distance becomes "undefined" due to that, as noted in the error).

It will only come into play when the player dies within range of the station (or the mine), so is a minor issue.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Fuel Station OXP

Post by Thargoid »

I've just uploaded v1.33 which will correct this issue.

However I've noticed that the ASC icon seems to be broken again (it's reverted from the petrol pump one to the "F"). I need to look at that one later, but for the moment the new version will fix the death errors issue.

This update also rolls the two populator scripts up into one (see the readme for details of how to switch between the two, via a minor script edit). Also it now uses Ahruman's pseudo-random generator to make the station/satellite's appearances repeatable (although stations and satellites may interchange with each other).
Makara
Dangerous
Dangerous
Posts: 122
Joined: Sat Oct 17, 2009 6:34 pm

Re: Fuel Station OXP

Post by Makara »

Thargoid wrote:
However I've noticed that the ASC icon seems to be broken again (it's reverted from the petrol pump one to the "F"). I need to look at that one later, but for the moment the new version will fix the death errors issue.
Just had a look at this following confusion in a Dictatorship, and it seems to be that the icons' names in descriptions.plist do not match the beacon = entry in shipdata.plist. Pull those two into line, et viola...

Image
Any excuse for a fancy viola pic :P

Edit: And a very nice icon it is too. I am inspired to have a go at coming up with a few for other compass fixtures...
Last edited by Makara on Tue Jan 24, 2012 10:38 pm, edited 1 time in total.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Fuel Station OXP

Post by Thargoid »

Hmm, ok how did that happen (again)?

Thanks for that - v1.34 will upload soon with the fix in place to sort that out (again). :oops:
Post Reply