Weapons

Tutorial for Red Alert 2 RA2, Yuri's Revenge YR

Avatar of Allied General

Allied General

Category: Code
Level: Beginner
Created: Wednesday July 29, 2009 - 5:11
Updated: Sunday October 11, 2009 - 8:14
Views: 4821
Summary: The dummies' guide to weapons for RA2 and YR.
Rating
  • Staff-
  • Members-
  • Average-

0 votes

It is advised to download Deezire's RA2 modding encyclopedia from Deezire.

Weapons in RA2 work like rock, paper, scissors.

The Weapon is made up of 3 parts. The actual weapon, its warhead and its projectile.

The actual weapon code describes basics like general damage, range and rate of fire, by generally browsing the rules you should be able to work out basics e.g. higher damage = more damage, higher range = longer weapon range and higher ROF = more delay between shots. I'm not gonna explaining all the tags but I'm gonna go over some basics.

Here is a example, the M60, the GI's undeployed weapon

              
Code
[M60]
Damage=15
ROF=20
Range=4
Projectile=InvisibleLow
Speed=100
Warhead=SA
Report=GIAttack
Anim=MGUN-N,MGUN-NE,MGUN-E,MGUN-SE,MGUN-S,MGUN-SW,MGUN-W,MGUN-NW
OccupantAnim=UCFLASH


Speed is how fast the projectile moves, default is 100 for weapons such as machine guns, 40 for tank shells and missiles. 100, for all intents and purposes, is infinite speed.

Report is the name of an sound from sound.ini or soundmdi.ini which is played when this weapon is fired.

Anim= is the graphic to be played when this weapon is used, in this case its MG anims

Now on to projectile


              
Code
; PCG; Use this for weapons that are invisble but are subject to cliffs, elevation and walls.
[InvisibleLow]
Inviso=yes
Image=none
SubjectToCliffs=yes
SubjectToElevation=yes
SubjectToWalls=yes


no need to explain, just read the comments

now warhead needs some comments

              
Code
; general multiple small arms fire
[SA]
;DB Changed how Plate interacts with this warhead on 6/6. See also AP warhead.
;Verses=100%,80%,70%,50%,25%,25%,75%,50%,25%,100%,100%
Verses=100%,80%,80%,50%,25%,25%,75%,50%,25%,100%,100%
InfDeath=1
AnimList=PIFFPIFF,PIFFPIFF
Bullets=yes
ProneDamage=70%


Verses=100%,80%,80%,50%,25%,25%,75%,50%,25%,100%,100% means none, flak, plate, light, medium, heavy, wood, steel, concrete, special_1, special_2 armour (these are armour types which are present on all objects in RA2).

When an the M60 hits an object which uses none armour, that object will suffer 15 damage because the % is a multipler of damage. 100% = x1 80% = x 0.8 etc ... however if it is an infantry unit which has crawling anims and has crawls=yes in its art code then the prone damage is taken into consideration which reduces the damage by the % so ProneDamage=50% would reduce damage by 50%. Deployed infantry also use prone damage.

CellSpread=.3
PercentAtMax=.5

the world of ra2 is like an chessboard, thinking of the map as divided into cells i.e. squares, this determines the area effect of the weapon from ground zero.

CellSpread=10 for instance is used for nuke but to make it not too powerful alter PercentAtMax= this reduces the damage of the weapon as it spread out when set to a value below 1 i.e. 0.5 but values higher then 1 can be used aswell.

Wood=yes/no (does this weapon damage sandbag walls, fences, trees)

Wall=yes/no (does this affect concrete walls)

WallAbsoluteDestroyer=yes/no (destroy walls in one hit)

PenetratesBunker=yes/no (weapon ignores protection provided by tank bunker, i.e. unit suffers damage)

Sonic=yes/no (removes parasites e.g. giant squid, terror drone)

Warhead values can be higher then 100% and negative values will generate healing effects (tutorial for this maybe later) and 0% means weapon cannot be used against that threat.

Apply this to sniper weapons to stop them shooting vehicles which attack them and thus make them only concerntrate on inf or make to make an unit use two different weapons e.g. mg against inf and tank shells against armour.

Return to top