Adding shield restore to planet shield generator

I can add it but it wont work right.It wont autocast.I can cast manually and it works.After I cast manually it blinks as tho its wanting to cast but never does.Someone please tell me how to add an ability correctly.

6,436 views 5 replies
Reply #1 Top

In the ability file did you change the targetFilter from;

numOwnerships 1
    ownership "Friendly"
    numObjects 3
    object "CapitalShip"
    object "Frigate"
    object "PlanetModule"
    numConstraints 2
    constraint "NotSelf"
    constraint "HasShieldDamage"

to ;numOwnerships 1
    ownership "Friendly"
    numObjects 1
    object "Planet"
    numConstraints 2
    constraint "NotSelf"
    constraint "HasShieldDamage"

Edit: Hang on, that may not be what you are looking for. In the ability file there is a line

isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE

if any of these are written in as FALSE, that would be your problem.

Reply #2 Top

No none of those.Just giving it the stock ability and it doesnt work right.

Reply #3 Top

Here is stock shield restore:

TXT
entityType "Ability"
buffInstantActionType "ApplyTargettedBuffToSelf"
instantActionTriggerType "AlwaysPerform"
buffType "BuffShieldRestoreActivate"
targetFilter
 numOwnerships 1
 ownership "Friendly"
 numObjects 4
 object "CapitalShip"
 object "Frigate"
 object "PlanetModule"
 object "StarBase"
 numSpaces 1
 space "Normal"
 numConstraints 1
 constraint "HasShieldDamage"
range
 Level:0 6000.000000
 Level:1 6000.000000
 Level:2 6000.000000
effectInfo
 effectAttachInfo
  attachType "Invalid"
 smallEffectName ""
 largeEffectName ""
 soundID ""
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 "Anytime"
aiUseTargetCondition "ShieldDamageExceedsAmount"
onlyAutoCastWhenTargetShieldDamageExceedsAmount
 Level:0 225.000000
 Level:1 450.000000
 Level:2 700.000000
isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "AntiMatter"
antiMatterCost
 Level:0 65.000000
 Level:1 65.000000
 Level:2 65.000000
cooldownTime
 Level:0 11.000000
 Level:1 11.000000
 Level:2 11.000000
orderAcknowledgementType "ONGENERALORDERISSUED"
researchPrerequisites
 NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_SHIELDRESTORE_NAME"
descStringID "IDS_ABILITY_SHIELDRESTORE_DESCRIPTION"
hudIcon "HUDICON_ABILITY_SHIELDRESTORE"
smallHudIcon "HUDICON_ABILITY_SHIELDRESTORE"
infoCardIcon ""

Here is ability I made:

TXT
entityType "Ability"
buffInstantActionType "ApplyTargettedBuffToSelf"
instantActionTriggerType "AlwaysPerform"
buffType "BuffShieldRestoreActivate"
targetFilter
 numOwnerships 1
 ownership "Friendly"
 numObjects 4
 object "CapitalShip"
 object "Frigate"
 object "PlanetModule"
 object "StarBase"
 numSpaces 1
 space "Normal"
 numConstraints 1
 constraint "HasShieldDamage"
range
 Level:0 16000.000000
 Level:1 16000.000000
 Level:2 16000.000000
effectInfo
 effectAttachInfo
  attachType "Invalid"
 smallEffectName ""
 largeEffectName ""
 soundID ""
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Anytime"
aiUseTargetCondition "ShieldDamageExceedsAmount"
onlyAutoCastWhenTargetShieldDamageExceedsAmount
 Level:0 225.000000
 Level:1 450.000000
 Level:2 700.000000
isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "AntiMatter"
antiMatterCost
 Level:0 65.000000
 Level:1 65.000000
 Level:2 65.000000
cooldownTime
 Level:0 11.000000
 Level:1 11.000000
 Level:2 11.000000
orderAcknowledgementType "ONGENERALORDERISSUED"
researchPrerequisites
 NumResearchPrerequisites 1
 ResearchPrerequisite
  Subject "RESEARCHSUBJECT_PLANETMODULEACCESS_TECHSHIELDGENERATOR"
  Level 1
nameStringID "IDS_ABILITY_SHIELDRESTORE_NAME"
descStringID "IDS_ABILITY_SHIELDRESTORE_DESCRIPTION"
hudIcon "HUDICON_ABILITY_SHIELDRESTORE"
smallHudIcon "HUDICON_ABILITY_SHIELDRESTORE"
infoCardIcon ""

 

Reply #4 Top

The shield generator roletype may not understand how to cast abilities.  PlanetShield is passive.  I kinda doubt that's the problem.  I might play around with it later, looks like that ability should be working though.

Reply #5 Top

Yeah. I have tried it. Works except for the auto caste. Don't know! Tried giving it its own point, changed the levelSourceType "Intrinsic" to  "FixedLevel0" because I thought that might be some thing to do with it, and also made a new ability with its own string but won't auto caste.