KicheEmergencyShields
Posted: Sat Nov 15, 2025 12:27 am
Latest version of the code for this oxp is at https://git.sr.ht/~lone_wolf/KicheEmergencyShields/tree
I don't really like Ironhide and the capacitors from Shield Equalizer & Capicators but do need something to reduce damage.
An equipment item that increases shield strength one time would suit me better.
Here's an untested rudimentary setup that I think may work .
equipment.plist
emergencyshields.js
Please comment on it.
I don't really like Ironhide and the capacitors from Shield Equalizer & Capicators but do need something to reduce damage.
An equipment item that increases shield strength one time would suit me better.
Here's an untested rudimentary setup that I think may work .
equipment.plist
Code: Select all
(
(
0,
10,
"Emergency Forward Shield",
"EQ_EFS",
"Onetime fwd shield boost",
{
"available_to_all" = yes;
"portable_between_ships" = no;
}
),
(
0,
10,
"Emergency Aft Shield",
"EQ_EAS",
"Onetime aft shield boost",
{
"available_to_all" = yes;
"portable_between_ships" = no;
}
),
)
Code: Select all
"use strict";
this.name = "emergencyshield";
this.shipTakingDamage = function(amount, whom, type)
{
if ( player.ship.equipmentStatus("EQ_EFS") === "EQUIPMENT_OK" )
{
if ( player.ship.fwdShield < player.ship.maxForwardShield/4 )
{
player.ship.fwdShield+=64;
player.ship.removeEquipment("EQ_EFS");
};
};
if ( player.ship.equipmentStatus("EQ_EAS") === "EQUIPMENT_OK" )
{
if ( player.ship.aftShield < player.ship.maxAfShield/4 )
{
player.ship.aftShield+=64;
ship.removeEquipment("EQ_EAS");
};
};
}