View Single Post
  #7  
Old 06-02-2019, 01:33 AM
superpally1
Sarnak
 
Join Date: Jul 2018
Location: Tennessee
Posts: 33
Default

Here is another way you can scale your damage.

in attack.cpp after line 5100.

(below this block)
Code:
if (IsClient()) {
		int extra = 0;
		switch (hit.skill) {
		case EQEmu::skills::SkillThrowing:
		case EQEmu::skills::SkillArchery:
			extra = CastToClient()->GetHeroicDEX() / 10;
			break;
		default:
			extra = CastToClient()->GetHeroicSTR() / 10;
			break;
		}
		hit.damage_done += extra;

add this:

Code:
//#####################################################################################################################################################################
		if (GetClass() == WARRIOR || GetClass() == PALADIN || GetClass() == SHADOWKNIGHT || GetClass() == BARD || GetClass() == BERSERKER) {
			hit.damage_done = ((hit.damage_done*(CastToClient()->GetSTR())/(RuleI(Combat,StatModDivideByAmount)))/(RuleI(Combat,TotalModDivideByAmount)));
		}
		if (GetClass() == MONK || GetClass() == BEASTLORD || GetClass() == ROGUE || GetClass() == RANGER) {
			hit.damage_done = ((hit.damage_done*(CastToClient()->GetDEX())/(RuleI(Combat,StatModDivideByAmount)))/(RuleI(Combat,TotalModDivideByAmount)));
		}
//#####################################################################################################################################################################
So it looks like this:


Code:
if (IsClient()) {
		int extra = 0;
		switch (hit.skill) {
		case EQEmu::skills::SkillThrowing:
		case EQEmu::skills::SkillArchery:
			extra = CastToClient()->GetHeroicDEX() / 10;
			break;
		default:
			extra = CastToClient()->GetHeroicSTR() / 10;
			break;
		}
		hit.damage_done += extra;
//#####################################################################################################################################################################
		if (GetClass() == WARRIOR || GetClass() == PALADIN || GetClass() == SHADOWKNIGHT || GetClass() == BARD || GetClass() == BERSERKER) {
			hit.damage_done = ((hit.damage_done*(CastToClient()->GetSTR())/(RuleI(Combat,StatModDivideByAmount)))/(RuleI(Combat,TotalModDivideByAmount)));
		}
		if (GetClass() == MONK || GetClass() == BEASTLORD || GetClass() == ROGUE || GetClass() == RANGER) {
			hit.damage_done = ((hit.damage_done*(CastToClient()->GetDEX())/(RuleI(Combat,StatModDivideByAmount)))/(RuleI(Combat,TotalModDivideByAmount)));
		}
//#####################################################################################################################################################################
	}

	// this appears where they do special attack dmg mods

Now in ruletypes.h add this :

Code:
RULE_INT(Combat, StatModDivideByAmount, 100) // Stat divided by amount for melee damage
RULE_INT(Combat, TotalModDivideByAmount, 100) // Total divided by amount
now recompile source.

This is damage scaled for Warrior, Paladin, Shadowknight, Bard, Berzerker using the Strength stat and Monk, Beastlord ,Rogue, Ranger using Dexterity stat, using 2 settings in your ruletypes which can be changed via sql query.

You can change the math to whatever you wish in the source then change the variables on the fly in the Variable tables. This is just an example.

Oh yeah, and the sql entries:

Code:
INSERT INTO `rule_values` (`ruleset_id`,`rule_name`,`rule_value`) VALUES ('1','StatModDivideByAmount','100')
INSERT INTO `rule_values` (`ruleset_id`,`rule_name`,`rule_value`) VALUES ('1','TotalModDivideByAmount,'100')
Reply With Quote