Page 1 of 2

Laser Booster OXP

Posted: Wed Jan 09, 2013 6:20 pm
by Thargoid
The R&D department of the Aquarian Shipbuilding Corp present their newest piece of equipment - the laser booster.

This upgrade introducing two new dynamics to combat. Firstly it offers a switchable laser booster, which doubles the laser damage inflicted when activated (for a small energy drain).

However it also introduces the risk of the lasers breaking under the stress - there is a base 1% chance of a laser breaking on use, with increased chance if the booster is brought into play and the lasers pushed beyond their specified heat tolerances.

If lasers do break they can be repaired either at the station equipment screen or by repair bots/systems.

It requires Oolite version 1.77 or above to work. Downloads are via the box or wiki links below.

Re: Laser Booster OXP

Posted: Thu Feb 07, 2013 7:54 pm
by Thargoid
A little update in this OXP to version 1.01. Adds a small block to prevent the boost inflicting extra damage on main stations, to help prevent the bug for awarding incorrect kills discovered by Plisken. Note that this fix will only correct the laser, not any other weapon used on your ship (missiles or particularly turrets).

Download via box or wiki links below as normal.

Re: Laser Booster OXP

Posted: Thu Feb 07, 2013 8:05 pm
by Eric Walch
Thargoid wrote:
Note that this fix will only correct the laser, not any other weapon used on your ship (missiles or particularly turrets).
I am confident that your fix will also cure the turret problem as both turret and laser go through the same handler in your script.

Re: Laser Booster OXP

Posted: Sun Feb 10, 2013 6:51 pm
by JeX
After having tried out this OXP I realised that, without having bought the equipment, my less than stellar pulse laser on my tine little used Adder would constantly break.
It was really weird since first of all I never bought the Laser Booster (I had just started a new game to test the "start choices" OXP) and every 10 shots or so would result in the laser breaking. It was kind of frustrating since I started the game with 0 credits and needed it for destroying asteroids to get bounties ^_^
Second of all, after quickloading, the same Krait would keep appearing right outside the space station and attack me, and the laser would also keep breaking after having fired it.
I looked through the code and your random generator seems random, however, this happened every time I quickloaded (4 times in a row).

Is the random number generator tied to a certain global variable that seems random but will actually be the same based on the space clock, save game or someting else?

Re: Laser Booster OXP

Posted: Sun Feb 10, 2013 6:58 pm
by Cody
JeX wrote:
... the same Krait would keep appearing right outside the space station and attack me...
Do you have the Griff chopped Krait OXP installed?

Re: Laser Booster OXP

Posted: Sun Feb 10, 2013 7:29 pm
by Thargoid
And for the other point, yes the breakability is introduced no matter whether you have the booster active or not, it's just (by code at least) a low chance of breaking if it's not active. That was deliberate, as for me the ship's laser not being breakable has never seemed that realistic. Before we couldn't do anything about it via script, but now we can.

Your experiences do sound somewhat odd though, although as you say the randomness in the script is pure Javascript and not influenced by anything other than the scaling factor to make it a low chance.

Re: Laser Booster OXP

Posted: Wed Feb 13, 2013 12:05 am
by JeX
Yes, I had the Griff Krait installed at that time. Found it so weird that it kept attacking me so I removed it later.

I will try the laser booster again and see if I notice any weirdness with it.

Re: Laser Booster OXP

Posted: Wed Feb 13, 2013 12:12 am
by Cody
JeX wrote:
Yes, I had the Griff Krait installed at that time. Found it so weird that it kept attacking me so I removed it later.
Ah, I thought so - a cool ship to pick apart slowly, is that. It's easily fixed:
Wiki wrote:
Note that the OXP contains test code which spawns a few aggressive Griff Kraits right outside your station whenever you leave.
Remove script.js from the Config folder in the OXP to stop this.

Re: Laser Booster OXP

Posted: Wed Feb 13, 2013 1:55 pm
by Svengali
El Viejo wrote:
Wiki wrote:
Note that the OXP contains test code which spawns a few aggressive Griff Kraits right outside your station whenever you leave.
Remove script.js from the Config folder in the OXP to stop this.
I never understood why some OXPs are leaving test-scripts in their release versions.

Re: Laser Booster OXP

Posted: Wed Feb 13, 2013 2:03 pm
by Cody
Svengali wrote:
I never understood why some OXPs are leaving test-scripts in their release versions.
Heh... in Griff's case, I reckon it's all part of a fiendish plot to fool us into believing he's a scatter-brained artist!

Re: Laser Booster OXP

Posted: Wed Feb 13, 2013 2:04 pm
by Smivs
Svengali wrote:
I never understood why some OXPs are leaving test-scripts in their release versions.
It's probably just an oversight. I know from personal experience just how much work is involved getting from a 'final development' version of an OXP to a release version, and human nature (and fallability) being what it is, these things will happen from time to time.

Re: Laser Booster OXP

Posted: Wed Feb 13, 2013 2:12 pm
by Svengali
El Viejo wrote:
Heh... in Griff's case, I reckon it's all part of a fiendish plot to fool us into believing he's a scatter-brained artist!
Yes, could be 8)
Smivs wrote:
It's probably just an oversight. I know from personal experience just how much work is involved getting from a 'final development' version of an OXP to a release version, and human nature (and fallability) being what it is, these things will happen from time to time.
No, I don't think it's an oversight. It was common practice in some OXPs to give players easy access to the new stuff. It's only a bit annoying that you have to remove these scripts for your standard game sessions. Otherwise you'll end up with 100 entities waiting for you on launching and exiting witchspace :mrgreen:

Re: Laser Booster OXP

Posted: Wed Feb 13, 2013 3:41 pm
by Thargoid
Kinda like discussing one OXP in the thread of another one... :twisted:

Re: Laser Booster OXP

Posted: Wed Feb 13, 2013 6:35 pm
by JeX
Thargoid wrote:
Kinda like discussing one OXP in the thread of another one... :twisted:
WHAT! WHERE!?? :mrgreen:

Re: Laser Booster OXP

Posted: Sun Jan 05, 2014 4:28 pm
by xdsldouble
Oolite 1.79
Laser Booster 1.01 does not work:
./Scripts/laserBooster_worldScript.js
contains string
if(player.ship.equipmentStatus("EQ_LASERBOOSTER") !== "EQUIPMENT_OK" || missionVariables.laserBooster !== "ACTIVE" || this.laserString === "NONE" || !other || !other.isMainStation || !other.isValid) { return; }
is valid?