Ability toggling

Pretty simple question, I'd be a little more adventurous about tackling it myself if I hadn't been messing with mine abilities all day. Is there a way to make a ability "toggle", no matter how complex? I assume there's got to be a roundabout way of doing it using LastSpawnerNoLongerHasBuff/FirstSpawnerNoLongerHasBuff, or maybe even a simpler way using the onReapplyDuplicateType or something, but I can't think of any way to do it right now. This ability will be used to deactivate a planetary minefield and then turn it back on again, I've got the buff ready but unless I can figure this out I'll have to make another ability that activates it again and who wants to use up two valuable ability slots?

5,028 views 6 replies
Reply #1 Top

well, you should probably start by examining the charged missiles ability on the Vasari LRFs&Flak Frigs, as well as the files that pertain to 'AbilityVolleyFire'. The three abilities (Vas LRF&Flak Frig use different versions) are all toggleable; you should be able to get the info you need.

Reply #2 Top

Oh, I thought they were on a timer! I'll check those out, thanks. Nothing like busting your ass trying to duplicate a feature already in the base game :3

e: yeah looks like it's just buffInstantActionType "ApplyOrRemoveBuffToSelf" way to go me. since my original buff uses buffInstantActionType "ApplyBuffToTargetsAtOrbitBody", I suppose I can make that the ability buff type then chain that with the old one.

Reply #3 Top

That's odd, it isn't working. When each individual thing is given an ability to toggle, it works fine, but trying to make an ability from one module that disables all the weapons on all the other modules doesn't. Gauss Turrets are counted as "PlanetModule"s, right?

 

TXT
entityType "Buff"
onReapplyDuplicateType "ReplaceWithNewBuff"
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 1
instantAction
    buffInstantActionType "ApplyBuffToTargetsAtOrbitBody"
    instantActionTriggerType "AlwaysPerform"
    buffType "BuffDisableMinefield"
    targetFilter
    numOwnerships 1
    ownership "Friendly"
    numObjects 1
    object "PlanetModule"
    numConstraints 0
    maxTargetCount
    Level:0 -1.000000
    Level:1 -1.000000
    Level:2 -1.000000   
    effectInfo
        effectAttachInfo
            attachType "Invalid"
        smallEffectName ""
        largeEffectName ""
        soundID ""
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 0

e: doesn't work on ships either :(

Reply #4 Top

does BuffDisableMinefield work?

Reply #5 Top

yes, all planetary points defense turrets (TEC Gauss, Advent Beam, and Vas PM Platform) are planet modules. However, they take of tactical slots, not logistic; <-this may be the thing that's messing you up.

Reply #6 Top

Quoting EvilTesla-RG, reply 4
does BuffDisableMinefield work?
End of EvilTesla-RG's quote

Yeah, and so does the overriding AbilityDisableMinefield ability (I made that one simply cast BuffDisableMinefield directly on the mine and then added it). It's completely puzzling, and since it doesn't work on ships either, it can't be that they use tactical rather than logistics slots.

AbilityDisableMinefield.entity:

TXT
entityType "Ability"
buffInstantActionType "ApplyOrRemoveBuffToSelf"
instantActionTriggerType "AlwaysPerform"
buffType "BuffDisableMinefieldSpawner"
effectInfo
    effectAttachInfo
        attachType "Center"
    smallEffectName ""
    largeEffectName ""
    soundID ""
toggleStateOnNameStringID "IDSLoadScreenTip01"
toggleStateOnDescStringID "IDSLoadScreenTip01"
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Anytime"
aiUseTargetCondition "Any"
isAutoCastAvailable FALSE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget FALSE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "AntiMatter"
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_DISABLEMINEFIELD_NAME"
descStringID "IDS_ABILITY_DISABLEMINEFIELD_DESCRIPTION"
hudIcon "HUDICON_ABILITY_VOLLEYFIRE"
smallHudIcon "HUDICON_ABILITY_VOLLEYFIRE"
infoCardIcon ""

End of quote

BuffDisableMinefield.entity:

TXT
entityType "Buff"
onReapplyDuplicateType "ReplaceWithNewBuff"
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 0
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 1
  entityBoolModifier "DisableWeapons"
numFinishConditions 0

End of quote