modding:xml:shield_devices
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
modding:xml:shield_devices [2012/06/30 04:46] – gpm | modding:xml:shield_devices [2017/02/02 03:07] – Standard Stats, Fields, Properties 0xabcdef | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | =====Summary===== | ||
+ | ^ < | ||
+ | ^ hitPoints= | Max HP of the shield | | ||
+ | ^ maxHPBonus= | Max percentage bonus hp that this shield can be enhanced to have | | ||
+ | ^ hpBonus= | Bonus resistance/ | ||
+ | ^ damageAdj | List of percentages for damage types the damage dealt is multiplied by. | | ||
+ | ^ damageAdjLevel= | The level on the damage curve that this shield will inherit its adjustments from. | | ||
+ | ^ absorbAdj= | List of percentages for each damage type that this shield will absorb the damage from | | ||
+ | ^ regen= | HP regenerated every 6 seconds | | ||
+ | ^ regenTime= | Time in 1/60ths of second between regeneration events | | ||
+ | ^ regenHP= | HP regenerated per regeneration event | | ||
+ | ^ depletionDelay= | Time in 1/30ths of second after HP reaches 0 during which regeneration is disabled | | ||
+ | ^ powerUse= | Power consumption in 1/10ths of MW while recharging | | ||
+ | ^ idlePowerUse= | Power consumption in 1/10ths of MW while //not// recharging | | ||
+ | ^ /> | | ||
+ | //Inherits the attributes and properties common to all devices// | ||
+ | TODO: Add properties | ||
+ | |||
+ | =====Overview===== | ||
+ | Shields are installable [[< | ||
+ | |||
+ | =====Basic Attributes===== | ||
+ | |||
+ | //This section is incomplete.// | ||
+ | |||
+ | **powerUse**= The amount of power consumed while the shield is recharging, in tenths of megawatts. | ||
+ | |||
+ | **idlePowerUse=** The amount of power consumed while the shield is fully charged. Optional. Defaults to 10% of powerUse.// | ||
+ | \\ Non-recharging shields consume 50% of the specified ' | ||
+ | |||
+ | =====Regeneration===== | ||
+ | There are two methods for specifying the regeneration rate of shields. The first uses the **regen** parameter: | ||
+ | |||
+ | **regen**= The number of hit points that the shield generates in 180 ticks. In 1.08c and above you may use a decimal value such as 1.5 or 5.3 for this field. The smallest possible valid value is 0.5. | ||
+ | |||
+ | Using this method, shields will recharge smoothly over time; that is, shield level will increment each tick by as much as necessary to reach the desired rate. Since hit points are integral (not fractional) the exact number of hit points per tick will vary in order to maintain the desired rate. | ||
+ | |||
+ | The second method for specifying regeneration uses a pair of parameters: | ||
+ | |||
+ | **regenTime**= This is the number of game seconds between regen events. Note that 1 game second is 0.5 ticks. | ||
+ | |||
+ | **regenHP**= This is the number of hit points recharged per regen event. | ||
+ | |||
+ | The second method allows you to regenerate shields in bursts, where the time between bursts is given by **regenTime** and the hit points gained on each burst is given by **regenHP**. regenTime and regenHP must be 0 or greater (if either value is 0, it means no recharge at all). Note that the smallest possible rate of recharge using this method is still 0.5 hit points per 180 ticks. | ||
+ | |||
+ | When shields drop to 0 there is a delay until they start to recharge. This delay is specified in different way depending on whether you use the **regen** attribute or the **regenTime** and **regenHP** attributes: | ||
+ | |||
+ | **depletionDelay**= If regen was specified with the **regen** attribute (see above) then this value is the number of ticks required before the shield starts to recharge after dropping to 0. If **regenTime** was used, then the ticks required is equal to the value of **depletionDelay** multiplied by **regenTime**. In either case, if depletionDelay is not specified it defaults to 360 ticks (12 real seconds). | ||
+ | |||
+ | =====Damage Adjustment===== | ||
+ | Normally shield level decreases by 1 hit point for every hit point of damage sustained. Depending on the shield and the [[damage type]] it was hit with, however, the shield level might decrease by more or less than 1 hp per point of damage. A shield that decreases by more than 1 hp per point of damage of a certain type is said to be // | ||
+ | |||
+ | The relationship between shield hp and damage hp is specified as a **damageAdj** value. The value is the percent of the damage that goes into decreasing the level. At a value of 100, every point of damage done to the shield decreases its level by an equal number of points. 50 means that every point of damage drops the shield by 1/2 point. Conversely, 200 means that 1 point of damage causes a 2 point drop in shield level. | ||
+ | |||
+ | By default, all shields have different damage adjustments for each damage type depending on their level. For example, a level 1 shield takes 100% damage from lasers, but a level 5 shield only takes 80% damage. These defaults are set by the adventure. | ||
+ | |||
+ | There are three different ways to change the damage adjustments for individual shield types: | ||
+ | |||
+ | First, you can use the **damageAdjLevel** property to set the adjustment to a different level. For example, **damageAdjLevel=" | ||
+ | |||
+ | The second way is to use the **hpBonus** property to specify adjustments to individual damage types. For example: | ||
+ | |||
+ | **hpBonus=" | ||
+ | |||
+ | hpBonus is expressed in as a hit point percent bonus to shields. The example above effectively adds 50% more hit points to total shield hit points when hit by lasers. That is, a 100 hp shield will behave like a 150 hp shield when it comes to lasers. Conversely, **hpBonus=" | ||
+ | |||
+ | You may specify multiple damage types on the same line: | ||
+ | |||
+ | **hpBonus=" | ||
+ | |||
+ | Note that this bonus is in addition to any intrinsic damage adjustment due to the shield' | ||
+ | |||
+ | The final way is to explicitly specify a damage adjustment: | ||
+ | |||
+ | **damageAdj=" | ||
+ | |||
+ | The example above sets the shield' | ||
+ | |||
+ | =====Additional Parameters===== | ||
+ | |||
+ | **maxHPBonus** If specified, this is the maximum HP bonus enhancement for the device. For example, a value of 100 means that the weapon cannot be enhanced beyond 100% bonus damage. The default is 150. **[API Version 17]** | ||
+ | |||
+ | =====Standard Stats===== | ||
+ | ^ Level | Regen | Cost | Power | | ||
+ | ^35 |12 |500 |10 | | ||
+ | ^45 |16 |1000 |20 | | ||
+ | ^60 |20 |2000 |50 | | ||
+ | ^80 |28 |4000 |100 | | ||
+ | ^100 |36 |8000 |200 | | ||
+ | ^135 |45 |16000 |300 | | ||
+ | ^175 |60 |32000 |500 | | ||
+ | ^225 |80 |65000 |1000 | | ||
+ | ^300 |100 |130000 |2000 | | ||
+ | ^380 |130 |250000 |3000 | | ||
+ | ^500 |170 |500000 |4000 | | ||
+ | ^650 |220 |-1 |6000 | | ||
+ | ^850 |290 |-2 |8000 | | ||
+ | ^1100 |370 |-4 |10000 | | ||
+ | ^1400 |490 |-8 |12000 | | ||
+ | ^1850 |630 |-16 |15000 | | ||
+ | ^2400 |820 |-32 |20000 | | ||
+ | ^3100 |1100 |-65 |25000 | | ||
+ | ^4000 |1400 |-130 |30000 | | ||
+ | ^5250 |1800 |-260 |35000 | | ||
+ | ^6850 |2350 |-525 |40000 | | ||
+ | ^9000 |3050 |-1000 |50000 | | ||
+ | ^12000 |4000 |-2100 |60000 | | ||
+ | ^15000 |5150 |-4200 |70000 | | ||
+ | ^20000 |6700 |-8400 |80000 | | ||
+ | |||
+ | =====Fields===== | ||
+ | * **adjustedHP** | ||
+ | * **balance** | ||
+ | * **damageAdj** | ||
+ | * **effectiveHP** | ||
+ | * **hp** | ||
+ | * **hpBonus** | ||
+ | * **power** | ||
+ | * **regen** | ||
+ | * **weaponSuppress** | ||
+ | |||
+ | =====Properties===== | ||
+ | * **damageAdj** | ||
+ | * **hp** | ||
+ | * **hpBonus** | ||
+ | * **maxHP** | ||
+ | |||
+ | =====Events===== | ||
+ | Shield events can be added to the < | ||
+ | |||
+ | ===< | ||
+ | This event is invoked to calculate the maximum hit point level of a shield item. The event must return either a non-negative number or Nil (to use the default value for max hit points). | ||
+ | |||
+ | **gSource** is the object on which the shield item is installed. | ||
+ | |||
+ | **gItem** is the shield item. | ||
+ | |||
+ | **aMaxHP** is the default value for max hit points, including all other enhancements and adjustments. | ||
+ | |||
+ | ===< | ||
+ | This event is called when a projectile hits this shield. | ||
+ | |||
+ | If the event returns Nil, the shields process the damage normally. | ||
+ | |||
+ | If the event returns a list, then the list must have three elements. The first element is either the string " | ||
+ | |||
+ | **gSource** is the object that was hit by the projectile. | ||
+ | |||
+ | **aArmorDamageHP** is the number of hit points of damage that will be passed to armor after the shields absorb some. | ||
+ | |||
+ | **aArmorSeg** is the armor segment that would be hit if it penetrates overlay and shields. | ||
+ | |||
+ | **aAttacker** is the object that fired the projectile. | ||
+ | |||
+ | **aCause** is the projectile object. | ||
+ | |||
+ | **aDamageHP** is the amount of damage (in hit points) that reached the shield. It has not been adjusted for damage type. | ||
+ | |||
+ | **aDamageType** is the type of damage. | ||
+ | |||
+ | **aDeviceItem** is the shield item. | ||
+ | |||
+ | **aHitDir** is the absolute direction that the projectile came from. | ||
+ | |||
+ | **aHitPos** is the vector position where the shot hit. | ||
+ | |||
+ | **aOrderGiver** is the object that ordered the attacker. | ||
+ | |||
+ | **aOriginalArmorDamageHP** if the shot will be reflected, this is the number of hit points that would have been dealt to armor if the shot had not been reflected. | ||
+ | |||
+ | **aOriginalShieldDamageHP** if the shot will be reflected, this is the number of hit points that would have been dealt to shields if the shot had not been reflected. | ||
+ | |||
+ | **aShieldDamageHP** is the number of hit points of damage that the hit will do to shields. | ||
+ | |||
+ | **aShieldHP** is the current number of hit points on the shields. | ||
+ | |||
+ | **aShieldReflect** is the string " | ||
+ | |||
+ | **aWeaponType** is the UNID of the weapon (for missile weapons, this is the UNID of the missile). | ||
+ | |||
+ | ===< | ||
+ | This event is called on shield items when shield level has dropped to 0. | ||
+ | |||
+ | **gSource** is the object on which the shields are installed. | ||
+ | |||
+ | **gItem** is the shield item. |
modding/xml/shield_devices.txt · Last modified: 2017/02/05 18:08 by 0xabcdef