Today, i will write a tutorial on how to make cluster bomb weapon and have your favourite aircraft drop it anywhere.....
First open ObjectCreationList.ini and scroll to the end of the file and add:
;---------------------------------------------------------------------- ObjectCreationList OCL_ClusterBombExplode CreateObject ObjectNames = ClusterBombBomblet Count = 40;this is the quantity of the bomblets Disposition = SEND_IT_FLYING DispositionIntensity = 120;if you want the bombs to spread to larger area increase this End CreateDebris ModelNames = GXMammoth_D01 GXMammoth_D02 GXMammoth_D03 GXMammoth_D04 Count = 4 Mass = 5.0 Disposition = SEND_IT_FLYING DispositionIntensity = 2.0 End End
This will spawn bomblets when your 'bigger' bomb which will explained later explode.
NEXT,open FXlist.ini and add this at the bottom:
; ---------------------------------------------- FXList FX_ClusterExplode ParticleSystem Name = BuggySubExplosion End ParticleSystem Name = DaisyExplosionScatter AttachToObject = Yes InitialDelay = 500 500 UNIFORM End ParticleSystem Name = NukeCannonFlare End ViewShake Type = SEVERE End End
This willl show how your BIG bomb explode in the air
Thirdly,we will make the 'actual' weapon which detonate on the ground and damage enemy units.
Open Weapon.ini and add this code at the bottom
;------------------------------------------------------------------------------------- Weapon ClusterBombWeapon PrimaryDamage = 100.0 PrimaryDamageRadius = 50.0 AttackRange = 100.0 DamageType = EXPLOSION DeathType = EXPLODED WeaponSpeed = 99999.0 ProjectileObject = NONE ProjectileDetonationFX = FX_A10ThunderboltMissileExplosion ProjectileDetonationOCL = OCL_FireFieldSmall RadiusDamageAffects = ALLIES ENEMIES NEUTRALS ; should this affect allies? @todo srj DelayBetweenShots = 0 ; time between shots, msec ClipSize = 1 ; how many shots in a Clip (0 == infinite) ClipReloadTime = 0 ; how long to reload a Clip, msec AutoReloadsClip = No HistoricBonusTime = 1000 HistoricBonusCount = 40 HistoricBonusRadius = 200 HistoricBonusWeapon = FirestormSmallCreationWeapon End
TWEAK IT AS YOU LIKE..
Next open FactionUnit.ini where we will add the code to create the bomb and the bomblets
Add:
;------------------------------ Object ClusterBomb Draw = W3DModelDraw ModuleTag_01 OkToChangeModelColor = Yes DefaultConditionState Model = AVBomber_B End End DisplayName = OBJECT:DaisyCutterBomb EditorSorting = SYSTEM TransportSlotCount = 10 VisionRange = 300.0 ShroudClearingRange = 0 ArmorSet Conditions = None Armor = ProjectileArmor DamageFX = None End SoundFallingFromPlane = DaisyCutterWeapon KindOf = PROJECTILE Body = ActiveBody ModuleTag_02 MaxHealth = 100.0 InitialHealth = 100.0 End Behavior = FXListDie ModuleTag_04 DeathFX = FX_ClusterExplode End Behavior = CreateObjectDie ModuleTag_03 CreationList = OCL_ClusterBombExplode End Behavior = DestroyDie ModuleTag_05 End Behavior = AIUpdateInterface ModuleTag_06 End ; it may seem odd to have a "bomb" with a Locomotor, especially a Thrust locomotor, ; but there's a good reason: the Aurora moves so freakin' fast that it's really ; hard to (1) find a reliable drop location, and (2) actually get it close enough to ; that location. So we cheat: just get fairly close, then let the "bomb" do a little (subtle) ; navigation on the way down. This works pretty well and actually looks much better ; than you might think. (srj) Behavior = MissileAIUpdate ModuleTag_04 TryToFollowTarget = No FuelLifetime = 0 IgnitionDelay = 0 InitialVelocity = 0 ; in dist/sec DistanceToTravelBeforeTurning = 0 DistanceToTargetBeforeDiving = 0 End Locomotor = SET_NORMAL AuroraBombLocomotor Behavior = PhysicsBehavior ModuleTag_07 Mass = 75.0 AerodynamicFriction = 3;1 ForwardFriction = 33;33 CenterOfMassOffset = 2;2 End Behavior = HeightDieUpdate ModuleTag_08 TargetHeight = 80.0 TargetHeightIncludesStructures = Yes End Geometry = Sphere GeometryIsSmall = Yes GeometryMajorRadius = 12.0 End ;---------------------------------------------------------------- Object ClusterBombBomblet Draw = W3DModelDraw ModuleTag_01 OkToChangeModelColor = Yes DefaultConditionState Model = EXAMine_A End End DisplayName = OBJECT:DaisyCutterBomb EditorSorting = SYSTEM TransportSlotCount = 10 VisionRange = 300.0 ShroudClearingRange = 25 ArmorSet Conditions = None Armor = ProjectileArmor DamageFX = None End SoundFallingFromPlane = DaisyCutterWeapon KindOf = PROJECTILE Body = ActiveBody ModuleTag_02 MaxHealth = 10000.0 InitialHealth = 10000.0 End Behavior = FXListDie ModuleTag_03 DeathFX = FX_CarpetBomb End Behavior = DestroyDie ModuleTag_04 End Behavior = AIUpdateInterface ModuleTag_05 End Behavior = FireWeaponWhenDeadBehavior ModuleTag_01 DeathWeapon = ClusterBombWeapon StartsActive = Yes End Behavior = HeightDieUpdate ModuleTag_07 TargetHeight = 1.0 TargetHeightIncludesStructures = Yes End Locomotor = SET_NORMAL None Behavior = PhysicsBehavior ModuleTag_06 Mass = 60.0 ;75 AerodynamicFriction = 1;1 ForwardFriction = 11;33 CenterOfMassOffset = 2 End Geometry = Sphere GeometryIsSmall = Yes GeometryMajorRadius = 2.0 Scale = 0.5 End
OPEN Weapons.ini again and add:
;------------------------------------------------------------------------------------- Weapon MultiBombWeapon PrimaryDamage = 1.0 ; you can just put your own weapon name above PrimaryDamageRadius = 50.0 AttackRange = 100.0 AcceptableAimDelta = 45 ; DamageType = EXPLOSION DeathType = EXPLODED WeaponSpeed = 99999.0 ProjectileObject = ClusterBomb ProjectileDetonationFX = FX_A10ThunderboltMissileExplosion RadiusDamageAffects = ENEMIES NEUTRALS ; should this affect allies? @todo srj DelayBetweenShots = 0 ; time between shots, msec ClipSize = 2 ; how many shots in a Clip (0 == infinite) ClipReloadTime = 0 ; how long to reload a Clip, msec AutoReloadsClip = RETURN_TO_BASE ShowsAmmoPips = Yes HistoricBonusTime = 1000 HistoricBonusCount = 40 HistoricBonusRadius = 200 HistoricBonusWeapon = FirestormSmallCreationWeapon End
THE LAST STEP,copy your weapon name,in this case MultiBombWeapon and paste it to your favourite aircraft.For example, I want to give this to aurora so I will find the Aurora Bomber section in FactionUnit.ini and put the weapon name to its primary weapon:
; ***DESIGN parameters *** DisplayName = OBJECT:Aurora EditorSorting = VEHICLE Side = America TransportSlotCount = 0 ;how many "slots" we take in a transport (0 == not transportable) VisionRange = 180.0 ShroudClearingRange = 600 Prerequisites Object = AmericaAirfield Object = AmericaStrategyCenter End BuildCost = 3000 BuildTime = 30.0 ;in seconds WeaponSet Conditions = None Weapon = PRIMARY MultiBombWeapon ;note that I pasted it here End
Now you're ready to go........
HAPPY MODDING!!