Thread Tools Display Modes
04/02/15, 03:57 PM   #1
SpellBuilder
 
SpellBuilder's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 10
Event_enlightened_state_lost

Is it only on my client, or it is a global bug, that event EVENT_ENLIGHTENED_STATE_LOST never fires? The other event (_GAINED) works correctly.
  Reply With Quote
04/02/15, 08:58 PM   #2
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by SpellBuilder View Post
Is it only on my client, or it is a global bug, that event EVENT_ENLIGHTENED_STATE_LOST never fires? The other event (_GAINED) works correctly.
I don't really know anything about enlightement, but I googled it & found this statement:
Every 24 hours, you receive enough Enlightenment to earn one Champion Point at the rate of 100,000XP per Point; after your Enlightenment is used up, you will return to requiring 400,000XP to earn a Champion Point.
If that is correct, the way I read it, you would have to go out & earn over 100,000 xp before the enlightenment resets (no clue at what time it does that) in order to get that event to fire. Did you try tracking xp to make sure you earned over 100,000 xp ?

Last edited by circonian : 04/02/15 at 11:03 PM.
  Reply With Quote
04/02/15, 09:47 PM   #3
Minceraft
 
Minceraft's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 51
Enlightenment

I've been using EVENT_ENLIGHTENED_STATE_GAINED to start the scrolling overlay on my own freestanding champion bar, but have had to rely on using EVENT_EXPERIENCE_GAIN or even EVENT_EXPERIENCE_UPDATE with IsEnlightenedAvailableForAccount and IsEnlightenedAvailableForCharacter to fire functions...

Something like this...

Lua Code:
  1. function GetEnlightenedPoolAmount()
  2.  
  3.     local pool = GetEnlightenedPool()
  4.    
  5.     local Elabel = ZO_ChampionEnlightenedLabel
  6.     local stats = ZO_ChampionFrameStatusBar
  7.     local oldText = Elabel:GetText()
  8.     local newText
  9.    if  IsEnlightenedAvailableForAccount and pool ~= 0 then
  10.      
  11.      newText = pool
  12.      Elabel:SetHidden(false)
  13.      Elabel:SetText(pool)
  14.    
  15.    ZO_ChampionEnlightenedLostLabel:SetText(string.format("|cFFFF00 " ..newText - oldText.." |r"))
  16.  
  17.  
  18.  
  19.       timelineAnimation()
  20.  
  21.      
  22.    
  23.  
  24.   if  IsEnlightenedAvailableForAccount and IsEnlightenedAvailableForCharacter  then
  25.    
  26.       stats:EnableScrollingOverlay(true)
  27.    
  28.    
  29.   else
  30.  
  31.      stats:EndScrollOverlay()
  32.    
  33.   end
  34.  
  35.  
  36.  
  37.    
  38.   end
  39. end
  40.  
  41. EVENT_MANAGER:RegisterForEvent("ChampionBuddy", EVENT_EXPERIENCE_GAIN, GetEnlightenedPoolAmount )

Added that to some NEAT stuff Garkin helped me out with (Thank ya!) but still in beta :/ lol

Maybe it doesn't fire because you are always in a state of either being enlightened or the cooldown tic for GAINING enlightenment is currently counting down...
That's my guess But I know that it DOES max out at 1200000, that's a lot of enlightenment!!

Last edited by Minceraft : 04/02/15 at 09:51 PM.
  Reply With Quote
04/02/15, 11:05 PM   #4
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by Minceraft View Post
But I know that it DOES max out at 1200000, that's a lot of enlightenment!!
Oh, every 24 hours you gain another 100,000 enlightenment xp....That stacks with enlightenment xp you already have? It doesn't just reset to 100,000 ?
  Reply With Quote
04/03/15, 01:34 AM   #5
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
Yeah, the amount stacks.


I don't remember the "no longer enlightened" message showing up all the time. It might be bugged or it might be I just don't notice since it typically happens while in combat.

Last edited by Sasky : 04/03/15 at 01:37 AM.
  Reply With Quote
04/03/15, 04:50 AM   #6
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by circonian View Post
Oh, every 24 hours you gain another 100,000 enlightenment xp....That stacks with enlightenment xp you already have? It doesn't just reset to 100,000 ?
http://forums.elderscrollsonline.com...t-how-it-works

Originally Posted by ZOS_GinaBruno
If you end up not using up all your Enlightenment while you play, it will continue to accrue for a maximum of 12 days. Once you hit the limit, you will not gain any additional Enlightenment until you begin to use it by gaining XP.
  Reply With Quote
04/03/15, 11:43 AM   #7
SpellBuilder
 
SpellBuilder's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 10
Originally Posted by circonian View Post
If that is correct, the way I read it, you would have to go out & earn over 100,000 xp before the enlightenment resets (no clue at what time it does that) in order to get that event to fire. Did you try tracking xp to make sure you earned over 100,000 xp ?
I did exactly like this: At 6:45AM I see that _GAINED event is fired and my enlightenment pool becomes 100k xp. But when I use all of this experience (basically complete full Champion point) there is no _LOST event fired. I mean, the enlightenment pool depletes, GetEnlightenedPool() start returning zero, but no event is fired at that point.

I wanted to use this 2 events to colorize my custom frames experience bar, but it looks like, that I need to track remaining enlightenment pool manually subtracting gained XP amount in EVENT_EXPERIENCE_UPDATE listener.
  Reply With Quote
04/04/15, 01:13 AM   #8
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
The GetEnlightenedPool() does work fine. So I guess the best you can do is something like:
Lua Code:
  1. Foo = {}
  2. function Foo.onXPUpdate()
  3.     if GetEnlightenedPool() == 0 then
  4.  
  5.         CryThatYourEnlightenmentIsGone()
  6.  
  7.         EVENT_MANAGER:UnRegisterForEvent("Foo", EVENT_EXPERIENCE_GAIN)
  8.         EVENT_MANAGER:RegisterForEvent("Foo",
  9.                 EVENT_ENLIGHTENED_STATE_GAINED, Foo.init)
  10.     end
  11. end
  12.  
  13. --Note: I'm not sure of the return values before PLAYER_ACTIVATED,
  14. -- so the init should probably be called there.
  15. function Foo.init()
  16.     if GetEnlightenedPool() > 0 then
  17.         EVENT_MANAGER:RegisterForEvent("Foo",
  18.                 EVENT_EXPERIENCE_GAIN, Foo.onXPUpdate)
  19.     else
  20.         EVENT_MANAGER:RegisterForEvent("Foo",
  21.                 EVENT_ENLIGHTENED_STATE_GAINED, Foo.init)
  22.     end
  23. end
Note: untested and written in the wonderful IDE of "Reply to Thread"

Also, if you use something like this, be careful to make sure function definitions can be referenced. I use a table to avoid it. Without the table dereference, the init function wouldn't have been defined.
  Reply With Quote
04/04/15, 05:07 AM   #9
Minceraft
 
Minceraft's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 51
Amounts?

I think the discrepancy is in the amount of enlightenment that is used in congruence with the amount of xp earned...

From my investigations, the amount of enlightenment used is EXACTLY EQUAL to the amount of xp gained, but is then multiplied by the enlightenment multiplier ( GetEnlightenedMultiplier() ) to get the total amount of Champion Xp earned... basically 3 times the amount. So if you have 400,000 enlightenment and it takes 400,000 xp to earn a champion point... then for every 100,000 xp you earn while enlightened, you're getting 300,000 Champion Points...Think about THAT!....According to the data called and returned, 100,000 xp = 300,000 CP! that's 3 champion xp per regular xp while enlightened! That's AMAZING! SO, for the cap, at 1,200,000 enlightenment...
WOW!! That means that for every 400,000 xp you get while enlightened, you are getting 1,200,00 champion xp -- or 3 CHAMPION POINTS!! That means with 1,200,000 enlightenment, you should be able to get 9 Champion Points! ( Note: I am NOT a math wizard!!!! LoL! )

Last edited by Minceraft : 04/04/15 at 05:27 AM.
  Reply With Quote
04/04/15, 05:17 AM   #10
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Minceraft View Post
I think the discrepancy is in the amount of enlightenment that is used in congruence with the amount of xp earned...

From my investigations, the amount of enlightenment used is EXACTLY EQUAL to the amount of xp gained, but is then multiplied by the enlightenment multiplier ( GetEnlightenedMultiplier() ) to get the total amount of Champion Xp earned... roughly 3 times the amount. So if you have 400,000 enlightenment and it takes 400,000 xp to earn a champion point... then for every 100,000 xp you earn while enlightened, you're getting 300,000 Champion Points...Think about THAT!....100,000 xp = 300,000 CP! that's 3 champion xp per regular xp while enlightened! That's AMAZING! SO, for the cap, at 1,200,000...
In enlightened state 100,000 XP = 400,000 CP.

Enlightened multiplier is for just bonus XPs, you are getting standard XP + bonus XP:

CP = XP + (XP * GetEnlightenedMultiplier())
  Reply With Quote
04/04/15, 05:32 AM   #11
Minceraft
 
Minceraft's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 51
When I call the GetEnlightenedMultiplier() It's always 3, is this diferent for anyone else? And if so, how and why? Awesome quick draw response btw, Garkin! Hell yeah!
I WAS kinda hoping it was deeper than just a multiplier..lol
  Reply With Quote
04/04/15, 05:42 AM   #12
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Minceraft View Post
When I call the GetEnlightenedMultiplier() It's always 3, is this diferent for anyone else? And if so, how and why? Awesome quick draw response btw, Garkin! Hell yeah!
I WAS kinda hoping it was deeper than just a multiplier..lol
AFAIK it's always 3. And I should correct my previous formula, because it does not check enlightened pool, so:

CP = XP + (math.min(XP, GetEnlightenedPool()) * GetEnlightenedMultiplier())
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Event_enlightened_state_lost

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