Download
(47Kb)
Download
Updated: 04-25-09 03:45 PM
Pictures
File Info
Updated:04-25-09 03:45 PM
Created:unknown
Downloads:4,895
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
------------------------------------------------------------------------
Post A Reply Comment Options
Unread 08-14-08, 10:56 AM  
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1360
File comments: 829
Uploads: 55
It is always an awkward comment to point to the other addons in the same category,
so let me preface it by saying that I welcome another addon and aim to keep an eye on it as it develops.

In any case it's good to have an idea how other authors have approached the problem of gear weighting.

SmartFilter, ItemValue, GearEvaluator (that you already mention) aim to be generic gear evaluation addons.

The best in the category at the moment is however Pawn by Vgeran imo (also available on this site)

Then there's addons for specialized roles like HealPoints and TankPoints and HunterAEP and finally addons in the same category that go a different approach (assume you know the stats you want in a set and only look at upgrades in terms of 'quality of gear')
like InventoryOnPar.

There has been one more addon that took the stat-weight approach a step further,
by implementing cuttoff points (when a stat is capped - eg. anti-crit, resistance, hit etc)
and meta-scales to make it easier to create "hybrid" sets (tanking-resistance for example)
I didn't add it to favorites and I can't find it now, but it should be here and on wowui
Report comment to moderator  
Reply With Quote
Unread 08-14-08, 11:11 AM  
Cladhaire
Salad!
 
Cladhaire's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 1935
File comments: 4939
Uploads: 19
Cool, I'm always looking for alternatives especially if they're better than something I've written. This was done as a simple exercise to see if I could use this method to not even have to worry about the underlying raw stats.. and only care about the actual results! I'll definitely take a look at Pawn, thanks!
__________________
"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..."
Report comment to moderator  
Reply With Quote
Unread 08-14-08, 11:21 AM  
Cladhaire
Salad!
 
Cladhaire's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 1935
File comments: 4939
Uploads: 19
Actually from looking at it it wouldn't be too tough to either write a wardrobe mod that can use Pawn, or convert the scales themselves to work with DressToKill. My problem is the following:

As a druid who is rush-leveling (for the third time on a druid mind you) I'm selling everything that isn't a quest reward which leaves me with pretty crap gear. I want to be able to heal when necessary and DPS when soloing, tank when I need to and as my gear is constantly changing this makes it pretty difficult to do. That's why I wrote DressToKill to automatically go through and equip a set that's appropriate for what I need to do. Anything do this already with Pawn?

I can use the following for example with a minor alteration in DressToKill (which I'll release):

Code:
local stats, bonus = PawnGetStatsForInventorySlot(slot, false, "player")
return PawnGetItemValue(stats, bonus, "Emmerald cat DPS")
That uses Pawn to get the Emmerald cat DPS value for each item, and ranks them that way.
__________________
"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..."
Last edited by Cladhaire : 08-14-08 at 11:35 AM.
Report comment to moderator  
Reply With Quote
Unread 08-15-08, 12:52 PM  
Trell
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Lovely addon.

I thought I'd post some of the code I'm using on my Rogue to determine best sets (after a little help from clad :P).

Just Hit Rating (ie, equip a set granting you the highest possible Hit Rating from items in your bags).

return GetCombatRating(6)

Hit Rating, Attack Power (equip a set granting the highest Hit Rating, then Attack Power from items in your bags).

local hitrating = GetCombatRating(6)
local base, pos, neg = UnitAttackPower("player")
local apower = base + pos - neg
return (hitrating * 1.0) + (apower * 0.7)

Hit Rating, Attack Power, Crit Rating (equip a set granting the highest Hit Rating, then Attack Power, then Crit chance, from items in your bags).

local hitrating = GetCombatRating(6)
local base, pos, neg = UnitAttackPower("player")
local apower = base + pos - neg
local critrating = GetCritChance()
return (hitrating * 1.0) + (apower * 0.7) + (critrating * 0.6)

You can change the weighting of the stats in the code by changing the numbers after the *'s.
Last edited by Trell : 08-15-08 at 12:53 PM.
Report comment to moderator  
Reply With Quote
Unread 08-17-08, 04:23 AM  
Cladhaire
Salad!
 
Cladhaire's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 1935
File comments: 4939
Uploads: 19
Updated version

Just posted an updated version that adds a new slash command and should fix the previous issues with mainhand/offhand weapons. Let me know if you run into any issues with 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..."
Report comment to moderator  
Reply With Quote
Unread 08-25-08, 08:30 AM  
willofgod
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
It would be nice if an addon like this one would plugin to ItemRack and auto-create sets.
Report comment to moderator  
Reply With Quote
Unread 09-08-08, 02:06 PM  
Hjalte
A Fallenroot Satyr

Forum posts: 21
File comments: 47
Uploads: 0
Got this error when DTK tried to equip my fishing rod, which I can not use:

Code:
Interface\AddOns\DressToKill\DressToKill.lua:375: Interface\AddOns\DressToKill\DressToKill.lua:13: Interface\AddOns\DressToKill\DressToKill.lua:13: in function <Interface\AddOns\DressToKill\DressToKill.lua:8>
Interface\AddOns\DressToKill\DressToKill.lua:198: in function <Interface\AddOns\DressToKill\DressToKill.lua:104>

[C]: ?
[C]: in function `assert'
Interface\AddOns\DressToKill\DressToKill.lua:375: in function <Interface\AddOns\DressToKill\DressToKill.lua:372>
Report comment to moderator  
Reply With Quote
Unread 10-08-08, 11:44 AM  
Junyr
A Defias Bandit

Forum posts: 3
File comments: 13
Uploads: 0
I'm going to have to do some research now on this stuff. I have a ret pally I'd like to have this search for strength, then agility....

Nice mod so far as always cladhaire.
Report comment to moderator  
Reply With Quote
Unread 10-17-08, 07:40 AM  
Kimster
A Kobold Labourer

Forum posts: 0
File comments: 22
Uploads: 0
Update?

I love this mod is going to be updated anytime soon?

BTW thanks for updating PR i love that one too
Report comment to moderator  
Reply With Quote
Unread 10-17-08, 08:52 AM  
Cladhaire
Salad!
 
Cladhaire's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 1935
File comments: 4939
Uploads: 19
Re: Update?

Originally posted by Kimster
I love this mod is going to be updated anytime soon?

BTW thanks for updating PR i love that one too
Yes, should be quick fixes, can you post any errors you are getting.. .that helps me move quicker.
__________________
"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..."
Report comment to moderator  
Reply With Quote
Unread 10-18-08, 02:36 PM  
Kimster
A Kobold Labourer

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

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 Kimster : 10-18-08 at 03:08 PM.
Report comment to moderator  
Reply With Quote
Unread 10-21-08, 02:22 PM  
Kimster
A Kobold Labourer

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

Just wondering how the update is coming? i miss it
Report comment to moderator  
Reply With Quote
Unread 10-21-08, 03:41 PM  
Cladhaire
Salad!
 
Cladhaire's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 1935
File comments: 4939
Uploads: 19
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..."
Report comment to moderator  
Reply With Quote
Unread 11-18-08, 10:04 AM  
Cladhaire
Salad!
 
Cladhaire's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 1935
File comments: 4939
Uploads: 19
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..."
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: 157
Uploads: 1
What a find, thanks for this
__________________
If science and religion are destroyed, science would re-emerge exactly the same;
but not religion.
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.