Need help with an ability

grrrr

Hello

 

I really need some help here, i'm trying to make a shield restore ability that restores the shields of the ship using it,

i've got the actual ability working, it will restore shields just fine when i use it manually, what i need to figure out now

is how to make it autocast when shield damage exceeds x-amount.

 

I've seen the 3 lines that goes:

aiUseTime "Anytime"
aiUseTargetCondition "ShieldDamageExceedsAmount"
onlyAutoCastWhenTargetShieldDamageExceedsAmount

 

And set them accordingly, i also set the abilitys buffInstantActionType to "ApplyTargettedBuffToSelfNoRange"

so that it should, in theory, consider the aiUseTargetCondition value, however, it doesn't..

 

And i'm stuck... I'm not sure if it's a game limitation or i'm doing something wrong,

can anyone help me out?

 

 

/vap

 

6,696 views 11 replies
Reply #1 Top

Um, if you just want it to simply want it to restore its own shields, you should use ApplyBuffToSelf. Targetted buff you apply the buff to self but you need to target a specified entity first, and could be the problem as if there is no valid target it can't be used.

Reply #2 Top

Yeah i tried that, the problem is though, when is use ApplyBuffToSelf, it doesn't care about shield damage, it just constantly casts it while on autocast.

Reply #3 Top

aiUseTime "Anytime"
End of quote

I think that is your issue.

Try using OnlyWhenTakingDamage

Reply #4 Top

That does stop it from constantly autocasting Ryat, however it doesn't solve what i really wanted to do, have it only autocast after the ship has taken x-amount of shield damage. Surely it must be possible, somehow..

Reply #5 Top

It is. Just couldn't remember what it is off hand and I was looking at old data.

Reply #6 Top

If you figure it out please please let me know :)

 

For now i've managed to "solve" it by using an ApplyBuffToTargetsInRadius with range and maxtargetcount both set to 1, works as it's supposed to, however there must be a way of doing it so that you don't get the annoying range circle when you hover over the ability, just a cosmetic issue, true, but still, if i can get rid of it that'd be rather nice :)

Reply #7 Top

Try setting aiUseTime to Invalid. I doubt it would work but you never know.

Reply #8 Top

That would stop the ai from using it completly wouldnt it?

Reply #9 Top

Possibly. I think what you have is the best we can do currently. I have looked at all the shield/hull repair abilities and aiUseTime is very limited.

Reply #10 Top

What you want won't work with ApplyTargettedBuffToSelf.

Here are two possible work arounds I know of which have the ability cast as ApplyBuffToSelf.

The first possibility is to put a finishCondition of shieldFailure. Then put a OnBuffFinish for your shield restore. This would be a pre-emptive shield restore ability.

The second possibility is to use onlyAutoCastWhenDamageTakenExceedsPerc coupled with an aiUseTime of onlyInCombat.

In any case feel free to look at my wiki for possible ideas: http://code.google.com/p/soaseplugin/wiki/Syntax.


A new Constraint of "Self" for targetFilter would be useful and would solve several of mine and others ability coding issues.

Reply #11 Top

Quoting ZombiesRus5, reply 10
A new Constraint of "Self" for targetFilter would be useful and would solve several of mine and others ability coding issues.
End of ZombiesRus5's quote

Yes it would! And i've been using that site a lot, excellent resource, i've also been using the eclipse plugin, very nice indeed :)

I tried fiddling with onlyAutoCastWhenDamageTakenExceedsPerc, but for some reason it ignored shield damage and only started casting once the ship was taking armor damage, which is fine i suppose, however, it's a shield restore for a shield tanking ship, it's not suposed to go off only after the shield fails, the ApplyBuffToTargetsInRadius with range and maxtargetcount both set to 1 works fine for now but i'll fiddle with some more.