Greetings,
I'm not a programmer but I do fiddle with code as a hobby (like modding UI's in various online games, modding Dungeon Siege code etc etc).
Ok with that out of the way. A few weeks back I started up my own server (thanks to the Dev's for all their hard work BTW!). Searching the site for answers. Find some answers here and there that covers the basics and all that but the one thing that was giving me grief was the NPC's dmg was waaay too low. After reading various posts on the subject, I started to fiddle with it myself.
Its not pretty but it does Scale with the mobs level and you can adjust it easy enough.
Ok in GameLiving.cs
- Code: Select all
public virtual double AttackDamage(InventoryItem weapon)
{//Krugus - Start of dmg mod
//original code: double damage = (1.0 + Level / 3.7 + Level * Level / 175.0) * AttackSpeed(weapon) * 0.001;
double damage = ((1.0 + Level * Level / 3.7 + Level * Level / 175.0) * AttackSpeed(weapon) * 0.001); //dmg goes up as the mob does
if (weapon == null || weapon.Item_Type == Slot.RIGHTHAND || weapon.Item_Type == Slot.LEFTHAND || weapon.Item_Type == Slot.TWOHAND)
{
//Melee damage buff and debuff
damage *= GetModified(eProperty.MeleeDamage) * 0.01;
}
else if (weapon.Item_Type == Slot.RANGED)
{
//Ranged damage buff and debuff
damage *= GetModified(eProperty.RangedDamage) * 0.01;
}//Krugus - the following is needed to adjust the dmg down to levels where the players can survive it.
//also based on the mobs Level. Easy to tweak: You could adjust levels in ranges of 10 instead (which I might try out later)
if (Level <=15) // lower level mobs get different adjustment so they wont kill players outright.
return damage *(.50 - (Level *0.015));
if (Level <= 32)// adjustments based on level ranges
return damage *(.35 - (Level - 15)*.0125);
if (Level <= 50)// adjustments based on level ranges
return damage *(.15 - ((Level - 32) * 0.0025));
if (Level <=60)// Needs Tweaking
return damage *(.05 -((Level - 50) * 0.0035));
if (Level >60) // Needs tweaking
return damage * (.015 - ((Level - 60) * 0.0005));
{
return damage;
}
}
Quote and Code seems to cut part of my code off(DUH fixed it::mumbles to self about not checking the disable HTML in this post)
Anyways, as I said its not pretty but the mobs at the start hit for 4 to 8 and the mobs at 50th hit for 200 to 300 pts on my test Armsman in arcaniumPlate armor.
My Armsman could kill a npcs upto Yellow easy enough but the Orange ones would kill him
This is the only dmg mod I have done to the DOL code for npc's. Its MUCH better than it was and yes it still needs tweaking (which I am in the process of still doing myself) but I wanted to give something back to the DOL community. I know its not much but its a start