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

Gattling Weapon System

From ModEnc
Jump to navigation Jump to search

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

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.

Westwood comment: This last stage is used to determine what the maximum fireing timer can be. Once it hits this it will stop increasing.
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.

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.

Note: 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.

Phobos has introduced enhancements to RateDown. Refer to the Phobos documentation.

WeaponCount

Since each WeaponStages is equipped with two Weapons, the value of WeaponCount equals WeaponStages multiplied by two. 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

Note: Failure to satisfy this equation will trigger EIP#0070DF8A.

(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. Refer to the Ares documentation for details.

Self-incrementing Timer

RateDown can accept negative values, which causes units to automatically accumulate timers from creation.

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:
[SOMEVEHICLE]
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
RateDown=0

[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

Replace SOMEVEHICLE with any valid VehicleType to use.
The FakeWeapon serves as a placeholder weapon designed to address the issue where the first firing action always prioritizes first-stage weapons.
All other Weapons and Warheads names are from the original Yuri's Revenge rules file content. Modifications should be based on the existing code.

  • For Ares engine, the INI Include feature can be utilized: use the sample text as a sub ini file.

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.

See Also

For alternative MultiWeapon extension methods of the Gatling Weapon System. Refer to the WeaponX page.

Rambling

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.
I initially discovered this before engaging with the community, and have incorporated self-explored optimizations in the implementation approach. Readers are advised to study from both articles.

Regardless of who originally disclosed it, all tutorial authors have never intended to seek monetary donations. Our sole purpose has always been to help more people create their own worlds through mod creation.

When citing content from this page, please comply with the ModEnc:Copyrights.