NPC shields [release]
Posted: Sun Mar 27, 2011 10:05 pm
Currently NPCs in Oolite have no shields like the player ship. It is possible that they'll get some in the code of Oolite 2.0.
What if you don't want to wait so long? Well, in the meantime you can help them with this small OXP.
NPC-shields.oxp gives shields to NPCs. If there is still shield strength left, the shield will absorb any hit, and the ship won't take damage. If a hit is absorbed by the shield, the ship glows red (NOTE: this works only with shaders set to FULL in Oolite's options; without full shaders you won't see the red glow, the shields will still be fully functional, though). As soon as the shield is depleted, the ship will take damage as usual.
There is only one shield per ship (not separate forward and aft shields like for the player). All NPC shields will absorb 128 points of energy damage, just like basic player shields. It is possible to raise that strength for NPCs with shield boosters or a military shield enhancement, and in fact the code for that is already included, but it is currently de-activated, because it may make NPCs just too tough.
Shields are recharged since version 0.91. Recharge only happens if the ship has full energy, with a rate of 2 points per second.
The OXP is expected to change game play dramatically. Generally NPCs get tougher through shields. You need more hits to kill them.
Also the usefulness of missiles will be affected. The first missile hitting a ship will not instantly kill it. Still, the NPC reaction to an incoming missile won't be affected. The AI will still attempt to flee.
It is possible to exclude missiles from the effects of this OXP. They could penetrate the shields and attack the ship's hull directly. On the other hand, the player ship's shields do protect it from missile hits as well. Any thoughts or suggestions on the matter?
There are still some glitches. A full implementation of NPC shields will probably only be possible in the game code itself:
(1) The glow effect is achieved simply by raising the ship's hull temperature. In open space, this lets the ship briefly glow red, before the temperature decreases again rapidly and immediately. If close to a sun, however, the temperature decreases much slower. It is even possible that the ship sustains additional damage through the heat. (This also means that the glow is only visible with shaders set to FULL.)
(2) It would be nice to decrease the ship's max energy as an exchange for increasing its shield strength. This would better allow to keep the overall balance. However,
Since version 1.0 ship designers can exclude their creations from getting shields. This can be useful for special OXP ships which are either already carefully balanced with regard to their strength, or are not supposed to have shields. The latter is true for both Generation Ships and the Flying Dutchman. I have therefore re-uploaded both OXPs in new versions which use the exclusion mechanism.
The exclusion works through the
EDIT: added note about the red glow effect. Thanks to a_c for alerting me.
EDIT2: new download links for v 0.91
EDIT3: version 1.0 released
What if you don't want to wait so long? Well, in the meantime you can help them with this small OXP.
NPC-shields.oxp gives shields to NPCs. If there is still shield strength left, the shield will absorb any hit, and the ship won't take damage. If a hit is absorbed by the shield, the ship glows red (NOTE: this works only with shaders set to FULL in Oolite's options; without full shaders you won't see the red glow, the shields will still be fully functional, though). As soon as the shield is depleted, the ship will take damage as usual.
There is only one shield per ship (not separate forward and aft shields like for the player). All NPC shields will absorb 128 points of energy damage, just like basic player shields. It is possible to raise that strength for NPCs with shield boosters or a military shield enhancement, and in fact the code for that is already included, but it is currently de-activated, because it may make NPCs just too tough.
Shields are recharged since version 0.91. Recharge only happens if the ship has full energy, with a rate of 2 points per second.
The OXP is expected to change game play dramatically. Generally NPCs get tougher through shields. You need more hits to kill them.
Also the usefulness of missiles will be affected. The first missile hitting a ship will not instantly kill it. Still, the NPC reaction to an incoming missile won't be affected. The AI will still attempt to flee.
It is possible to exclude missiles from the effects of this OXP. They could penetrate the shields and attack the ship's hull directly. On the other hand, the player ship's shields do protect it from missile hits as well. Any thoughts or suggestions on the matter?
There are still some glitches. A full implementation of NPC shields will probably only be possible in the game code itself:
(1) The glow effect is achieved simply by raising the ship's hull temperature. In open space, this lets the ship briefly glow red, before the temperature decreases again rapidly and immediately. If close to a sun, however, the temperature decreases much slower. It is even possible that the ship sustains additional damage through the heat. (This also means that the glow is only visible with shaders set to FULL.)
(2) It would be nice to decrease the ship's max energy as an exchange for increasing its shield strength. This would better allow to keep the overall balance. However,
maxEnergy
is read-only and thus cannot be changed by script. Hence I am reluctant to give ships with boosters a higher shield strength, because the shield boosting equipment is already reflected in the ship's max energy. If the property could be written to, balanced NPC-shields could be realized entirely by OXP.Since version 1.0 ship designers can exclude their creations from getting shields. This can be useful for special OXP ships which are either already carefully balanced with regard to their strength, or are not supposed to have shields. The latter is true for both Generation Ships and the Flying Dutchman. I have therefore re-uploaded both OXPs in new versions which use the exclusion mechanism.
The exclusion works through the
script_info
key in shipdata. For any ship you don't want to have shields, insert a script_info
key named npc_shields
and set it to no
. Please refer to the readMe for more information.EDIT: added note about the red glow effect. Thanks to a_c for alerting me.
EDIT2: new download links for v 0.91
EDIT3: version 1.0 released