Thread Tools Display Modes
06/24/15, 01:31 AM   #21
Teh Magnus
Join Date: Dec 2014
Posts: 1
THANK you VERY VERY VERY much for opening this!!!!!!!
  Reply With Quote
07/08/15, 12:39 PM   #22
Keldor
 
Keldor's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2015
Posts: 101
Originally Posted by ZOS_ChipHilseberg View Post
We've added a new function called GetAbilityIcon which takes the ability id and returns its icon path. We've also modified COMBAT_EVENT to pass numerical identifiers for the source and target so units with the same name can be separated. This ids are good for as long as the unit exists on the client. The same is true of EFFECT_UPDATED and its unit.
Will the source and target IDs be unique through all NPCs in the game or just unique for the targets that are involved in the current combat? My idea was to separate the dungeon bosses to enable a boss kill tracker based on these IDs

Some nice changes BTW!

Keldor
  Reply With Quote
10/06/15, 04:46 AM   #23
Olivierko
AddOn Author - Click to view addons
Join Date: Dec 2014
Posts: 8
@ZOS_ChipHilseberg

It would be really useful with a hook to the source and target in the EVENT_COMBAT_EVENT.

Currently the workarounds for certain lookups are painful and cause performance issues, would it be possible to either get unitTags for target and source or a reverse lookup for a unitTag using a target/source name?

The idea is to resolve information such as: alliance, class, race etc.
  Reply With Quote
10/16/15, 08:56 AM   #24
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,577
I added a page about the event filters to the wiki because it wasn't documented there yet. Maybe somebody who already worked with them can check or extend it a bit?
  Reply With Quote
10/25/15, 03:10 PM   #25
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
I have some questions regarding AddFilterForEvent.
  1. Specifying multiple filters in one call -- AND?
    I assume this limits the event handler to ultimate AND player, right?
    Lua Code:
    1. EVENT_MANAGER:AddFilterForEvent("ZO_ActionBar", EVENT_POWER_UPDATE, REGISTER_FILTER_POWER_TYPE, POWERTYPE_ULTIMATE, REGISTER_FILTER_UNIT_TAG, "player")
  2. Multiple calls to AddFilterForEvent -- OR?
    Would this limit the handler to events related to player ultimate OR boss health?
    Lua Code:
    1. EVENT_MANAGER:AddFilterForEvent("ZO_ActionBar", EVENT_POWER_UPDATE, REGISTER_FILTER_POWER_TYPE, POWERTYPE_ULTIMATE, REGISTER_FILTER_UNIT_TAG, "player")
    2. EVENT_MANAGER:AddFilterForEvent("ZO_ActionBar", EVENT_POWER_UPDATE, REGISTER_FILTER_POWER_TYPE, POWERTYPE_HEALTH, REGISTER_FILTER_UNIT_TAG, "boss")
  3. Lifespan of filters
    Are filters reset upon UnregisterForEvent, or do they persist "forever"? I couldn't find any reset/clear function.
  Reply With Quote
10/25/15, 03:36 PM   #26
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,577
It seems regardless of how you register them it is always OR. I register my filter like this:
Lua Code:
  1. local filters = {
  2.     REGISTER_FILTER_COMBAT_RESULT, ACTION_RESULT_DIED,
  3.     REGISTER_FILTER_COMBAT_RESULT, ACTION_RESULT_DIED_XP,
  4.     REGISTER_FILTER_COMBAT_RESULT, ACTION_RESULT_KILLING_BLOW,
  5. }
  6. EVENT_MANAGER:AddFilterForEvent(handle, EVENT_COMBAT_EVENT, unpack(filters))
and receive events for any of the 3 cases.

The lifetime is something I would be interested in too. I register them multiple times right now. No idea if that is necessary, or maybe even causes some trouble.
  Reply With Quote
10/26/15, 07:54 AM   #27
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
All forms of registration should function as AND. If any of the filters fail the event will not be sent. When the event is unregistered the filter will be cleared.
  Reply With Quote
11/05/15, 09:13 AM   #28
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Are these filters easily and cheaply (from both development and runtime perspective) extensible to other events? I'm thinking about EVENT_INVENTORY_SINGLE_SLOT_UPDATE:
REGISTER_FILTER_BAG_ID
REGISTER_FILTER_IS_NEW_ITEM
REGISTER_FILTER_INVENTORY_UPDATE_REASON
  Reply With Quote
11/05/15, 12:10 PM   #29
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by merlight View Post
Are these filters easily and cheaply (from both development and runtime perspective) extensible to other events? I'm thinking about EVENT_INVENTORY_SINGLE_SLOT_UPDATE:
REGISTER_FILTER_BAG_ID
REGISTER_FILTER_IS_NEW_ITEM
REGISTER_FILTER_INVENTORY_UPDATE_REASON
That would be a nice one to have !
  Reply With Quote
11/06/15, 01:21 PM   #30
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
I don't think it'll be a problem to add most of these. I'll throw it on the backlog.
  Reply With Quote
11/07/15, 11:18 PM   #31
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by ZOS_ChipHilseberg View Post
For the unique ID we're looking at providing a number to identify each instance with the same name. Players will always be 0 (since their name should be unique anyway) and non-players will have an arbitrary number that will be the same as long as that unit exists.
I'm guessing this was changed? Because effects on me or other players (in EFFECT_CHANGED) do not give a unitId of 0.

Any chance we could get something to help us determine when targets, unitId's, no longer exist? An event of some kind that fires when unitId's are destroyed perhaps. That way we know when to clear any data related to that target. Or at least a function to determine if a unitId still exists (both would be great), like:
Lua Code:
  1. EVENT_UNITID_DESTROYED
  2. DoesUnitIdExist(unitId)

Also a function to differentiate between different unit types (player, monsters, pets, other players, exc..) using unitId would be very helpful.
Lua Code:
  1. GetUnitIdType(unitId)
For example right now the event EFFECT_CHANGED passes us:
Lua Code:
  1. function OnEffectChanged(eventCode, changeType, effectSlot, effectName, unitTag, beginTime, endTime, stackCount, iconName, buffType, effectType, abilityType, statusEffectType, unitName, unitId, abilityId)
The unitId does help us differentiate between different units, but we have no idea what those units are. For example when a target/mob dies or is not currently targeted the unitTag field is nil so we can't use GetUnitType(unitTag) so we have no way of knowing if the effect was on a mob, pet, or another player.

Last edited by circonian : 11/08/15 at 01:16 AM.
  Reply With Quote
05/05/21, 12:31 AM   #32
Phinix
 
Phinix's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 186
Originally Posted by ZOS_ChipHilseberg View Post
I don't think it'll be a problem to add most of these. I'll throw it on the backlog.
Hi @ZOS_ChipHilseberg,

I wanted to request adding a MsgEffectResult (changeType) event filter for EVENT_EFFECT_CHANGED. Use case would be, registering the unfiltered event only for EFFECT_RESULT_GAINED.

This way a database of gained abilityIds can be kept by an addon like Srendarr, and each could be registered for EVENT_EFFECT_CHANGED in its own namespace by abilityId and unregistered when the effect ends.

This should significantly improve performance, as you are only then open-listening for EFFECT_RESULT_GAINED events in EVENT_EFFECT_CHANGED (which is a heavy event), along with a pre-filtered list of specific abilityIds.

Last edited by Phinix : 05/05/21 at 12:33 AM.
  Reply With Quote
05/05/21, 12:38 AM   #33
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 639
Originally Posted by Phinix View Post
Hi @ZOS_ChipHilseberg,
Best not to necro a thread, he is not longer the developer.
  Reply With Quote
05/05/21, 06:44 AM   #34
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,959
@Phinix
Better use the WishList addon for this request, that's what Sharlikran meant. Or maybe ask ZOs DanBatson within Gitter.im/esoui/esoui. He is the actual responsible communication person for us
  Reply With Quote
05/05/21, 10:53 AM   #35
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 639
Thank you Baertram, I made that at almost midnight my time while I was working on something and forgot to post where. Then when I woke up I thought there was a forum for that wasn't there? The WishList, I was too tired and lazy to go hunt it down.

Last edited by Sharlikran : 05/05/21 at 11:03 AM.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Upcoming Combat and Effect API Changes

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