Menu:

GenDev
 
  » News
  » Forums
  » Downloads
  » Link Us
  » The Team

Cameo Mapper
 
  » About
  » How to Use
  » Download

Tutorials
 
  » Modding
  » Graphics
  » Mapping

Modding Resources
 
  » GenDev Utilities
  » User Submitted Models
  » Alpha/Beta Models
  » Tutorial Downloads
  » Modding Utilities

Affiliates
 
  » CNC DEN
  » SDI
  » Defcon
  » PPM
  » BattleTech Mod
  » CNC Unleashed
  » Deezire Online
  » Sleipnir's Stuff
  » Blitzkrieg 2: The Finest Hour
  » Call To Arms

Staff Only
 
  » News Post
  » File Admin
  » File Team

Buildable Carpet Bomber

By: The Hunter

This will explain to you people how to make a buildable carpet bomber that drops 4 bombs in line over it’s target.

First we need to make a new projectile for this we can copy the code of the aurora bomb (this code can be found in the WeaponObjects.ini):
Object AuroraBomb

; *** ART Parameters ***
Draw = W3DModelDraw ModuleTag_01
DefaultConditionState
Model = EXCarptBmb
End
End

; ***DESIGN parameters ***
Side = America
EditorSorting = SYSTEM
ArmorSet
Conditions = None
Armor = ProjectileArmor
DamageFX = None
End
VisionRange = 0.0

; *** AUDIO Parameters ***

; *** ENGINEERING Parameters ***
KindOf = PROJECTILE
Body = ActiveBody ModuleTag_02
MaxHealth = 100.0
InitialHealth = 100.0
End

Behavior = PhysicsBehavior ModuleTag_03
Mass = 75.0
AerodynamicFriction = 2 ; this is now friction-per-sec
ForwardFriction = 2 ; this is now friction-per-sec
CenterOfMassOffset = 2 ; Default of 0 means nothing tips as it falls. Positive tips forward, negative tips back
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 ; yes, that's right.

Geometry = Sphere
GeometryIsSmall = Yes
GeometryMajorRadius = 2.0

End
Be sure to rename the new bomb to something like "CarpetBombingProjectile" or another name.

Now you have to make the bomb projectile use this locomotor:
Locomotor = SET_NORMAL FreeFallLocomotor

The locomotor “FreeFallLocomotor” is still ingame so you don’t need to make a new one, this locomotor has all the values set to 0 that make the bomb fall straight to the ground once it’s used.

Then make a new weapon for the bomber:

Weapon CarpetBombingWeapon
PrimaryDamage = 400.0
PrimaryDamageRadius = 20.0
AttackRange = 100.0
AcceptableAimDelta = 45
DamageType = AURORA_BOMB
DeathType = EXPLODED
WeaponSpeed = 99999
ProjectileObject = carpetbombingprojectile
FireFX = FX_AuroraBombLaunch
ProjectileDetonationFX = FX_AuroraBombDetonate
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
ClipSize = 4
DelayBetweenShots = 280
ClipReloadTime = 10000
AutoReloadsClip = RETURN_TO_BASE
ShowsAmmoPips = Yes
ProjectileCollidesWith = STRUCTURES
End

Be sure that the weapon range is not larger or smaller than 100, or the bombs are dropped too soon or too late in order to hit the target.

Now we're almost done with the carpet bombing weapon. We just need to be sure of some other things on the plane, so we don’t get any weird side effects.

The new plane that drops the bombs should not be too fast or too slow - otherwise this would effect the whole bombing process so the locomotor it’s using must be like this:

Locomotor CarpetBombingPlaneLocomotor
Surfaces = AIR
Speed = 150
SpeedDamaged = 150
MinSpeed = 60
TurnRate = 120
TurnRateDamaged = 90
Acceleration = 110
AccelerationDamaged = 30
Lift = 120
LiftDamaged = 80
Braking = 10
MinTurnSpeed = 150
PreferredHeight = 100
AllowAirborneMotiveForce = Yes
ZAxisBehavior = SURFACE_RELATIVE_HEIGHT
CirclingRadius = 100
Appearance = WINGS

PitchInDirectionOfZVelFactor = 1.0
PitchStiffness = 0.5
RollStiffness = 0.4
PitchDamping = 0.9
RollDamping = 0.8
ForwardVelocityPitchFactor = 0
LateralVelocityRollFactor = 0.2
Apply2DFrictionWhenAirborne = Yes
AirborneTargetingHeight = 30
LocomotorWorksWhenDead = Yes
End

Then, to make the plane drop the bombs even after it passed the target, you need to give it a fake turret which will not be visible but makes it able to drop bombs after it passed its target.
Behavior = JetAIUpdate ModuleTag_06
OutOfAmmoDamagePerSecond = 10%
TakeoffDistForMaxLift = 0%
TakeoffPause = 500
MinHeight = 5
ReturnToBaseIdleTime = 10000
Turret
TurretTurnRate = 10000
RecenterTime = 1
ControlledWeaponSlots = PRIMARY
End
AutoAcquireEnemiesWhenIdle = No NotWhileAttacking
End

Make sure its AI update is exactly like this, or you will might get some errors, an example of this is that it might drop the bombs while passing enemy units (it has a invisible turret)


This tutorial was taken from Sleipnir's Stuff. For discussion and more information on this tutorial, visit this thread.

Layout by Origin-Network