Well I was thinking since there are now rules for the monk damage attacks and archery, there should be one for rogue's backstab damage. Granted I don't know what KLS has left to do to the formulas for backstab damage, but for custom server purposes this should be a temporary solution. Now I've just been delving into the code for the first time, so this is only my second attempt at something like this. I was comparing all the rule additions for monk/archery so I think I've figured this out. My only thing is I don't know if it would be better to use RuleR or RuleI...but I'll give both examples below and maybe someone can give me some better insight.
Another thing to note is this is just for max backstab damage above level 25. I would think min backstab damage is relatively fine, and damage below level 25 should be a moot point.
First RuleI:
Code:
ruletypes.h
----------------
ADD
RULE_INT ( Combat, MaxBackstabBonus, 10) //% Modifier
AFTER
RULE_INT ( Combat, RoundKickBonus, 10) //% Modifier that this skill gets to str and skill bonuses
Code:
special_attacks.cpp
--------------------------
REPLACE
max_hit = (((2*primaryweapondamage) * GetDamageTable(BACKSTAB) / 100) * 10 * GetSkill(BACKSTAB) / 355) + ((level-25)/3) + 1;
WITH
max_hit = (((2*primaryweapondamage) * GetDamageTable(BACKSTAB) / 100) * RuleI(Combat, MaxBackstabBonus) * GetSkill(BACKSTAB) / 355) + ((level-25)/3) + 1;
Or using RuleR:
Code:
ruletypes.h
----------------
ADD
RULE_REAL ( Combat, MaxBackstabBonus, 1) // % Modifier to Max Backstab Damage (.5 = 50% base damage, 1 = 100%, 2 = 200%)
AFTER
RULE_INT ( Combat, RoundKickBonus, 10) //% Modifier that this skill gets to str and skill bonuses
Code:
special_attacks.cpp
--------------------------
REPLACE
max_hit = (((2*primaryweapondamage) * GetDamageTable(BACKSTAB) / 100) * 10 * GetSkill(BACKSTAB) / 355) + ((level-25)/3) + 1;
WITH
max_hit = ((RuleR(Combat, MaxBackstabBonus)*(2*primaryweapondamage) * GetDamageTable(BACKSTAB) / 100) * 10 * GetSkill(BACKSTAB) / 355) + ((level-25)/3) + 1;
Like I said I'm not sure which route would be the best way to go or if I even did it right, any help would be appreciated. =)