N-Shields

From Elite Wiki
Revision as of 15:41, 27 November 2020 by Dybal (talk | contribs)

Gives NPCs highly customizable shields, with the default setting (as in CustomShields) being a 'fair' emulation of the player's shields.

Features:

- Fair shield recharge code (CustomShields didn't charge shields until energy banks were full)

- Acts as a hub for handling damage to NPCs, calling damage handlers from other OXPs after the shields are depleted and the damage reach the ship's hull, providing better compatibility for other OXPs with shipTakingDamage overrides

- Thargoids get dorsal/ventral shields. Support for other very non-standard shield configurations was attempted but removed in version 0.7 to simplify the code.

- More customisable colours. The default multicolour set goes from green down to red for standard shields, extending to blue/purple with upgrades.

- New visual effects based on explosions.plist for shields and unshielded hits.

- Awards Shield Cycler for a percentage of the ships that don't have them, configures Shield Booster and Military Shield Booster for NPCs that have them, apply shield recharge enhancements from Energy Grid (civillian and naval) for ships that have them.

Downloads

latest version available on the Expansion Manager and here: N-Shields v1.0

N-Shields 0.7 667 downloads

N-Shields 0.6.4 downloaded 108 times

Version History

1.0 (by Dybal)

  • Drops support for Shield Cycler (and Shield Cycler Next) 1.x for NPCs.
  • Creates idempotent function for OXPs to call to configure a NPC's shields.
  • Encapsulates modifications of ship's energy to verify for NaN before assigning a value into ship.energy (to prevent "invulnerable ship" bug).
  • Adds delay to shipSpawned before setting up the ship to allow other OXPs' shipSpawned to award equipments.
  • Configures shield recharge rate with Energy Grid (civilian and naval) upgrades if the NPC has them installed.
  • Configures both Military Shield Enhancement and Shield Enhancer for NPCs.
  • Doesn't award Shield Cycler to NPCs that have Shield Equalizer.
  • Fixes bugs in handling of damage to subentities.
  • Standardizes script object properties names: functions references start with '$' (except event handlers), everything else starts with '_';

0.7.1

  • Fixed missing "use strict" in N-Shields.js.
  • Removed Ship Configuration compatibility script entry from world-scripts.plist (the actual script was removed in 0.7.0).
  • Reduced Thargoids' max shields (and compensatory energy reduction) slightly.

0.7

  • Removed support for unusual/configurable shield types, except dorsal/ventral which now applies to Thargoids only, in order to simplify the scripts.
  • Changed flashers from Ship entities to VisualEffects.
  • Pre-defined flasher colour options: 3x Multicolour, Green, Blue.
  • Hemisphere glow effects removed.
  • New script_info keys NShields_flasherPreset, NShields_flasherKeys, max_shield_forward etc. to replace the now-unsupported NShields_colours, NShields_config.
  • Config interface now works correctly (requires Oolite 1.83 or higher and Library OXP).
  • Improved efficiency of hit-location code.
  • Tentative support for Shield Cyclers on NPCs.

0.6.4

  • Fixed bug in $locateHit cloaked-attacker handling (missing a ".position" or two).

0.6.3

  • Fixed some bugs in NPC Equipment Damage compatibility code

0.6.2

  • Fixed bug in manifest (missing "}").

0.6.1

  • Added correctly functioning shipconfig version check and fixed small variable non-declaration in $drawSparks

0.6

  • Added user-friendly configuration options via Library OXP.
  • Hemisphere glow effects now work, although they still look awful.
  • Added compatibility with NPC Equipment Damage OXP.

0.5.4

  • Removed non-functioning version check; tested & corrected quaternion multiplication.

0.5.3

  • Added version check in NShields-shipconfig-compatibility.js as requested by phkb

0.5.2

  • Attempt to fix buggy aft shield effect orientation by using quaternion multiplication. Untested due to oolite-trunk launching error.

0.5.1

  • Fixed bug in subentity shielding code which didn't check whether a shipTakingDamage handler had been stored before trying to call it
  • Added hemisphere glow effects (disabled by default because very under-debugged & not really working yet)

0.5

  • Added explosion-based shield effects.

0.4

  • Improved recharge code for fore/aft shields works more like the core player version.
  • Correct handling of heat damage (hopefully?).
  • $locateHit now attempts to identify a cloaked attacker if the parameter passed is null.
  • Added dorsal/ventral shield configuration option and changed Thargoid default to use this.
  • Fixed bug in $configureShieldsFromArray which caused Thargoid shield config failure.

0.3

  • New features: Player shield effects, NPC shields protect subentities, spark effects for unshielded hits.
  • Support for Ship Configuration OXP's shield upgrades/downgrades.
  • Fixed bug in recharge code which resulted in excessive energy drain.
  • Not released.

0.2

  • Extensive re-write implementing some configuration options.
  • 'single' and 'fore/aft' shield types supported.
  • Damage handler array added for compatibility with other OXPs.
  • Not released.

0.1

  • Very basic shield simulation. Not released.

Links

N-Shields on Oolite Bulletin Board

Use this thread for discussion, suggestions, bug reports etc.


Commander Ngalo's other OXPs