Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 8:35 pm
All times are UTC + 0
Three (or more ) weapons for a unit
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
BaRaka
Medic


Joined: 09 Jun 2014

PostPosted: Fri Jul 18, 2014 8:09 am    Post subject:  Three (or more ) weapons for a unit
Subject description: Adding more than two weapons
Reply with quote  Mark this post and the followings unread

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:

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

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

[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%


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%

[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:
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

[MammothTusk]   ;AA weapon
Damage=50
ROF=80
Range=8
Projectile=AAHeatSeeker
Speed=20
Warhead=HE
Burst=2
Report=none    ;;ApocalypseAttackAir
Anim=APOCATKAIR   


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

[APMUZZLE]
Report=ApocalypseAttackGround
Normalized=yes
Rate=900

[VTMUZZLEApoc]
Image=VTMUZZLE
Normalized=yes
Report=ApocalypseAttackGround
Rate=900
Translucent=no


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:
Code:

[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%

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.



apocs.jpg
 Description:
 Filesize:  419.21 KB
 Viewed:  7846 Time(s)

apocs.jpg




Key Words: #Tutorials #Modding #RedAlert2 #YurisRevenge #Ares #Rules.INI 

Back to top
View user's profile Send private message
gistop
Stealth Laser Trooper


Joined: 19 Feb 2014
Location: Canada

PostPosted: Fri Jul 18, 2014 5:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

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. Sad

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?

Back to top
View user's profile Send private message
BaRaka
Medic


Joined: 09 Jun 2014

PostPosted: Fri Jul 18, 2014 6:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
Nikademis Von Hisson
General


Joined: 05 Sep 2007
Location: Wilkes Barre PA

PostPosted: Fri Jul 18, 2014 9:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

http://www.ppmsite.com/forum/viewtopic.php?t=27714

Back to top
View user's profile Send private message Send e-mail Skype Account
gistop
Stealth Laser Trooper


Joined: 19 Feb 2014
Location: Canada

PostPosted: Fri Jul 18, 2014 10:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Sat Jul 19, 2014 6:56 am    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
RIAKTOR
Disk Thrower


Joined: 23 Nov 2013

PostPosted: Thu Sep 14, 2017 4:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

How make infantry with three weapons?

Back to top
View user's profile Send private message
4StarGeneral
General


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Fri Sep 15, 2017 4:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

You can't, IsGattling logic doesn't work on infantry.

_________________
"Don't beg for things; Do it yourself or you'll never get anything."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.1550s ][ Queries: 14 (0.0102s) ][ Debug on ]