Download
(2 Kb)
Download
Updated: 08-30-12 06:11 AM
Addon for:
oUF.
Compatibility:
Mists of Pandaria (5.0.4)
Updated:08-30-12 06:11 AM
Created:unknown
Downloads:33,833
Favorites:167
MD5:
oUF Experience  Popular! (More than 5000 hits)
Version: 50001.12-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 is required that you have this addon updated at all times to make everything work as it should.
You can download oUF by clicking on the link located under the "Download" button on the right.


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


Note:
Wiki found on my GitHub page for basic implementation:
http://github.com/p3lim-wow/oUF_Experience/wiki
You need to add this addon to your layout's toc metadata!


Issues & Requests
To submit a bug report or feature request, please visit the Issue Tracker on my GitHub page.
Changes in 50001.12-Release
  • Use double underscores to avoid tainting blizzard
  • Remove support for oUF 1.5.x
  • Bump Interface version
Changes in 40300.11-Release
  • Add support for 1.6
  • Update game version
  • Let the packager(s) set the version number automaticly
Changes in 40200.10-Release
  • Pet experience isn't as big a deal any more
  • Update version
  • Return earlier if in a vehicle.
Changes in 40000.9-Release
  • Register the tags outside of the Enable function
  • Update version
Changes in 40000.8-Release
  • Add some basic tags
  • Update version
Changes in 40000.7-Release
  • Add a fallback texture to the Rested bar
  • Update version
Changes in 40000.6-Release
  • Clean up and update to 1.4 standard
  • Remove comments
  • Remove tooltip option
  • Update to the new override method
  • Add :ForceUpdate()
  • Back to basics
  • Sneak in a :PreUpdate()
  • Update TOC to 4.0
  • Fix some typos
  • End things early
  • Update version
Changes in 30300.5-Release
  • Clean up the act and make everything work with vehicles and other pets
  • Add embedding support
  • Stupid copy/paste
  • Update TOC version
  • Update version
Changes in 30200.4-Release
  • Let rested values go through, independant of the rested bar
  • Update version
Changes in 30200.3-Release
  • Added default texture properly
  • Pass unit for disabling
  • Add some comments
  • Update version
Changes in 30200.2-Release
  • Set version back to normal, learning by doing :/
  • Fix pet issues if layout has Rested bar enabled
  • Let the element handle the uncommon settings
  • Rename some functions
  • Pet xp bar should also replicate backdrop, if there is any
  • Just set the parent of the bg
  • Update version
Archived Files (23)
File Name
Version
Size
Author
Date
40300.11-Releas
2kB
p3lim
02-06-12 05: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 11:53 AM
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 01:36 PM
30000.26
2kB
p3lim
01-14-09 01:38 PM
30000.25
2kB
p3lim
01-13-09 01:41 PM


Post A Reply Comment Options
Old 10-16-10, 03:37 PM  
p3lim
Mmmrrrggglll
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1143
File comments: 1200
Uploads: 24
Re: experience bar doesnt show

Originally posted by maluus
Hey,

I m using caellian ui. a few months ago experience bar was showing above my player frame on mouseover. I m updating my addons regularly. now I cant see experience bar anymore. is there something wrong or things have changed and should I do something?
This is an implementation issue of a layout, issue the author of that layout instead.
p3lim is offline Report comment to moderator  
Reply With Quote
Old 10-16-10, 02:50 PM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar

Forum posts: 142
File comments: 430
Uploads: 0
Originally posted by p3lim
Yes, but always test before asking
Sorry, sometimes I'm unable to, but understood. Anyway received this error when using the below..

Code:
1x oUF_Experience-40000.9-Release\oUF_Experience.lua:112: <unnamed>:SetFrameLevel(): Passed negative frame level: -1
oUF_Experience-40000.9-Release\oUF_Experience.lua:112: in function `enable'
oUF-1.5.2\ouf.lua:260: in function `EnableElement'
oUF-1.5.2\ouf.lua:439: in function <oUF\ouf.lua:391>
(tail call): ?:
oUF-1.5.2\ouf.lua:702: in function `Spawn'
oUF_Freeb-4.1\freeb.lua:1005: in function `func'
oUF-1.5.2\ouf.lua:723: in function <oUF\ouf.lua:719>
(tail call): ?:
Toran is offline Report comment to moderator  
Reply With Quote
Old 10-16-10, 01:58 PM  
maluus
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
experience bar doesnt show

Hey,

I m using caellian ui. a few months ago experience bar was showing above my player frame on mouseover. I m updating my addons regularly. now I cant see experience bar anymore. is there something wrong or things have changed and should I do something?
maluus is offline Report comment to moderator  
Reply With Quote
Old 10-16-10, 09:14 AM  
p3lim
Mmmrrrggglll
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1143
File comments: 1200
Uploads: 24
Originally posted by Toran
Thanks. This correct?

Code:
self.Experience = createStatusbar(self.Experience, texture, nil, 4, nil, 0, .7, 1, 1)
Yes, but always test before asking
p3lim is offline Report comment to moderator  
Reply With Quote
Old 10-16-10, 08:42 AM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar

Forum posts: 142
File comments: 430
Uploads: 0
Originally posted by p3lim
the first arg in your 'createStatusBar' is the parent, use the Experience bar instead of the unitframe (self)
Thanks. This correct?

Code:
self.Experience = createStatusbar(self.Experience, texture, nil, 4, nil, 0, .7, 1, 1)
Toran is offline Report comment to moderator  
Reply With Quote
Old 10-15-10, 06:51 AM  
p3lim
Mmmrrrggglll
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1143
File comments: 1200
Uploads: 24
Originally posted by Toran
Ok, not sure what I need to do. Can you be more specific? thanks
the first arg in your 'createStatusBar' is the parent, use the Experience bar instead of the unitframe (self)
p3lim is offline Report comment to moderator  
Reply With Quote
Old 10-14-10, 08:45 PM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar

Forum posts: 142
File comments: 430
Uploads: 0
Originally posted by p3lim
Rested must have Experience as parent, I'm updating my example to reflect this
Ok, not sure what I need to do. Can you be more specific? thanks
Toran is offline Report comment to moderator  
Reply With Quote
Old 10-14-10, 11:42 AM  
p3lim
Mmmrrrggglll
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1143
File comments: 1200
Uploads: 24
Originally posted by Toran
On my lvl 80, it shows as a plain blue bar. Didn't show before on my 80. Are there new settings we need to implement? Here's my code:

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

	self.Experience.Rested = createStatusbar(self, 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)

end
Rested must have Experience as parent, I'm updating my example to reflect this
p3lim is offline Report comment to moderator  
Reply With Quote
Old 10-13-10, 05:24 PM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar

Forum posts: 142
File comments: 430
Uploads: 0
On my lvl 80, it shows as a plain blue bar. Didn't show before on my 80. Are there new settings we need to implement? Here's my code:

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

	self.Experience.Rested = createStatusbar(self, 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)

end
Toran is offline Report comment to moderator  
Reply With Quote
Old 09-06-10, 09:01 PM  
p3lim
Mmmrrrggglll
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1143
File comments: 1200
Uploads: 24
Cataclysm branch can be found on github, needs testing!

http://github.com/p3lim/oUF_Experience/tree/cata
p3lim is offline Report comment to moderator  
Reply With Quote
Old 09-08-09, 11:39 AM  
p3lim
Mmmrrrggglll
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1143
File comments: 1200
Uploads: 24
Originally posted by Icerat
Cool thanks works as intended now,

Ive been playing around with the way you show the experience bar with the rested in it and trying to auto hide it on mouse over.

The problem I'm having is the text and the green part of the bar hide on mouse over but I'm left with the rested blue bar still showing.

How can i get the bar that shows rested to hide also when i mouse over?

Code:
		if(unit == 'player' or unit == 'pet') then
		if(IsAddOnLoaded('oUF_Experience')) then
			self.Experience = CreateFrame('StatusBar', nil, self)
			self.Experience:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -10)
			self.Experience:SetPoint('TOPRIGHT', self, 'BOTTOMRIGHT', 0, -10)
			self.Experience:SetHeight(11)
			self.Experience:SetStatusBarTexture(texture2)
			self.Experience:SetStatusBarColor(0.15, 0.7, 0.1)
			self.Experience.Tooltip = true

			self.Experience.Rested = CreateFrame('StatusBar', nil, self)
			self.Experience.Rested:SetAllPoints(self.Experience)
			self.Experience.Rested:SetStatusBarTexture(texture2)
			self.Experience.Rested:SetStatusBarColor(0, 0.4, 1, 0.6)
			self.Experience.Rested:SetBackdrop(backdrop)
			self.Experience.Rested:SetBackdropColor(0, 0, 0)
			
			self.Experience.Text = self.Experience:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmall')
			self.Experience.Text:SetPoint('CENTER', self.Experience)

			self.Experience.bg = self.Experience.Rested:CreateTexture(nil, 'BORDER')
			self.Experience.bg:SetAllPoints(self.Experience)
			self.Experience.bg:SetTexture(0.3, 0.3, 0.3)
			
			self.Experience:SetScript ('OnEnter', function(self) self:SetAlpha(1) end)
			self.Experience:SetScript ('OnLeave', function(self) self:SetAlpha(0) end)

			
		end
		end
I'm sorry if its a little a stupid question, I'm still learning.
If you create a rested bar you must know that it will be above the normal bar.
You have to parent text etc to it, aswell to make the OnEnter/OnLeave scripts on it, though to hide the parent, not the rested bar.

This is a very tacky way to do it, but blizzard doesnt allow multi-bars.
Last edited by p3lim : 09-08-09 at 11:39 AM.
p3lim is offline Report comment to moderator  
Reply With Quote
Old 09-08-09, 11:11 AM  
Icerat
A Fallenroot Satyr

Forum posts: 28
File comments: 47
Uploads: 0
Originally posted by p3lim
This is not intended, and a fix for it is on its way.
Cool thanks works as intended now,

Ive been playing around with the way you show the experience bar with the rested in it and trying to auto hide it on mouse over.

The problem I'm having is the text and the green part of the bar hide on mouse over but I'm left with the rested blue bar still showing.

How can i get the bar that shows rested to hide also when i mouse over?

Code:
		if(unit == 'player' or unit == 'pet') then
		if(IsAddOnLoaded('oUF_Experience')) then
			self.Experience = CreateFrame('StatusBar', nil, self)
			self.Experience:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -10)
			self.Experience:SetPoint('TOPRIGHT', self, 'BOTTOMRIGHT', 0, -10)
			self.Experience:SetHeight(11)
			self.Experience:SetStatusBarTexture(texture2)
			self.Experience:SetStatusBarColor(0.15, 0.7, 0.1)
			self.Experience.Tooltip = true

			self.Experience.Rested = CreateFrame('StatusBar', nil, self)
			self.Experience.Rested:SetAllPoints(self.Experience)
			self.Experience.Rested:SetStatusBarTexture(texture2)
			self.Experience.Rested:SetStatusBarColor(0, 0.4, 1, 0.6)
			self.Experience.Rested:SetBackdrop(backdrop)
			self.Experience.Rested:SetBackdropColor(0, 0, 0)
			
			self.Experience.Text = self.Experience:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmall')
			self.Experience.Text:SetPoint('CENTER', self.Experience)

			self.Experience.bg = self.Experience.Rested:CreateTexture(nil, 'BORDER')
			self.Experience.bg:SetAllPoints(self.Experience)
			self.Experience.bg:SetTexture(0.3, 0.3, 0.3)
			
			self.Experience:SetScript ('OnEnter', function(self) self:SetAlpha(1) end)
			self.Experience:SetScript ('OnLeave', function(self) self:SetAlpha(0) end)

			
		end
		end
I'm sorry if its a little a stupid question, I'm still learning.
Icerat is offline Report comment to moderator  
Reply With Quote
Old 09-07-09, 04:17 PM  
p3lim
Mmmrrrggglll
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1143
File comments: 1200
Uploads: 24
Originally posted by Icerat
I removed
Code:
self.Experience:EnableMouse(true)
but it didn't make any difference i still get no rested line

EDIT: Only way i could get the tool tip to display the rested line was to add
Code:
self.Experience.Rested = CreateFrame('StatusBar', nil, self)
and then it would show the amount of rested line with no problems.

I now have
Code:
if(IsAddOnLoaded("oUF_Experience") and (unit == "player" or unit == "pet")) then
		self.Experience = CreateFrame("StatusBar", nil, self)
		self.Experience:SetPoint("BOTTOM", self, "TOP", 0, 5)
		if(unit == "pet") then
			self.Experience:SetPoint("BOTTOM", self, "TOP", 0, -31)
		end
		self.Experience:SetHeight(6)
		self.Experience:SetWidth((unit == "pet") and 110 or width)		
		self.Experience:SetStatusBarTexture(texture2)
		self.Experience:SetBackdrop(backdrop)
		self.Experience:SetBackdropColor(0,0,0)	
		self.Experience.PostUpdate = PostUpdateExperience		
		
		self.Experience.Rested = CreateFrame('StatusBar', nil, self)

		self.Experience.bg = self.Experience:CreateTexture(nil, "BORDER")
		self.Experience.bg:SetAllPoints(self.Experience)
		self.Experience.bg:SetTexture(0.3, 0.3, 0.3)
		
		self.Experience:SetScript ('OnEnter', function(self) self:SetAlpha(1) end)
		self.Experience:SetScript ('OnLeave', function(self) self:SetAlpha(0) end)
		self.Experience.Tooltip = true	
	end
Is this correct way to do it, sorry for all the questions i'm learning and its fun
This is not intended, and a fix for it is on its way.
p3lim is offline Report comment to moderator  
Reply With Quote
Old 09-07-09, 11:23 AM  
Icerat
A Fallenroot Satyr

Forum posts: 28
File comments: 47
Uploads: 0
Originally posted by p3lim
Works fine for me atleast, though you dont need to enable the mouse, as using .Tooltip does that for you
I removed
Code:
self.Experience:EnableMouse(true)
but it didn't make any difference i still get no rested line

EDIT: Only way i could get the tool tip to display the rested line was to add
Code:
self.Experience.Rested = CreateFrame('StatusBar', nil, self)
and then it would show the amount of rested line with no problems.

I now have
Code:
if(IsAddOnLoaded("oUF_Experience") and (unit == "player" or unit == "pet")) then
		self.Experience = CreateFrame("StatusBar", nil, self)
		self.Experience:SetPoint("BOTTOM", self, "TOP", 0, 5)
		if(unit == "pet") then
			self.Experience:SetPoint("BOTTOM", self, "TOP", 0, -31)
		end
		self.Experience:SetHeight(6)
		self.Experience:SetWidth((unit == "pet") and 110 or width)		
		self.Experience:SetStatusBarTexture(texture2)
		self.Experience:SetBackdrop(backdrop)
		self.Experience:SetBackdropColor(0,0,0)	
		self.Experience.PostUpdate = PostUpdateExperience		
		
		self.Experience.Rested = CreateFrame('StatusBar', nil, self)

		self.Experience.bg = self.Experience:CreateTexture(nil, "BORDER")
		self.Experience.bg:SetAllPoints(self.Experience)
		self.Experience.bg:SetTexture(0.3, 0.3, 0.3)
		
		self.Experience:SetScript ('OnEnter', function(self) self:SetAlpha(1) end)
		self.Experience:SetScript ('OnLeave', function(self) self:SetAlpha(0) end)
		self.Experience.Tooltip = true	
	end
Is this correct way to do it, sorry for all the questions i'm learning and its fun
Last edited by Icerat : 09-07-09 at 12:58 PM.
Icerat is offline Report comment to moderator  
Reply With Quote
Old 09-06-09, 07:24 AM  
p3lim
Mmmrrrggglll
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1143
File comments: 1200
Uploads: 24
Originally posted by Icerat
I get the 2 lines but no rested xp I know the toon in the pic has 54% rested xp.



I don't know a huge amount about lua but getting there very slowly,i use the following to get my xp bar hidden and how i want it.

Code:
if(IsAddOnLoaded("oUF_Experience") and (unit == "player" or unit == "pet")) then
		self.Experience = CreateFrame("StatusBar", nil, self)
		self.Experience:SetPoint("BOTTOM", self, "TOP", 0, 5)
		if(unit == "pet") then
			self.Experience:SetPoint("BOTTOM", self, "TOP", 0, -31)
		end
		self.Experience:SetHeight(6)
		self.Experience:SetWidth((unit == "pet") and 110 or width)		
		self.Experience:SetStatusBarTexture(texture2)
		self.Experience:SetBackdrop(backdrop)
		self.Experience:SetBackdropColor(0,0,0)	
		self.Experience.PostUpdate = PostUpdateExperience		
		self:RegisterEvent("UPDATE_EXHAUSTION", PostUpdateExperience)
		
		self.Experience.bg = self.Experience:CreateTexture(nil, "BORDER")
		self.Experience.bg:SetAllPoints(self.Experience)
		self.Experience.bg:SetTexture(0.3, 0.3, 0.3)
		
		self.Experience:SetScript ('OnEnter', function(self) self:SetAlpha(1) end)
		self.Experience:SetScript ('OnLeave', function(self) self:SetAlpha(0) end)
		self.Experience:EnableMouse(true)
		self.Experience.Tooltip = true	
	end
Is the correct way to do it?
Works fine for me atleast, though you dont need to enable the mouse, as using .Tooltip does that for you
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.