Shield Equalizer And Capacitors OXP
This OXP adds 2 pieces of equipment that work well together but otherwise have no dependancies on each other. The equipment in this package is also compatible with the forthcoming ShieldCycler.oxp and both oxps may be in the addons folder with no conflict. This OXP was authored by CommonSenseOTB on February 17, 2011.
The first piece of equipment is the Shield Equalizer. As the name suggests it equalizes the shields by transferring energy from the high-energy shield to the low-energy shield. This is completely AUTOMATIC and prevents pilot distraction during combat conditions. The noise emitted has the added benefit of alerting the pilot when this occurs.
The second piece of equipment is the Shield Capacitor. Both forward and aft capacitors may be installed. A charging cycle is initiated when the shield is full of energy. Added (wasted) shield energy is then stored in the capacitor until the shield drops below the energy level of the capacitor. At this point a discharge is initiated as there is now space for the stored energy to flow into. The charge/discharge cycle is completely AUTOMATIC and prevents pilot distraction. A loud noise similar to a high voltage short circuit can be heard when the discharge occurs. In addition, a countdown timer/alarm alerts the pilot to the status of capacitor charging.
Both of these features keep the pilot aware of the charge/discharge cycle with no need of gauges or displays, again preventing distraction.
Due to the robust(over-engineered) construction of the Shield Equalizer and the use of heavy duty cross-connected shield power transfer couplings, there is less chance of damage generally to all installed shield system components. However, there is a small chance of minor feedback damage if a capacitor is damaged/destroyed without a Shield Equalizer being available to dampen/redirect the energy flow.
- Tech Level - 14.
- Cost - 75,000 credits.
- Required Equipment - none.
- Tech Level - 14.
- Cost - 18,750 credits(each).
- Required Equipment - none.
This OXP has configurations that the player can change through the Station Interfaces (F4) Config for AddOns:
- enable/disable the OXP functionality for NPCs (default disabled)
Setting this option to enabled will use more CPU resources to play the game, and will make the game harder, specially at the early stages when the player's ship is poorly kitted, but will even the field later on once the player's ship has acquired the OXP's equipment.
With this option set to disabled, even if the NPCs are awarded Shield Equalizer or Shield Capacitors (there are OXPs that award them to NPCs), the equipment will not be functional.
- Oolite 1.79
- Library OXP
Download Shield Equalizer and Capacitors 1.8.
- Capacitor discharge tops shield up, without taking next shield recharge into account.
- Only recharges capacitors if ship's energy greater than half a bank.
- Changes equipment processing order, so shields are topped up with Capacitors energy, if necessary and possible, before the Equalizer balances the shields.
- Tests for NaN before updating ship's energy (assigning NaN to ship.energy maxs out the ship's energy, leading to the "invulnerable to lasers" bug if done in the damage handling path).
- Adds thoughening up of Energy Grid against damage, as it's done for Naval Grid, SHield Booster and Military Shield Enhancement.
- Changes delay for setting up spawned NPCs to at least 2s to make sure ShipVersion's shipSpawned event handler has run and had a chance to award equipments.
- Re-factors equalizer and capacitor processing functions to unify code, so aft and forward shields are parameters to the unified code.
- Reduces Capacitor prices to a cost-benefit level comparable to Shield Booster (10% more expensive for shield energy depth added), so they are not over-priced anymore; the Equalizer remains a money-sink though.
- Adds scriptInfo towbar_max_salvage_price to the equipments to limit their salvage price when salvaging a derelict.
- Make the delay to setup NPC ship after they are spawned variable, between 0s and 3s. The delay is meant to make sure that any OXP that wants to award Shield Equalizer and Capacitors equipments to NPCs at shipSpawned event handler had a chance to do so before we setup the ship.
- Capacitor code re-factored so charging and discharging are in separate functions; charging is essentially timer-driven, but discharging, i.e., transferring energy from the capacitor to the shield, could be event-driven, and next version of Shield Cycler Next will take advantage of that to put the capacitors to use before balancing the shields.
- only allows NPC functionality enabling (includes the inclusion in Config for AddOns on F4) if there is an OXP installed that adds shields to NPCs - right now, that's only N-Shields.
- resets the array of references to NPC setup timers whenever all timers have ran, i.e., all spawned NPCs have been set up.
Version 1.4 (by Dybal)
- don't transfer to/between shields while in Torus Drive (HardWay OXP might be keeping the shields drained), but do recharge the capacitors while in Torus.
- make possible the enablement of OXP functionality for NPCs, with the user defining if it's enabled or not (this has performance and game balance consequences), default being not NPC enabled.
Version 1.3 (by CommonSenseOTB)
- removed missionVariables as they are not really needed.
- fixed a bug first discovered by UK Eliter which at first appeared to be the normal operation of the game but on closer inspection is a bug in this oxp. When you have critical energy and critical shields and either a damaged or no energy unit the equalizer could get into a loop preventing recharging the shields. Now fixed!
- installed toggles to deactivate messages and sounds, allowing huds to replace messages and sounds with gauges. Player may also switch sounds and messages off by altering the variables in the script's startup function.
- added Shield Equalizer equipment.plist incompatibility with TOTALLY NEW equipment.plist in Shield Cycler 0.20BETA
- unaware of Bug(#18108) where soundsources keep going after the game resets. Changed loop to false on the capacitor charging sounds and put repeatcount in instead. Works good. maximum 32 seconds of charging sounds if game is reset while in flight.(usully much lower, compromise instead of rewriting code)
- aso some minor script tweaks.
- added shield equalizer/shield cycler EQ incompatibility...shield capacitors currently compatible with both.
- mistakenly left in a test script for the capacitors... All Fixed may 8, 2011.
- added option to sell equipment, added sound effects and made minor script tweaks including more robust construction(due to the shield equalizer's high quality cross-connected energy transfer power couplings and being over-engineered there is more resistance to damage for the SHIELD system in general).
|CC BY-NC-SA 3.0
|Shields balancing, Shields recharging