Displaying Spell Critical Chance

Miscellaneous code snippets and examples that members have posted

Displaying Spell Critical Chance

Postby seleleth » Wed Sep 06, 2006 8:23 pm

I've been working on this project in the dev team forums. I thought I'd go ahead and post it out here for public use now. Because I don't want to go over the whole discussion again, I'm just going to quote myself several times so you can see how I came up with this, if you're interested.

If you don't care about all that, just go to the bottom of the topic and download the .zip file. Also, a working demo can be seen here (click on a character capable of spell crits):

http://clan-ai.org/wowa/

-------------------
The Discussion
-------------------

seleleth wrote:Before anyone jumps on the subject title alone, I know there is no way to determine spell critical chance in-game.

However...

We do have a general idea of how to do this, thanks to our friends at wowwiki.com: http://www.wowwiki.com/Formulas:Critica ... ith_Spells

And I was thinking, since WoW doesn't provide an accurate calculation itself, maybe we could take advantage of the accumulated data in the roster to come up with an estimated base spell crit chance for people! Wouldn't that be cool?

I'm thinking of including this stat on the character page, just under the Crit and Dodge percentages, under the name of "Base Spell Crit (Estimate/No Schools):"

Anywho, if you check out the link to the wowwiki.com discussion, I think we can go off these basic formulas:

- Druid [INT/60 + 1.8]%
- Mage [INT/59.5 + 0.2]%
- Priest [INT/59.5 + 0.8]%
- Warlock [INT/60.6 + 1.7]%
- Paladin [INT/29.5]%
- Shaman [INT/59.2 + 2.3]%

+ critical strike with spells by XX% equipment (examples)
(includes Warlock Spellstones, if equipped)

--------------------------------------------

Beyond these base calculations is the consideration of spells/talents and their effect on spell crits.

Because of the complexity of not only calculating various scenarios and spell types, but also representing these in some way in the profiler, I settled on the following exclusions to spell crit modifiers:

- Limited number of casts (e.g., Priest: Inner Focus)
- Specific spell modifiers (e.g., Shaman: Call of Thunder)
- Specific spell school modifiers (e.g., Paladin: Holy Power)
- Specific target type modifiers (e.g., Mage: Shatter)
- Crit strike damage bonus (e.g., Warlock: Ruin) (plus it's irrelevant to crit chance)
- Healing crit only (no talents, but equipment, if exists, wouldn't be scanned)

Once those exclusions are in place, believe it or not, only two talents/spells remain. These are the only two that modify the base spell crit chance, permanently, for all spells, and on all targets:

- Druid: Moonkin Form: +3%
- Mage: Arcane Instability: Rank 1-3, +1%-3%

So there's the math, and the items/talents to scan for.


zanix wrote:Cool :thumright:
Keeping the line saying (Estimate) and only calculating the base level seems ok to me


seleleth wrote:Yeah, I kinda settled on the same thing myself. Just too many variations, exceptions, bonuses out there to really do any class justice. Best to just stick with the basics. I also cleaned up a code a bunch. You guys were probably laughing at me before (and maybe still are). Plus, I moved all the boring details about exclusions to a tooltip.


In other words, you can see why Blizzard decided to not show spell crit--too many variations. But for the curious mind, now you can see your base.
Attachments
spellcrit.zip
(688 Bytes) Downloaded 121 times
User avatar
seleleth
Gimpy Developer
Gimpy Developer
 
Posts: 59
Joined: Thu Jul 06, 2006 10:26 pm
Location: Salt Lake City, UT

Return to Code Cache

Who is online

Users browsing this forum: No registered users and 0 guests

cron