Quantcast [open] Event when leaving ground target mode. - ESOUI
Thread Tools Display Modes
03/28/18, 05:30 PM   #1
decay2
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 65
[open] Event when leaving ground target mode.

When using a ground target ability the events EVENT_ENTER_GROUND_TARGET_MODE and EVENT_ACTION_SLOT_ABILITY_USED fire. When the ground targeting is finished, no further event happens, so it is hard to find out if the ability has been fired or cancelled and thus if it has consumed magicka.

I can right now track the cost (e.g. magicka) and try to catch when those cost are removed from the resource pool. But I don't like this roundabout way since it can also fail.

I tried looking for other events and also prehooked CancelCast() but none gave me a reliable way to figure this out.

Would it be possible to add an event EVENT_LEAVE_GROUND_TARGET_MODE(isCancelled) with a return that indicates if the skill was fired?.

Alternatively EVENT_COMBAT_EVENT could also report when Resources get used by skills. Right now it only reacts to effects on the player (like sprinting, blocking, potions or those lightning drains in the Halls of Fabrication trial)

Last edited by decay2 : 03/29/18 at 03:34 AM.
  Reply With Quote
03/29/18, 03:25 AM   #2
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 193
I highly support the first request. The second request has only my support if it won't be too much of performance (fps/ping) drain.

Last edited by Letho : 03/29/18 at 07:22 AM.
  Reply With Quote
03/29/18, 08:27 AM   #3
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 507
I can easily add an event for cancel. But you don't get any combat event when the ability casts?
  Reply With Quote
03/29/18, 01:19 PM   #4
decay2
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 65
Sounds very good already, thanks.

I tested this with Blazing Spear rank IV (Id of the slotted skill: 27167):

When I select the skill I get the events as written before. When I then throw it (or it gets thrown automatically if the gameplay setting is chosen accordingly) I get EVENT_ACTION_SLOT_STATE_UPDATED for each other slotted ability, however the same happens when I cancel it. This is also the point in time that I like to get, since this is when the magicka gets subtracted.

Finally, when it lands I get two combat events with
  • result = ACTION_RESULT_EFFECT_GAINED_DURATION
  • abilityId = 44449 and 27170

Since the abilityIds don't match I can't really use this to detect that it was sucessfully thrown.
I guess with a reliable event when it gets cancelled I could at least assume that it goes through unless such an event is called, but it would be better if some event gets called when the actuall throwing/activation happens.

Last edited by decay2 : 03/29/18 at 01:27 PM.
  Reply With Quote
03/30/18, 11:37 AM   #5
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 507
It's easy to know when the ground target was chosen, but the ability may still fail after that for many reasons. It is the responsibility of the combat events to indicate the state of the actual cast. So I'll add the canceled event and I think your best bet will be to map the ability id from the combat event to the ability id of the ability on the bar for your addon.
  Reply With Quote
03/30/18, 12:14 PM   #6
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 193
Originally Posted by ZOS_ChipHilseberg View Post
It's easy to know when the ground target was chosen, but the ability may still fail after that for many reasons. It is the responsibility of the combat events to indicate the state of the actual cast. So I'll add the canceled event and I think your best bet will be to map the ability id from the combat event to the ability id of the ability on the bar for your addon.
I think there is a problem with this as well, at least when talking about ground effects:

Combat events don't give a 'cast succeeded' event, one would have to watch out for a damage tick or an effect that has been gained. This is what Chip wrote back in the days when I wrote about that problem (he is referring to the elemental blockade ability):

Originally Posted by ZOS_ChipHilseberg View Post
The casting of the fire variant only has a combat event because it it adds an effect to you on cast. The lightning one does not. This is to say it's pretty random what gets through. There is a rule in place right now that only sends the ACTION_RESULT_BEGIN if the cast time is greater than 0 with the assumption that some other event would arrive immediately explaining the results of the ability. In the case of ground AoEs like this, that isn't true though. We could send down BEGIN in the case of instant AoEs or even in all cases for all abilities, but that would mean for event traffic. What are you trying to achieve with this?
As we can see, lightning blockade will send no combat event after it has been successfully cast, so the only way of determining if the cast was successful is waiting for it to deal the first damage tick.
  Reply With Quote
03/30/18, 06:28 PM   #7
ArtOfShred
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 59
Originally Posted by Letho View Post
As we can see, lightning blockade will send no combat event after it has been successfully cast, so the only way of determining if the cast was successful is waiting for it to deal the first damage tick.
Blockade fires off 4 EVENT_EFFECT_CHANGED (Spreadsheet Link) with no source/target that can be tracked though. Almost all ground auras have this except a few that are bugged (Ranks 2-4 of all the Fighter's Guild Circle of Protection Morphs so far from what I've seen). You can track those and filter with "if castByPlayer == COMBAT_UNIT_TYPE_PLAYER" to determine if it was player sourced. Unfortunately some of these don't have proper names or icons and you'd have to manually track the individual ids to determine if the effect did go off. I'm working on adding every GTAOE class ability into table in LUI which other authors could benefit from but its time consuming and I get burnt out every time I delve into it so its pretty impractical.

However - there is still a slight delay between action bar events and effects firing off. Also its worth nothing that if the player has their weapon sheathed the action bar events all fire off but the effect is delayed by the duration of the weapon draw animation.

Last edited by ArtOfShred : 03/30/18 at 06:32 PM.
  Reply With Quote
03/31/18, 02:42 AM   #8
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 193
Oh right, combatUnitType has been added after I have designed my code! Good find! If all ground effects use this, I could use event_effect_changed to track them. Not all of them returning a proper name is a problem though, as my CheckAllAbilityIds-functionality uses localized spell names :/

/edit: Damn, and I need the unitTag to determine the exact source. I'd have to hack my own code to change the functionality...... *sigh* ok I admit the needed tools are there but they are not normalized and imo they feel very chaotic.

I'd still like to have a proper combat event for successful instant casts that pass the abilityId of the ability used.

Last edited by Letho : 03/31/18 at 02:46 AM.
  Reply With Quote
04/01/18, 10:34 AM   #9
decay2
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 65
Originally Posted by ZOS_ChipHilseberg View Post
It's easy to know when the ground target was chosen, but the ability may still fail after that for many reasons. It is the responsibility of the combat events to indicate the state of the actual cast. So I'll add the canceled event and I think your best bet will be to map the ability id from the combat event to the ability id of the ability on the bar for your addon.
I'm actually more interested if magicka/stamina get's consumed. If the ability then fails, so be it.
But I think I probably can make it work with the canceled event.
  Reply With Quote
04/01/18, 01:56 PM   #10
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 193
Where is your point of interest exactly located? When the button is pressed or when the effect really starts? Because the 2nd case should be impossible right now, as even EVENT_EFFECT_CHANGED fires 'OnButtonPressed' and not 'OnEventStarted'.
  Reply With Quote

ESOUI » Developer Discussions » Wish List » [open] Event when leaving ground target mode.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off