Download
(60Kb)
Download
Updated: 06-30-11 01:16 PM
Addon for:
LitePanels.
Pictures
File Info
Updated:06-30-11 01:16 PM
Created:10-12-09 02:10 AM
Downloads:18,841
Favorites:113
MD5:

LiteStats  Popular! (More than 5000 hits)

Version: 40200.1
by: Katae [More]

Proof of concept plugin for LitePanels, which you will need installed.

To install, rename config_default.lua to config.lua.

/litestats (/lstats) - In-game functionality help.

Another stats mod? Why?
This addon was initially created to test LitePanels to make sure it was bug free. There are a lot of addons like this out there, but none that had the capabilities that I wanted from an addon of this type.

Missing a nifty feature X from stats mod Y?
Ask and ye shall receive!

~ modules ~

#Memory: Right click collects Lua garbage. Max number of addons can be set in the config.

#Durability: Armored man can be configured to be hidden or shown. Armor durability percentages scale from green (100%) to yellow (50%) to red (0%). Auto-repair may be toggled by right-clicking the text, guild funds can be configured in the config. Shift-click or Middle-click opens an equipment set switching menu.

#Gold: Saves data on the amount of gold you have server-wide. Right-clicking the text toggles auto-vendoring trash loot. A junk exceptions list can be configured via the /junk command.

#Clock: Left-click toggles the game calendar, right-click toggles time manager. Time manager settings apply.

#Location/Coords: Player coords are displayed on the tooltip or as a separate module. Clicking toggles the world map. Shift-click inserts the coordinates into chat.

#Ping: Displays a class colored text with who pinged the minimap!

#DPS: May be configured to show/hide on activity.

#Guild/Friends: Online count text including members/friends online tooltip with right-click sorting (guild only). Holding alt shows notes and ranks.

#Talents: Talent spec display with ability to right-click to cast dual spec.

#Character Stats: User's choice of stats configured in a [tag] format. Dual spec support.

#Experience/Played/Reputation: A three-in-one module with XP tracking, playtime tracking, and a reputation text display. The three modes can be cycled through by right-clicking.

Also: Latency, FPS, Mail, and Bag space.


Note that some modules may be disabled by default. Simply head to the config file and enable as you see fit!

» locales


40200.1 -- 2011.06.30
- Fixed a couple bugs that crept in with 4.2 API changes.
- 4.2 toc update.

40100.1 -- 2011.06.12
- Fixed a 4.1 bug in the DPS module that was breaking it.
- Implemented 'World' latency. Text shows the greater of home or world. Latency module given tooltip to display both.
- 4.1 toc update.

40000.5 -- 2011.03.12
- Added average ilvl to the durability tooltip.
- Friends list module was not updating when BN friends list changed.
- Explicitly converted 'lastkill' and 'lastquest' to a number in case it was being interpreted as a string. May have been causing some errors.

40000.4 -- 2011.02.15
- Fixed clock bug and added the Tol Barad timer. (donjon & dutorien)
- Moved around the default location of modules in the config in relation to the default minimal.
- Disabled the Coords, Talent, and Stats modules by default.
- Player name is no longer hidden in the guild module.
- Default minimap zone text is now hidden when the Location module is enabled.
- DPS module, if set to do so, will now hide when inactive after 10 seconds. DPS value can now be shortened (15.2k).

40000.3 -- 2010.10.24
- Minor code cleanup.
- Fixed issue where b.net friends' real names were not showing up by holding alt if the person didn't have a note.

40000.2 -- 2010.10.18
- Removed talent spam filtering, obsolete.
- Fixed bug equipmentManager bug. (thanks lainbh)
- Guild module now opens the new guild frame. (thanks lainbh)
- Friends module now shows Battle.net friends. Holding alt will show the player's real name while they're logged into WoW.
- Fixed watched currency icon.

40000.1 -- 2010.10.13
- 4.0 toc update.
- Ammo module obsolete, removed.
- Tracking module obsolete, removed.
- Talent module bugs squashed.
- Bug with the default clock not hiding correctly.

30300.9 -- 2010.08.13
- Enabled ability to set font to each stat individually. Simply use the following attributes in the individual stat settings: font, color, size, alpha, outline, and/or shadow.

30300.8 -- 2010.08.04
- Added Korean (koKR) locale. Updated Spanish (esES) locale.

0.9.10a -- 2010.01.29
- Localization updates: frFR added, complete; esES added, partial; deDE updated.

0.9.10 -- 2010.01.29
- Added [color] tag, for a gradient color code, to latency and durability modules.
- Added latency and fps to the memory tooltip.
- Hidden addons in the memory module, or hidden guild mates in the guild module can now be exposed by holding the Alt key.
- Faction name subs config added (faction_subs).
- Faction tooltip with basic info added.
- Localization updates. zhTW added, partial.

0.9.9 -- 2010.01.08
- ruRU and deDE localizations added. http://wow.curseforge.com/addons/litepanels/localization/
- Commented out d/h/m/s variables in experience module, customize by uncommenting.
- Changed default font to a more universal locale friendly one.
- Added ammo module by request. Enabled only on hunters by default.
- Added reputation watcher to experience module. Change format with the new faction_fmt variable.
- Left-click now cycles between experience, time played, and reputation.
- Experience module variable changes: normal_fmt -> xp_normal_fmt, rested_fmt -> xp_rested_fmt, maxlevel_fmt -> played_fmt
- Moved LPSTAT_SUBS table to Talents.name_subs in the module config.

0.9.8a -- 2009.12.15
- Small variable bug fix in experience module. Forgot to document changing the variable Experience.fmt to Experience.normal_fmt.

0.9.8 -- 2009.12.14
- Added in-combat hiding options for all or specific stats.
- Equipment set switching menu added to durability module. Shift-click or Middle-click opens it.

0.9.7a -- 2009.12.08
- Fixed error when config.lua isn't installed.

0.9.7 -- 2009.12.08
- 3.3 toc update.
- Renamed default config file to config_default.lua. Config now installed by changing the name to config.lua.
- Renamed Experience.fmt variable to Experience.normal_fmt
- Added location module's chat coords functionality to the coords module.
- Rewrote the coords module. Less buggy now.
- Added memory gradient coloring in memory tooltip.
- Modules anchored to a disabled module will no longer be hidden.
- Experience module and tags revamped, please see new config for changes.
- Playtime added to experience module, hold alt to see all character's total time played (default when max level).
- Minor time format changes (#d #h #m #s).
- Asterisk next to grouped friend/guildies is now colored green if in player's current zone, orange if not.
- Added /lstats command. Lists tips on how to use various module functionalities.

0.9.6c -- 2009.11.12
- Reverted last revision's "icon_size" setting changes back to "iconsize". This was causing a little confusion.
- Tracking icon bug fixed.
- Removed coord tracking inside instances. This was causing the world map to hide itself when opened.

0.9.6b -- 2009.11.11
- Added global tooltip icon setting (LTIPICONSIZE)
- Added icon tag to tracking module.

0.9.6a -- 2009.11.11
- Various bug fixes
- Class names can now be used in profiles.

0.9.6 -- 2009.11.11
- Added character stats module. Two strings available for dual specs, configurable by tags. Tag list is in config.
- Added experience module, tag configurable. Basic, much more functionality is planned in the future.
- Added coordinates module (off by default), location module tooltip retains coord functionality.
- Added an asterisk to friends and guild members that are in your group or raid.
- Added a default guild roster sorting setting.
- Tracked currencies added to the gold module. Left-click now opens currencies tab.
- Added the default UI mail tooltip to the mail module.

0.9.5a -- 2009.11.04
- Fixed a bug with class localizations in the friends module.

0.9.5 -- 2009.11.04
- Moved all of the configuration variables to config.lua. Included a string class coloring function.
- Guild list tooltip added to the guild module. Right-click cycles sorting name/level/class/zone, shift right-click reverses the current sort. Hold the Alt key to view or sort by notes and ranks.
- Friends list tooltip added to the friends module. Hold the Alt key to view notes.
- Reworked the clock module. The clock display now reflects the settings in the Time Manager (right-click).
- Memory module will now display in KB when below 1MB.
- Bugs in the talents module squashed.
- Made changes to string format configs dealing with numbers, allowing for more control over decimals.
- Stat building structure changed, see NewStat().

0.9.4 -- 2009.10.29
- Fixed a bug in the clock module.
- Added icon tag and chat filter to the talents module.

0.9.3 -- 2009.10.25
- Moved autosell/repair default savedvars to set themselves on login.
- 24-hour option added to the Clock module.
- Inventory repairs can now be ignored/unignored via the ignore_inventory option.
- Added guild and friends modules. Clicking will toggle either the guild or friends/ignore list.
- Added bag space module. Clicking opens/closes all bags.
- Added talents module. Clicking swaps spec if dual spec is learned, right-click opens the talent UI.
- Provided a commented stat template near the end of core.lua.

0.9.2 -- 2009.10.13
- Added a junk profit chat printout. Chat gold format changed.

0.9.1 -- 2009.10.13
- Removed some personal tweaks I forgot to remove in the release.
- Fixed a bug with profiles and moved them to a different file, profiles.lua
- Added variable for changing the number of letters the location text is truncated by, 0 disables this feature.
- Option for displaying local time added.
- Added chat syntax explanation for /junk.
- Tooltip click polishing.
- Default for DPS hide_inactive enabled.
- Added coords to the location tooltip, auto-updates. Shift-clicking location text will insert the player's zone and coords into the chat edit box.
- Memory tooltip now auto-updates while hovered.
- Included 04b03 font. http://www.dsg4.com/04/extra/bitmap/index.html

0.9 -- 2009.10.12
- Initial release.
Post A Reply Comment Options
Unread 10-24-09, 09:08 AM  
Dajova
A Wyrmkin Dreamwalker
 
Dajova's Avatar
AddOn Author - Click to view AddOns

Forum posts: 58
File comments: 787
Uploads: 5
Something i've noticed about the auto-repair feature is that it doesn't repair the equipments you have in your inventory, only what you have on yourself. This is specially useful for hybrid classes that has more than one role in a raid (like a shaman, you can be invited as dps, but then be forced to go healer at some point).
__________________
Livestream | Twitter | YouTube
Report comment to moderator  
Reply With Quote
Unread 10-24-09, 04:14 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
That's intentional, but I could add an option to repair all or only equipped.
Originally posted by richerich
Something i've noticed about the auto-repair feature is that it doesn't repair the equipments you have in your inventory, only what you have on yourself. This is specially useful for hybrid classes that has more than one role in a raid (like a shaman, you can be invited as dps, but then be forced to go healer at some point).
Report comment to moderator  
Reply With Quote
Unread 10-25-09, 08:04 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Added guild/friends, bag space, and talent spec modules with 0.9.3. Sorry about not adding XP and mail yet, but I promise that it's coming
Report comment to moderator  
Reply With Quote
Unread 10-25-09, 10:03 PM  
alimjocox
A Warpwood Thunder Caller
AddOn Author - Click to view AddOns

Forum posts: 96
File comments: 68
Uploads: 2
thx alot for the update anyway to outline certain things? lets say Location or Clock? without outlining the rest of the stats?
Last edited by alimjocox : 10-25-09 at 10:03 PM.
Report comment to moderator  
Reply With Quote
Unread 10-25-09, 10:27 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
The font config is made for convenience, you can easily go down to the modules you want to customize directly and, in the instance of the Location outline, change outline = s.outline to outline = 1.

Other things, such as size, color, etc., can be changed much the same way.

Originally posted by alimjocox
thx alot for the update anyway to outline certain things? lets say Location or Clock? without outlining the rest of the stats?
Report comment to moderator  
Reply With Quote
Unread 10-26-09, 01:29 PM  
donjon
A Kobold Labourer

Forum posts: 0
File comments: 9
Uploads: 0
first thx for your work i really appreciate it.
slowly replacing all my FuBar and LDB addons for this single one.

so whilst editing & configuring i thought it would be neat to have an icon for the talents module
so heres my suggestion
add this to the list of "tags" for the talent module (in the OnEvent function of it)

replace the onevent with this:
Code:
local function OnEvent(self, event)
	if event == "PLAYER_ENTERING_WORLD" then
		self:RegisterEvent'PLAYER_TALENT_UPDATE'
	elseif event == "PLAYER_LEAVING_WORLD" then
		self:UnregisterEvent'PLAYER_TALENT_UPDATE'
	else	
		if GetNumTalentTabs() == 0 then return end
		self.talents = {{},{}}
		for i = 1, GetNumTalentGroups() do
			local tal, pts, name = self.talents[i], -1
			for tree = 1, GetNumTalentTabs() do
				tinsert(tal, {GetTalentTabInfo(tree,nil,nil,i)})
				if tal[tree][3] ~= 0 and tal[tree][3] > pts then
					name, icon, pts = {tal[tree][1],tree}, tal[tree][2], tal[tree][3]
				end
			end
			if not name then 
				name = {"No Talents"}
				icon = "Interface\\Icons\\INV_Misc_QuestionMark"
			end
			tinsert(tal, name)
			if i == GetActiveTalentGroup() then
				self.text:SetText(modules.Talents.fmt:gsub("%[(.-)%]", {
					name = name[1], shortname = name[1]:gsub(".*",talent_subs),
					spec = format(modules.Talents.spec_fmt,tal[1][3],tal[2][3],tal[3][3]), 
					icon = format("\124T%s:" .. s.size * 1.3 .. "::0:-2\124t",icon)
				}))
				tinsert(tal, 1)
			end
		end			
	end
end
so now its possible to use "[icon]" as a Tag for the Talents fmt.

AND i am working on the ability to supress the spam (with an On & Off switch)

================================================================
EDIT:
Got the spam filtering to work
I'm just gonna spam the whole Talent Module cuz it's the easiest ^^
Feel free to implement if you like it.
Don't forget to define modules.Talents.hide_spam in the config of the modules!

Locals and Functions needed
Code:
-- ================= Talent Spam Filter Stuff ================

-- Dual Spec Spell Names
local SpecSpellPrimary = GetSpellInfo(63645)
local SpecSpellSecondary = GetSpellInfo(63644)

-- Time variables for the temporary Supressing
local SpecSwitchStart = 0

-- Spam patterns 
local SpecSpam1 = string.gsub(ERR_LEARN_ABILITY_S:gsub('%.', '%.'), '%%s', '(.*)')
local SpecSpam2 = string.gsub(ERR_LEARN_SPELL_S:gsub('%.', '%.'), '%%s', '(.*)')
local SpecSpam3 = string.gsub(ERR_SPELL_UNLEARNED_S:gsub('%.', '%.'), '%%s', '(.*)')

-- Our chat filter function.
local function FilterTalentSpam(self, event, msg)
	-- You have unlearned soandso.
	-- You have learned a new spell: soandso.
	-- You have learned a new ability: soandso.
	if (SpecSwitchStart > GetTime() - 8) and (msg:find(SpecSpam1) ~= nil or msg:find(SpecSpam2) ~= nil or msg:find(SpecSpam3) ~= nil) then
		return true
	end
end
-- ================================================================

The Module (with the Icon Tag already implemented)
Code:
--  Talents
m = modules.Talents; if m and m.enabled then
local function OnEvent(self, event, ...)
	if event == "PLAYER_ENTERING_WORLD" then
		self:RegisterEvent'PLAYER_TALENT_UPDATE'
	elseif event == "PLAYER_LEAVING_WORLD" then
		self:UnregisterEvent'PLAYER_TALENT_UPDATE'
	elseif event == "UNIT_SPELLCAST_START" then
		local unit, spellName = ...
		if unit == "player" and (spellName == SpecSpellPrimary or spellName == SpecSpellSecondary) then
			SpecSwitchStart = GetTime()
		end
	else	
		if GetNumTalentTabs() == 0 then return end
		self.talents = {{},{}}
		for i = 1, GetNumTalentGroups() do
			local tal, pts, name = self.talents[i], -1
			for tree = 1, GetNumTalentTabs() do
				tinsert(tal, {GetTalentTabInfo(tree,nil,nil,i)})
				if tal[tree][3] ~= 0 and tal[tree][3] > pts then
					name, icon, pts = {tal[tree][1],tree}, tal[tree][2], tal[tree][3]
				end
			end
			if not name then 
				name = {"No Talents"}
				icon = "Interface\\Icons\\INV_Misc_QuestionMark"
			end
			tinsert(tal, name)
			if i == GetActiveTalentGroup() then
				self.text:SetText(modules.Talents.fmt:gsub("%[(.-)%]", {
					name = name[1], shortname = name[1]:gsub(".*",talent_subs),
					spec = format(modules.Talents.spec_fmt,tal[1][3],tal[2][3],tal[3][3]), 
					icon = format("\124T%s:" .. s.size * 1.3 .. "::0:-2\124t",icon)
				}))
				tinsert(tal, 1)
			end
		end	
	end
end
lpanels:CreateLayout("Talents", {{
	name = "Talents", anchor_frame = m.anchor_frame, anchor_to = m.anchor_to, anchor_from = m.anchor_from,
	x_off = m.x_off, y_off = m.y_off, strata = "HIGH", level = 99,-- height = 11,
	text = { font = s.font, color = s.color, size = s.size, alpha = s.alpha, outline = s.outline, shadow = s.shadow },
	OnLoad = function(self)
		self:RegisterEvent'PLAYER_LOGIN'
		self:RegisterEvent'PLAYER_TALENT_UPDATE'
		self:RegisterEvent'CHARACTER_POINTS_CHANGED'
		self:RegisterEvent'PLAYER_ENTERING_WORLD'
		self:RegisterEvent'PLAYER_LEAVING_WORLD'
		self:RegisterEvent'UNIT_SPELLCAST_START'
		if modules.Talents.hide_spam then
			ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", FilterTalentSpam)
		end
	end,
	OnEvent = OnEvent,
	OnUpdate = function(self) if GetNumTalentTabs() ~= 0 then self:SetScript("OnUpdate",nil); OnEvent(self) end end,
	OnEnter = function(self)
		if UnitLevel'player' >= 40 then
			GameTooltip:SetOwner(self, modules.Talents.tip_anchor)
			GameTooltip:ClearLines()
			GameTooltip:AddLine("Talent Specs",tthead.r,tthead.g,tthead.b)
			GameTooltip:AddLine' '
			for i = 1, GetNumTalentGroups() do
				local tal = self.talents[i]
				local tree = tal[4][2]
				local name, icon, talents = tal[tree][1], tal[tree][2], format("%d/%d/%d",tal[1][3],tal[2][3],tal[3][3])
				if tal[5] then r,g,b = 0.3,1,0.3 else r,g,b = 0.5,0.5,0.5 end
				GameTooltip:AddDoubleLine(format("\124T%s:19\124t %s %s", icon, name:gsub(".*",talent_subs), talents),i==1 and "Primary" or "Secondary",1,1,1,r,g,b)
			end
			GameTooltip:Show()
		end
	end,
	OnLeave = HideTT,
	OnClick = function(_,b)
		if b == "LeftButton" and GetNumTalentGroups() > 1 then
			SetActiveTalentGroup(3-GetActiveTalentGroup())
		elseif b == "RightButton" then
			ToggleTalentFrame()
		end
	end
}}) end
------------------------------------------

PS: If it's coded bad, i'm sorry. I've just started to fool around with lua/addons since 2 weeks and i've been going through loads of Code to learn as much as I can.
Last edited by donjon : 10-26-09 at 02:48 PM.
Report comment to moderator  
Reply With Quote
Unread 10-26-09, 02:42 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Nice call on the icon tag, and I was meaning to add a filter for the spam. Looks good!
Originally posted by donjon
so now its possible to use "[icon]" as a Tag for the Talents fmt.

AND i am working on the ability to supress the spam (with an On & Off switch)
Last edited by Katae : 10-26-09 at 02:43 PM.
Report comment to moderator  
Reply With Quote
Unread 10-28-09, 02:19 PM  
archiv
Guest

Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
why do we need LitePanels? no way to get this as standalone?
Report comment to moderator  
Edit/Delete Message Reply With Quote
Unread 10-28-09, 03:28 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Because otherwise, I'd have to rewrite the whole thing. Litepanels makes it easy to edit and add new things. You can embed it yourself if you want, it just needs to load before Litestats.
Originally posted by archiv
why do we need LitePanels? no way to get this as standalone?
Report comment to moderator  
Reply With Quote
Unread 10-29-09, 11:38 AM  
shinchih2001
A Defias Bandit

Forum posts: 3
File comments: 198
Uploads: 0
[2009/10/30 01:33:09-221-x5]: LiteStats-0.9.3\core.lua:489: bad argument #4 to 'format' (string expected, got nil)
LiteStats-0.9.3\core.lua:489: in function <Interface\AddOns\LiteStats\core.lua:482>

when i change talent, i got this error message
Last edited by shinchih2001 : 10-29-09 at 01:20 PM.
Report comment to moderator  
Reply With Quote
Unread 10-29-09, 11:20 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Bug fixed, thanks.
Originally posted by shinchih2001
LiteStats-0.9.3\core.lua:489: bad argument #4 to 'format' (string expected, got nil)
Report comment to moderator  
Reply With Quote
Unread 11-02-09, 07:19 PM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
Originally posted by Katae
SLDT uses the Ace TabletLib library to create the nifty friends/guild list, and I'd rather not get into that. [...] but a popup list would add too much bloat.
I lied, next version will have a guild and friends tooltip
Note that it's only a list--no fancy buttons.

Teaser:

Report comment to moderator  
Reply With Quote
Unread 11-03-09, 12:58 AM  
alimjocox
A Warpwood Thunder Caller
AddOn Author - Click to view AddOns

Forum posts: 96
File comments: 68
Uploads: 2
ampm = false, -- Set to false to use the 24-hour clock.

i set to false and it doesn't change the clock format? do i need to change any ingame settings?
Report comment to moderator  
Reply With Quote
Unread 11-03-09, 05:14 AM  
Katae
A Cobalt Mageweaver
AddOn Author - Click to view AddOns

Forum posts: 208
File comments: 260
Uploads: 6
That's strange, I'll check it out when servers come back up.
I just now noticed there is a 24 hour mode and local time on the in-game time manager, so I'll look into working with that setting instead of all the logic I'm using.

Edit: Solution drycoded, just need to test when the servers are back up.
Originally posted by alimjocox
i set to false and it doesn't change the clock format? do i need to change any ingame settings?
Last edited by Katae : 11-03-09 at 08:53 AM.
Report comment to moderator  
Reply With Quote
Unread 11-03-09, 09:34 PM  
shinchih2001
A Defias Bandit

Forum posts: 3
File comments: 198
Uploads: 0
my english is bad
may add LFG option to show raid level message and click to join/leave the chat??
Last edited by shinchih2001 : 11-03-09 at 09:53 PM.
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.