I tried it again and it still seemed to proc way too often. I am still not sure what exactly is causing the problem. For now, I just set it to divide the bonuses by 1000 instead of 100 and that actually seems pretty good for proc rates... So, maybe something is factoring in that I am unaware of.
Code:
ProcBonus += float(itembonuses.ProcChance + (spellbonuses.ProcChance / 10) + AABonus) / 1000.0f;
ProcChance = 0.05f + float(mydex) / 9000.0f;
ProcBonus *= ProcChance;
ProcChance += ProcBonus;
mlog(COMBAT__PROCS, "Proc chance %.2f (%.2f from bonuses)", ProcChance, ProcBonus);
return ProcChance;
The highest spell bonus that I am aware of is from that bard song that adds 102%, and the Weapon Affinity AA can only go to 25. The only thing I am not sure about is the itembonuses for ProcChance.
In mob.cpp
Code:
if(itemtmp->CombatEffects != 0)
itembonuses.ProcChance += itemtmp->CombatEffects;
mob.h
Code:
//PoP effects:
sint16 StrikeThrough; // PoP: Strike Through %
// sint16 CombatEffects; //AFAIK: Combat Effects == ProcChance
// sint16 Shielding; //AFAIK, Shielding == MeleeMitigation
// sint16 Avoidance; //AFAIK: Avoidance == AvoidMeleeChance
// sint16 Accuracy; //AFAIK: Accuracy == HitChance
Maybe it is getting multiplied somewhere, but on my server I have it capped at 50.
So, doing the math, I think the max possible base percent increase should be + 177% (50 + 102 + 25). And since the max dex on my server is 380 without buffs, and with max buffs it only goes as high as 471, that is only 0.10 (10%) proc rate. So, adding another 177% on top of that should be about 0.28 (28%) proc rate which is slightly more than 1 in 4 hits. With a warrior dual weilding, that would make it almost once per round. Hmm, so maybe the code is working right and just seems too extreme, lol. I think that could quickly be fixed by adjusting the equation for the base proc rate, because that will heavily effect the total with bonuses since they are all multipliers.
Having 5% proc chance before dex is factored seems a bit high to me. Especially when even without AAs on a server with max level 60, you can get to 255 dex which would be about 8% base ProcRate. So, maybe instead of adding 0.05 (5%) in the equation, we could add 0.02(2%) before Dex gets calculated. That would bring a player with 255 dex and no other bonuses up to a 5% proc rate, which sounds about like Live IIRC. Then, once AAs, Combat Effects and Spell Bonuses get factored in, a player with 255 dex would be lucky to break 10%. And even someone with 471 dex on my server couldn't exceed 20% proc rate with every bonus and stat maxed. I know that is still way too high, but only bards could get that high as far as I know. Everyone else would be more in the 10-12% range even with very nice gear, maxed AAs, and buffs.
I will give this a try and see how it seems. Do any other admins have feedback on if proc rates already seem good in the current code or not? I imagine it is hard to tell for sure until you start factoring in alot of bonuses. We could probably set the dex bonus code to be capped or to scale down after it exceeds 255 dex.