ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Track Dolmen (https://www.esoui.com/forums/showthread.php?t=4901)

Keldor 07/18/15 04:38 AM

Track Dolmen
 
Hi,

I've searched a while for a way to track completed dolmen via API.
I was wondering that there is no dolmen complete EVENT in the API.

Have I missed something or is there currently no way to track dolmens?

Keldor

merlight 07/18/15 05:10 AM

You'll probably need to hard-code the related achievements.

sirinsidiator 07/18/15 05:19 AM

Maybe through map pins? Once you completed a dolmen it will become white. Should be possible to get it that way.

Keldor 07/18/15 06:13 AM

Thanks, yes this would be helpfully to export the list of completed dolmen. But I look for a way to get a counter for completed dolmen for the ESO DB. So I look for a way to increase the counter every time the player has completed a dolmen.

Keldor

sirinsidiator 07/18/15 08:48 AM

Hmm.. that's certainly a bit harder. At least the first few hundreds will be shown in the achievements, but afterwards you will have to rely on some other method.
Maybe you can track when the boss at a dolmen get's killed via the combat events and count that?

circonian 07/18/15 10:50 AM

I don't know enough about achievements, but maybe this will give you an Idea.
Like sirinsidiator said this should work until they max out the Anchor Devastater achievement at 250 anchors. After that though, unless the achievement updated event keeps firing to keep track of how many you have completed, I don't know any other easy way to do it.

Lua Code:
  1. -- id (621): Anchor Devastater
  2. local function OnAchievementUpdated(eventCode, id)
  3.     if id == 621 then
  4.         -- Do you want to separate the counters
  5.         -- for each individual dolmen?
  6.         -- if so figure out which one they completed like this:
  7.         local zone, poi = GetCurrentSubZonePOIIndices()
  8.         local dolmenName = GetPOIInfo(zone, poi)
  9.         UpdateDolmenCounter(dolmenName)
  10.     end
  11. end
  12. EVENT_MANAGER:RegisterForEvent(ADDON_NAME,  EVENT_ACHIEVEMENT_UPDATED, OnAchievementUpdated)

One possible problem is, I don't know how this works, what happens if you die & respawn somewhere else then an anchor is closed. Do you still get the achievement update for particpating in it? Even though you were not there when it closed? If so the code to get the dolmen name would not return the proper name because you would not be at that poi so you would have to check that the returned name is a proper dolmen name and filter it out or just add it to a global unspecified dolmen counter.

circonian 07/18/15 11:02 AM

Actually, if you really wanted to put in the work, you could watch for the other anchor achievements as well.
You could watch for the Covenant Anchor Shatterer, Dominion Anchor Shatterer, Pact Anchor Shatterer, & Imperial Anchor Shatterer and use those for counters as well.
You would have to make sure they dont double count an anchor though. Probably easiest way would be to set a flag like:
Lua Code:
  1. local ACHIEVEMENT_DEVISTATOR = 621
  2. local DEVISTATOR_COMPLETED = IsAchievementComplete(ACHIEVEMENT_DEVISTATOR)
Then when they get an update for the devistator achievement check to see if they have completed it or not and set that to true. Then only allow the code/checks for the Shatterer events to run after DEVISTATOR_COMPLETED == true. That would prevent them from double counting anchors.
Although that would only count new dolmen that had not been previously completed, but it would allow you to get those counts in at least. It seems extremely messy just to add a few more counts, but it would insure you are able to get at least a 1 count on each anchor. Just a thought.

Keldor 07/18/15 11:54 AM

Thanks for all your ideas and thoughts.

I think there is no perfect way to track the completed dolmen yet. I'll hope ZOS will be add an DOLMEN_COMPLETE event in the future.

Keldor

Ayantir 07/18/15 05:37 PM

As I said on official forums :


You can just use

EVENT_EXPERIENCE_UPDATE (eventCode, unitTag, currentExp, maxExp, reason)
EVENT_VETERAN_POINTS_UPDATE (eventCode, unitTag, currentPoints, maxPoints, reason)

and check reason with :

PROGRESS_REASON_DARK_ANCHOR_CLOSED
PROGRESS_REASON_DARK_FISSURE_CLOSED

To know chich dolmen has been closed, just look at player map coords and deduct it.
I'm sure destinations already have data of thoses dolmens coordinates.

PS: I'm not sure if we got XP at each dolmen or only 1st time, don't really remember, check?

Keldor 07/21/15 12:34 PM

Quote:

Originally Posted by Ayantir (Post 22098)
As I said on official forums :


You can just use

EVENT_EXPERIENCE_UPDATE (eventCode, unitTag, currentExp, maxExp, reason)
EVENT_VETERAN_POINTS_UPDATE (eventCode, unitTag, currentPoints, maxPoints, reason)

and check reason with :

PROGRESS_REASON_DARK_ANCHOR_CLOSED
PROGRESS_REASON_DARK_FISSURE_CLOSED

To know chich dolmen has been closed, just look at player map coords and deduct it.
I'm sure destinations already have data of thoses dolmens coordinates.

PS: I'm not sure if we got XP at each dolmen or only 1st time, don't really remember, check?

I've checked it, only the first time :(

Keldor

sirinsidiator 07/21/15 01:30 PM

I think the closest you can come is combining several sources of information and take a guess.
  • Did he get xp for dolmen completion
    As you have tested, this only applies for the first time when a dolmen is completed
  • Did the achivement count go up
    Also only works for a limited time until he reaches 250 completions. You could also track the other achievements if he already has 250 but did not finish all of them.
  • Is the player close to a dolmen?
    This is a strong requirement because he won't complete a dolmen if he is not at a dolmen location, but it does not tell us if he did complete it
  • Did he fight against monsters that are common at a dolmen?
    This is not a good indicator because he could just have arrived after others cleared all monsters and still get the dolmen or he fought them but died and respawned at a wayshrine before the dolmen was completed.
  • Did he interact with the last pinion
    This is a good indicator, but it won't work when somebody else activated it
  • Did he take the chest that appears after completing a dolmen?
    Also a good indicator, but won't work for lowlevel dolmen as the chest only spawns when your level is in range of the dolmen (10 levels?)

If you combine them correctly you should be able to track most of them. I think it's pretty safe to assume that a player that completed a dolmen will also take the chest afterwards. Unless we missed some method, this will be the best accuracy we have for now.

@AlphaLemming 07/21/15 03:48 PM

If you complete a low level Dolmen or a Dolmen twice in a short time, there will be no chest or XP.

Savest way for me seems to track the Achievement: "Foe of Coldharbour" which counts towards 250 anchors to complete, even low level Dolmen.


All times are GMT -6. The time now is 08:42 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI