Thread Tools Display Modes
12-11-05, 01:32 AM   #1
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
WDN ExpBarMod

wdnExpBarMod
------------------------------------------------------------------------------
This is a fairly simple experience bar, designed with the intention of providing a small bar that displays your experience, percent of xp, and other informatin via tooltip. I didn't want to add too many features as there are already plenty of other bars out there with advanced features.

At the moment my bar simple displays your level, changes color based on your rest experience, and flashes when you gain experience or when you level up.

Bear in mind that this does NOT replace or remove the default experience bar. If you have not disabled or hidden it via another addon, but would like to remove it, you will need to find another addon to do that for you. I typically use CTmod for certain things, and one of their features is to optionally disable said experience bar. There are other addons that do the same. I also chose to leave that disable function out, as including it would prevent people that DO want both enabled, not to do so.
------------------------------------------------------------------------------
Versions

* 0.10.11000b - added the ability to disable the default experience bar
* 0.9.10900 - updated toc version, moved script loading to the toc file
* 0.8.1800 - overhauled the look and feel of the bar, added dropdown options
* 0.7.1800 - added animation features, further optimizations
* 0.6.1800 - fixed a bug that seeped through my testing - thanks Cair!
* 0.5.1800 - fixed a minor rested xp update glitch. Enabled dragging of the entire bar
* 0.4.1800 - updated the graphic for better usability / appearance
* 0.3.1800 - added level indicator to xp bar. Disabled level on the default level indicator.
* 0.2.1800 - converted original design to use casting bar graphics
* 0.1.1800 - initial design, not released publicly. Simple but effective...

Special Thanks

* Cairenn for testing and providing good feedback
* futrtrubl for trading ideas on both of our experience bars

Download Located Here: http://www.wowinterface.com/download...fo.php?id=4396

Last edited by Beladona : 03-08-06 at 01:48 PM.
  Reply With Quote
12-12-05, 11:07 AM   #2
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
updated to version 0.3.1800

This version includes a level indicator...
  Reply With Quote
12-12-05, 10:29 PM   #3
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
updated to version 0.4.1800, now with prettier frame graphic
  Reply With Quote
12-13-05, 12:33 PM   #4
neriak_x
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 32
nice one, it's looking better now. could you tweak it so the level is just shown inside the bar as a simple number instead of adding an extra frame ?
__________________
~ N: "All Semicolons must die!" ~R: "Yay!"
Neriak's Portal
  Reply With Quote
12-13-05, 01:09 PM   #5
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
future version will have an option for that. Right now though I opted to keep it on the side, with the percentage in the bar.

There is a slight bug I am working to correct right now, in which rest xp doesn't change the bar color immediately when you first get rest xp. Mistake on my part by not registering an event I should have...

Will have the new version up shortly. Need to test it, along with a couple optimizations I made.
  Reply With Quote
12-13-05, 02:36 PM   #6
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
fixed the rested xp bug, and also enabled dragging from any place on the bar (hi Cair /wink)

Next version you should begin to see animation features. After that will come options and configurations.
  Reply With Quote
12-14-05, 05:57 PM   #7
Jedis
A Defias Bandit
Join Date: Dec 2005
Posts: 3
Getting all info to display in tooltip/get rid of mouse over

I wanted all of the tooltip info in the main window and the mouse over turned off. I also turned off the level display

I was able to do it myself, but for some reason now my level does not show in the regular play info window. It just has a "--".

Also, I wanted to make the font size smaller.. is this possible too?

Any ideas?

lua:
Code:
wdnExpBarMod = {
-- functions --------------------------------------------------------------------------------
	OnLoad = function()
		this:RegisterEvent( "PLAYER_ENTERING_WORLD" );
		this:RegisterEvent( "PLAYER_LEVEL_UP" );
		this:RegisterEvent( "PLAYER_XP_UPDATE" );
		this:RegisterEvent( "PLAYER_UPDATE_RESTING" );
		this:RegisterEvent( "UPDATE_EXHAUSTION" );
		this:RegisterEvent( "VARIABLES_LOADED" );
	end;
	OnEvent = function()
		this:SetMinMaxValues(0, UnitXPMax("player"));
		this:SetValue(UnitXP("player"));
		if( GetXPExhaustion("player") ~= nil ) then this:SetStatusBarColor(0, 0.7, 1.0); else 

this:SetStatusBarColor(0.9, 0, 1.0); end
		local ratio = (UnitXP("player")/UnitXPMax("player"));
		local text = format("%d%% (%d/%d)",ratio*100,UnitXP("player"),UnitXPMax("player")) .. "|c005D8FF3 + 

" .. GetXPExhaustion("player") .. "|r"
		wdnExpBarFrameText:SetText(text);
	end;
	OnDrag = function(mode)
		if (mode == "start") then this:StartMoving(); else this:StopMovingOrSizing(); end
	end;
};
-- hookers -------------------------------------------------------------------------------
wdnExpBarMod.oldPlayerEvent = PlayerFrame_OnEvent;
wdnExpBarMod.newPlayerEvent = function(event)
	wdnExpBarMod.oldPlayerEvent(event);
	PlayerLevelText:SetText("--");
end;
PlayerFrame_OnEvent = wdnExpBarMod.newPlayerEvent;
xml:
Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\..\FrameXML\UI.xsd">
	<Script file="wdnExpBarMod.lua"/>
	<Frame name="wdnExpBarFrame" drawLayer="BORDER" toplevel="true" parent="UIParent" movable="true">
		<Size><AbsDimension x="340" y="13"/></Size>
		<Anchors><Anchor point="CENTER" relativeTo="UIParent" relativePoint="CENTER"/></Anchors>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="wdnExpBarFrameText" 

inherits="GameFontHighlight"><Size><AbsDimension x="340" y="40"/></Size><Anchors><Anchor point="CENTER" 

relativePoint="CENTER"><Offset><AbsDimension x="12" y="1"/></Offset></Anchor></Anchors></FontString>
			</Layer>
		</Layers>
		<Frames>
			<StatusBar name="wdnExpBarFrameStatus" drawLayer="BORDER" frameStrata="LOW" 

parent="wdnExpBarFrame">
				<Size><AbsDimension x="200" y="13"/></Size>
				<Anchors><Anchor point="CENTER" relativePoint="CENTER"><Offset><AbsDimension x="9" 

y="0"/></Offset></Anchor></Anchors>
				<Layers><Layer level="BACKGROUND"><Texture setAllPoints="true"><Color r="0" g="0" 

b="0" a="0.5"/></Texture></Layer></Layers>
				<Scripts>
					<OnLoad>wdnExpBarMod.OnLoad();</OnLoad>
					<OnEvent>wdnExpBarMod.OnEvent();</OnEvent>
				</Scripts>
				<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
				<BarColor r="1.0" g="0.7" b="0.0"/>
			</StatusBar>
		</Frames>
		<Scripts>
			<OnDragStart>wdnExpBarMod.OnDrag("start");</OnDragStart>
			<OnDragStop>wdnExpBarMod.OnDrag("stop");</OnDragStop>
			<OnMouseUp>wdnExpBarMod.OnDrag("stop");</OnMouseUp>
			<OnMouseDown>wdnExpBarMod.OnDrag("start");</OnMouseDown>
		</Scripts>
	</Frame>
</Ui>

Last edited by Jedis : 12-14-05 at 06:00 PM.
  Reply With Quote
12-16-05, 02:12 PM   #8
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
download my latest version, and delete the section in the lua file from -- hookers ----- down to the end of the file. That entire section is meant to get rid of or otherwise replace the level indicator.

As for changing the font size, you can try playing around with the xml file, but bear in mind that if you change the font, likely the alignment will also be off...

FYI - new version is up, complete with an animated flashon/flashoff when you get xp or level up...
  Reply With Quote
12-20-05, 11:49 PM   #9
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
0.8.1800 has been uploaded.

Overhauled the look of the bar. It no longer has the level attached to the bar, and the bar has gotten slightly longer so that it matches the exact width of the default health and power bars.

It now has a dropdown menu that you can access via right click. It allows you to enable or disable the flashing animation, as well as the ability to drag the bar. Both are enabled by default.

I am looking at adding more info to the tooltip as well. Look for another version just before christmas...
  Reply With Quote
12-29-05, 02:02 PM   #10
neriak_x
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 32
Originally Posted by Beladona
It no longer has the level attached to the bar, and the bar has gotten slightly longer so that it matches the exact width of the default health and power bars.
*cry* I had to hack the code to display the Level and XP in the bar, because I don't have any other frame showing my level anymore
On the other hand, I really love this bar. Good work, Beladona.
__________________
~ N: "All Semicolons must die!" ~R: "Yay!"
Neriak's Portal
  Reply With Quote
01-09-06, 05:50 PM   #11
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
version 0.9.10900 now released. updated the toc version, and moved the script loading to the toc file.

Next version should allow you to customize the text string, and the tooltip string (neriak_x !)
  Reply With Quote
03-08-06, 01:53 PM   #12
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
There is now an updated version available here: http://www.wowinterface.com/download...fo.php?id=4691

This is PURELY test material only. Use at your own risk, and only use it on the test server. It will NOT work on a public realm. This new version allows you to hide the experience bar via a right click option. This option is backwards compatible with the reputation bar, so the new reputation bar should still show if you turn it on.

Please post any bugs via my bug report section through the download page. You can also reach me here, but I check the bug report sections first.

I am shooting to have custom strings as an option as well before this goes live. Bear with me as my time is limited at the moment.
  Reply With Quote
06-23-06, 08:34 AM   #13
myskaal
A Murloc Raider
Join Date: May 2006
Posts: 4
Love the bar mod. It fits absolutely perfectly with my FlexBar UI set up.

Having said that, are their any plans to update this for 1.11? Nothing appears to be broken, mind you, just have the 'out-of-date" note on it.
  Reply With Quote
08-24-06, 07:13 AM   #14
Martek
A Defias Bandit
 
Martek's Avatar
Join Date: Aug 2006
Posts: 2
Great mod! Just a few suggestions...

1. I cannot turn off any of the bars. Probably user error .

2. Add a bar to display the amount of rest. Alternatively, show rest as %.

Thanks for the great work!

Martek
  Reply With Quote
08-24-06, 07:36 AM   #15
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
Originally Posted by Martek
Great mod! Just a few suggestions...

1. I cannot turn off any of the bars. Probably user error .

2. Add a bar to display the amount of rest. Alternatively, show rest as %.

Thanks for the great work!

Martek
1. turning off the bars is done via slash commands. I have plans to include a configuration ui shortly. Until then the following slash commands can be used to disable or enable each bar:

/statbars enable OR /statbars disable (DEFAULT is enable)
disable or enable the entire addon, including all bars. Individual bars retain their settings which mean that if you had the honor bar off, and the experience bar on, and you disable the entire addon, they will both be gone. But if you re-enable the entire addon, the honor bar will still be gone (settings retained) while the experience bar will show up

/statbars xp enable OR /statbars xp disable (DEFAULT is enable)
this will enable or disable the experience bar alone. You can have the experience bar off, and the honor bar on for example. I doubt you will ever need this however, unless you simply have no use for the experience bar. There is another option however for those of you who have reached level 60:

/statbars xp smart (DEFAULT is smart mode turned on)
This will turn on 'smart mode' which basically acts like the default experience bar, in that when you reach lvel 60, the experience bar simply dissapears. This will usually meet most players needs, as I see no reason a level 60 would want to see their experience bar

/statbars honor enable OR /statbars honor disable (DEFAULT is enable)
This will enable or disable the honor bar alone. You can have the honor bar off, and the experience bar on, for example.

2. Rest experience is shown via the tooltip. I will be adding a feature shortly that will allow you to customize what is shown on the bar, and probably the tooltip, via easy to use tags, sort of like bbcode in a forum post.
  Reply With Quote
08-24-06, 10:02 AM   #16
Martek
A Defias Bandit
 
Martek's Avatar
Join Date: Aug 2006
Posts: 2
Wow! Thanks for the quick response! I got the honor bar to go away.

A few more things To get all the functionality I am looking for, I also have to use 'Player Frame Meter' (http://www.curse-gaming.com/en/wow/a...amemeter.html). I'd like to use just one => yours.

Any way your mod can hide the stock XP bar?

The rest bar would be very good too I know, I know... I already mentioned it. Numbers just give me a headache. I like visual and/or percentages much better.

Thanks again!

Martek
  Reply With Quote
08-25-06, 09:08 AM   #17
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
I will definitely add the ability to hide the default bar. Should be present in the next version.

I am not sure about adding a rest bar, as it seems like "too much" for something that isn't always there. Maybe I can have some other type of display for it, that is attached to the xp bar. Will experiement with ideas. That is the one thing about my style of addon development. I tend to go for usability, without sacrificing space or simplicity. Simpler is better in my mind ;D

Last edited by Beladona : 08-25-06 at 09:11 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Released AddOns » WDN ExpBarMod


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