After having some lucky success with making abilities actually work (and not minidump), I ran into a problem that makes no sence.
I'm trying to do a simple conversion of one of my working abilities:
The design is that the fleet ships have the ability infrastructure built in, but the power for those abilities comes form the base (sort of like the Starwars Droid Command Center, but not so extreme)
The attached code works, but gives antimatter to the fleet.
It should drain the fleet's antimatter when the base explodes...
AbilityEntokEnable.Entity
TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTargetsInRadius"
instantActionTriggerType "AlwaysPerform"
buffType "BuffEntokEnable"
targetFilter
numOwnerships 1
ownership "Friendly"
numObjects 2
object "CapitalShip"
object "Frigate"
numConstraints 1
constraint "HasAntiMatterShortage"
range
Level:0 50000.000000
Level:1 50000.000000
Level:2 50000.000000
maxTargetCount
Level:0 -1.000000
Level:1 -1.000000
Level:2 -1.000000
effectInfo
effectAttachInfo
attachType "Center"
smallEffectName "CapitalAbility_AntiMatterRestoreActivate"
largeEffectName "CapitalAbility_AntiMatterRestoreActivate"
soundID "EFFECT_ANTIMATTERRECHARGE"
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "Intrinsic"
minExperienceLevelRequired
Level:0 0.000000
Level:1 0.000000
Level:2 0.000000
aiUseTime "Anytime"
aiUseTargetCondition "Any"
isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
isPassive FALSE
antiMatterCost
Level:0 0.000000
Level:1 0.000000
Level:2 0.000000
cooldownTime
Level:0 0.000000
Level:1 0.000000
Level:2 0.000000
researchPrerequisites
NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_ANTIMATTERRESTORE_NAME"
descStringID "IDS_ABILITY_ANTIMATTERRESTORE_DESCRIPTION"
hudIcon "HUDICON_ABILITY_ANTIMATTERRESTORE"
smallHudIcon "HUDICON_ABILITY_ANTIMATTERRESTORE"
infoCardIcon ""
BuffEntokEnable.Entity
TXT
entityType "Buff"
onReapplyDuplicateType "StackNewBuff"
buffExclusivityForAIType "NotExclusive"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 1
instantAction
buffInstantActionType "RestoreAntiMatter"
instantActionTriggerType "OnDelay"
delayTime 0.000000
antiMatter
Level:0 20.000000
Level:1 20.000000
Level:2 20.000000
effectInfo
effectAttachInfo
attachType "Aura"
smallEffectName ""
largeEffectName ""
soundID ""
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
finishConditionType "AllOnDelayInstantActionsDone"
**********************************************************************************
These are the changes I made to it:
AbilityEntokDisable.Entity
TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTargetsInRadius"
instantActionTriggerType "OnOwnerDeath"
buffType "BuffEntokDisable"
targetFilter
numOwnerships 1
ownership "Friendly"
numObjects 2
object "CapitalShip"
object "Frigate"
numConstraints 1
constraint "HasAntiMatterPool"
range
Level:0 50000.000000
Level:1 50000.000000
Level:2 50000.000000
maxTargetCount
Level:0 -1.000000
Level:1 -1.000000
Level:2 -1.000000
effectInfo
effectAttachInfo
attachType "Center"
smallEffectName ""
largeEffectName ""
soundID ""
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "Intrinsic"
minExperienceLevelRequired
Level:0 0.000000
Level:1 0.000000
Level:2 0.000000
aiUseTime "Invalid"
aiUseTargetCondition "Invalid"
isAutoCastAvailable FALSE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
isPassive TRUE
researchPrerequisites
NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_ANTIMATTERRESTORE_NAME"
descStringID "IDS_ABILITY_ANTIMATTERRESTORE_DESCRIPTION"
hudIcon "HUDICON_ABILITY_ANTIMATTERRESTORE"
smallHudIcon "HUDICON_ABILITY_ANTIMATTERRESTORE"
infoCardIcon ""
BuffEntokDisable.Entity
TXT
entityType "Buff"
onReapplyDuplicateType "StackNewBuff"
buffExclusivityForAIType "NotExclusive"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 1
instantAction
buffInstantActionType "RemoveAntiMatter"
instantActionTriggerType "OnDelay"
delayTime 0.000000
antiMatter
Level:0 20.000000
Level:1 20.000000
Level:2 20.000000
effectInfo
effectAttachInfo
attachType "Aura"
smallEffectName ""
largeEffectName ""
soundID ""
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
finishConditionType "AllOnDelayInstantActionsDone"
It should work... ...unless of course there is some kind of formatting error (I tried several variations, and it seems to stick on the "OnOwnerDeath" condition, but that's the point of the ability, to undo the base's power when it explodes...
Please point me in the right direction