ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   GetUnitXP returning odd value (https://www.esoui.com/forums/showthread.php?t=2419)

justinbarrett 11/10/14 01:58 AM

GetUnitXP returning odd value
 
is this
Code:

GetUnitXP("player")
returning the wrong value for veterans? I thought veterans went to normal xp and we dropped
Code:

GetUnitVeteranPoints("player")
it does check beforehand if the *player exists, so it is not an empty pointer...not sure how you reffer to this exactly in LUA, but I'm sure I am understood here :)
Anyway am I just wrong, a current known issue, or possibly initialized incorrectly by me?
I fill a local variable upon initialization just to get a value in there...any help is appreciated.

merlight 11/10/14 08:05 AM

Just guessing here... Since veteran points functions still exist, I'd say they made that change more on the presentation level, while API remained nearly the same.

Lua Code:
  1. -- from playerprogressbar.lua
  2. function ZO_PlayerProgressBarCurrentFragment:RefreshBaseType()
  3.     if(self:IsShowing()) then
  4.         if(GetUnitVeteranRank("player") > 0) then
  5.             PLAYER_PROGRESS_BAR:SetBaseType(PPB_VP)
  6.         else
  7.             PLAYER_PROGRESS_BAR:SetBaseType(PPB_XP)
  8.         end
  9.     else
  10.         PLAYER_PROGRESS_BAR:ClearBaseType()
  11.     end
  12. end

PPB_VP uses GetUnitVeteranPoints("player"), GetUnitVeteranRank("player"), GetNumVeteranPointsInRank(rank) where
PPB_XP uses GetUnitXP("player"), GetUnitLevel("player"), GetNumExperiencePointsInLevel(rank)

edit: a bit strange that they use GetUnitVeteranRank("player") > 0 to check you're veteran, in other places they still use IsUnitVeteran("player") so that function wasn't removed, either.

mra4nii 11/10/14 08:14 AM

So far is just a cosmetic change. They changed just the name of those points for now.
All API functions related to veteran points/ranks are still there and in use.

justinbarrett 11/10/14 08:50 AM

ok, I can check on int. to get those two different variables returned, but I would rather just do it once....
does anyone have a clue about what the future of this will be in the api? do we need to maintain this or is it a good time to ignore the vet stuff and just focus on the normal xp? I know this is a shot in the dark question.

vali 11/10/14 01:24 PM

I checked XP and VP yesterday with a veteran char and those functions return different values (more XP than VP), but right now XP gains seems to be equal to VP gains, at least when you complete a quest or kill some mobs. The amount of VP you get through quests or completing POIs is a lot lower than before.

justinbarrett 11/13/14 07:20 AM

well using this..
Code:

xpMax = GetUnitVeteranPointsMax("player")
It is returning 4 millon into the variable???
any idea where this number is coming from?...or how I can get the correct value?
it IS giving correct results for the current amount....so it seems the function is working fine.

merlight 11/13/14 09:10 AM

That's probably related to a bug reported since the last patch.

edit: http://forums.elderscrollsonline.com...h-notes-v1-5-4

justinbarrett 11/13/14 10:31 AM

ty, but that doesn't really tell me anything specific about what, if any, changes happened in that function...or if another(or new)function was created....or if they are aware of the issue.

merlight 11/13/14 10:33 AM

It tells you that the function returning 4mil is bugged, and will be fixed later.

justinbarrett 11/13/14 11:11 AM

Ahhhh!!! I sincerely apologize, I just saw the line that says exactly that....I apparently did something wrong when I did a ctrl+f search of the page...because hey, I'm a lazy SOB :) ...ty...I do not know what I would do without this forum...and all the help you circonian and a few others have given me ty :).

justinbarrett 11/14/14 05:28 AM

ofc now....it is returning 1,000,000 but the eso xp bar is showing 4,000,000?

merlight 11/14/14 05:34 AM

I guess you picked the wrong time for this kind of tool :D Maybe check other add-ons that work with exp bars, there's quite a few. If they have problems, too, I'd lay it off till reported values are fixed ;)

justinbarrett 11/14/14 06:15 AM

Yes, I certainly could not have timed this worse :)
and I checked foundary tactical combat, as well as, the war genesis addons...and they are returning the same values as mine...so I know I am not crazy :)

I'm hoping ZOS irons this out....it is almost certainly not that hard to fix....maybe it is not a priority?

katkat42 11/14/14 10:07 AM

Quote:

Originally Posted by justinbarrett (Post 13245)
I'm hoping ZOS irons this out....it is almost certainly not that hard to fix....maybe it is not a priority?

It's a "known issue"... Patch notes for 1.5.4

justinbarrett 11/14/14 07:49 PM

yes ty, I assumed they addressed it...and I did see the patch notes soon after my last post...so basicly they broke their internal xp interface, and mine is actually correct now....odd...It seems like more changes will be coming in general to xp....I don't think this is the last of it.


All times are GMT -6. The time now is 04:48 PM.

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