Multi Weapon Hack
This guide requires:
- rules(md).ini, art(md).ini
- Engine extensions: Ares (optional)
Credit to BaRaka for discovering this.
PPM link: Three (or more) weapons for a Unit
Step 1: Setting Up
Here is the instruction on how the modders can give more than just two weapons to any vehicle in Yuri's Revenge, using IsGattling= yes You can give six different AG weapons AND six different AA weapons at maximum, and by changing the Verses on the warheads, you can keep the unit to use just some of the weapons.
In this case, the Apocalyse tank is given a machine gun that is effective vs enemy InfantryTypes. Along with that it has three different anti ground weapons in total:
1.1: Enabling IsGattling logic
First, add
IsGattling=yes
to the unit.
1.2: Primaries and Secondaries settings
Then, replace the (Elite)Primary with a weapon that will be used against all targets, and add an EliteSecondary (these are the first AA weapons to be used ): Code:
Primary=ParaApoc ;a new clone of E1's machinegun, only for apocalypse ElitePrimary=ParaApocE Secondary=MammothTusk EliteSecondary=MammothTusk
1.3: Gattling weapons definitions
Then, add the weapons as reqested by gattling logic:
Weapon1=ParaApoc ;Primary weapon EliteWeapon1=ParaApocE Weapon2=MammothTusk ; Secondary EliteWeapon2=MammothTusk Weapon3=120mmx EliteWeapon3=120mmxE Weapon4=MammothTusk EliteWeapon4=MammothTusk Weapon5=120mmx EliteWeapon5=120mmxE Weapon6=MammothTusk EliteWeapon6=MammothTusk
and the rest of the gattling-related stuff:
TurretCount=1 WeaponCount=6 WeaponStages=3 Stage1=1 Stage2=1 Stage3=1 EliteStage1=1 EliteStage2=1 EliteStage3=1 RateUp=1 RateDown=1
Stages, RateUp and RateDown are very low, so it switches from one weapon to another very fast. Notice that Weapon3 and Weapon5 point to the same weapon - 120mmx. When playing the game, the unit will apear to fire a machine gun and then to switch to cannons (if the armor of the target allows). But you can give it two different weapons, and control via the Verses= tag how the unit will use them, so the unit can have three different weapons. Also, all AA weapons are identical - the player will see the Apocalypse as having only one AA weapon. But here, too, you can give it up to three different AA weapons, for different armor types - like firing a single long-ranged missile (a clone of the weapon with Burst=1) to intercept an V3 Rocket, using two medium-ranged AA missiles against aircrafts, and four low-ranged AA missiles against Kirovs.
Step 2: Weapons and Warheads
2.1: Defining anti-personel weapons
Now, create the machine gun required by Apoc, by cloning GI's secondary weapons and warhead, and change the names to match those from Apoc:
[ParaApoc] Damage=15 ROF=15 Range=5 Projectile=InvisibleLow Speed=100 Warhead=SSApoc ; a new warhead, we'll need to change a few things here, too Report=none ; GIAttackDeployed ; the report must come from animation Anim=APOCMGGUNFIRE ; animation for Report
[ParaApocE] Damage=25 ROF=5 Range=7 Projectile=InvisibleLow Speed=100 Warhead=SSApoc Report=none ; GIAttackDeployed Anim=APOCMGGUNFIRE
[SSApoc] ; the warhead for the machine gun Wall=yes ;you want the Apoc to be able to target walls Wood=yes Verses=100%,100%,100%,2%,2%,2%,2%,2%,2%,2%,2% ; it will target vehicle units or buildings, but will not damage them InfDeath=1 AnimList=PIFFPIFF Bright=true Bullets=yes ProneDamage=80%
- Note: if you're using Ares, you can give Gattling.Cycle=yes to your unit. In that case, you might want to increase the percentage of damage done by the machine gun against buildings:
[SSApoc] Wall=yes Wood=yes Verses=100%,100%,100%,10%,10%,10%,10%,10%,10%,10%,10% InfDeath=1 AnimList=PIFFPIFF Bright=true Bullets=yes ProneDamage=80%
2.2: Defining Anti-tank weapons
So far, the unit will fire a machine-gun for a very short time, then will switch to cannons. We need to stop it from firing the cannons if the target is an infantry, so it will keep using the machine gun:
[ApocAP] CellSpread=.3 PercentAtMax=.5 Wall=yes Wood=yes Verses=0%,0%,0%,75%,100%,100%,100%,100%,70%,60%,100% ; 0% will not allow this weapon to fire against infantry Conventional=yes InfDeath=3 AnimList=APOCEXP ProneDamage=50%
[ApocAPE] CellSpread=.3 PercentAtMax=.5 Wall=yes Wood=yes Verses=0%,0%,0%,75%,100%,100%,100%,100%,70%,60%,100% Conventional=yes InfDeath=3 AnimList=VTEXPLOD ProneDamage=50%
Now, remember that we've changed the animation for the machine gun.
Find the cannons and the missile used by Apoc, remove the reports, and replace the animations played when firing the weapons with new ones:
[120mmx] ;the main weapon Damage=100 ROF=80 Range=5.75 Projectile=Cannon Speed=40 Warhead=ApocAP Burst=2 Bright=yes Report=none ; ApocalypseAttackGround ; again, Raport from all the weapons should be none Anim=APMUZZLE ; I will keep this one, as this weapon is the only one using it; [b]if you use this animation for another unit, clone this animation too[/b]
[120mmxE] ;elite cannon Damage=100 ROF=80 Range=5.75 Projectile=Cannon Speed=40 Warhead=ApocAPE Report=none ; ApocalypseAttackGround Anim=VTMUZZLEApoc ; VTMUZZLE [b]is[/b] used by other units, so we need a new animation for Elite Cannons Burst=4 Bright=yes
[MammothTusk] ;AA weapon Damage=50 ROF=80 Range=8 Projectile=AAHeatSeeker Speed=20 Warhead=HE Burst=2 Report=none ;;ApocalypseAttackAir Anim=APOCATKAIR
2.3: Assigning the Warheads and Animations
Now, add the warhead for the machinge gun ( SSApoc warhead ) to [Warhead] list, and add the new animations to [Animations] list:
…
X=APOCMGGUNFIRE Y=VTMUZZLEApoc Z=APOCATKAIR
Step 3: Art.ini Entries
3.1: IsGattling logic limitation on Report=
The Report for each weapon should move to weapon's Anim=, instead of simply add as a Report to weapon, because the game "knows" than Gattling is a machine gun, and will play continuously the Report for the weapons, so, ingame, you would hear the Apocalypse firing the cannon or the missile a couple of times while it will actually fire the cannon only once. By attaching the sound of the weapon to the animation, the player will hear the sounds normally, only when the weapon is actually fired. Check again if you used APMUZZLE to any other weapon; if so, clone it and give the one with Report= only to Apocalypse.
3.2: Providing proper Report= to different kind of weapons
Now, open Artmd.ini; we need an animation for the machine gun, so let's clone TWLT026:
[APOCMGGUNFIRE] Image=TWLT026 ;so it will use the same image Normalized=yes Translucent=no Report=GIAttackDeployed ; this is how you[b] must [/b]do the Report - the sound you hear when the weapon is fired UseNormalLight=yes Crater=yes Scorch=yes DemandLoad=true
Then clone one more time TWLT026 for AA weapon, clone VTMUZZLE, and add the Reports for the cannon animations:
[APOCATKAIR] ; animation played when AA missiles are fired Image=TWLT026 ;so it will use the same image Normalized=yes Translucent=no Report=ApocalypseAttackAir UseNormalLight=yes Crater=yes Scorch=yes DemandLoad=true
[APMUZZLE] Report=ApocalypseAttackGround Normalized=yes Rate=900
[VTMUZZLEApoc] Image=VTMUZZLE Normalized=yes Report=ApocalypseAttackGround Rate=900 Translucent=no
2.3: Adjusting Weapon FLH of the unit
Last, find [MTNK] (this is the Apocalypse entry in Artmd.ini) and fix WeaponXFLH, so it will not fire all the weapons from the middle of the turret:
[MTNK] ; Apocalypse tank Voxel=yes Remapable=yes Cameo=MTNKICON AltCameo=MTNKUICO PrimaryFireFLH=30,42,96 ; this is the machine gun ElitePrimaryFireFLH=30,42,96
SecondaryFireFLH=-22,58,118 ; this is the AA Missile weapon EliteSecondaryFireFLH=-22,58,118
Weapon1FLH=30,42,96 ; machine gun Weapon2FLH=-22,58,118 ; AA Weapon3FLH=200,25,90 ; cannons Weapon4FLH=-22,58,118 ; AA Weapon5FLH=200,25,90 ; cannons Weapon6FLH=-22,58,118 ; AA
EliteWeapon1FLH=30,42,96 ; elite machine gun EliteWeapon2FLH=-22,58,118 ; AA EliteWeapon3FLH=200,25,90 ; elite cannons EliteWeapon4FLH=-22,58,118 ; AA EliteWeapon5FLH=200,25,90 ; elite cannons EliteWeapon6FLH=-22,58,118 ; AA
This way, it will fire only the machine gun when attacking infantry, but will fire both the machine gun and the cannons, at the same time ( respecting the ROF for each ) when attacking vehicles or buildings.