←  Modding Tutorials

Fallout Studios Forums

»

How To Make Cluster Bomb Weapon

Laksamana's Photo Laksamana 22 Nov 2008

Hello all.....

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&#59;this is the quantity of the bomblets
	Disposition = SEND_IT_FLYING
	DispositionIntensity = 120&#59;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   &#59; should this affect allies? @todo srj
  DelayBetweenShots = 0				  &#59; time between shots, msec
  ClipSize = 1					   &#59; how many shots in a Clip (0 == infinite)
  ClipReloadTime = 0			  &#59; 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

 &#59; it may seem odd to have a "bomb" with a Locomotor, especially a Thrust locomotor,
 &#59; but there's a good reason: the Aurora moves so freakin' fast that it's really
 &#59; hard to (1) find a reliable drop location, and (2) actually get it close enough to
 &#59; that location. So we cheat: just get fairly close, then let the "bomb" do a little (subtle)
 &#59; navigation on the way down. This works pretty well and actually looks much better
 &#59; than you might think. (srj)
  Behavior = MissileAIUpdate ModuleTag_04
	TryToFollowTarget   = No 
	FuelLifetime		= 0
	IgnitionDelay	   = 0
	InitialVelocity	 = 0			   &#59; in dist/sec
	DistanceToTravelBeforeTurning = 0
	DistanceToTargetBeforeDiving  = 0
  End

  Locomotor = SET_NORMAL AuroraBombLocomotor

  Behavior = PhysicsBehavior ModuleTag_07
	Mass = 75.0
	AerodynamicFriction = 3&#59;1
	ForwardFriction = 33&#59;33
	CenterOfMassOffset = 2&#59;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	   &#59;75
	AerodynamicFriction = 1&#59;1
	ForwardFriction = 11&#59;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  &#59; you can just put your own weapon name above		   
  PrimaryDamageRadius = 50.0	  
  AttackRange = 100.0
  AcceptableAimDelta = 45		 &#59; 
  DamageType = EXPLOSION		 
  DeathType = EXPLODED
  WeaponSpeed = 99999.0			 
  ProjectileObject = ClusterBomb
  ProjectileDetonationFX = FX_A10ThunderboltMissileExplosion
  RadiusDamageAffects = ENEMIES NEUTRALS   &#59; should this affect allies? @todo srj
  DelayBetweenShots = 0				  &#59; time between shots, msec
  ClipSize = 2					   &#59; how many shots in a Clip (0 == infinite)
  ClipReloadTime = 0			  &#59; 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:

 &#59; ***DESIGN parameters ***
  DisplayName		 = OBJECT:Aurora
  EditorSorting	   = VEHICLE
  Side				= America
  TransportSlotCount  = 0				&#59;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		 &#59;in seconds	 
  WeaponSet
	Conditions = None 
	Weapon = PRIMARY MultiBombWeapon &#59;note that I pasted it here
  End



Now you're ready to go........
HAPPY MODDING!!
Quote

AZZKIKR's Photo AZZKIKR 23 Nov 2008

i haven't gotten a chance to try but will this solve the veterancy thing? where units don't get promoted as it is the cluster bomblet that kills, not the weapon
Quote

Jazzie Spurs's Photo Jazzie Spurs 23 Nov 2008

There's no factionunit.ini in ZH anymore.
Quote

Laksamana's Photo Laksamana 23 Nov 2008

if that's the case,add the code into weaponobjects.ini.....

ATTENTION: THOSE WHO HAD READ MY TUTORIAL,CAN YOU POST FEEDBACK LIKE COMMENTS OR PICTURES, ETC
AS I WANT TO KNOW IF ITS HELP YOU.THIS IS MY FIRST TUTORIAL,MORE To COME..
Edited by General Ironsides, 24 November 2008 - 08:01.
Quote

Zeke's Photo Zeke 24 Nov 2008

View PostAZZKIKR, on 23 Nov 2008, 17:01, said:

i haven't gotten a chance to try but will this solve the veterancy thing? where units don't get promoted as it is the cluster bomblet that kills, not the weapon


no
Quote

GuardianTempest's Photo GuardianTempest 19 Jul 2010

View PostZeke, on 24 Nov 2008, 21:55, said:

View PostAZZKIKR, on 23 Nov 2008, 17:01, said:

i haven't gotten a chance to try but will this solve the veterancy thing? where units don't get promoted as it is the cluster bomblet that kills, not the weapon


no


Can you make it? Like how do those B1 Lanncers get promoted either.
Quote

Alias's Photo Alias 19 Jul 2010

The B1s in Shockwave only get promoted from the primary bomb damage, not from the cluster bomblets.

In other news, why on earth revive a two year-old thread. D;
Edited by Alias, 19 July 2010 - 10:24.
Quote

Wizard's Photo Wizard 19 Jul 2010

They get promoted by luck. IIRC if the OCL object deals the killing blow, rather than the bomblets then the Lancer ranks up.

Edit: Ninja'd
Edited by Wizard, 19 July 2010 - 10:24.
Quote

GuardianTempest's Photo GuardianTempest 19 Jul 2010

Damn...how could I forsee such a disaster?
I'm going so fast I forgot about it.
Quote