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

Adding A Kamikaze Airstrike To RA2/YR

From ModEnc
Revision as of 16:16, 14 March 2007 by Aurum (talk | contribs)
Jump to navigation Jump to search

This is a fairly easy method of adding a suicide bomber aircraft and/or it's superweapon. Note: Requires RockPatch 1.06 or later. Note: All credit for the warhead, projectile and airplane goes to Renegade, while I designed the superweapon code.

The Missile Code:

The missile code is placed in the rules(md).ini. Of course you may tailor it to your needs.

[MissileJump]
Damage=40              ;Determines the amount of damage caused
ROF=45                 ;Determines the Rate Of Fire
Range=6                ;Determines the range at which the plane will start diving into it's target
Speed=80               ;Determines the speed of the diving plane
Warhead=CruiseAP       ;Determines which warhead will be used for the missile
OmniFire=yes           ;See OmniFire
Projectile=SCDMISSILE1 ;Set's which projectile to use as the payload
LimboLaunch=yes        ;Here's the limbo launch trick

The Warhead Code:

The warhead code is also placed in the rules(md).ini. Of course you may tailor it to your needs.

[CruiseAP]
CellSpread=1.3                                          ;Determines the radius of the warheads blast
Wall=yes                                                ;Determines if the warhead can destroy walls
Wood=yes                                                ;Determines if the warhead can damage terrain
Verses=25%,25%,15%,75%,100%,100%,100%,95%,90%,100%,100% ;See Verses
Conventional=yes                                        ;See Conventional 
InfDeath=2                                              ;See InfDeath
AnimList=MININUKE                                       ;Determines anim played when warhead explodes
ProneDamage=100%                                        ;See ProneDamage
MinDebris=1                                             ;See MinDebris
MaxDebris=2                                             ;See MaxDebris

The Projectile Code:

The projectile code is also placed in the rules(md).ini. Of course you may tailor it to your needs.

[SCDMISSILE1]
Image=FALC            ;Determines the image of the projectile, currently set to Harrier's image
AA=no                 ;Determines if the projectile can damage airborne units
Arm=2                 ;See Arm
AG=yes                ;See AG
ROT=8                 ;Rate Of Turn, requires to use Rotates
Shadow=yes            ;Determines should a shadow be drawn on the ground
Proximity=no          ;See Proximity
Ranged=no             ;See Ranged
FirersPalette=yes     ;This tag can only be used on SHP projectiles, so it's useless here
SubjectToCliffs=no    ;See SubjectToCliffs
SubjectToElevation=no ;See SubjectToElevation
SubjectToWalls=no     ;See SubjectToWalls

The Kamikaze Airplane:

This is the kamikaze airplane code. It is placed (again) in rules(md).ini. It has to be specified in AircraftTypes. You should also add the appropriate string into ra2{md}.csf. You may tailor it to your needs.

[CRUISEM]
Image=FALC
UIName=Name:CRUISEM
Name=Kamikaze Airplane
Primary=MissileJump         ;Weapon to use when it kamikazes into it's target
DeathWeapon=HornetCollision ;Alternate weapon when it gets shot down
CanPassiveAquire=no
CanRetaliate=no
Strength=120
Category=AirLift
Armor=light
TechLevel=-1 
Sight=0
RadarInvisible=no
Landable=yes
MoveToShroud=yes
PipScale=Ammo
Speed=16
PitchSpeed=1.1
PitchAngle=0
OmniFire=yes
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans,Arabs,YuriCountry
Cost=1000
Points=20
ROT=3
Ammo=1
Crewed=no
ConsideredAircraft=yes
AirportBound=no
GuardRange=1
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=3
IsSelectableCombatant=no
VoiceSelect=ChaosDroneSelect
VoiceAttack=ChaosDroneAttackCommand
VoiceMove=ChaosDroneMove
VoiceFeedback=
VoiceCrashing=ChaosDroneDie
DieSound=
MoveSound=IntruderMoveLoop
CrashingSound=IntruderDie
ImpactLandSound=GenAircraftCrash
Locomotor={4A582746-9839-11d1-B709-00A024DDAFD1}
MovementZone=Fly
ThreatPosed=20
DamageParticleSystems=SparkSys,SmallGreySSys
AuxSound1=IntruderTakeOff
AuxSound2=IntruderLanding
Fighter=yes
AllowedToStartInMultiplayer=no
ImmuneToPsionics=yes
ImmuneToRadiation=yes
PreventAttackMove=yes
Trainable=no
Spawned=yes

Superweapon Code:

The superweapon code is (again) placed in the rules(md).ini. You must list the superweapon in SuperWeaponTypes. I don't recommend editing anything here but: RechargeTime, IsPowered, Spyplane, SpyplaneNums, ShowTimer, SidebarImage and EvaReady. You must add a different action. See Adding Custom Actions for help.

[AirstrikeSpecial]
UIName=Name:KAZI
Name=Kamikaze Airstrike 
IsPowered=false             ;Defines whether this superweapon
RechargeTime=4              ;Time until it charges up
Type=SpyPlane               ;SpyPlane is the type for SpyPlane clones or Airstrikes
Action=Kazi                 ;check out the Adding custom Actions page to find out more about this
SidebarImage=KAZICON        ;Cameo in the sidebar
ShowTimer=no                ;Should everyone be allowed to see the timer
DisableableFromShell=no     ;Defines can this superweapon be disabled by turning off superweapons 
FlashSidebarTabFrames=120   ;See FlashSidebarTabFrames
AITargetingType=1           ;Defines where will the AI use this superweapon. See AI Targeting for info
SpyPlane=CRUISEM            ;Sets which plane will be used for the airstrike
SpyPlanesNum=3              ;The number of planes which will kamikaze
IsAirstrike=yes             ;Defines is this an airstrike or spyplane
EvaReady=EVA_AirstrikeReady ;The sound which is played when it's fully charged up