Gattling Weapon System
The Gattling Weapon System, introduced through the Yuri side's Gattling Tank and Yuri Gattling Cannon in Yuri's Revenge, utilizes a firing timer to divide the WeaponX system into phases with two weapons per phase, enabling dedicated handling of AG and AA missions respectively.
Basic
Flags involved
- IsGattling
- TurretCount
- WeaponCount
- (Elite)WeaponX
- WeaponStages
- (Elite)StageX
- RateUp
- RateDown
TurretCount
First, enable the WeaponX System by setting a TurretCount value greater than or equal to 1.
- Without this step, Gatling weapon system will trigger EIP#0070DF8A when processing the Report.
IsGattling
Then, set IsGattling=yes to make this WeaponX System follow Gatling weapon system assignment rules, meaning odd-numbered weapons are used for AG (Anti-Ground) and even-numbered weapons for AA (Anti-Air).
WeaponStages
The stages of the Gattling weapon system are specified by the WeaponStages parameter. For instance, both vanilla examples mentioned above use WeaponStages=3, indicating that the Gattling Weapon possesses three distinct phases. In Yuri's Revenge, this implementation serves to progressively enhance the weapon's firepower as firing duration increases.
(Elite)StageX
(Elite)StageX sets the endpoint at which phase X ends when the timer accumulates to a specific value and switches to the next Stage. Therefore, each system contains WeaponStages number of (Elite)StageX. For example, if Stage1=100, the initial firing will use Weapon1 and Weapon2 from the first stage. When the timer reaches 100, the system will switch to Weapon3 and Weapon4 from the second stage.
It is important to clarify that: it represents the endpoint - meaning StageX is used to divide the timer into phases, rather than indicating how long StageX remains active as the current stage.
- For each stage's two weapons - Weapon(2*X-1) and Weapon(2*X), there must be a corresponding StageX flag; otherwise, they will remain permanently unusable.
Westwood comment: This last stage is used to determine what the maximum fireing timer can be. Once it hits this it will stop increasing[1].
If this is larger than the previous stage, then it will have a grace period once the unit stops firing before it needs to drop down to the lower weapon.
Notes
For stages X, Y, Z where X<Y<Z, it is not necessary that StageX < StageY < StageZ.
For example:
[TechnoType] Stage1=400 Stage2=200 Stage3=600
Then:
During forward timing: Switching from stage 1 to stage 2 requires the timer > 400, but at this point it already exceeds stage 2's upper limit (200), thus it jumps directly to stage 3.
During reverse timing: Switching from stage 3 to stage 2 requires the timer < 200, but at this point it is already below stage 1's upper limit (400), thus it falls directly to stage 1.
If the timer
during forward timing is exactly at the transition point from stage 1 to stage 2 (400),
or
during reverse timing is exactly at the transition point from stage 3 to stage 2 (200),
there will still be 1 frame belonging to stage 2.
- However, this usually doesn't manifest due to the previous shot's ROF not being completed.
- If there is no need to randomly use stage 2 weapons, it's best to set a dummy weapon for stage 2.
RateUp & RateDown
These two parameters control how timers change in the Gatling Weapon System:
- RateUp How much the timer increases per frame when firing.
- RateDown: How much the timer decreases per frame when not firing.
Notes
Both RateUp and RateDown are signed integers, so addition and subtraction merely follow the conventionally chosen positive direction. If you set them to negative values, it is equivalent to inverting them. See #Self-incrementing Timer.
RateDown=0 is a special value that causes the timer to instantly reset instead of maintaining its value when not firing.
- Therefore, you cannot use this setting to create a Gatling Weapon System that never downgrades its stage.
- However, this may not always immediately reset the timer after a target is destroyed/switched due to reasons such as immediately designating another unit as the new target. Refer to the Phobos documentation.
WeaponCount
Since each WeaponStages is equipped with two Weapons, the value of WeaponCount equals WeaponStages multiplied by two [2]. Therefore, the WeaponStages also determines the number of Weapons participating in this Gatling Weapon System. For example, the Gattling Tank in Yuri's Revenge uses the following parameters:
IsGattling=yes TurretCount=1 WeaponCount=6 Weapon1=AGGattling EliteWeapon1=AGGattlingE Weapon2=AAGattling EliteWeapon2=AAGattlingE Weapon3=AGGattling2 EliteWeapon3=AGGattling2E Weapon4=AAGattling2 EliteWeapon4=AAGattling2E Weapon5=AGGattling3 EliteWeapon5=AGGattling3E Weapon6=AAGattling3 EliteWeapon6=AAGattling3E WeaponStages=3 Stage1=200 Stage2=400 Stage3=600 EliteStage1=100 EliteStage2=200 EliteStage3=300 RateUp=1 RateDown=50
(Elite)WeaponX
Configure the Xth weapon; See the Flag page.
Expand
Energy Accumulator Cannon
The Gattling Weapon System was originally designed to implement the warm-up and subsequent firepower enhancement mechanism for Gatling-style weapons, making it particularly suitable for creating weapon effects that require charging before firing.
The implementation method involves: initially using a weapon with no actual effect or only visual effects for "targeting", then switching to a higher-stage weapon for firing once the timer accumulates to a specified threshold. Regarding the reset of the timer after firing, setting FireOnce=yes combined with the Gattling control parameter RateDown=0 can make the weapon immediately lose its target after completing the shot, thereby triggering timer reset.
However, this approach has notable drawbacks: the FireOnce parameter restricts Burst functionality, and target loss necessitates re-acquisition (which may lead to target changes).
- To address this, the Ares engine introduced the Gattling.Cycle flag.
- This feature enables the weapon to automatically cycle back to the initial stage after reaching the final phase.
Self-incrementing Timer
RateDown can accept negative values, which causes units to automatically accumulate timers from creation[1].
This allows units to initially use ordinary weapons, then switch to another weapon after a specific duration, or employ a powerful weapon as a time-limited appearance effect when just produced.
Naturally, RateUp also supports negative values. You can explore more interesting gameplay possibilities on your own.
Note: Regardless of settings, units will always use first-stage weapons during their initial attack. To circumvent this issue, you may utilize a dummy weapon with no actual effects as a placeholder.
Multi Weapon
Since (Elite)StageX only restricts the phase end timing, while the Gattling Weapon System happens to have a weapon choose rule:
if higher-stage weapons cannot fire at the target, the system will attempt to switch to lower-stage weapons.
This creates a tactical approach: within the timer range, use Verses to restrict higher-stage weapons from firing, forcing the system to use lower-stage weapons instead.
- By configuring RateUp, you can make the unit immediately meet the conditions for using multiple stage weapons after firing, then utilize Verses to filter these weapons. For example:
IsGattling=yes Weapon1=FakeWeapon Weapon3=Comet Weapon5=120mm Weapon7=M60 Weapon9=120mmx WeaponCount=10 WeaponStages=5 Stage1=1 Stage2=1 Stage3=1 Stage4=1 Stage5=1 RateUp=1 [CometWH] Verses=0,0,0,0,0,0,1,1,1,0,0 [AP] Verses=0,0,0,1,1,1,0,0,0,0,0 [SA] Verses=1,1,1,0,0,0,0,0,0,0,0 [ApocAP] Verses=0,0,0,0,0,0,0,0,0,1,1
This is sample code demonstrating the principle. If you want to use it, you need to complete it yourself. For example, the FakeWeapon here does not exist in Yuri's Revenge, but you need to create such a dummy weapon to ensure units can target all types of enemies when they start attacking, in order to initiate RateUp.
If not adjusted to the appropriate timing combinations, the unit may frequently miss targeting commands or cease firing after a few shots. In this case, please don't be discouraged; calmly examine your code thoroughly. After all, the principle isn't complex, and with a few tries, you will surely succeed.
Additionally: This selection mechanism works in tandem with the timer system. You can initially use (Elite)StageX to divide the timer into multiple phases, then employ Verses for weapon selection within each phase - naturally, within the weapon quantity limits supported by this Gattling Weapon System. Here is a simple example combining both switching rules.
Footnotes
- ↑ 1.0 1.1 1.2 Disable RateUp.
- If the use of a negative-valued RateDown causes the counter to exceed its maximum range, then even if you set RateUp to a negative value, it cannot return to the regulated range. You can only clear it through logic such as Convert.
- ↑ You can certainly set a WeaponCount greater than WeaponStages*2, but these extra weapons can only be called by flags like NoAmmoWeapon.
- However, under no circumstances set it lower than WeaponStages*2, or you will likewise receive EIP#0070DF8A.
References
The original person and article that first disclosed the usage of the Multi Weapon section are now untraceable.
For instance, PPM also hosted an article Three (or more) weapons for a Unit on the same topic published by BaRaka in 2014.
Gattling Enhancements in Ares - Gattling Cycle.
See Also
For alternative MultiWeapon extension methods of the Gatling Weapon System. Refer to the WeaponX page.