Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(3 Kb)
Download
Updated: 10-15-14 11:46 AM
Addon for:
oUF.
Compatibility:
Warlords of Draenor Pre-Patch (6.0.2)
Updated:10-15-14 11:46 AM
Created:unknown
Downloads:34,683
Favorites:169
MD5:
Categories:oUF: Plugins, Warlords of Draenor Beta

oUF Experience  Popular! (More than 5000 hits)

Version: 60000.15-Release
by: p3lim [More]

Supported oUF Version: 1.6.x

Description:
oUF Experience is a element plug-in made for the UnitFrame framework oUF.
It does nothing by itself, and requires a layout that supports it to function.

Features:

  • Experience bar
  • Optional rested element
  • Basic tags included
  • Hides if the player is at max level

Note:
For details on how to implement this in your own layout, please see this wiki:
http://github.com/p3lim-wow/oUF_Experience/wiki
Don't forget to add this addon to your OptionalDeps!

Issues & Requests
To submit a bug report or feature request, please visit the Issue Tracker.

Changes in 60000.15-Release:
  • Added: License
  • Added: Changelog
  • Changed: Update Interface version
  • Changed: Only show on player frame
  • Changed: Internal performance tweaks
Changes in 50400.14-Release:
  • Added: Support for trial account level cap
  • Changed: Update Interface version
Changes in 50001.13-Release:
  • Fixed: PostUpdate not firing for players in vehicle or at max level
Changes in 50001.12-Release:
  • Changed: Update Interface version
  • Fixed: Taints caused by Blizzard leaking a global variable
  • Removed: Support for oUF 1.5
Changes in 40300.11-Release:
  • Changed: Update Interface version
  • Changed: Update support for oUF 1.6
  • Changed: Added support for packagers to set the version automatically
Changes in 40200.10-Release:
  • Changed: Update Interface version
  • Changed: Stop updating early if player is in a vehicle
  • Removed: Experience bar for pets
Changes in 40000.9-Release:
  • Changed: Register tags regardless of element being added or not
Changes in 40000.8-Release:
  • Added: Tags
Changes in 40000.7-Release:
  • Added: Default texture to rested bar
Changes in 40000.6-Release:
  • Added: Override method
  • Added: ForceUpdate method
  • Added: PreUpdate method
  • Changed: Update Interface version
  • Changed: Update support for oUF 1.4
  • Removed: Tooltip options
Changes in 30300.5-Release:
  • Added: Embedding support
  • Changed: Update Interface version
  • Fixed: Hide while in a vehicle regardless of layout properties
  • Fixed: Hunter pet support
Changes in 30200.4-Release:
  • Fixed: Pass the rested xp regardless of unit
Changes in 30200.3-Release:
  • Fixed: Set the default texture properly
  • Fixed: Use the interal unitID for unit checks
Changes in 30200.2-Release:
  • Fixed: Hide the rested bar on pets
  • Fixed: Replicate the backdrop for pets
  • Fixed: Framelevel on the rested bar
Changes in 30200.1-Beta:
  • First public release
Archived Files (25)
File Name
Version
Size
Author
Date
50400.14-Releas
2kB
p3lim
06-14-14 10:29 PM
50001.12-Releas
2kB
p3lim
08-30-12 06:11 AM
40300.11-Releas
2kB
p3lim
02-06-12 06:58 PM
40200.10-Releas
1kB
p3lim
10-03-11 07:24 PM
40000.9-Release
2kB
p3lim
10-14-10 11:56 AM
40000.8-Release
2kB
p3lim
10-13-10 12:39 PM
30300.5-Release
2kB
p3lim
12-28-09 12:53 PM
30200.4-Release
2kB
p3lim
09-07-09 04:24 PM
30200.3-Release
2kB
p3lim
08-22-09 03:20 PM
30200.2-Release
2kB
p3lim
08-17-09 03:58 PM
30200.1-Beta
2kB
p3lim
08-08-09 10:06 AM
30200.39
2kB
p3lim
08-04-09 04:22 PM
30200.38
2kB
p3lim
08-04-09 01:28 PM
30000.37
2kB
p3lim
07-15-09 12:51 PM
30000.36
2kB
p3lim
06-13-09 12:31 PM
30000.35
2kB
p3lim
06-11-09 02:27 PM
30000.34
2kB
p3lim
06-01-09 10:45 AM
30000.33
2kB
p3lim
06-01-09 03:55 AM
30000.32
2kB
p3lim
05-26-09 02:36 PM
30000.31
2kB
p3lim
05-24-09 07:28 PM
30000.30
2kB
p3lim
05-20-09 10:52 AM
30000.29
2kB
p3lim
04-17-09 09:34 AM
30000.28
2kB
p3lim
02-07-09 02:36 PM
30000.26
2kB
p3lim
01-14-09 02:38 PM
30000.25
2kB
p3lim
01-13-09 02:41 PM


Post A Reply Comment Options
Unread 10-19-12, 03:14 PM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1320
File comments: 1185
Uploads: 25
Originally Posted by -ReD-
Hello,
I am trying to make a small modification to how the experience bar works. I would like the text to be visible at all times rather than just when hovering over it with the mouse. So I went and commented out those lines, starting at 64:



And it works, almost. The text now is always displayed, however when it comes to updating it, rather than updating the existing text, the game prints a new value that is displayed directly over the old one every time an experience gain occurs, this obviously makes the numbers unreadable in a couple of kills. How to get it working correctly, I am at a dead end, as far as my LUA skills go. Thanks
This would be layout related, as this plugin has nothing to do with how and when a text element is shown or updated.
This plugin merely provides the information, as with any plugin.
p3lim is offline Report comment to moderator  
Reply With Quote
Unread 10-19-12, 03:02 PM  
-ReD-
A Murloc Raider

Forum posts: 5
File comments: 19
Uploads: 0
Hello,
I am trying to make a small modification to how the experience bar works. I would like the text to be visible at all times rather than just when hovering over it with the mouse. So I went and commented out those lines, starting at 64:

Text:Hide()

experience:SetScript('OnEnter', function(self)Text:Show()end)
experience:SetScript('OnLeave', function(self)Text:Hide()end)
And it works, almost. The text now is always displayed, however when it comes to updating it, rather than updating the existing text, the game prints a new value that is displayed directly over the old one every time an experience gain occurs, this obviously makes the numbers unreadable in a couple of kills. How to get it working correctly, I am at a dead end, as far as my LUA skills go. Thanks
-ReD- is offline Report comment to moderator  
Reply With Quote
Unread 08-31-12, 05:49 AM  
Vodkaholic
A Kobold Labourer
 
Vodkaholic's Avatar

Forum posts: 0
File comments: 57
Uploads: 0
Originally Posted by p3lim
Read what I just wrote below, you have to use oUF version 1.6 or later for this plugin to work, you're using 1.5.16.
Yes sorry about that I did indeed use 1.6 and it worked (just forgot to edit my post sorry)
And thanks!
Vodkaholic is offline Report comment to moderator  
Reply With Quote
Unread 08-30-12, 03:39 PM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1320
File comments: 1185
Uploads: 25
Read what I just wrote below, you have to use oUF version 1.6 or later for this plugin to work, you're using 1.5.16.
Last edited by p3lim : 08-30-12 at 03:39 PM.
p3lim is offline Report comment to moderator  
Reply With Quote
Unread 08-30-12, 01:08 PM  
Vodkaholic
A Kobold Labourer
 
Vodkaholic's Avatar

Forum posts: 0
File comments: 57
Uploads: 0
Just got this error

Code:
Date: 2012-08-30 20:04:39
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\oUF_Experience\oUF_Experience.lua line 25:
   attempt to index field 'Methods' (a nil value)
Debug:
   [C]: ?
   oUF_Experience\oUF_Experience.lua:25: in main chunk
Locals:
__ = "oUF_Experience"
ns = <table> {
}
oUF = <table> {
 DisableBlizzard = <function> defined @Interface\AddOns\oUF\blizzard.lua:39
 SetActiveStyle = <function> defined @Interface\AddOns\oUF\ouf.lua:333
 EnableFactory = <function> defined @Interface\AddOns\oUF\factory.lua:35
 ColorGradient = <function> defined @Interface\AddOns\oUF\colors.lua:45
 SpawnHeader = <function> defined @Interface\AddOns\oUF\ouf.lua:503
 RegisterStyle = <function> defined @Interface\AddOns\oUF\ouf.lua:323
 AddElement = <function> defined @Interface\AddOns\oUF\ouf.lua:571
 UnitlessTagEvents = <table> {
 }
 Factory = <function> defined @Interface\AddOns\oUF\factory.lua:24
 RegisterMetaFunction = <function> defined @Interface\AddOns\oUF\ouf.lua:312
 Tags = <table> {
 }
 TagEvents = <table> {
 }
 colors = <table> {
 }
 units = <table> {
 }
 objects = <table> {
 }
 DisableFactory = <function> defined @Interface\AddOns\oUF\factory.lua:39
 version = "1.5.16"
 RunFactoryQueue = <function> defined @Interface\AddOns\oUF\factory.lua:43
 HandleUnit = <function> defined @Interface\AddOns\oUF\units.lua:8
 RegisterInitCallback = <function> defined @Interface\AddOns\oUF\ouf.lua:308
 IterateStyles = <function> defined @Interface\AddOns\oUF\ouf.lua:346
 Spawn = <function> defined @Interface\AddOns\oUF\ouf.lua:548
}
(for generator) = <function> defined =[C]:-1
(for state) = <table> {
 currested = <function> defined @Interface\AddOns\oUF_Experience\oUF_Experience.lua:15
 perrested = <function> defined @Interface\AddOns\oUF_Experience\oUF_Experience.lua:18
 maxxp = <function> defined @Interface\AddOns\oUF_Experience\oUF_Experience.lua:9
 perxp = <function> defined @Interface\AddOns\oUF_Experience\oUF_Experience.lua:12
 curxp = <function> defined @Interface\AddOns\oUF_Experience\oUF_Experience.lua:6
}
(for control) = "currested"
tag = "currested"
func = <function> defined @Interface\AddOns\oUF_Experience\oUF_Experience.lua:15
(*temporary) = nil
(*temporary) = <function> defined @Interface\AddOns\oUF_Experience\oUF_Experience.lua:15
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field 'Methods' (a nil value)"

AddOns:
  Swatter, v5.14.5335 (KowariOnCrutches)
  WowheadLooter, v50005
  NPCScan, v5.0.0.1
  Ace3, v
  AucAdvanced, v5.14.5335 (KowariOnCrutches)
  AucStatHistogram, v5.14.5335 (KowariOnCrutches)
  AucStatiLevel, v5.14.5335 (KowariOnCrutches)
  AucStatStdDev, v5.14.5335 (KowariOnCrutches)
  AucUtilFixAH, v5.14.5335 (KowariOnCrutches)
  AucUtilScanProgress, v5.14.5335.4979(5.14/embedded)
  AucUtilSimpleAuction, v5.14.5335.5208(5.14/embedded)
  Babylonian, v5.1.DEV.312(/embedded)
  Bagnon, v5.0.2
  BloodShieldTracker, v0.19
  ButtonFacade, v5.0.387
  Configator, v5.1.DEV.330(/embedded)
  DBMCore, v
  DebugLib, v5.1.DEV.312(/embedded)
  Dominos, v5.0.8
  DominosCast, v
  DominosXP, v
  Grid, v5.0.4.1517
  HideBlizzard, v1.0.68
  InlineAura, vv1.7
  kgPanels, v1.13
  KuiNameplates, v
  LibExtraTip, v5.12.DEV.324(/embedded)
  mCombatText, v2.1.2
  Mapster, v1.5.0
  Masque, v5.0.387
  MasqueRealUI, v7.1
  ncError, v1.5
  nibProfileLoader, v
  oUF, v1.5.16
  oUFAuraWatch, v1.5.2-7
  oUFExperience, v50001.12-Release
  Postal, v3.4.13
  PowerAuras, v5.0.0.P
  Raven, v
  Reflux, v1.15
  SharedMedia, v3.0
  SlideBar, v5.14.5335 (KowariOnCrutches)
  Stubby, v5.14.5335 (KowariOnCrutches)
  TipHelper, v5.12.DEV.315(/embedded)
  TipTac, v12.08.30
  TipTacItemRef, v12.08.30
  TipTacTalents, v12.08.30
  tullaCC, v5.0.0
  tullaRange, v4.3.1
  BlizRuntimeLib_enUS v5.0.4.50001 <eu>
  (ck=563)
Got it just after I added Auctioneer.
Cheers
Vodkaholic is offline Report comment to moderator  
Reply With Quote
Unread 08-30-12, 08:14 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1391
File comments: 3396
Uploads: 89
Thanks. Now I can update.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline Report comment to moderator  
Reply With Quote
Unread 08-30-12, 06:12 AM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1320
File comments: 1185
Uploads: 25
When updating to 50001.12-Release, keep in mind that you will need oUF 1.6 for this plug-in to work!
p3lim is offline Report comment to moderator  
Reply With Quote
Unread 02-08-12, 10:28 AM  
Coldkil
A Wyrmkin Dreamwalker
 
Coldkil's Avatar
AddOn Author - Click to view AddOns

Forum posts: 50
File comments: 148
Uploads: 2
Originally Posted by p3lim
It is fully possible to make yourself, through the OnEnter/OnLeave scripts.
You can look at the old code on how to do it:
https://github.com/p3lim/oUF_Experie...nce.lua#L31-43

This is also the reason why I removed it.
People were suggesting options for the tooltip, so to have it customizable I just removed it so people can make their own.
Love this approach - it's the same i'm using for my ui. Thanks for the info, going to put some work on this.

And keep up your awesome work

EDIT: tried the fix, it doesn't work. Looking deeper into the files.
Last edited by Coldkil : 02-08-12 at 01:10 PM.
Coldkil is offline Report comment to moderator  
Reply With Quote
Unread 02-07-12, 06:04 PM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1320
File comments: 1185
Uploads: 25
Originally Posted by Coldkil
Originally Posted by p3lim
That code works for me, except for the OnEnter/OnLeave code.
I'm guessing it is because the bar has no real size.
Try setting the size manually with SetSize or SetHeight/SetWidth, that did the trick for me.

Note that the tooltip part was removed with the first release after Cataclysm.

Also note that the version you find here only supports the 1.5.x versions of oUF, not the version haste has on his git repo.
Thanks, going to fix it Yes, i use the last version of oUF so no problem from that side.

I'm a little sad that the tooltip part isn't there anymore, is it possible to re-create or it's something that is being blocked blizzard's side? I won't waste time on it if it's not possible.
It is fully possible to make yourself, through the OnEnter/OnLeave scripts.
You can look at the old code on how to do it:
https://github.com/p3lim/oUF_Experie...nce.lua#L31-43

This is also the reason why I removed it.
People were suggesting options for the tooltip, so to have it customizable I just removed it so people can make their own.
Last edited by p3lim : 02-07-12 at 06:05 PM.
p3lim is offline Report comment to moderator  
Reply With Quote
Unread 02-07-12, 02:03 PM  
Coldkil
A Wyrmkin Dreamwalker
 
Coldkil's Avatar
AddOn Author - Click to view AddOns

Forum posts: 50
File comments: 148
Uploads: 2
Originally Posted by p3lim
That code works for me, except for the OnEnter/OnLeave code.
I'm guessing it is because the bar has no real size.
Try setting the size manually with SetSize or SetHeight/SetWidth, that did the trick for me.

Note that the tooltip part was removed with the first release after Cataclysm.

Also note that the version you find here only supports the 1.5.x versions of oUF, not the version haste has on his git repo.
Thanks, going to fix it Yes, i use the last version of oUF so no problem from that side.

I'm a little sad that the tooltip part isn't there anymore, is it possible to re-create or it's something that is being blocked blizzard's side? I won't waste time on it if it's not possible.
Coldkil is offline Report comment to moderator  
Reply With Quote
Unread 02-06-12, 05:16 PM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1320
File comments: 1185
Uploads: 25
Originally Posted by Coldkil
Yes, downloaded latest version yesterday, but nothing changed.

Going to post code as soon as i return from work.
Code's here:
Code:
-- XP Bar
		if UnitLevel("player") ~= MAX_PLAYER_LEVEL  then
			local Experience = CreateFrame("StatusBar", "ColdExperience", self)
			Experience:SetStatusBarTexture(_TEXTURE)
			Experience:SetStatusBarColor(.9, .2, 1)
			Experience:SetPoint("TOPLEFT", Power, "TOPLEFT")
			Experience:SetPoint("BOTTOMRIGHT", Power, "BOTTOMRIGHT")
			Experience:SetFrameLevel(8)
			Experience:SetAlpha(0)
			Experience.Tooltip = true						
			Experience.Rested = CreateFrame('StatusBar', nil, self)
			Experience.Rested:SetParent(Experience)
			Experience.Rested:SetAllPoints(Experience)
			Experience.Rested:SetStatusBarTexture(_TEXTURE)
			Experience.Rested:SetStatusBarColor(0, .4, 1)
			Experience.Rested:SetFrameLevel(7)
			
			local Resting = lib.SetFontString(Experience, font, smalls, "OUTLINE, MONOCHROME")
			Resting:SetText"Resting"
			Resting:SetTextColor(1, 1, 0)
			Resting:SetPoint"CENTER"
			
			self.Resting = Resting
			self.Experience = Experience
			
			Experience:SetScript("OnEnter",function()
				Experience:SetAlpha(1)
			end)
			Experience:SetScript("OnLeave",function()
				Experience:SetAlpha(0)
			end)
		end
That code works for me, except for the OnEnter/OnLeave code.
I'm guessing it is because the bar has no real size.
Try setting the size manually with SetSize or SetHeight/SetWidth, that did the trick for me.

Note that the tooltip part was removed with the first release after Cataclysm.

Also note that the version you find here only supports the 1.5.x versions of oUF, not the version haste has on his git repo.
p3lim is offline Report comment to moderator  
Reply With Quote
Unread 02-06-12, 09:45 AM  
Coldkil
A Wyrmkin Dreamwalker
 
Coldkil's Avatar
AddOn Author - Click to view AddOns

Forum posts: 50
File comments: 148
Uploads: 2
Yes, downloaded latest version yesterday, but nothing changed.

Going to post code as soon as i return from work.
Code's here:
Code:
-- XP Bar
		if UnitLevel("player") ~= MAX_PLAYER_LEVEL  then
			local Experience = CreateFrame("StatusBar", "ColdExperience", self)
			Experience:SetStatusBarTexture(_TEXTURE)
			Experience:SetStatusBarColor(.9, .2, 1)
			Experience:SetPoint("TOPLEFT", Power, "TOPLEFT")
			Experience:SetPoint("BOTTOMRIGHT", Power, "BOTTOMRIGHT")
			Experience:SetFrameLevel(8)
			Experience:SetAlpha(0)
			Experience.Tooltip = true						
			Experience.Rested = CreateFrame('StatusBar', nil, self)
			Experience.Rested:SetParent(Experience)
			Experience.Rested:SetAllPoints(Experience)
			Experience.Rested:SetStatusBarTexture(_TEXTURE)
			Experience.Rested:SetStatusBarColor(0, .4, 1)
			Experience.Rested:SetFrameLevel(7)
			
			local Resting = lib.SetFontString(Experience, font, smalls, "OUTLINE, MONOCHROME")
			Resting:SetText"Resting"
			Resting:SetTextColor(1, 1, 0)
			Resting:SetPoint"CENTER"
			
			self.Resting = Resting
			self.Experience = Experience
			
			Experience:SetScript("OnEnter",function()
				Experience:SetAlpha(1)
			end)
			Experience:SetScript("OnLeave",function()
				Experience:SetAlpha(0)
			end)
		end
Last edited by Coldkil : 02-06-12 at 11:00 AM.
Coldkil is offline Report comment to moderator  
Reply With Quote
Unread 02-05-12, 09:56 AM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1320
File comments: 1185
Uploads: 25
Originally Posted by Coldkil
I have an issue, the xp value won't update on my chars - the xpbar looks like full, tooltip doesn't appear and is just stays there.

Only thing i've done is to create the frame and put it on mouseover.

If you need, i can post the code.
Paste the code please.
Do you have the latest version?
p3lim is offline Report comment to moderator  
Reply With Quote
Unread 02-05-12, 08:10 AM  
Coldkil
A Wyrmkin Dreamwalker
 
Coldkil's Avatar
AddOn Author - Click to view AddOns

Forum posts: 50
File comments: 148
Uploads: 2
I have an issue, the xp value won't update on my chars - the xpbar looks like full, tooltip doesn't appear and is just stays there.

Only thing i've done is to create the frame and put it on mouseover.

If you need, i can post the code.
Coldkil is offline Report comment to moderator  
Reply With Quote
Unread 12-09-10, 03:17 PM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1320
File comments: 1185
Uploads: 25
Originally posted by Solarin
Here is the section with the experience text code.

Code:
if(IsAddOnLoaded('oUF_Experience')) then
            self.Experience = createStatusbar(self, texture, nil, 4, nil, 0, .7, 1, 1)
            self.Experience:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -2)
            self.Experience:SetPoint('TOPRIGHT', self, 'BOTTOMRIGHT', 0, -2)

            self.Experience.Rested = createStatusbar(self.Experience, texture, nil, nil, nil, 0, .4, 1, .6)
            self.Experience.Rested:SetAllPoints(self.Experience)
            self.Experience.Rested:SetBackdrop(backdrop)
            self.Experience.Rested:SetBackdropColor(0, 0, 0)

            self.Experience.bg = self.Experience.Rested:CreateTexture(nil, 'BORDER')
            self.Experience.bg:SetAllPoints(self.Experience)
            self.Experience.bg:SetTexture(texture)
            self.Experience.bg:SetVertexColor(.1, .1, .1)

            self.Experience.bd = createBackdrop(self.Experience, self.Experience)

            self.Experience.text = createFont(self.Experience, "OVERLAY", font, fontsize, fontflag, 1, 1, 1)
            self.Experience.text:SetPoint("CENTER")
            self.Experience.text:Hide()
            self:Tag(self.Experience.text, '[freeb:curxp] / [freeb:maxxp] - [freeb:perxp]%')

            self:SetScript("OnEnter", OnEnter)
            self:SetScript("OnLeave", OnLeave)
        end
No wonder, its hidden and only shown on an OnEnter script.
p3lim is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.