Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(47 Kb)
Download
Updated: 04-25-09 03:45 PM
Pictures
File Info
Updated:04-25-09 03:45 PM
Created:unknown
Downloads:4,015
Favorites:61
MD5:

DressToKill

Version: r29
by: Cladhaire [More]

DressToKill is a very simple add which aims to take the guesswork out of choosing the "best" equipment for a given situation. Rather than including a complicated item parsing library that can break and change over time it sacrifices speed for accuracy.

Main benefits:

  • Rather than needing to know how much attack power each unit of strength gives you, you just simply test attack power.
  • This addon encourages you to consider the EFFECTIVE stats (such as attack power, crit, +healing, etc.) rather than the confusing raw statistics.
  • Farging fun to watch ;-)

Commands:
  • /dress is the primary slash command, and will automatically execute the selected evaluation.
  • /dress config can be used to open the interface options, or you can get them from the Blizzard Interface Options menu
  • /dress <name of weight function> can be used to execute a specific weight function from a macro or slash command. For example /dress Attack Power will evaluate using the Attack Power function.
  • /dress debug - Opens a window in the interface options screen that provides more detailed information about the selection process.

This addon moves through each inventory slot, finding the local optimum given a particular "weight" function. For example the following function can be used to create a healing/mana outfit, weighting every unit of +healing at 1.0, and every unit of mana as 0.7.

Code:
local healing = GetSpellBonusHealing()
local mana = UnitManaMax("player")
return (healing * 1.0) + (mana * 0.7)
The weight functions are also passed the link of the item being evaluated. For example, the following code will create a outfit for the highest possible health, requiring that the item "Regal Protectorate" be chosen:

Code:
local name = GetItemInfo(link)
if name == "Regal Protectorate" then
  return math.huge
end
local health = UnitHealthMax("player")
return health
The way this addon works can be pretty tempermental and is effected by your buffs and shapeshifts. Therefore if you want to test for armor contribution in Bear Form, you need to be in Bear Form in order for the results to be accurate. You also should not try to modify your inventory or bags while this addon is working.

This is an early release of a working addon, so there may be bugs that need to be worked out. Please let me know if you have any issues.

It's been pointed out to the there is another addon that does something similar on the wowace repository (http://svn.wowace.com/wowace/trunk/GearEvaluator/), but after looking at it this addon uses item scanning, and there doesnt' seem to be much support for the various evaluator functions. I plan to continue updating mine as necessary.

Credits:
Aska on StormReaver(EU) - Name
Krka - For all Indents and Purposes
[Ammo] - Base code for the options screen

------------------------------------------------------------------------
r29 | Cladhaire-15704 | 2009-04-25 21:41:27 +0100 (Sat, 25 Apr 2009) | 2 lines

Updating DressToKill to actually work correctly

------------------------------------------------------------------------
r28 | Cladhaire-15704 | 2008-12-11 17:22:07 +0000 (Thu, 11 Dec 2008) | 2 lines

* Fix the opening of the options menu

------------------------------------------------------------------------
r27 | Cladhaire-15704 | 2008-11-18 16:00:15 +0000 (Tue, 18 Nov 2008) | 2 lines

* Clean up some leaked globals, bad jnwhiteh!

------------------------------------------------------------------------
r26 | Cladhaire-15704 | 2008-11-18 15:50:58 +0000 (Tue, 18 Nov 2008) | 2 lines

* Recover from errors when the API tells us to equip something in a slot (such a
s 3.0.X where it says a 2-Hander can go in the offhand due to Titan's Grip)

------------------------------------------------------------------------
r25 | Cladhaire-15704 | 2008-09-08 21:17:50 +0100 (Mon, 08 Sep 2008) | 2 lines

Added error checking for ERR_CANT_EQUIP_SKILL

------------------------------------------------------------------------
r24 | Cladhaire-15704 | 2008-08-23 08:37:30 +0100 (Sat, 23 Aug 2008) | 2 lines

Fixed a rather nasty bug that would prevent you from equipping any boe items

------------------------------------------------------------------------
r23 | Cladhaire-15704 | 2008-08-22 12:44:31 +0100 (Fri, 22 Aug 2008) | 2 lines

Fixed an error that can occur when equipping an item with a higher required level

------------------------------------------------------------------------
r22 | Cladhaire-15704 | 2008-08-17 14:53:12 +0100 (Sun, 17 Aug 2008) | 2 lines

Re-add debug messages to the chat frame, when ending a round

------------------------------------------------------------------------
r21 | Cladhaire-15704 | 2008-08-17 14:50:17 +0100 (Sun, 17 Aug 2008) | 2 lines

Remove the base from weapon scores

------------------------------------------------------------------------
r20 | Cladhaire-15704 | 2008-08-17 14:45:27 +0100 (Sun, 17 Aug 2008) | 2 lines

Fixing a typo, compile before you commit jerkheadface

------------------------------------------------------------------------
r19 | Cladhaire-15704 | 2008-08-17 14:42:30 +0100 (Sun, 17 Aug 2008) | 2 lines

Fix an error that can occur when only one trinket slot has a winner

------------------------------------------------------------------------
r18 | Cladhaire-15704 | 2008-08-17 14:31:15 +0100 (Sun, 17 Aug 2008) | 2 lines

Adding error messages to debug function, fixed a typo

------------------------------------------------------------------------
r17 | Cladhaire-15704 | 2008-08-17 14:26:26 +0100 (Sun, 17 Aug 2008) | 2 lines

Fixed the scoring for mainhand/offhand weapons, at least I think

------------------------------------------------------------------------
r16 | Cladhaire-15704 | 2008-08-17 14:21:08 +0100 (Sun, 17 Aug 2008) | 2 lines

Adding more debug messages for when we're equipping

------------------------------------------------------------------------
r15 | Cladhaire-15704 | 2008-08-17 14:11:58 +0100 (Sun, 17 Aug 2008) | 2 lines

Changes the way the offhand score is calculated

------------------------------------------------------------------------
r14 | Cladhaire-15704 | 2008-08-17 13:58:57 +0100 (Sun, 17 Aug 2008) | 2 lines

Added more debug messages, along with a 'Copy Log' button

------------------------------------------------------------------------
r13 | Cladhaire-15704 | 2008-08-17 13:21:46 +0100 (Sun, 17 Aug 2008) | 2 lines

Make the start "winner" score (- math.huge) instead of 0

------------------------------------------------------------------------
r12 | Cladhaire-15704 | 2008-08-17 11:20:29 +0100 (Sun, 17 Aug 2008) | 2 lines

Fix for mainhand/offhand code, and added a debug frame

------------------------------------------------------------------------
r11 | Cladhaire-15704 | 2008-08-16 12:03:33 +0100 (Sat, 16 Aug 2008) | 2 lines

Dry-coded support for equipped mainhand and offhand weapon combinations

------------------------------------------------------------------------
r10 | Cladhaire-15704 | 2008-08-16 11:52:37 +0100 (Sat, 16 Aug 2008) | 2 lines

Drycode of mainhand and offhand weapon support

------------------------------------------------------------------------
r9 | Cladhaire-15704 | 2008-08-15 19:16:53 +0100 (Fri, 15 Aug 2008) | 2 lines

Added DressToKill:SetDebug(value) which will enable/disable debug message depending on what you pass it. This works for one session only.

------------------------------------------------------------------------
r8 | Cladhaire-15704 | 2008-08-15 12:05:39 +0100 (Fri, 15 Aug 2008) | 2 lines

Fixed an error that occured when trying to equip an item the player doesn't have the proficiency for

------------------------------------------------------------------------
r7 | Cladhaire-15704 | 2008-08-15 08:17:26 +0100 (Fri, 15 Aug 2008) | 2 lines

Pass the item slot to the weight function and fix an error when opening interface options instead of using /dr
ess config

------------------------------------------------------------------------
r6 | Cladhaire-15704 | 2008-08-14 16:23:44 +0100 (Thu, 14 Aug 2008) | 2 lines

Fix font path

------------------------------------------------------------------------
r5 | Cladhaire-15704 | 2008-08-14 16:19:05 +0100 (Thu, 14 Aug 2008) | 2 lines

Actually pass the link to the weight function

------------------------------------------------------------------------
r4 | Cladhaire-15704 | 2008-08-14 16:13:16 +0100 (Thu, 14 Aug 2008) | 2 lines

Fixed a few typos, and a bug


------------------------------------------------------------------------
r3 | Cladhaire-15704 | 2008-08-14 16:07:06 +0100 (Thu, 14 Aug 2008) | 2 lines

Added options screen among other features

------------------------------------------------------------------------
r2 | Cladhaire-15704 | 2008-08-14 13:25:03 +0100 (Thu, 14 Aug 2008) | 2 lines

Initial commit

------------------------------------------------------------------------
r1 | wowinterface | 2008-08-14 13:15:48 +0100 (Thu, 14 Aug 2008) | 1 line

Creating inital directory structure
------------------------------------------------------------------------
Archived Files (1)
File Name
Version
Size
Author
Date
r27
47kB
Cladhaire
11-18-08 10:03 AM


Post A Reply Comment Options
Unread 04-12-09, 01:56 PM  
mrruben5
Guest

Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
Re: some info + a question

Originally posted by dirtag
How do I add values for an items socket color ?..
GetItemInfo don't seem to have it, and from googeling I see other people have the same issue.
http://www.wowwiki.com/API_GetItemGem
Report comment to moderator  
Edit/Delete Message Reply With Quote
Unread 12-27-08, 06:57 AM  
dirtag
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
some info + a question

Here's some local's I've used:
Code:
local spellpower=GetSpellBonusDamage(6)
local intellect=UnitStat("player",4)
local stamina=UnitStat("player",3)
local spirit=UnitStat("player",5)
local critrating=GetSpellCritChance(6)
local hasterating=GetCombatRating(20)
local hitrating=GetCombatRating(8)
local mp5=GetManaRegen()*5
and two weight sets Ive gotten from pawn:

HEAL(don't remember exactly where I got this )
Code:
return (intellect*1.1)+(stamina*0.125)+(spirit*1.55)+(critrating*0.139)+(spellpower*0.6)+(hasterating*0.4)+(mp5*0.448)
Shadow Priest 80 Not Hit Capped:
Code:
return (intellect*0.19)+(spirit*0.21)+(critrating*0.61)+(hasterating*0.56)+(spellpower*1)+(hitrating*1.12)
Now for my question:

How do I add values for an items socket color ?..
GetItemInfo don't seem to have it, and from googeling I see other people have the same issue.

Oh..and a small suggestion:
When entering just '/dresstokill' it should pop up the config menu/write out the help screen. Not run the latest set you made.
Last edited by dirtag : 12-27-08 at 06:59 AM.
dirtag is offline Report comment to moderator  
Reply With Quote
Unread 12-11-08, 10:53 AM  
dirtag
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
Re: Error Message

If you get the errors below, then replace all instances of "InterfaceOptionsFrame_OpenToFrame" with "InterfaceOptionsFrame_OpenToCategory" in DressToKill.lua (should only be 2)

It now works for me.

Originally posted by Kimster
It happens when trying to check/equip weapons and then cant get past that

Error: bad argument #1 to 'format' (string expected, got nil)
AddOn: DressToKill
File: DressToKill.lua
Line: 33
Count: 1

And can't open the configure menu get this error

Error: attempt to call global 'InterfaceOptionsFrame_OpenToFrame' (a nil value)
AddOn: DressToKill
File: DressToKill.lua
Line: 389
Count: 4

Debug
Error: attempt to call global 'InterfaceOptionsFrame_OpenToFrame' (a nil value)
AddOn: DressToKill
File: DressToKill.lua
Line: 394
Count: 1

when i got it open in the blizzard interface there are no values

Error: attempt to index local 'frame' (a number value)
File: Interface\FrameXML\UIDropDownMenu.lua
Line: 809
Count: 1
--------------------------------------------------
Error: attempt to index global 'editbox' (a nil value)
AddOn: DressToKill
File: DressToKillOptions.lua
Line: 48
Count: 3
Last edited by dirtag : 12-11-08 at 10:53 AM.
dirtag is offline Report comment to moderator  
Reply With Quote
Unread 12-07-08, 02:45 PM  
Cladhaire
Salad!
 
Cladhaire's Avatar
WoWInterface Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 1934
File comments: 4529
Uploads: 18
Re: Preconfig

Originally posted by slickwalker
Does anyone have, or know of, a compilation of preconfigured rule sets for specific classes?
You could interface with Pawn based on what I left in previous comments, or you could start a post her on wowinterface where people can work to write new evaluation functions.

I'd like to help make DressToKill more popular but haven't had a ton of time to do more work on it or make people more aware of it.
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
Cladhaire is offline Report comment to moderator  
Reply With Quote
Unread 12-07-08, 10:04 AM  
slickwalker
A Deviate Faerie Dragon
 
slickwalker's Avatar

Forum posts: 18
File comments: 156
Uploads: 0
Preconfig

Does anyone have, or know of, a compilation of preconfigured rule sets for specific classes?
slickwalker is offline Report comment to moderator  
Reply With Quote
Unread 11-26-08, 08:45 AM  
Kimster
A Kobold Labourer

Forum posts: 0
File comments: 22
Uploads: 0
Thanks

Thanks Clad

This is all new to me and thanks for the link too
Kimster is offline Report comment to moderator  
Reply With Quote
Unread 11-24-08, 04:27 PM  
Cladhaire
Salad!
 
Cladhaire's Avatar
WoWInterface Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 1934
File comments: 4529
Uploads: 18
Re: Re: Re: Moonkin Form

That's because as indicated on the API page (http://wowprogramming.com/docs/api/GetSpellBonusHealing) that function only returns one value, so you don't need to go through the adding the base and positive minus the negative to get the actual value.
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
Cladhaire is offline Report comment to moderator  
Reply With Quote
Unread 11-24-08, 04:25 PM  
Kimster
A Kobold Labourer

Forum posts: 0
File comments: 22
Uploads: 0
Re: Re: Moonkin Form

Originally posted by Cladhaire
What error are you getting?

Error: attempt to perform arithmetic on local 'pos' (a nil value)
AddOn: DressToKill
File: DressToKill.lua:387: [string "return function (link, slot) local hitratin..."]
Line: 3
Count: 1
Kimster is offline Report comment to moderator  
Reply With Quote
Unread 11-22-08, 03:36 AM  
Cladhaire
Salad!
 
Cladhaire's Avatar
WoWInterface Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 1934
File comments: 4529
Uploads: 18
Re: Moonkin Form

What error are you getting?
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
Cladhaire is offline Report comment to moderator  
Reply With Quote
Unread 11-21-08, 08:15 PM  
Kimster
A Kobold Labourer

Forum posts: 0
File comments: 22
Uploads: 0
Moonkin Form

what weight function can i use to get hit, spell power then crit i tried to modify one but keep getting error

local hitrating = GetCombatRating(6)
local base, pos, neg = GetSpellBonusHealing()
local SpellBonusHealing = base + pos - neg
local critrating = GetCritChance()
return (hitrating * 1.0) + (healing * 1.0) + (critrating * 0.6)

if anyone has any idea's please post

Thanks
Kimster is offline Report comment to moderator  
Reply With Quote
Unread 11-19-08, 05:48 PM  
Kimster
A Kobold Labourer

Forum posts: 0
File comments: 22
Uploads: 0
Error Message

Using / command i tried to open config & debug menu got these errors its fine through the Blizzard Interface options though

Error: attempt to call global 'InterfaceOptionsFrame_OpenToFrame' (a nil value)
AddOn: DressToKill
File: DressToKill.lua
Line: 406
Count: 1
--------------------------------------------------
Error: attempt to call global 'InterfaceOptionsFrame_OpenToFrame' (a nil value)
AddOn: DressToKill
File: DressToKill.lua
Line: 401
Count: 1
Last edited by Kimster : 11-19-08 at 05:59 PM.
Kimster is offline Report comment to moderator  
Reply With Quote
Unread 11-19-08, 11:56 AM  
Kimster
A Kobold Labourer

Forum posts: 0
File comments: 22
Uploads: 0
Originally posted by Cladhaire
Updated to fix the issue with level requirements, skill requirements, and now the new API change where two-handers are "equippable" for everyone in the off-hand, ostensibly due to Titan's Grip.

Clad

thank you thank you thank you
Kimster is offline Report comment to moderator  
Reply With Quote
Unread 11-18-08, 06:07 PM  
noble8
A Warpwood Thunder Caller
 
noble8's Avatar
AddOn Author - Click to view AddOns

Forum posts: 95
File comments: 149
Uploads: 1
What a find, thanks for this
__________________
If science and religion are destroyed, science would re-emerge exactly the same;
but not religion.
noble8 is online now Report comment to moderator  
Reply With Quote
Unread 11-18-08, 10:04 AM  
Cladhaire
Salad!
 
Cladhaire's Avatar
WoWInterface Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 1934
File comments: 4529
Uploads: 18
Updated to fix the issue with level requirements, skill requirements, and now the new API change where two-handers are "equippable" for everyone in the off-hand, ostensibly due to Titan's Grip.
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
Cladhaire is offline Report comment to moderator  
Reply With Quote
Unread 10-21-08, 03:41 PM  
Cladhaire
Salad!
 
Cladhaire's Avatar
WoWInterface Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 1934
File comments: 4529
Uploads: 18
Re: update

Originally posted by Kimster
Just wondering how the update is coming? i miss it
Life, etc. "Soon".
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
Cladhaire 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.