Download
(5Kb)
Download
Updated: 02-22-22 12:05 PM
Addon for:
oUF.
Compatibility:
Eternity's End (9.2.0)
Updated:02-22-22 12:05 PM
Created:unknown
Downloads:45,569
Favorites:159
MD5:

oUF Experience  Popular! (More than 5000 hits)

Version: 90200.32-Release
by: p3lim [More]

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.

It has the following features:

  • Experience/honor bar
  • Rested bar (optional)
  • Tags
  • Automatically hides under certain conditions:
    • Player has reached max level
    • Player has locked their experience gain
    • Player has reached trial account level cap
    • Player is in a vehicle
    • Player has disabled honor-tracking

For details on how to implement this in your own layout, please see the wiki:
https://github.com/p3lim-wow/oUF_Experience/wiki

Feedback

If you have a question, please use the comments section on Curse/WoWInterface.
If you would like to report a bug or contribute to the project, please follow this link to get started.

Legal

Please see the LICENSE file.

Changes in 90200.32-Release:
  • Changed: Update Interface version
Archived Files (2)
File Name
Version
Size
Author
Date
90105.31-Release
5kB
p3lim
11-03-21 12:17 PM
90100.30-Release
5kB
p3lim
07-01-21 12:08 AM


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

Forum posts: 1710
File comments: 1222
Uploads: 43
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.
Report comment to moderator  
Reply With Quote
Unread 10-16-10, 02:50 PM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member

Forum posts: 143
File comments: 433
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): ?:
Report comment to moderator  
Reply With Quote
Unread 10-16-10, 01:58 PM  
maluus
A Kobold Labourer

Forum posts: 0
File comments: 1
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?
Report comment to moderator  
Reply With Quote
Unread 10-16-10, 09:14 AM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1710
File comments: 1222
Uploads: 43
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
Report comment to moderator  
Reply With Quote
Unread 10-16-10, 08:42 AM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member

Forum posts: 143
File comments: 433
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)
Report comment to moderator  
Reply With Quote
Unread 10-15-10, 06:51 AM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1710
File comments: 1222
Uploads: 43
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)
Report comment to moderator  
Reply With Quote
Unread 10-14-10, 08:45 PM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member

Forum posts: 143
File comments: 433
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
Report comment to moderator  
Reply With Quote
Unread 10-14-10, 11:42 AM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1710
File comments: 1222
Uploads: 43
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
Report comment to moderator  
Reply With Quote
Unread 10-13-10, 05:24 PM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member

Forum posts: 143
File comments: 433
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
Report comment to moderator  
Reply With Quote
Unread 09-06-10, 09:01 PM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1710
File comments: 1222
Uploads: 43
Cataclysm branch can be found on github, needs testing!

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

Forum posts: 1710
File comments: 1222
Uploads: 43
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.
Report comment to moderator  
Reply With Quote
Unread 09-08-09, 11:11 AM  
Icerat
A Fallenroot Satyr

Forum posts: 28
File comments: 46
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.
Report comment to moderator  
Reply With Quote
Unread 09-07-09, 04:17 PM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1710
File comments: 1222
Uploads: 43
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.
Report comment to moderator  
Reply With Quote
Unread 09-07-09, 11:23 AM  
Icerat
A Fallenroot Satyr

Forum posts: 28
File comments: 46
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.
Report comment to moderator  
Reply With Quote
Unread 09-06-09, 07:24 AM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1710
File comments: 1222
Uploads: 43
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
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.