Proposed engine change to ApplyTargettedBuffToSelf

This is a proposed engine change for Diplomacy to solve the targetting/auto-cast issues with most targetted chanelled abilities.

Basically, my assumption is if the targetting/auto-cast worked like the ApplyBuffToTarget then ships would stop targetting the same unit with non-stacking abilities.

In this suggestion ApplyTargettedBuffToSelf would use the buffTypeToQuery as part of the targetting/auto-cast parameters and then would apply buffType to self once a targettable unit is selected. Not sure if it is doable or not for ironclad but just wanted to throw out a suggestion.

entityType "Ability"
buffInstantActionType "ApplyTargettedBuffToSelf"
instantActionTriggerType "AlwaysPerform"
buffTypeToQuery "BuffSuppressionTarget"
buffType "BuffSuppressionCaster"
targetFilter
 numOwnerships 1
 ownership "Enemy"
 numObjects 1
 object "Frigate"
 numSpaces 1
 space "Normal"
 numConstraints 0
range
 Level:0 6000.000000
 Level:1 6000.000000
 Level:2 6000.000000
effectInfo
 effectAttachInfo
  attachType "Invalid"
 smallEffectName ""
 largeEffectName ""
 soundID "EFFECT_SUPPRESSION"

10,869 views 11 replies
Reply #1 Top

Ima not a modder... So i have very little idea what you said, but anything that would fix domina's autocast (and to a lesser extent, all your overseers from all channelling their slow phase jump ability at the same tme)... sounds good to me.  (guardian's shield bubble as well?)

 

Reply #2 Top

I think a simpler solution might be to add another AIUseTargetCondition that prefers targets that don't already have the buff/debuff in question.

Reply #3 Top

I can see why that might be simpler and would provide some more value. Downside is you would lose access to the existing aiUseTargetCondition's.

My original thought process is ApplyBuffToTarget doesn't have the same issue with abilities targetting the same object, while I have noticed multiple Domina's will disable the same unit even though the aiUseTargetCondition is IsNotWeaponDisabled. This lead me to believe the aiUseTargetCondition is applied a bit differently.

 

As a test I had 5 domina's warp in with a single flak frigate. I manually cast the Suppression ability on the flak frigate and then turned back on autocast on the remaining 4. As they all turned to face the target each one cast Suppression one by one (.i.e. not all at once) as they came in line with the target.

I then had them warp into a system with multiple ships (3 flak, 2 heavy, 1 lrm, 2 light) and repeated having them disabled then manually casting the first Suppression on a flak. I re-enabled autocast on the remaining Domina's and they still targetted in on the same flak even though it was weapon disabled.

 

After running these tests again... Does aiUseTargetCondition of IsNotWeaponDisabled work as intended? It doesn't seem right to me.

Maybe there is some issue with targetting and needs to face target that is influencing this?

Reply #4 Top

Quoting LikeTheWhirlwind, reply 2
I think a simpler solution might be to add another AIUseTargetCondition that prefers targets that don't already have the buff/debuff in question.

Well I don't know the details, I'm not sure if I understood it well, does what you suggest fix that problem which particularly affect with ships with abilities having needToFaceTarget true ? Would that stop a ship going to use an ability when it realizes (after it had decided to cast it on a target, but does not yet face it or is not yet in range) that the target has just been debuffed ?

An example, if 3 Dominas (1, 2, 3) are against 4 ships (A, B, C, D), would that behave like this :

-1) All three Dominas target a ship (say A) with Suppression. But some are closer and better oriented, so one is faster.

-2) So Domina 1 just casted Suppression on A. Here is my question, will Dominas 2 and 3 stop targetting 1 and choose another target at that point ? And so on ?...

This would be cool if it worked with that apparently simple solution you suggest... It wouldn't be the "optimal" solution (it would be a bit better if the 3 Dominas above targetted different ships from the start) but that would already be a great improvement over the current behaviour.

Edit : I'm no modder please excuse me if this is not really relevant.

Reply #5 Top

-2) So Domina 1 just casted Suppression on A. Here is my question, will Dominas 2 and 3 stop targetting 1 and choose another target at that point ? And so on ?...

Here are some more observations...

I've done some further testing and have come to the conclusion that ApplyTargettedBuffToSelf mainly relies on the weapon targetting when ownership is Enemy to determine which unit the ability will be applied too. So even if the aiUseTargetCondition is IsNotWeaponDisabled this doesn't stop the Domina from casting Suppression on the current target when it's already disabled. This is true even if needsToFaceTarget is FALSE as well.

So I'm not sure about LikeTheWhirlWind's solution given the way aiUseTargetCondition seems to have little bearing unless it is also changed to stop the auto-cast if the aiUseTargetCondition is NOT met.

Try turning off auto-attack and Suppression won't even target a non-disabled unit. Of course this is one way to micro Suppression by leaving auto-attack off to conserve AM and manually targetting when you are ready for Suppression. All you have to do is select a domina and issue a attack order and it will cast Suppression if set to auto-cast.

Reply #6 Top

really? thats interesting. I wonder what guardians do when you turn off auto-attack? They generally dont care about enemy units except repulse. would shield projection still auto-cast?

Reply #7 Top

Quoting SithLordAJ, reply 6
really? thats interesting. I wonder what guardians do when you turn off auto-attack? They generally dont care about enemy units except repulse. would shield projection still auto-cast?

When auto-attack is turned OFF Guardians will only auto-cast Shield Projection when they take damage. When auto-attack is on and an ememy is in weapons range Shield Projection is always auto-cast.

 

Reply #8 Top

(guardian's shield bubble as well?)

So probably two points here, should multiple Guardians be autocasting at the same time and should the use times for this ability be changed.

Without any engine changes this could be changed from ApplyBuffToSelf to ApplyTargettedBuffToSelf and use similar conditions to the Progen's shield restore as an example. However, this still won't keep multiple Guardians from burning through AM but it would keep it from casting in situations where it's not necessary.

Assuming Ironclad can come up with a solution that keeps channeled abilities from casting when no viable target is present, the solution should be extended to Guardian's as well. I would go so far as to look at every channeled ability to see if it would benefit or not.

 

Reply #9 Top

Quoting ZombiesRus5, reply 7
When auto-attack is turned OFF Guardians will only auto-cast Shield Projection when they take damage. When auto-attack is on and an ememy is in weapons range Shield Projection is always auto-cast.

that is so weird.

Quoting ZombiesRus5, reply 8
So probably two points here, should multiple Guardians be autocasting at the same time and should the use times for this ability be changed.

This was my immediate thought: well, okay just make it so their natural behavior as far as special abilities are concerned is auto attack disabled. However, you still need to check to make sure an the player's owned ships dont already have another copy already online. Personally, if I were coding the game, I would have the actual ability throw a flag of some kind to tell auto-cast to twiddle it's thumbs. However, you still might run into an issue when that first one finishes and you have 30 ships lined up for the next cast. But that's still workable, as you could manually get the auto-cast to do what you want.

Quoting ZombiesRus5, reply 8
Without any engine changes this could be changed from ApplyBuffToSelf to ApplyTargettedBuffToSelf and use similar conditions to the Progen's shield restore as an example. However, this still won't keep multiple Guardians from burning through AM but it would keep it from casting in situations where it's not necessary.

I'm not sure how either of those functions work and I didnt really figure it out based off what you said in the above posts. My thought is that auto-attack should not be relevent to auto-cast, and I'm not sure what you propose is along these lines (not that its a bad idea, just not mine :) ). hmm... you know, auto-attack is really just a ability with auto-cast enabled on it.... I wonder if somehow the targeting data is shared among all abilities for the entire ship. so it asks: can I shoot at something? if yes, queue gun fire, queue ability 1, queue ability 2.... blah blah blah. I guess that makes some sense as there is probably a ton of these comparisons being done

Reply #10 Top

I found another specific issue concerning targetting that's a bit different from what we've seen so far, concerning Phasic Trap :

When strikecrafts get caught in Phasic Trap, fighters that were attacking them do not change their target and continue turning around them like they are trying to attack them but obviously can't since the strikecrafts trapped are phased out and invulnerable...

Depending on how it has been coded, there might be an easy fix for this, since generally, when ships or structures get invulnerable or phased out, ships and SCs that were attacking them automatically change their target (I am thinking about Phase out Hull, Vasari's structure phasing out, Armistice in some way (ships stop trying to attack), maybe others I do not remember right now). It even works for the Revelation's Reverie, which does not render its target invulnerable, but makes it so that damaging it too much will cancel the effects the ability. Ships that were attacking the target of Reverie automatically change their target.

This is why I think it might be easily fixable (but still, not sure)...

Aside that, Vasari hangars also cast Phasic Trap all at once if left on autocast, wasting abilities and antimatter, but that was expectable and is a result of the general issue with targetting AI.

Reply #11 Top

Quoting Yarlen, reply 517
There won't be any major additional AI/autocast changes for this update.

Unfortunately, it seems the Auto-cast targetting isn't being worked on this patch. While that kinda sucks, as it affects alot of things, I guess I can understand it. Lets make the case to get this fixed in Rebellion. Maybe things like this that get fixed in Rebellion can be back-ported as a final patch just before release.