modding:xml:weapon_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:weapon_devices [2017/01/31 03:21] – [Balance] 0xabcdef | modding:xml:weapon_devices [2017/02/05 18:03] – Move weapon_devices to weapon 0xabcdef | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | =====Overview==== | + | ~~GOTO> |
- | Weapons are [[modding: | + | |
- | + | ||
- | Some weapons fire a single type of projectile; in that case, the definition of the weapon and the projectile are both included in the < | + | |
- | + | ||
- | Other times, the weapon fires more than one type of projectile. In that case, the definition of the projectiles are in the < | + | |
- | + | ||
- | Here is a comprehensive thread that describes how weapons are defined: | + | |
- | [[http:// | + | |
- | + | ||
- | =====Basic Parameters===== | + | |
- | These are the attributes for a weapon that define how the projectiles are fired. | + | |
- | + | ||
- | **fireRate=** The number of [[game seconds]] that elapse between shots. By default, a game second is two [[http:// | + | |
- | + | ||
- | **powerUse=** The amount of power consumed each tick while the weapon is firing. Power is expressed in tenths of megawatts, so a value of 10 equals 1 MW. | + | |
- | + | ||
- | **idlePowerUse=** The amount of power consumed each tick while the weapon is //not// firing. Optional. Defaults to 10% of powerUse. //(New in 1.06)// | + | |
- | + | ||
- | **recoil=** If non-zero, this accelerates the ship opposite to the direction of fire. The acceleration is proportional to the square of the value (e.g., a value of 2 has a recoil four times stronger than a value of 1). | + | |
- | + | ||
- | **failureChance=** The % chance that the weapon will fail when it fires. | + | |
- | + | ||
- | **charges=** If **true**, the weapon uses up a charge when it is fired. The weapon will not fire if it has no charges left. | + | |
- | + | ||
- | =====Launchers ===== | + | |
- | A weapon with more than one < | + | |
- | + | ||
- | **launcher=** If set to **true**, this parameter specifies that the weapon should be treated as a launcher regardless of the number of < | + | |
- | + | ||
- | **reportAmmo=** For purposes of statistics, when a launcher is fired, the engine collects statistics about the number of times the launcher fired //and// the number of each type of missile fired. Since non-launchers can only fire one type of projectile, we don't keep track of both. If you want to override this behavior for non-launchers, | + | |
- | + | ||
- | =====Fire Direction===== | + | |
- | By default a weapon fires forward at 0 degrees. You may change the direction of fire with the following attributes: | + | |
- | + | ||
- | **omnidirectional=** If **true**, the weapon is mounted on a turret that can fire in any direction. On a player ship the weapon will fire at the currently selected target (friendly or enemy) or, if no target is selected, at the nearest enemy ship. | + | |
- | + | ||
- | **minFireArc=** A non-zero value indicates that the weapon swivels to aim at targets. This is the minimum angle of the swivel. Within the fire arc defined by minFireArc and maxFireArc, the weapon will fire as an omnidirectional weapons, i.e., aiming at the currently selected target or the nearest enemy ship. | + | |
- | + | ||
- | **maxFireArc=** The maximum angle of the swivel. | + | |
- | + | ||
- | If minFireArc and maxFireArc are equal but non-zero then the weapon fires in the specified direction. For example, minFireArc=" | + | |
- | + | ||
- | NOTE: A weapon' | + | |
- | + | ||
- | * omnidirectional: | + | |
- | * swivel: The weapon can fire across a specific fire arc of less then 360 degrees. | + | |
- | * fixed: The weapon fires at a fixed angle (no necessarily 0 degrees). | + | |
- | + | ||
- | Since both the weapon and the device slot can specify a fire direction, there are nine possible results: | + | |
- | + | ||
- | DEVICE SLOT | + | |
- | omni swivel | + | |
- | WEAPON ------------------------------------------------------------------------- | + | |
- | omni | + | |
- | | | + | |
- | | | + | |
- | swivel | omni device slot swivel in | + | |
- | | + | |
- | | | + | |
- | fixed | omni device slot fixed in weapon+device | + | |
- | | + | |
- | | | + | |
- | + | ||
- | For example, a swivel device slot always overrides any swivelling in the weapon; but a fixed device slot combines with the fire direction of the weapon. | + | |
- | + | ||
- | =====Linked Fire Controls===== | + | |
- | By default a weapon only fires when it is the selected weapon and when the player presses the appropriate fire key ([Ctrl] for weapons, [Shift] for launchers). | + | |
- | + | ||
- | **linkedFire=** The linkedFire attribute removes the weapon from the selection rotation (i.e., the weapon can never be selected). Instead, the weapon will fire whenever the selected weapon fires. A launcher with the linkedFire attribute will fire whenever the launcher fires; a weapon will fire whenever the selected weapon fires. | + | |
- | + | ||
- | The linkedFire attribute can have one of the following values: | + | |
- | + | ||
- | * always : With this value, the linked-fire weapon will always fire, regardless of the position or existance of a target. | + | |
- | * whenInFireArc : With this value, the linked-fire weapon will fire only if the selected target or an enemy ship is within its fire arc. | + | |
- | + | ||
- | In general, forward-facing weapons should use the //always// value while others should use the // | + | |
- | + | ||
- | =====Configurations===== | + | |
- | + | ||
- | A weapon can fire multiple projectiles at the same time. There are two ways to specify this. | + | |
- | + | ||
- | **configuration=** This attribute specifies a standard configuration. The following values are valid: | + | |
- | + | ||
- | * alternating | + | |
- | * dual | + | |
- | * spread2 | + | |
- | * spread3 | + | |
- | * spread5 | + | |
- | * wall | + | |
- | + | ||
- | ====< | + | |
- | A better way to specify how projectiles are fired is to use the < | + | |
- | + | ||
- | For example: | + | |
- | + | ||
- | < | + | |
- | < | + | |
- | <Shot posAngle=" | + | |
- | <Shot posAngle=" | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | You can place aimTolerance=" | + | |
- | In addition, alternating=true can be placed within < | + | |
- | + | ||
- | < | + | |
- | < | + | |
- | type= " | + | |
- | + | ||
- | damage= | + | |
- | repeating= | + | |
- | fireRate= | + | |
- | hitPoints= | + | |
- | interaction= | + | |
- | hitEffect= | + | |
- | missileSpeed= | + | |
- | accelerationFactor= | + | |
- | lifetime= | + | |
- | powerUse= | + | |
- | deviceSlots= | + | |
- | noFriendlyFire= | + | |
- | > | + | |
- | < | + | |
- | <Shot posAngle=" | + | |
- | <Shot posAngle=" | + | |
- | <Shot posAngle=" | + | |
- | <Shot posAngle=" | + | |
- | <Shot posAngle=" | + | |
- | <Shot posAngle=" | + | |
- | </ | + | |
- | < | + | |
- | <Image imageID="& | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | means one shot. In this example, 6 shots are fired at the same time each time the weapon is fired. | + | |
- | < | + | |
- | posAngle=" | + | |
- | </ | + | |
- | posAngle is the angle you want it to fire from. 0 is facing upwards (as in the nose of the Sapphire at the 1st facing.) | + | |
- | < | + | |
- | posRadius=" | + | |
- | </ | + | |
- | means how far you want the shot to appear from the angle [in pixels] , which means that the shot shows up 20 pixels from center, towards the nose of the craft. | + | |
- | < | + | |
- | angle=" | + | |
- | </ | + | |
- | means how much you want the shot to deviate (as in it can fire from angle x to y) from the initial firing. Since some of it is 0-180, and others are 360-181, that means all of the shots cover the full 360 degrees. This is different from posAngle and posRadius because posAngle and posRadius determine where the shot comes out, angle determines where the shot goes. | + | |
- | Angles 0 and 360 is the same from what I've seen, and 90 is to the left of the playership. | + | |
- | If you want a smaller angle, use something like 355-10 to have a narrow cone in front of your ship. | + | |
- | + | ||
- | =====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]** | + | |
- | + | ||
- | =====Defining Projectiles===== | + | |
- | The following attributes may be used in the < | + | |
- | + | ||
- | **ammoID=** If specified, this is the UNID of the [[< | + | |
- | + | ||
- | **type=** The type of projectile defines its basic nature. The following types are supported: | + | |
- | + | ||
- | * area | + | |
- | * beam | + | |
- | * missile | + | |
- | * particles | + | |
- | * radius | + | |
- | + | ||
- | **damage=** The damage done by the projectile. Damage is expressed as a [[modding: | + | |
- | + | ||
- | **lifetime=** The number of ticks that the projectile will live for. This is expressed as a [[modding/ | + | |
- | + | ||
- | **repeating=** If specified, this is the number of extra shots that will fire. | + | |
- | + | ||
- | **missileSpeed=** The speed of the projectile, in % of light-speed. If this attribute is not specified, then the projectile travels at light-speed. This is expressed as a [[modding/ | + | |
- | + | ||
- | **initialDelay=** If non-zero, the projectile doesn' | + | |
- | + | ||
- | **canHitSource=** If **true** then this projectile can hit the object that fired it. By default, this is false. | + | |
- | + | ||
- | **noFriendlyFire=** If **true** then the projectile never hits any friendly objects. | + | |
- | + | ||
- | **autoAcquireTarget=** If **true** then the projectile will automatically acquire an enemy target when fired. | + | |
- | + | ||
- | **stealth=** The stealth value of the projectile. | + | |
- | + | ||
- | **passthrough=** If specified, this is the chance that the projectile will continue in its path even after it hits and damages an object. NOTE: For area weapons the default is 80; for all others the default is 0. | + | |
- | + | ||
- | **sound=** The sound effect UNID to be played when the projectile is fired. | + | |
- | + | ||
- | Be careful when using type=" | + | |
- | + | ||
- | ====type=area==== | + | |
- | + | ||
- | ====type=beam==== | + | |
- | Certain weapontypes only take certain effects: | + | |
- | " | + | |
- | + | ||
- | " | + | |
- | can specify colors using hexadecimal. | + | |
- | < | + | |
- | beamType= " | + | |
- | primaryColor= " | + | |
- | secondaryColor= " | + | |
- | </ | + | |
- | " | + | |
- | Can specify colors using hexadecimal as well as intensity | + | |
- | < | + | |
- | beamType= " | + | |
- | primaryColor= " | + | |
- | secondaryColor= " | + | |
- | intensity= " | + | |
- | </ | + | |
- | " | + | |
- | < | + | |
- | beamType= " | + | |
- | </ | + | |
- | " | + | |
- | < | + | |
- | beamType= " | + | |
- | primaryColor= " | + | |
- | secondaryColor= " | + | |
- | intensity= " | + | |
- | </ | + | |
- | + | ||
- | " | + | |
- | < | + | |
- | beamType= " | + | |
- | primaryColor= " | + | |
- | secondaryColor= " | + | |
- | sound= "& | + | |
- | </ | + | |
- | + | ||
- | " | + | |
- | < | + | |
- | beamType= " | + | |
- | </ | + | |
- | + | ||
- | " | + | |
- | < | + | |
- | beamType= " | + | |
- | </ | + | |
- | NOTE: | + | |
- | intensity is a parameter used by SOME beam type weapon projectiles. | + | |
- | Valid beams include heavy blaster & lightning. | + | |
- | Note that intensity of less than 4 will not work on beams due to a strange bug that causes them to disappear at 0, 90 180 and 270 degrees. | + | |
- | Intensity will basically increase the size of the projectile. | + | |
- | ====type=missile==== | + | |
- | + | ||
- | ====type=particles==== | + | |
- | + | ||
- | ====type=radius==== | + | |
- | + | ||
- | ====< | + | |
- | The < | + | |
- | + | ||
- | ====< | + | |
- | This optional sub-element defines how to paint the explosion that results when the projectile hits a target. If the element is omitted, a default hit effect is used. See the page on [[modding: | + | |
- | + | ||
- | ====< | + | |
- | This optional sub-element defines how to paint the muzzle-flash effect when a weapon fires. If the element is omitted, no fire effect is painted. See the page on [[modding: | + | |
- | + | ||
- | ====Vapor Trail==== | + | |
- | + | ||
- | **vaporTrailLength=** integer, probably pixels, default is 64 | + | |
- | + | ||
- | **vaporTrailWidth=** integer, probably pixels | + | |
- | + | ||
- | **vaporTrailWidthInc=** integer, has something to do with how trapezoidal the trail is probably, default is 25 | + | |
- | + | ||
- | **vaporTrailColor=** presumably the same color formats as are used elsewhere | + | |
- | + | ||
- | //quick notes from looking at one place in the source --Weaver// | + | |
- | + | ||
- | =====Fragments===== | + | |
- | + | ||
- | =====Standard Stats===== | + | |
- | ^ Level | | + | |
- | ^1 | 4 |10 |350 |0.6 | 0 | 0 | | + | |
- | ^2 | 5 |20 |800 |1.2 | 0 | -20 | | + | |
- | ^3 | 7 |50 |1850 |3.0 | 0 | -50 | | + | |
- | ^4 | 9 |100 |4000 |6.0 | 0 | -100 | | + | |
- | ^5 | 12 |200 |8500 |12.0 | 5 | -170 | | + | |
- | ^6 | 16 |300 |18500 |18.0 | 5 | -250 | | + | |
- | ^7 | 21 |500 |39000 |30.0 | 5 | -300 | | + | |
- | ^8 | 27 |1000 |78500 |60.0 | 10 | -300 | | + | |
- | ^9 | 35 |2000 |158000 |120.0 | 10 | -300 | | + | |
- | ^10 | 46 |3000 |320000 |180.0 | 10 | -300 | | + | |
- | ^11 | 60 |4000 |640000 |240.0 | 25 | -300 | | + | |
- | ^12 | 78 |6000 |1300000 |360.0 | 25 | -300 | | + | |
- | ^13 | 101 |8000 |2700000 |480.0 | 25 | -300 | | + | |
- | ^14 | 131 |10000 |5300000 |600.0 | 100 | -300 | | + | |
- | ^15 | 170 |12000 |10600000 |720.0 | 100 | -300 | | + | |
- | ^16 | 221 |15000 |21300000 |900.0 | 100 | -300 | | + | |
- | ^17 | 287 |20000 |42600000 |1200.0 | 200 | -300 | | + | |
- | ^18 | 373 |25000 |85200000 |1500.0 | 200 | -300 | | + | |
- | ^19 | 485 |30000 |170000000 |1800.0 | 200 | -300 | | + | |
- | ^20 | 631 |35000 |341000000 |2100.0 | 200 | -300 | | + | |
- | ^21 | 820 |40000 |682000000 |2400.0 | 200 | -300 | | + | |
- | ^22 | 1066 |50000 |1400000000 |3000.0 | 200 | -300 | | + | |
- | ^23 | 1386 |60000 |2700000000 |3600.0 | 200 | -300 | | + | |
- | ^24 | 1802 |70000 |5500000000 |4200.0 | 200 | -300 | | + | |
- | ^25 | 2343 |80000 |10900000000 |4800.0 | 200 | -300 | | + | |
- | + | ||
- | * The standard fire delay is 8 ticks (or 3.75 shots per second) | + | |
- | * The standard range is 60 ls | + | |
- | * The standard ammo mass is 10.0 kg | + | |
- | * The Over and Under values are Balance Points; they are used when determining the overpoweredness or underpoweredness of a weapon. Rather than being chosen based on the level of the weapon, they are chosen based on the difference between | + | |
- | + | ||
- | ^Damage | Level | | + | |
- | ^laser | 1 | | + | |
- | ^kinetic | 1 | | + | |
- | ^particle | 4 | | + | |
- | ^ion | 4 | | + | |
- | ^thermo | 7 | | + | |
- | ^positron | 7 | | + | |
- | ^plasma | 10 | | + | |
- | ^antimatter | 10 | | + | |
- | ^nano | 13 | | + | |
- | ^graviton | 16 | | + | |
- | ^singularity | 16 | | + | |
- | ^darkAcid | 19 | | + | |
- | ^darkSteel | 19 | | + | |
- | ^darkLightning | 22 | | + | |
- | ^darkFire | 22 | | + | |
- | + | ||
- | This table shows the standard weapon level that each damage type is associated with. | + | |
- | + | ||
- | =====Fields===== | + | |
- | + | ||
- | =====Properties===== | + | |
- | + | ||
- | * **ammoTypes=** If the weapon uses ammo, this is a list of UNIDs for every compatible ammo item type. | + | |
- | * **averageDamage=** This is the average unadjusted damage dealt every time the weapon is fired. This assumes that all projectiles hit the same target. | + | |
- | * **balance=** The percentage to which the weapon is overpowered relative to its level | + | |
- | * **balanceDamage=** | + | |
- | * **balanceCost=** | + | |
- | * **balanceExcludeCost=** | + | |
- | * **damage=** | + | |
- | * **damagePerProjectile=** | + | |
- | * **damageWMD180=** | + | |
- | * **damaged=** | + | |
- | * **effectiveRange=** | + | |
- | * **fireArc=** | + | |
- | * **fireDelay=** | + | |
- | * **fireRate=** | + | |
- | * **linkedFireOptions=** | + | |
- | * **maxDamage=** | + | |
- | * **minDamage=** | + | |
- | * **omnidirectional=** | + | |
- | * **secondary=** | + | |
- | * **stdCost=** | + | |
- | * **tracking=** | + | |
- | + | ||
- | ====Balance==== | + | |
- | + | ||
- | | Notes | Balance Points | | + | |
- | | Compare this weapon' | + | |
- | | If the damage type's standard level is greater than the weapon' | + | |
- | | If the damage type's standard level is less than the weapon' | + | |
- | | If the weapon uses ammo or charges, it loses 100 balance points | **-100** | | + | |
- | | Find the percentage difference between our ammo unit cost and the standard firing cost at our level. The standard firing cost is found by multiplying the standard unit cost with the ratio between our fire rate and the standard fire rate. Subtract 0.2 Balance Points for every percentage point that our cost is above the standard. If the cost is below standard, add instead. | StdAmmoFiringCost = StdAmmoCost[Level] * FireRate / StdFireRate[Level] \\ **-0.2 | 100 * (AmmoCost - StdAmmoFiringCost) / StdAmmoFiringCost** | | + | |
- | | Find the percentage difference between our ammo unit mass and the standard firing mass at our level. The standard firing mass is found by multiplying the standard unit mass with the ratio between our fire rate and the standard fire rate. Subtract 0.25 Balance Points for every percentage point that our mass is above the standard. If the mass is below standard, add instead | StdAmmoMass = 10 \\ StdAmmoFiringMass = StdAmmoMass * FireRate / StdFireRate \\ **-0.25 * 100 * (AmmoMass - StdAmmoFiringMass) / StdAmmoFiringMass** | | + | |
- | | If the weapon can rotate, add up to 100 Balance Points | **100 * √(FireArc / 360)** | | + | |
- | | If the weapon has tracking or any of its fragments have tracking, then add Balance Points | **100** | | + | |
- | | Compare the weapon range to the standard range. For each light-second distance that the weapon' | + | |
- | | Compare the weapon range to the standard range. For each light-second distance that the weapon' | + | |
- | | Subtract up to 25 Balance Points based on missile speed | **-25 * (1 - √(MissileSpeed / 100))** | | + | |
- | | Add up to 5 Balance Points for not having interaction | **5 * (100 - Interaction) / 100** | | + | |
- | | Add up to 10 Balance Points as projectile hp approaches standard damage | **10 * HitPoints / StdDamage[Level]** | | + | |
- | | If this weapon is a primary, Find the difference between its power use and the adjusted standard (10% of the standard if we use ammo, 100% otherwise). Divide this difference by the unadjusted standard and multiply by 100. | StdPowerAdjusted = 0.1 * StdPower[Level] \\ StdPowerAdjusted = Power[Level] \\ **100 * (Power - StdPowerAdjusted) / StdPower[Level]** | | + | |
- | | If this weapon is a primary, compare its value to the standard value at its level. For each percentage point difference from standard, subtract 0.5 Balance Points if our value is greater. Otherwise, add. | **-0.5 * 100 * (Value - StdValue[Level]) / StdValue[Level]** | | + | |
- | | If the weapon is slotless, add 20 Balance Points | **20** | | + | |
- | | If the weapon takes one slot, then no Balance Points | **0** | | + | |
- | | If the weapon takes more than one slot, subtract 40 Balance Points for each additional slot | **-40 * (Slots - 1)** | | + | |
- | | If the weapon has linked-fire, | + | |
- | | Subtract 2.5 points for each point of recoil | **2.5 * Recoil** | | + | |
- | | Subtract 40 Balance Points if external | **-40** | | + | |
- | | Add 30 Balance Points if this weapon has radiation | **30** | | + | |
- | | Add 3 Balance Points for each percent chance of device disruption (up to 50%) | **3 * DeviceDisruptChance** | | + | |
- | | Add 3 Balance Points for each percent chance of device damage (up to 50%) | **3 * DeviceDamageChance** | | + | |
- | | Add 100 Balance Points if this weapon has disintegration | **100** | | + | |
- | | Add 12 Balance Points for each point of Shatter | **12 * Shatter** | | + | |
- | | Add 0.25 Balance Points for each percent chance of shield penetration | **0.25 * ShieldPenetrateChance** | | + | |
- | | Shield Buster | **10 * (3 + Shield - Level)** | | + | |
- | | Armor Penetrate | **20 * (3 + Armor - Level)** | | + | |
- | | Add 0.1 for every percentage point chance of mining | MiningChance[Mining] = 2 * Mining² + 2 \\ **0.1 * MiningChance[Mining]** | | + | |
- | | Add 0.5 Balance Points for each percentage point of adjustment for non-standard WMD damage | **0.5 * WMDAdj[WMD]** | | + | |
- | =====Variants===== | + | |
- | + | ||
- | =====Events===== | + | |
- | Weapon | + | |
- | + | ||
- | ===< | + | |
- | This event is called when a projectile from this weapon hits the armor of a ship. If the event returns an integer, the value is interpreted as the amount of damage to do to armor (before adjustments for damage type). If the event returns Nil, the original damage amount is unchanged. | + | |
- | * **gSource** is the object that was hit by the projectile. | + | |
- | * **aArmorSeg** is the armor segment on the object that was hit. | + | |
- | * **aAttacker** is the object that fired the projectile. | + | |
- | * **aCause** is the projectile object. | + | |
- | * **aDamageHP** is the adjusted damage (in hit points) that reached the armor. | + | |
- | * **aDamageType** is the type of damage. | + | |
- | * **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. | + | |
- | * **aWeaponType** is the UNID of the weapon (for missile weapons, this is the UNID of the missile). | + | |
- | ===< | + | |
- | This event is called when a projectile from this weapon hits an overlay on a ship. If the event returns an integer, the value is interpreted as the amount of damage to pass to shields (before adjustments for damage type). If the event returns Nil, the original damage amount is unchanged. | + | |
- | * **gSource** is the object that was hit by the projectile. | + | |
- | * **aAttacker** is the object that fired the projectile. | + | |
- | * **aCause** is the projectile object. | + | |
- | * **aDamageHP** is the adjusted damage (in hit points) that reached the armor. | + | |
- | * **aDamageType** is the type of damage. | + | |
- | * **aArmorSeg** is the armor segment that would be hit if it penetrates overlay and shields. | + | |
- | * **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. | + | |
- | * **aOverlayID** is the ID of the overlay that was hit. | + | |
- | * **aWeaponType** is the UNID of the weapon (for missile weapons, this is the UNID of the missile). | + | |
- | ===< | + | |
- | This event is called when a projectile from this weapon hits the shields on a ship. | + | |
- | + | ||
- | If the event returns Nil, the shields process the damage normally. | + | |
- | + | ||
- | If the event returns an integer, then the shields are by-passed and the value is interpreted as the amount of damage to do to armor. | + | |
- | + | ||
- | If the event returns the string " | + | |
- | + | ||
- | 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. | + | |
- | * **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 armor. It has not been adjusted for damage type. | + | |
- | * **aDamageType** is the type of damage. | + | |
- | * **aDeviceItem** is the shield item. | + | |
- | * **aArmorSeg** is the armor segment that would be hit if it penetrates shields. | + | |
- | * **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 weapon items when the weapon fires. For weapons with multi-projectile configurations or for repeating weapons, the event is called once per projectile. The event may use sysCreateWeaponFire to create projectiles. If the event returns Nil, then the normal projectile is created. | + | |
- | * **gSource** is the object that fired the weapon. | + | |
- | * **gItem** is the weapon itself (for missile weapons, this is the launcher). | + | |
- | * **aFireAngle** is the angle that the weapon fired at. | + | |
- | * **aFirePos** is the position where the weapon fire originates. | + | |
- | * **aTargetObj** is the target object (if any). | + | |
- | * **aWeaponBonus** is the %bonus confered by any enhancements. | + | |
- | * **aWeaponType** is the UNID of the weapon (for missile weapons, this is the UNID of the missile). | + | |
- | ===< | + | |
- | This event is called on a weapon when a shot from that weapon fragments due to either proximity or reaching the end of its lifetime. | + | |
- | * **aNearestObj** The object that triggered the fragmentation (or Nil) | + | |
- | * **aTargetObj** The object that the attacker was targeting (or Nil if no target) | + | |
- | * **aHitPos** The detonation position | + | |
- | * **aHitDir** The direction that the shot was traveling | + | |
- | * **aWeaponType** The UNID of the weapon that fired | + | |
- | * **aWeaponFragment** An identifier for the fragmentation (in case a fragment also fragments) | + | |
- | * **aCause** The shot object | + | |
- | * **aAttacker** The attacker | + | |
- | * **aOrderGiver** The object that ordered the attack (in case aAttacker is an auton) | + |
modding/xml/weapon_devices.txt · Last modified: 2017/02/05 18:07 by 0xabcdef