Based on a discussion on the Piratez Discord channel, I've coded a new feature for interceptions - rechargeable shields! The changes include the ability to define shield levels for UFOs and player craft in the ruleset, set effectiveness of craft weapons against shields, new palette-effect GFX for the interception window, and shield percentage information in craft status windows. This is built against OXCE+ 3.3.
Edit 161220 (especially for Meridian later
) - I've re-staged the edits on top of OXCE+ 3.5, now into a single commit,
found in this branch of my repository. The executables below are out-of-date, and I don't feel like recompiling right now.
Edit 170130 This is now included in OXCE+, so the urls for my repositories will be deprecated as I clean up to make room for writing new code features.
The ruleset options are:
- (craft/ufo stats) shieldCapacity: 0 - defines the number of shield points a craft has, similar to damageMax. Defaults to 0.
- (craft/ufo stats) shieldRecharge: 0 - defines the percent chance of recharging a point of shielding per game second during an interception. Values under 100 are the percent chance, for over 100, every +100 means an automatic +1 to shields per GS. Thus shieldRecharge: 250 means +2 shields/GS, with a 50% chance of +1 more. Defaults to 0.
- (craft/ufo stats) shieldRechargeInGeoscape: 0 - similar to shieldRecharge, but acts every 5 seconds in the Geoscape. Giving it a value of -1 means instant recharge as soon as 5 seconds pass! Defaults to 0.
- (craft/ufo stats) shieldBleedThrough: 0 - defines the percent of damage that passes the shield when it goes down. A value of 0 means that with even just 1 shield point, any single hit will be blocked, while 100 means 100% of the damage left after the shield blocks it will go on to damage the craft. Defaults to 0.
- (craft) shieldRechargedAtBase: 1000 - defines how many shield points are recharged at base per hour for player craft. Recharge happens on the hour, whether or not the craft is damaged. Defaults to 1000 (meant to be all shields require just an hour to recharge)
- (craftWeapon) shieldDamageModifier: 100 - defines the percent of power that a weapon does to shields. Default is 100.
The shieldCapacity, shieldRecharge, shieldRechargeInGeoscape, and shieldBleedThrough parameters can also be defined as a stat bonus by race for UFOs or put on craft weapons (to simulate adding shield generators).
Here's a link to a copy of the Windows and Ubuntu 14.04 executables I've compiled, with a mod and save to test out some of the new features.
Edit: Had to fix a bug with not having proper default color handling, added the commit for that and updating the testing package.
More Edit: Here are the extra strings for this and my previous interception window tweaks, since those don't have their own thread:
extraStrings:
- type: en-US
strings:
# Interception window strings
STR_UFO_HIT_NO_DAMAGE: "BOUNCED OFF THE HULL!"
STR_UFO_HIT_GLANCING: "GLANCING HIT!"
STR_UFO_SHIELD_HIT: "HIT THE SHIELDS!"
STR_UFO_SHIELD_DOWN: "ENEMY SHIELDS DOWN!"
STR_INTERCEPTOR_SHIELD_HIT: "OUR SHIELDS ARE HOLDING!"
# Craft info window strings
STR_SHIELD: "SHIELD>{ALT}{0}"