Download
(7 Kb)
Download
Updated: 10/05/15 12:24 AM
Pictures
File Info
Compatibility:
Update 7 (1.7.0)
Updated:10/05/15 12:24 AM
Created:04/20/14 05:45 PM
Monthly downloads:20
Total downloads:8,106
Favorites:28
MD5:
X4D XP  Popular! (More than 5000 hits)
Version: 1.12
by: wilson0x4d [More]
X4D XP

A LibStub-compatible XP Add-On.

Features
  • Outputs 'XP' Gains to Chat Window.
  • Includes reason for XP Gain (such as Boss, Kill, Quest, etc.)
  • Can be integrated with via LibStub, and a callback can be set via: X4D_XP:RegisterCallback(function(color, text) d(color .. text) end)
  • Integrated into X4D Chat Add-On which provides time-stamp support for all **X4D XP** output.

Planned Features
  • Display of Quest Name for Quest Progressions/Reward XP Gains. -- IMPLEMENTED! (v1.1)
  • Display of Zone/POI Name(s) for Discovery and POI Completion XP Gains. -- IMPLEMENTED! (v1.1)
  • Display of Skill-specific XP Gains (rather than Player XP, for example, XP/TNL for 2-Hand or Undaunted Skill Lines)

Installation

First, make sure you have the latest X4D Core installed.

As with most Addons, simply open the Archive and copy the contents into "%USERPROFILE%\Documents\Elder Scrolls Online\live\Addons\" folder.

If ESO is already running, execute /reloadui command.


Change Log

To see version history, including 'vNext' (soon to be published) changes, view the README on Github.
Optional Files (0)


Post A Reply Comment Options
Unread 04/19/15, 01:20 PM  
wilson0x4d
Premium Member
 
wilson0x4d's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 180
Uploads: 10
Thumbs up Re: Re: v1.5 - API Updates and misc fixes

PLANNED- Support for Alliance Points (Loot)
PLANNED- Output to Specific Chat Tab (Chat)

Originally Posted by heruel
It seems that Alliance Point are not reported.
I'll work it in, but I think it belongs in the Loot mod (which, optionally, reports monetary changes.)

I'll review the Loot mod options and make sure everything is optional so users only interested in AP gains can use it just for the AP gains.

Originally Posted by heruel
Killing guards in PVP with a v14 character I get a notify of experience but with a very high and wrong number. (it's ok to get XP gain as it will go for champion points but the number is completely wrong).
The incorrect values are being addressed, I have a potential fix fix that will go out soon, I'm without a Vet ranked character to test this with.

Originally Posted by heruel
It would be nice to be able to put those notification in a different chat windows or to be able to define what XP gain you want to see (for example I'm most interested in AP).
I'll review the Chat Tabs API and code from ESO and see what I can do.
Report comment to moderator  
Reply With Quote
Unread 04/19/15, 05:05 AM  
heruel

Forum posts: 0
File comments: 15
Uploads: 0
Re: v1.5 - API Updates and misc fixes

It seems that Alliance Point are not reported.
Killing guards in PVP with a v14 character I get a notify of experience but with a very high and wrong number. (it's ok to get XP gain as it will go for champion points but the number is completely wrong).

It would be nice to be able to put those notification in a different chat windows or to be able to define what XP gain you want to see (for example I'm most interested in AP).
Report comment to moderator  
Reply With Quote
Unread 04/16/15, 03:38 AM  
wilson0x4d
Premium Member
 
wilson0x4d's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 180
Uploads: 10
Post v1.5 - API Updates and misc fixes

I've gone through comments and PMs for this addon and made all the changes I can verify. Unfortunately I'm still working on achieving veteran rank (writing clean code takes time) and haven't tested VP-specific features (the code looks proper, but I don't know without a Veteran toon to test with.)

Thanks!
Report comment to moderator  
Reply With Quote
Unread 06/29/14, 11:58 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
Re: Re: vp for discovery has been nerfed

Originally Posted by Marcent
Can u please update this addon?
This addon doesn't have enabled option for uploading patches, so it has to be updated by original author.
However if you want, this is updated X4D_XP.lua that works with patch 1.2.3:
Lua Code:
  1. local X4D_XP = LibStub:NewLibrary('X4D_XP', 1005)
  2. if (not X4D_XP) then
  3.    return
  4. end
  5.  
  6. X4D_XP.NAME = 'X4D_XP'
  7. X4D_XP.VERSION = '1.5'
  8.  
  9. X4D_XP.Settings = {}
  10. X4D_XP.Settings.SavedVars = {}
  11. X4D_XP.Settings.Defaults = {
  12.    None = 'true',
  13. }
  14.  
  15. X4D_XP.Colors = {
  16.    XP = '|cAA33FF',
  17.    VP = '|cAA33FF',
  18.    Gray = '|cC5C5C5',
  19.    X4D = '|cFFAE19',
  20. }
  21.  
  22. local _progressReasons = {
  23.    [PROGRESS_REASON_ACHIEVEMENT] = 'Achievement',
  24.    [PROGRESS_REASON_ACTION] = 'Action',
  25.    [PROGRESS_REASON_ALLIANCE_POINTS] = 'AP',
  26.    [PROGRESS_REASON_AVA] = 'AvA',
  27.    [PROGRESS_REASON_BATTLEGROUND] = 'Battleground',
  28.    [PROGRESS_REASON_BOOK_COLLECTION_COMPLETE] = 'Collection',
  29.    [PROGRESS_REASON_BOSS_KILL] = 'Boss',
  30.    [PROGRESS_REASON_COLLECT_BOOK] = 'Book',
  31.    [PROGRESS_REASON_COMMAND] = 'Command',
  32.    [PROGRESS_REASON_DARK_ANCHOR_CLOSED] = 'Anchor',
  33.    [PROGRESS_REASON_DARK_FISSURE_CLOSED] = 'Fissure',
  34.    [PROGRESS_REASON_DUNGEON_CHALLENGE] = 'Challenge',
  35.    [PROGRESS_REASON_EVENT] = 'Event',
  36.    [PROGRESS_REASON_FINESSE] = 'Finesse',
  37.    [PROGRESS_REASON_GRANT_REPUTATION] = 'Reputation',
  38.    [PROGRESS_REASON_GUILD_REP] = 'Guild',
  39.    [PROGRESS_REASON_KEEP_REWARD] = 'Keep',
  40.    [PROGRESS_REASON_KILL] = 'Kill',
  41.    [PROGRESS_REASON_LOCK_PICK] = 'Lockpicking',
  42.    [PROGRESS_REASON_MEDAL] = 'Medal',
  43.    [PROGRESS_REASON_NONE] = 'None',
  44.    [PROGRESS_REASON_OTHER] = 'Other',
  45.    [PROGRESS_REASON_OVERLAND_BOSS_KILL] = 'Boss',
  46.    [PROGRESS_REASON_PVP_EMPEROR] = 'Emperor',
  47.    [PROGRESS_REASON_REWARD] = 'Reward',
  48.    [PROGRESS_REASON_SCRIPTED_EVENT] = 'Event',
  49.    [PROGRESS_REASON_SKILL_BOOK] = 'Book',
  50.    [PROGRESS_REASON_TRADESKILL] = 'Tradeskill',
  51.    [PROGRESS_REASON_TRADESKILL_ACHIEVEMENT] = 'Acheivement',
  52.    [PROGRESS_REASON_TRADESKILL_CONSUME] = 'Consumption',
  53.    [PROGRESS_REASON_TRADESKILL_HARVEST] = 'Harvest',
  54.    [PROGRESS_REASON_TRADESKILL_QUEST] = 'Quest',
  55.    [PROGRESS_REASON_TRADESKILL_RECIPE] = 'Recipe',
  56.    [PROGRESS_REASON_TRADESKILL_TRAIT] = 'Trait',
  57. }
  58.  
  59. local function GetReason(reasonIndex)
  60.    return _progressReasons[reasonIndex]
  61. end
  62.  
  63. local function DefaultCallback(color, text)
  64.    CHAT_SYSTEM:AddMessage(color .. text)
  65. end
  66.  
  67. X4D_XP.Callback = DefaultCallback
  68.  
  69. function X4D_XP.RegisterCallback(self, callback)
  70.    if (callback ~= nil) then
  71.       X4D_XP.Callback = callback
  72.    else
  73.       X4D_XP.Callback = DefaultCallback
  74.    end
  75. end
  76.  
  77. function X4D_XP.UnregisterCallback(self, callback)
  78.    if (X4D_XP.Callback == callback) then
  79.       self:RegisterCallback(nil)
  80.    end
  81. end
  82.  
  83. local function InvokeCallbackSafe(color, text)
  84.    local callback = X4D_XP.Callback
  85.    if (color == nil) then
  86.       color = '|cFF0000'
  87.    end
  88.    if (color:len() < 8) then
  89.       d('bad color color=' .. color:gsub('|', '!'))
  90.       color = '|cFF0000'
  91.    end
  92.    if (callback ~= nil) then
  93.       callback(color, text)
  94.    end
  95. end
  96.  
  97. local _pointType = 'XP'
  98.  
  99. local function GetAmountAndType(level, previousExperience, currentExperience, rank, previousPoints, currentPoints)
  100.    local rankSize
  101.    if rank then
  102.       rankSize = GetNumVeteranPointsInRank(rank)
  103.    end
  104.    if rankSize ~= nil and currentPoints > previousPoints then
  105.       return currentPoints - previousPoints, 'VP'
  106.    else
  107.       local levelSize
  108.       if level then
  109.          levelSize = GetNumExperiencePointsInLevel(level)
  110.       end
  111.       if levelSize ~= nil and currentExperience >  previousExperience then
  112.          return currentExperience - previousExperience, 'XP'
  113.       end
  114.    end
  115. end
  116.  
  117. local function OnQuestComplete(eventCode, questName, level, previousExperience, currentExperience, rank, previousPoints, currentPoints)
  118.    local amount, pointType = GetAmountAndType(level, previousExperience, currentExperience, rank, previousPoints, currentPoints)
  119.    InvokeCallbackSafe(X4D_XP.Colors[pointType], zo_strformat('<<1>> <<2>> for|r <<3>><<4>>|r', amount, pointType, X4D_XP.Colors.X4D, questName))
  120. end
  121.  
  122. local function OnDiscoveryExperience(eventCode, subzoneName, level, previousExperience, currentExperience)
  123.    if IsUnitVeteran('player') then return end
  124.    InvokeCallbackSafe(X4D_XP.Colors[_pointType], zo_strformat('<<1>> <<2>> for Discovery|r <<3>><<4>>|r', (currentExperience - previousExperience), _pointType, X4D_XP.Colors.X4D, subzoneName))
  125. end
  126.  
  127. local function OnObjectiveCompleted(eventCode, zoneIndex, poiIndex, level, previousExperience, currentExperience, rank, previousPoints, currentPoints)
  128.    local amount, pointType = GetAmountAndType(level, previousExperience, currentExperience, rank, previousPoints, currentPoints)
  129.    if amount then
  130.       local objectiveName = GetPOIInfo(zoneIndex, poiIndex)
  131.       if (objectiveName ~= nil and objectiveName ~= "") then
  132.          InvokeCallbackSafe(X4D_XP.Colors[pointType], zo_strformat('<<1>> <<2>> for|r <<3>><<4>>|r', amount, pointType, X4D_XP.Colors.X4D, objectiveName))
  133.       else
  134.          InvokeCallbackSafe(X4D_XP.Colors[pointType], zo_strformat('<<1>> <<2>> for POI|r', amount, pointType))
  135.       end
  136.    end
  137. end
  138.  
  139. local _currentExp = 0
  140.  
  141. local function OnExperienceUpdate(eventCode, unitTag, currentExp, maxExp, reasonIndex)
  142.    if (unitTag ~= 'player' or IsUnitVeteran('player')) then
  143.       return
  144.    end
  145.    local xpGained = currentExp - _currentExp
  146.    if (xpGained > 0) then
  147.       local reason = GetReason(reasonIndex)
  148.       if (reason ~= nil) then
  149.          InvokeCallbackSafe(X4D_XP.Colors.XP, zo_strformat('<<1>> XP for <<2>>', xpGained, reason))
  150.       end
  151.    end
  152.    _currentExp = currentExp
  153. end
  154.  
  155. local _currentVP = 0
  156.  
  157. local function OnVeteranPointsUpdate(eventCode, unitTag, currentVP, maxVP, reasonIndex)
  158.    if (unitTag ~= 'player') then
  159.       return
  160.    end
  161.    local vpGained = currentVP - _currentVP
  162.    if (vpGained > 0) then
  163.       local reason = GetReason(reasonIndex)
  164.       if (reason ~= nil) then
  165.          InvokeCallbackSafe(X4D_XP.Colors.VP, zo_strformat('<<1>> VP for <<2>>', vpGained, reason))
  166.       else
  167.          InvokeCallbackSafe(X4D_XP.Colors.VP, zo_strformat('<<1>> VP', vpGained))
  168.       end
  169.    end
  170.    _currentVP = currentVP
  171. end
  172.  
  173. function X4D_XP.OnAddOnLoaded(event, addonName)
  174.    if (addonName ~= X4D_XP.NAME) then
  175.       return
  176.    end
  177.    X4D_XP.Settings.SavedVars = ZO_SavedVars:NewAccountWide(X4D_XP.NAME .. '_SV', 1.0, nil, X4D_XP.Settings.Defaults)
  178.    X4D_XP.Register()
  179. end
  180.  
  181. function X4D_XP.Register()
  182.    EVENT_MANAGER:RegisterForEvent(X4D_XP.NAME, EVENT_QUEST_COMPLETE, OnQuestComplete)
  183.    EVENT_MANAGER:RegisterForEvent(X4D_XP.NAME, EVENT_DISCOVERY_EXPERIENCE, OnDiscoveryExperience)
  184.    EVENT_MANAGER:RegisterForEvent(X4D_XP.NAME, EVENT_OBJECTIVE_COMPLETED, OnObjectiveCompleted)
  185.    EVENT_MANAGER:RegisterForEvent(X4D_XP.NAME, EVENT_EXPERIENCE_UPDATE, OnExperienceUpdate)
  186.    EVENT_MANAGER:RegisterForEvent(X4D_XP.NAME, EVENT_VETERAN_POINTS_UPDATE, OnVeteranPointsUpdate)
  187. end
  188.  
  189. function X4D_XP.Unregister()
  190. end
  191.  
  192. function X4D_XP.OnPlayerActivated()
  193.    _currentExp = GetUnitXP('player')
  194.    if (IsUnitVeteran('player')) then
  195.       _currentVP = GetUnitVeteranPoints('player')
  196.       _pointType = 'VP'
  197.    else
  198.       _pointType = 'XP'
  199.    end
  200. end
  201.  
  202. EVENT_MANAGER:RegisterForEvent(X4D_XP.NAME, EVENT_ADD_ON_LOADED, X4D_XP.OnAddOnLoaded)
  203. EVENT_MANAGER:RegisterForEvent(X4D_XP.NAME, EVENT_PLAYER_ACTIVATED, X4D_XP.OnPlayerActivated)

EDIT:
Fixed XP issues for VR characters.
Last edited by Garkin : 07/07/14 at 06:51 AM.
Report comment to moderator  
Reply With Quote
Unread 06/27/14, 01:29 AM  
Marcent

Forum posts: 0
File comments: 2
Uploads: 0
Re: vp for discovery has been nerfed

Can u please update this addon?
Report comment to moderator  
Reply With Quote
Unread 06/07/14, 11:41 AM  
HeroOfEvbof

Forum posts: 0
File comments: 64
Uploads: 0
vp for discovery has been nerfed

we nolonger get vp for discovery but x4d xp is still reporting we do
Report comment to moderator  
Reply With Quote
Unread 06/06/14, 03:01 AM  
ojustaboo

Forum posts: 3
File comments: 11
Uploads: 0
I'm getting VP XP showing for discovering new areas when you don't get VP XP for that.
Report comment to moderator  
Reply With Quote
Unread 06/02/14, 10:37 AM  
cnschu

Forum posts: 0
File comments: 9
Uploads: 0
Originally Posted by Otagamo
I made a little change to line 140 in X4D_XP.lua

if ((xpGained > 0) and (not(IsUnitVeteran('player')))) then

It stops XP messages from showing to lvl 50 players (VP still shows).
Hi, if it get implemented, it should be an configurable option.
XP matter for some veteran level players, because it counts for skill improvement.
Report comment to moderator  
Reply With Quote
Unread 05/01/14, 05:26 PM  
Otagamo

Forum posts: 0
File comments: 16
Uploads: 0
I made a little change to line 140 in X4D_XP.lua

if ((xpGained > 0) and (not(IsUnitVeteran('player')))) then

It stops XP messages from showing to lvl 50 players (VP still shows).
Report comment to moderator  
Reply With Quote
Unread 04/29/14, 05:37 PM  
Otagamo

Forum posts: 0
File comments: 16
Uploads: 0
1.3 is working fine here. Thanks.
Suggestion: at lvl 50 the XP messages are meaningless, please show only VP for lvls 50 (or maybe an option).
Report comment to moderator  
Reply With Quote
Unread 04/29/14, 06:55 AM  
Sek0n

Forum posts: 0
File comments: 12
Uploads: 0
I got it working eventually, thanks. Not sure what caused it exactly, but it showed up after my fifth or so try. lol

I think Minion just pulls directly from the published files, as 1.3 showed up in Minion almost immediately for me. It doesn't seem to have any delay for pending releases.

I'm running it now. The mob kills show correctly now.(FinesseXP, BossXP, and VP. Which is normal if I'm understanding right?)

Vet quest turn ins seem to be good now too. Only showed VP for the quest and POI. No Books or Lockpicking xp from them.


Also, as per your question another post; No you don't aquire XP after V1 like regular. The only thing I think regular XP is used for after hitting vet ranks is for skills that aren't maxed yet.
Last edited by Sek0n : 04/29/14 at 06:56 AM.
Report comment to moderator  
Reply With Quote
Unread 04/29/14, 06:36 AM  
wilson0x4d
Premium Member
 
wilson0x4d's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 180
Uploads: 10
Also, v1.3 appears to still be pending mod approval. Dunno if Minion provides access to it faster than the site does.. that would be something interesting.
Report comment to moderator  
Reply With Quote
Unread 04/29/14, 06:34 AM  
wilson0x4d
Premium Member
 
wilson0x4d's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 180
Uploads: 10
Originally Posted by Sek0n
oblem with 1.3 actually loading though. After I installed it, it dissipated. I did reloadui, close the game uninstalled and deleted the lua file, and reinstalled, but it's still not showing in the addon list or anything. (installed with Minion)
This has happened with other add-ons as well, it's a known issue with Minion but I've no idea what causes it nor how to fix it. I really hope someone figures it out.

I've just logged in and can confirm v1.3 appears in my Add-On list. Try a manual install and restart ESO? (I've no idea how Minion works, I'm afraid of having it wipe my add-on folders which I develop directly against, so I don't use it.)
Report comment to moderator  
Reply With Quote
Unread 04/29/14, 06:29 AM  
Sek0n

Forum posts: 0
File comments: 12
Uploads: 0
Didn't know about the Finesse XP stuff. Good to know.

The UI shows VP for it, if that's what you mean. Although I always say/hear "Veteran XP." Sounds better. lol


Edit: Disregard the not working, showed up after doing a few reloaduis. heh
Last edited by Sek0n : 04/29/14 at 06:31 AM.
Report comment to moderator  
Reply With Quote
Unread 04/29/14, 05:52 AM  
wilson0x4d
Premium Member
 
wilson0x4d's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 180
Uploads: 10
I've updated the reason table for veteran points, and also tried to adjust some of the event handlers to display 'VP' instead of 'XP'.

I'm working under the assumption that VP and XP are the same thing (that once you are a vet you no longer accrue XP.) Please correct me if I'm mistaken.

There are some veteran reason codes I don't understand, so hopefully the generic text makes sense.

Similarly, I'm not sure how POI discovery vs. completions are reported with vet ranks (as I only see XP-based events for these). I've erred on the side of assuming that the same event is used for VP and XP.

Thanks for the feedback, it helps, especially when I'm unable to test on my own. I appreciate the patience.


NOTE: "Finesse XP" is 'additional XP' rewarded along with a kill/encounter, I'm not entirely certain under what cases. It seems to be awarded more when I have a fluid combat sequence (fast kills utilizing multiple skills, or efficiency when finishing off multiple enemies, I've tried to figure it out.) Whatever the case may be, this XP is being reported by ESO and is always a very small amount compared to all other XP gains.

These messages will continue reporting as 'XP' until I can confirm that certain XP events/updates occur even when a vet. The 'XP' text allows us to see the difference between a "Vet Point update" and an "Experience Point update" .. once it's understood better I'll adjust it to always read "VP".

I'm also not sure if there is a preference here, re: do players expect to see "VP" or "XP", near as I can tell by inspecting globals the UI changes for displaying vet points but I can't really tell how.
Last edited by wilson0x4d : 04/29/14 at 05:58 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: