Page 10 of 12

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

Posted: Sat Jul 23, 2011 7:21 am
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.

Re: Fuel Station OXP

Posted: Sat Jul 23, 2011 3:57 pm
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.

Re: Fuel Station OXP

Posted: Sat Jul 23, 2011 4:01 pm
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.

Re: Fuel Station OXP

Posted: Sat Jul 23, 2011 4:13 pm
by Smivs
What he said. :D

Re: Fuel Station OXP

Posted: Sat Jul 23, 2011 4:24 pm
by Cody
What he said!

Re: Fuel Station OXP

Posted: Sat Jul 23, 2011 4:25 pm
by Gimi
It adds to the original Elite which didn't have injectors. Fuel gets a dual role.
So, conclusion, what Fatleaf said.

Re: Fuel Station OXP

Posted: Fri Aug 19, 2011 3:38 pm
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.

Re: Fuel Station OXP

Posted: Mon Aug 22, 2011 11:47 am
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).

Re: Fuel Station OXP

Posted: Mon Aug 22, 2011 1:09 pm
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.

Re: Fuel Station OXP

Posted: Wed Aug 24, 2011 7:03 am
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.

Re: Fuel Station OXP

Posted: Wed Aug 24, 2011 4:59 pm
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.

Re: Fuel Station OXP

Posted: Wed Aug 24, 2011 5:42 pm
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.

Re: Fuel Station OXP

Posted: Wed Aug 24, 2011 5:54 pm
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).

Re: Fuel Station OXP

Posted: Tue Jan 24, 2012 3:51 pm
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...

Re: Fuel Station OXP

Posted: Tue Jan 24, 2012 6:39 pm
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: