The idea is to make an ability where a weapon is fired at a planet, the projectile moves very slowly and when it hits the planet it destroys all enemy forces in the gravity well.
I've managed to get it working but it's damaging the enemy too early. As soon as the weapon is fired all the enemy explode. Which makes the slow moving projectile and the huge explosion effect irrelevant.
I think it's something to do with one of the BUFF.entity files which controls the damage levels being set off too early.
How do I activate the second buff file that controls the damage after the projectile has hit the planet?
the ability file looks like this:
TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTargetWithTravel"
instantActionTriggerType "AlwaysPerform"
buffType "BuffNova"
targetFilter
numOwnerships 1
ownership "Enemy"
numObjects 1
object "Planet"
numSpaces 1
space "Normal"
numConstraints 0
range
Level:0 40000.000000
Level:1 40000.000000
Level:2 40000.000000
travelSpeed 500.000000
hasWeaponEffects TRUE
weaponEffectOriginType "Targetter"
weaponEffectAttachInfo
attachType "Ability"
abilityIndex 0
weaponEffectImpactOffsetType "RandomMesh"
canWeaponEffectHitHull TRUE
canWeaponEffectHitShields TRUE
weaponEffectsDef
weaponType "Projectile"
burstCount 1
burstDelay 0.000000
muzzleEffectName "Ability_OrbitalCannonPhaseMuzzle"
muzzleSoundMinRespawnTime 0.100000
muzzleSounds
soundCount 1
sound "WEAPON_PHASEORBITALCANNON_MUZZLE"
hitEffectName "Ability_OrbitalCannonPhaseSurfaceImpact"
hitHullEffectSounds
soundCount 0
hitShieldsEffectSounds
soundCount 0
projectileTravelEffectName "CapitalAbility_GravityWarheadTravel"
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 3
levelSourceType "Intrinsic"
minExperienceLevelRequired
Level:0 0.000000
Level:1 2.000000
Level:2 4.000000
aiUseTime "OnlyInCombat"
aiUseTargetCondition "Any"
isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "AntiMatter"
antiMatterCost
Level:0 600.000000
Level:1 550.000000
Level:2 500.000000
cooldownTime
Level:0 600.000000
Level:1 500.000000
Level:2 400.000000
orderAcknowledgementType "ONATTACKORDERISSUED"
researchPrerequisites
NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_NOVA_NAME"
descStringID "IDS_ABILITY_NOVA_DESCRIPTION"
hudIcon "HUDICON_ABILITY_PHASEORBITALCANNON"
smallHudIcon "HUDICON_ABILITY_PHASEORBITALCANNON"
infoCardIcon ""
The first BUFF which is BUFFNOVA looks like this:
TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeNewBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit 1
allowFirstSpawnerToStack TRUE
buffExclusivityForAIType "NotExclusive"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 1
instantAction
buffInstantActionType "ApplyBuffToTargetsInRadiusWithTravel"
instantActionTriggerType "OnBuffFinish"
buffType "BuffNova1"
targetFilter
numOwnerships 1
ownership "Enemy"
numObjects 5
object "CapitalShip"
object "Frigate"
object "PlanetModule"
object "StarBase"
object "Planet"
numSpaces 1
space "Normal"
numConstraints 0
range
Level:0 30000.000000
Level:1 30000.000000
Level:2 30000.000000
maxTargetCount
Level:0 -1.000000
Level:1 -1.000000
Level:2 -1.000000
effectInfo
effectAttachInfo
attachType "Center"
smallEffectName "Buff_CannonShellPhaseImpactWave"
largeEffectName "Buff_CannonShellPhaseImpactWave"
soundID ""
travelSpeed 400.000000
effectStaggerDelay 0.000000
hasWeaponEffects FALSE
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
finishConditionType "AllOnDelayInstantActionsDone"
And the final one which controls the damage is BUFFNOVA1 :
TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeNewBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit -1
buffExclusivityForAIType "NotExclusive"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 2
instantAction
buffInstantActionType "DoDamage"
instantActionTriggerType "OnBuffFinish"
damage
Level:0 30000.000000
Level:1 35000.000000
Level:2 40000.000000
damageAffectType "AFFECTS_SHIELDS_AND_HULL"
damageType "PHYSICAL"
isDamageShared FALSE
instantAction
buffInstantActionType "DoDamageToPlanet"
instantActionTriggerType "OnBuffFinish"
damage
Level:0 10000.000000
Level:1 20000.000000
Level:2 40000.000000
populationKilled
Level:0 100.000000
Level:1 200.000000
Level:2 400.000000
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
finishConditionType "AllOnDelayInstantActionsDone"