Posted: Fri Jul 18, 2014 8:09 am Post subject:
Three (or more ) weapons for a unit
Subject description: Adding more than two weapons
I wrote a tutorial for this "hack" a few years ago on another Ra2YR modding forum, but I'll post the info here aswell.
Ok, here's how you can give more than just two weapons to any vehicle in Yuri's Revenge, using Gattling logic.
You can give three different AG weapons AND three different AA weapons, and by changing the Verses on the warheads, you can keep the unit to use just some of the weapons.
I'll add an anti-infantry-only machinegun to the Apocalypse to make it more efficient at killing enemy soldiers.
First, add
Code:
IsGattling=yes
to the unit.
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
Then, add the weapons as reqested by gattling logic:
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.
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:
Code:
[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
[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%
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:
Code:
[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%
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:
Code:
[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
Now, add the warhead for the machinge gun ( SSApoc warhead ) to [Warhead] list, and add the new animations to [Animations] list:
Code:
…
X=APOCMGGUNFIRE
Y=VTMUZZLEApoc
Z=APOCATKAIR
Then, open Artmd.ini; we need an animation for the machine gun, so let's clone TWLT026:
Code:
[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:
Code:
[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
The Report for each weapon is moved 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.
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:
Code:
[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
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:
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.
Nice, I assumed this could be functional at some point, but me still having school has left me with just enough time to practice voxelling and Java.
ALSO: Do you think you could actually have 6 weapons? You could just have Gattling.Cycle on, so therefore couldn't you theoretically have a bunch of different weapons coming from everywhere? QUICK_EDIT
Yes, you can have 6 different weapons, but in game, gattling weapons are AG-AA-AG-AA-AG-AA, and the unit fires W1-W3-W5 against ground targets and W2-W4-W6 against air targets; so, I suspect you can have "just" 3 AG weapons and another 3 AA weapons.
Rather than speculating, I think it would be easier if one would just play a little with thist stuff, like giving 6 AG weapons and no AA, or testing with AG+AA weapons ( like FV's Hover Missile ); it' an open field for playing and testing with more properties for each weapon.
LE: it seems to be hard-coded to use odd weapons for AG targets, and even weapons for AA only. An AG-only weapon on an even slot will not be fired, and an AA+AG weapon on 2,4 or 6 slot will not be fired against AG targets.
So, you're limited to 3 AG weapons and 3 AA weapons. QUICK_EDIT
can you post a video of in game play to show this please.
and question was looking into a water craft the could shoot forward guns. torpedo and with a passenger could have AA, how would I do this?? _________________ I am authorized to send out the TMP Studio, PM ME IF YOU WANT IT And check this out, these were sent to me for help with terrain and zdata help along with TMP Studio/Builder
ah, but each AA weapon and AG weapon can have burst = X and then you could set multiple FLH (still only up to 2) which would then allow you to make it seem as if it has 12 weapons, 6 AA and 6 AG QUICK_EDIT
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Sat Jul 19, 2014 6:56 am Post subject:
BaRaKa, he can have 6 weapons actually. YR allows for a maximum of 6 WeaponStages (using 12 Weapons ofc)
Otherwise it's glad to see this tutorial again. _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
You can't, IsGattling logic doesn't work on infantry. _________________ "Don't beg for things; Do it yourself or you'll never get anything." QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum