ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Difference between revisions of "OccupyWeapon"

From ModEnc
Jump to: navigation, search
m (Replacing Template:TTL with Template:F.)
(Revised and corrected for more and better information.)
 
Line 1: Line 1:
 
{{Flag
 
{{Flag
|name=OccupyWeapon
+
|values={{Values|strings|[[Weapons]]}}
|files={{Categ|Rules(md).ini}}
+
|default={{f|Primary|link}}
|values={{Values|string|[[Weapons]]}}
+
|types={{Categ|InfantryTypes}}
|types={{Categ|TechnoTypes}}
 
|ra2=yes
 
 
|yr=yes
 
|yr=yes
|rp=yes
 
 
}}
 
}}
  
Specifies the weapon that this unit should use when occupying an urban structure or bunker. The unit should have {{f|Occupier|link}}=yes set.
+
This flag specifies the [[Weapons|weapon]] that an [[InfantryTypes|infantry]] with {{f|Occupier|yes|link}} should fire when occupying a [[BuildingTypes|building]] with {{f|CanBeOccupied|yes|link}} and {{f|MaxNumberOccupants|link}} set to a positive [[Help:Values#Integers|integer]] greater than 0.
  
The unit will then fire its designated OccupyWeapon from the structure at a specific global {{f|OccupyWeaponRange|link}} and damage the target using the weapon's {{f|Damage|link}} multiplied by {{f|OccupyDamageMultiplier|link}}(global). The rate of fire of the weapon should be the weapon's {{f|ROF|link}} multiplied by {{f|OccupyROFMultiplier|link}}(global).
+
If the infantry's veterancy status is "elite", it will instead use the weapon specified by {{f|EliteOccupyWeapon|link}}.
  
When the unit has become elite, it will use its {{f|EliteOccupyWeapon|link}}. If there is no such tag set, it will continue using its OccupyWeapon to fire.
+
The range of any weapon fired by an occupant is overridden by {{s|CombatDamage|link}}{{arr}}{{f|OccupyWeaponRange|link}}. Those weapons also get additional multiplers to {{f|Damage|link}} and {{f|ROF|link}} specified by {{s|CombatDamage}}{{arr}}{{f|OccupyDamageMultiplier|link}} and {{s|CombatDamage}}{{arr}}{{f|OccupyROFMultiplier|link}}, respectively.
  
{{Automatictypelist|2=Weapons}}
+
If a weapon fired by an occupant has {{f|OccupantAnim|link}} set to any valid [[Animations|animation]], it will be displayed when the weapon is fired accordingly.
 +
 
 +
{{Automatictypelist|Weapons|Weapons}}
 +
 
 +
==Different implementation for Red Alert 2==
 +
{{NeedsTesting}}
 +
For {{Ra2}} without the {{Yr}} expansion, which weapon each occupant fires is instead determined by the building itself. {{f|Primary|link}} is used by a player controlling any [[Countries|country]] listed under {{s|Sides|link}}{{arr}}{{f|GDI|link}}{{fnl|1}}; {{f|Secondary|link}} for {{s|Sides}}{{arr}}{{f|Nod|link}}{{fnl|1}}.
 +
 
 +
Interestingly, this akward implementation allows infantry to fire different weapons depending on the building they are occupying.
 +
 
 +
==See also==
 +
* {{f|Occupier|link}}
 +
* {{f|EliteOccupyWeapon|link}}
 +
* {{f|OccupyPip|link}}
 +
 
 +
==Notes==
 +
{{fn|1|Note that "GDI" and "Nod" are residual from the {{Ts}} [[engine]] and are treated as the Allied and Soviet sides respectively in {{Ra2}}.}}

Latest revision as of 03:15, 7 December 2009

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: OccupyWeapon
File(s): rules(md).ini
Values: Strings: Normal text. (Limited to: Weapons)
Default: Primary
Applicable to: InfantryTypes


This flag specifies the weapon that an infantry with Occupier=yes should fire when occupying a building with CanBeOccupied=yes and MaxNumberOccupants set to a positive integer greater than 0.

If the infantry's veterancy status is "elite", it will instead use the weapon specified by EliteOccupyWeapon.

The range of any weapon fired by an occupant is overridden by [CombatDamage]OccupyWeaponRange. Those weapons also get additional multiplers to Damage and ROF specified by [CombatDamage]OccupyDamageMultiplier and [CombatDamage]OccupyROFMultiplier, respectively.

If a weapon fired by an occupant has OccupantAnim set to any valid animation, it will be displayed when the weapon is fired accordingly.

Cc documentinfo.png Automatic List Inclusion

Weapons used as values for this flag are automatically listed under the internal [Weapons] array. However no harm can be done by listing them manually.

Different implementation for Red Alert 2

This needs testing
Cc mouse.png
The following section contains information that has not been personally confirmed by the revision's author; readers are encouraged to test it themselves and update the section accordingly.

For Red Alert 2 without the Yuri's Revenge expansion, which weapon each occupant fires is instead determined by the building itself. Primary is used by a player controlling any country listed under [Sides]GDI1; Secondary for [Sides]Nod1.

Interestingly, this akward implementation allows infantry to fire different weapons depending on the building they are occupying.

See also

Notes

1 Note that "GDI" and "Nod" are residual from the Tiberian Sun engine and are treated as the Allied and Soviet sides respectively in Red Alert 2.