For cute little mines go over here
http://www.ppmsite.com/forum/viewtopic.php?p=418829#418829
Code:
;*******************************
;If you are not intersted in mines,cpoy [MineEMP][MineEMPPr][MineEMPWH] and go downwards.Ignore other parts about the mine.You will get 3 sample weapons with instruction near the end of this tutorial.
;***************************************
;Mine weapon module.The primary part is [MineKill].Changed the order to easier copy needed parts.
;[MineEMP][MineEMPPr][MineEMPWH] will be used in other ways so you must have them in your ini.
;Warhead introduced:GetMineAres,MineKillerWH,MineEMPWH,APSpecial
[WeaponTypes]
1=MineEMP
2=MineGeneratorAres
[General]
AnimToInfantry=BRUTE,DUMMYINF7
[MineEMP] ;the EMP part of this trick.You can write others with EMP or Psychedelic warhead
Damage=1 ;normal damage
ROF=1
Projectile=MineEMPPr
Warhead=MineEMPWH
Range=1.5
DecloakToFire=no
[MineEMPPr]
Image=INVISO
Arm=10
Shadow=no
Acceleration=100
Vertical=yes
DetonationAltitude=0 ;double warhead trick,this makes the spawned weapon to explode immediately.
[MineEMPWH]
Verses=5%,5%,5%,5%,5%,5%,5%,5%,5%,5%,5% ;set your own
CellSpread=1
AnimList=INVISO
PercentAtMax=1
EMP.Duration=100 ;actually EMP explosion is triggered 9 times.
EMP.Cap=9999
[MineKill] ;the normal damage part
Damage=100
ROF=500
;Suicide=yes
Projectile=MineVertical
Warhead=MineKillerWH
Range=1.5 ;perfect for a mine
Anim=ASDFG ;you cannot use suicide on a EMP mine.because when using suicide,double warhead will not be triggered.Animation suicide instead.
DecloakToFire=no ;cloakable mines need this
[MineVertical]
Image=INVISO
Shadow=no
Acceleration=1
Vertical=yes ;fake areafire
Airburst=yes ;double warhead trick.You can also create psychedelic weapon with normal damage
AirburstWeapon=MineEMP
Cluster=1 ;seems that in Ares this tag is still hardcoded to 9,so you can not make any warhead tricks more than 2 kind.If this is enabled,you will be able to create psychedelic+EMP weapons with damage too.Just a example.
[MineKillerWH] ;Explosion
Verses=300%,300%,300%,100%,100%,100%,10%,8%,6%,300%,300%
InfDeath=6;3
CellSpread=1.5
PercentAtMax=.25
AnimList=TWLT070
;*********************************************
;Mine layer missile.Why not lay your mines by firing a weapon?There are so many ZH mods with that feature.Make a minelayer creating building or vehicle type mines will cause path finding problems.The old RA1 way is out of date on RA2.
[AresMineLayer] ;Ares only.NPext vision is much longer.
Damage=1 ;special weapon's damage,useless
ROF=40
Range=15
Burst=1
Projectile=AresMineLayerPr
Speed=30
Warhead=RailShot
MinimumRange=1
[AresMineLayerPr]
Arm=2
Shadow=no
Ranged=yes
AG=yes
Image=DRAGON
ROT=60
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no
Airburst=yes
AirburstWeapon=MineGeneratorAres
[MineGeneratorAres]
Projectile=InvisibleAll
Damage=2
Warhead=GetMineAres
Range=15
ROF=300
[GetMineAres]
CellSpread=2
PercentAtMax=1
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%
AnimList=TOINF7
Sparky=no
;***************************
;Mine module.Already set to deal with all targets available,you don't need to change this module much.
[DUMMYINF7]
UIName=Name:MINE
Name=Mine
AllowedToStartInMultiplayer=no
Image=MINE ;Image by Zerg Kete
NotHuman=yes
TypeImmune=yes ;a mine's explosion should not affect other mines.Or you can use warhead immunity.
Category=Soldier
ImmuneToPoison=yes
Sensors=yes
SensorsSight=2
Primary=MineKill
AllowedToStartInMultiplayer=no
Fraidycat=yes
NoShadow=yes
Shadow=no
;DefaultToGuardArea=yes
;GuardRange=2 ;this will make them behave like Spider Mines of starcraft.If this is enabled,you should change the speed.Not recommended.
Civilian=yes
Trainable=no
Insignificant=yes
Crushable=yes
RadarInvisible=yes
;Cloakable=yes ;Dropped from a missile,should it cloak?
PixelSelectionBracketDelta=-10000
CloakingSpeed=1
Selectable=no
Occupier=no
Prerequisite=NAHAND
CrushSound=InfantrySquish
Strength=1
Armor=heavy
TechLevel=-1
Sight=1
Speed=1
Owner=MKLAB
Cost=0
Soylent=0
Points=0
IsSelectableCombatant=yes
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
SpeedType=Amphibious
MovementZone=AmphibiousDestroyer ;you get mines in water too.
ThreatPosed=5
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER,CLOAK
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
ImmuneToVeins=yes
Size=1
AllowedToStartInMultiplayer=no
IFVMode=2
DontScore=yes
DontSayUnitLost=yes
ImmuneToPsionics=yes
ImmuneToRadiation=yes
;****************Art**********************
[TOINF7]
Layer=ground
MakeInfantry=1
Shadow=no
[ASDFG]
Rate=400
Warhead=RailShot
Damage=1
Report=Dummy
;Mine art is in the SHP thread.You only need to set PrimaryFireFLH=0,0,0
So that's the end.When Ares don't have seperated verses for EMP and normal damage,we can only use this trick or animation damage.This trick has lower (though avoidable)accuracy but gains experience.Animation damage is fine for delivering damage but at the cost of experience.Personally recommended:on main battle tanks,small arms use animation damage(ohhhh crazy,EMP shells for MBT!!Animation damage ignores experience,so better only on elite units that gains EMP upgrade),on seige units or bombardments use this trick.Or if you don't mind making your unit's weapon 'massive',use this.(XD A little bit 'massive' is not a big problem,personally.In ZH general Alexandra's EMP patriots can disable group of units)
Now thanks to Graion Dilach,making me realize the importance for the logic part.Here is it.
When Airburst and AirburstWeapon is used with a non-missile projectile,it will detonate just as they did without these Airburst voodoo.So adding such code to Arcing,Inviso and Vertical projectiles will not lead to any big change except the accuracy(adjust by changing CellSpread).
In short:
The right projectile type with airburst weapon will behave normal
and the second part,the airburst weapons,they will behave like :
ROT kinda projectile-always seperate to attack 9 cells around
Inviso kinda projectile-immediately hit 9 cells around
Vertical kinda projectile-will not seperate and hit the only one cell in the center.
In short:
If on the spawned weapon's projectile Vertical is used,it will detonate at the master weapon's target
Available with:Ares,GZ,NP,NPExt,Vanilla YR,RA2,can be used for all double warhead design.
Frame code:
[WeaponMain]
Projectile=ProjectileMain
[ProjectileMain]
Airburst=yes
AirburstWeapon=WeaponSpawned
[WeaponSpawned]
Projectile=ProjectileSpawned
[ProjectileSpawned]
Vertical=yes
In the frame you can take "MineKill" as Main, MineEMP as Spawned.
Also TestCannon,TestBolt,TestMissile as Main,MineEMP as Spawned.
TestCannon,TestBolt,TestMissile are examples for this logic,nothing to do with the mine part.Just for C&P users.You can ignore them from this tut.
MineKill and MineEMP are combined by AirburstWeapon.
Though EMP blast is triggered 9 times,its warhead doesn't have a visible AnimList.So not laggy.
InfDeath is decided mainly by the main weapons warhead.The spawned is mostly used for special,non-killing warhead.You see InfDeath in the MineEMPWH because I copied the warhead from one existing,it does not matter anyway.
