I was trying to figure out how the spectre gunship works, to see if I could make a higher level with two or three at a time circling, or make them autoaccquire targets. I can't figure out a thing. Apparently all the code for how the superweapon behaves is in AmericaAir.ini, tied directly to the Behavior, but I'm stumped as to how it works.
Here's the code. I highlighted what I think is the code dealing with how it acts.
Code:
;--------------------------------
Object AmericaJetSpectreGunship
; *** ART Parameters ***
Draw = W3DOverlordAircraftDraw ModuleTag_01 ; Works with the dependencyModelDraw of the upgrade portable structures
;----NORMAL-------------
DefaultConditionState
Model = AVSGunship
WeaponFireFXBone = PRIMARY MUZZLE
WeaponFireFXBone = SECONDARY MUZZLE
WeaponMuzzleFlash = PRIMARY MUZZLEFX
WeaponMuzzleFlash = SECONDARY MUZZLEFX
End
ConditionState = DOOR_1_OPENING
Model = AVSGunship
Animation = AVSGunship.AVSGunship
AnimationMode = ONCE
Flags = MAINTAIN_FRAME_ACROSS_STATES
ParticleSysBone = WingTip01 SpectreContrail
ParticleSysBone = WingTip02 SpectreContrail
End
ConditionState = DOOR_1_CLOSING
Model = AVSGunship
Animation = AVSGunship.AVSGunship
AnimationMode = ONCE_BACKWARDS
Flags = MAINTAIN_FRAME_ACROSS_STATES
ParticleSysBone = WingTip01 JetContrailThin
ParticleSysBone = WingTip02 JetContrailThin
ParticleSysBone = Engine01 SpectreAfterburnerTrail
ParticleSysBone = Engine02 SpectreAfterburnerTrail
ParticleSysBone = Engine01 SpectreEngineFlare
ParticleSysBone = Engine02 SpectreEngineFlare
End
;----DAMAGED-------------
ConditionState = DOOR_1_OPENING DAMAGED
Model = AVSGunship_D
Animation = AVSGunship_D.AVSGunship_D
AnimationMode = ONCE
Flags = MAINTAIN_FRAME_ACROSS_STATES
ParticleSysBone = WingTip01 SpectreContrail
ParticleSysBone = WingTip02 SpectreContrail
ParticleSysBone = Smoke01 JetFireLarge
ParticleSysBone = Smoke02 JetFireLarge
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke02 JetSmokeLarge
End
ConditionState = DOOR_1_CLOSING DAMAGED
Model = AVSGunship_D
Animation = AVSGunship_D.AVSGunship_D
AnimationMode = ONCE_BACKWARDS
Flags = MAINTAIN_FRAME_ACROSS_STATES
ParticleSysBone = WingTip01 JetContrailThin
ParticleSysBone = WingTip02 JetContrailThin
ParticleSysBone = Engine01 SpectreAfterburnerTrail
ParticleSysBone = Engine02 SpectreAfterburnerTrail
ParticleSysBone = Engine01 SpectreEngineFlare
ParticleSysBone = Engine02 SpectreEngineFlare
ParticleSysBone = Smoke01 JetFireLarge
ParticleSysBone = Smoke02 JetFireLarge
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke02 JetSmokeLarge
End
;----REALLY DAMAGED-------------
ConditionState = DOOR_1_OPENING REALLYDAMAGED
Model = AVSGunship_D
Animation = AVSGunship_D.AVSGunship_D
AnimationMode = ONCE
Flags = MAINTAIN_FRAME_ACROSS_STATES
ParticleSysBone = WingTip01 SpectreContrail
ParticleSysBone = WingTip02 SpectreContrail
ParticleSysBone = Smoke01 SpectreGunshipFireLarge
ParticleSysBone = Smoke02 SpectreGunshipFireLarge
ParticleSysBone = Smoke03 SpectreGunshipFireLarge
ParticleSysBone = Smoke04 SpectreGunshipFireLarge
ParticleSysBone = Smoke05 SpectreGunshipFireLarge
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke02 SpectreSmokeLarge
ParticleSysBone = Smoke03 JetSmokeLarge
ParticleSysBone = Smoke04 SpectreSmokeLarge
End
ConditionState = DOOR_1_CLOSING REALLYDAMAGED
Model = AVSGunship_D
Animation = AVSGunship_D.AVSGunship_D
AnimationMode = ONCE_BACKWARDS
Flags = MAINTAIN_FRAME_ACROSS_STATES
ParticleSysBone = WingTip01 JetContrailThin
ParticleSysBone = WingTip02 JetContrailThin
ParticleSysBone = Engine01 SpectreAfterburnerTrail
ParticleSysBone = Engine02 SpectreAfterburnerTrail
ParticleSysBone = Engine01 SpectreEngineFlare
ParticleSysBone = Engine02 SpectreEngineFlare
ParticleSysBone = Smoke01 SpectreGunshipFireLarge
ParticleSysBone = Smoke02 SpectreGunshipFireLarge
ParticleSysBone = Smoke03 SpectreGunshipFireLarge
ParticleSysBone = Smoke04 SpectreGunshipFireLarge
ParticleSysBone = Smoke05 SpectreGunshipFireLarge
ParticleSysBone = Smoke01 JetSmokeLarge
ParticleSysBone = Smoke02 SpectreSmokeLarge
ParticleSysBone = Smoke03 JetSmokeLarge
ParticleSysBone = Smoke04 SpectreSmokeLarge
End
ConditionState = RUBBLE
Model = AVSGunship_D1
ParticleSysBone = Smoke01 SpectreGunshipFireLarge
ParticleSysBone = Smoke05 SpectreGunshipFireLarge
ParticleSysBone = Smoke03 SpectreGunshipFireLarge
ParticleSysBone = Smoke04 SpectreGunshipFireLarge
ParticleSysBone = Smoke01 SpectreSmokeLarge
ParticleSysBone = Smoke03 SpectreSmokeLarge
ParticleSysBone = Smoke02 SpectreSmokeLarge
ParticleSysBone = Smoke05 SpectreSmokeLarge
End
AliasConditionState = REALLYDAMAGED RUBBLE
AliasConditionState = REALLYDAMAGED RUBBLE DOOR_1_CLOSING
AliasConditionState = REALLYDAMAGED RUBBLE DOOR_1_OPENING
OkToChangeModelColor = Yes
ParticlesAttachedToAnimatedBones = Yes
End
; ***DESIGN parameters ***
DisplayName = OBJECT:SpectreGunship
EditorSorting = VEHICLE
Side = America
TransportSlotCount = 0 ;how many "slots" we take in a transport (0 == not transportable)
VisionRange = 300.0
ShroudClearingRange = 300
Prerequisites
Object = AmericaAirfield
End
ArmorSet
Conditions = None
Armor = SpectreGunshipArmor
DamageFX = None
End
ArmorSet
Conditions = PLAYER_UPGRADE
Armor = CountermeasuresSpectreGunshipArmor
DamageFX = None
End
WeaponSet
Conditions = None
Weapon = PRIMARY SpectreHowitzerGun
End
ExperienceValue = 50 100 150 400 ;Experience point value at each level
ExperienceRequired = 0 150 450 900 ;Experience points needed to gain each level
IsTrainable = No ;Not Player built, so no veterancy..............................
; *** AUDIO Parameters ***
VoiceSelect = SpectreGunshipVoiceSelect
VoiceAttack = SpectreGunshipVoiceAttack
VoiceMove = SpectreGunshipVoiceMove
SoundAmbient = SpectreGunshipAmbientLoop
SoundAmbientRubble = NoSound
UnitSpecificSounds
Afterburner = SpectreGunshipAfterburnerLoop
HowitzerFire = SpectreHowitzerWeapon
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD CAN_ATTACK VEHICLE AIRCRAFT SCORE SELECTABLE EMP_HARDENED
Body = ActiveBody ModuleTag_03
MaxHealth = 1000.0
InitialHealth = 1000.0
End
ExperienceValue = 40 40 40 40 ; Experience point value at each level
Behavior = JetSlowDeathBehavior ModuleTag_04
DestructionDelay = 99999999 ; destruction will happen when we
RollRate = 0.0
RollRateDelta = 100% ;each frame, rollrate = rollrate * rollrateDelta
PitchRate = 0.0
FallHowFast = 110.0% ;Bigger is faster (can be over 100%,it's a fraction of gravity)
FXInitialDeath = FX_SpectreGunshipExplosionLight
OCLInitialDeath = None
DelaySecondaryFromInitialDeath = 500 ; in milliseconds
FXSecondary = FX_spectreDeathExplosion
OCLSecondary = None
FXHitGround = FX_spectreGunshipDeathExplosion
OCLHitGround = OCL_A10DeathHitGround
DelayFinalBlowUpFromHitGround = 200 ; in milliseconds
; FXFinalBlowUp = FX_spectreGunshipDeathExplosion
OCLFinalBlowUp = OCL_SpectreDeathFinalBlowUp
End
Behavior = PhysicsBehavior ModuleTag_05
Mass = 500.0
End
Here's the part that seems to control how the spectre acts.
Code:
;SCRIPTED SUPPORT: These special power is triggered directly
;from the transport without creating a transport. This is done
;via new code support and CreateLocation USE_OWNER_OBJECT --
;which also prevents creating the payload transport.
Behavior = AIUpdateInterface ModuleTag_07
ForbidPlayerCommands = Yes ; this AIUpdate will only do command if from script or AI, not player
End
Locomotor = SET_PANIC SpectreGunshipTransitLocomotor
Locomotor = SET_NORMAL SpectreGunshipOrbitLocomotor
Behavior = SpecialAbility ModuleTag_32
SpecialPowerTemplate = SuperweaponSpectreGunship
UpdateModuleStartsAttack = Yes
End
Behavior = SpectreGunshipUpdate ModuleTag_10
GattlingStrafeFXParticleSystem = SpectreGattlingArmsSmoke
SpecialPowerTemplate = SuperweaponSpectreGunship
HowitzerWeaponTemplate = SpectreHowitzerGun
GattlingTemplateName = SpectreGunshipGattlingCannon
RandomOffsetForHowitzer = 20
TargetingReticleRadius = 25
OrbitInsertionSlope = 0.7 ; steepness of orbit entry
GunshipOrbitRadius = 250
HowitzerFiringRate = 300 ; how long between each attempted shot of howitzer
HowitzerFollowLag = 400 ;600 ; how long after gattling acquires target can howitzer shoot same
StrafingIncrement = 20 ; how far apart is each shot of the gattling as it strafes
AttackAreaRadius = 200
OrbitTime = 15000 ;20000 ;32000 ; thirty-two seconds
AttackAreaDecal
Texture = SCCSpecTarg
Style = SHADOW_ALPHA_DECAL
OpacityMin = 25%
OpacityMax = 50%
OpacityThrobTime = 1500
Color = R:127 G:177 B:222 A:255
OnlyVisibleToOwningPlayer = Yes
End
TargetingReticleDecal
Texture = SCCSpecRet
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
OpacityThrobTime = 300
Color = R:127 G:177 B:222 A:255
OnlyVisibleToOwningPlayer = Yes
End
End
This is the rest of the file
Code:
Behavior = HelixContain ModuleTag_09
Slots = 1
DamagePercentToUnits = 100%
AllowInsideKindOf = PORTABLE_STRUCTURE
PassengersAllowedToFire = Yes
ShouldDrawPips = No
End
Behavior = FlammableUpdate ModuleTag_08
AflameDuration = 5000 ; If I catch fire, I'll burn for this long...
AflameDamageAmount = 3 ; taking this much damage...
AflameDamageDelay = 500 ; this often.
End
Behavior = ArmorUpgrade ModuleTag_Armor01
TriggeredBy = Upgrade_AmericaCountermeasures
End
Behavior = CountermeasuresBehavior ModuleTag_11
TriggeredBy = Upgrade_AmericaCountermeasures
FlareTemplateName = CountermeasureFlare
FlareBoneBaseName = Flare ; Name of the base flare bone (Flare01, Flare02, Flare03)
VolleySize = 4 ; Number of flares launched per volley (requires bones)
VolleyArcAngle = 90.0 ; Max angle of flare relative to forward direction (with VolleySize of 1, flare will always goes straight back).
VolleyVelocityFactor = 2.0 ; Shoots out flares at a stronger velocity with a higher value.
DelayBetweenVolleys = 1000 ; Time between flare volleys
NumberOfVolleys = 5 ; Number of times the volleys will fire before reloading
ReloadTime = 0 ; After all volleys launched, then reloading must occur. If 0, then reloading occurs at airstrip only.
EvasionRate = 30% ; With active flares, the specified percentage will be diverted.
ReactionLaunchLatency = 0 ; Reaction between getting shot at and the firing of the first volley of countermeasures.
MissileDecoyDelay = 200 ; A reported missile that has been determined to hit a decoy will wait this long before acquiring countermeasures.
End
;;;;;;;; ClientUpdate = AnimatedParticleSysBoneClientUpdate ModuleTag_Client01
;;;;;;;; End ; This allows the wingtip trails to stay stuck to the retractable wings
Geometry = Box
GeometryIsSmall = No
GeometryMajorRadius = 40.0
GeometryMinorRadius = 10.0
GeometryHeight = 10.0
Shadow = SHADOW_VOLUME
ShadowSizeX = 89 ; minimum elevation angle above horizon. Used to limit shadow length
End