Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 11-07-2019, 08:26 PM
fozy
Fire Beetle
 
Join Date: Oct 2019
Posts: 7
Default NPC stat changed

I have a question about changing stats on npc. I used the following thread to help me.

https://eqemu.gitbook.io/server/cate...pc/npc-scaling

I have changed the stats in the npc_types table to 0 for the stats that I want to control in the npc_scale_global_base. For the most part this works but for some mobs ie npc_id 113511 it has values in game using the development tools that are different from the stats that I put in the npc_scale_global_base table

For example for a level 52 npc_id 113511 I have in the npc_types table field mindmg of zero and maxdmg of zero and in the npc_scale_global_base table field min_dmg of 3 and max_dmg of 57 but when in game and using the dev tools it shows that the minhit of 3 and maxhit of 69.

Any help in helping me understand where the game is getting this value from would be greatly appreciated.

Thanks much
Reply With Quote
  #2  
Old 11-07-2019, 10:31 PM
Kingly_Krab's Avatar
Kingly_Krab
Demi-God
 
Join Date: May 2013
Location: United States
Posts: 1,530
Default

Seems to be that damage has an additional modifier from what I can see.
Code:
if (npc->GetMinDMG() == 0 && npc->GetMaxDMG() == 0) {
    int min_dmg = scale_data.min_dmg;
    if (RuleB(Combat, UseNPCDamageClassLevelMods)) {
        int32 class_level_damage_mod = GetClassLevelDamageMod(npc->GetLevel(), npc->GetClass());
        min_dmg = (min_dmg * class_level_damage_mod) / 220;

        LogNPCScaling("ClassLevelDamageMod::min_dmg base: [{}] calc: [{}]", scale_data.min_dmg, min_dmg);
    }

    npc->ModifyNPCStat("min_hit", std::to_string(min_dmg).c_str());
}
if (npc->GetMaxDMG() == 0) {
    int max_dmg = scale_data.max_dmg;
    if (RuleB(Combat, UseNPCDamageClassLevelMods)) {
        int32 class_level_damage_mod = GetClassLevelDamageMod(npc->GetLevel(), npc->GetClass());
        max_dmg = (scale_data.max_dmg * class_level_damage_mod) / 220;

        LogNPCScaling("ClassLevelDamageMod::max_dmg base: [{}] calc: [{}]", scale_data.max_dmg, max_dmg);
    }

    npc->ModifyNPCStat("max_hit", std::to_string(max_dmg).c_str());
 }

Code:
uint32 NpcScaleManager::GetClassLevelDamageMod(uint32 level, uint32 npc_class)
{
    uint32 multiplier = 0;

    switch (npc_class) {
        case WARRIOR: {
            if (level < 20) {
                multiplier = 220;
            }
            else if (level < 30) {
                multiplier = 230;
            }
            else if (level < 40) {
                multiplier = 250;
            }
            else if (level < 53) {
                multiplier = 270;
            }
            else if (level < 57) {
                multiplier = 280;
            }
            else if (level < 60) {
                multiplier = 290;
            }
            else if (level < 70) {
                multiplier = 300;
            }
            else {
                multiplier = 311;
            }
            break;
        }
        case DRUID:
        case CLERIC:
        case SHAMAN: {
            if (level < 70) {
                multiplier = 150;
            }
            else {
                multiplier = 157;
            }
            break;
        }
        case BERSERKER:
        case PALADIN:
        case SHADOWKNIGHT: {
            if (level < 35) {
                multiplier = 210;
            }
            else if (level < 45) {
                multiplier = 220;
            }
            else if (level < 51) {
                multiplier = 230;
            }
            else if (level < 56) {
                multiplier = 240;
            }
            else if (level < 60) {
                multiplier = 250;
            }
            else if (level < 68) {
                multiplier = 260;
            }
            else {
                multiplier = 270;
            }
            break;
        }
        case MONK:
        case BARD:
        case ROGUE:
        case BEASTLORD: {
            if (level < 51) {
                multiplier = 180;
            }
            else if (level < 58) {
                multiplier = 190;
            }
            else if (level < 70) {
                multiplier = 200;
            }
            else {
                multiplier = 210;
            }
            break;
        }
        case RANGER: {
            if (level < 58) {
                multiplier = 200;
            }
            else if (level < 70) {
                multiplier = 210;
            }
            else {
                multiplier = 220;
            }
            break;
        }
        case MAGICIAN:
        case WIZARD:
        case NECROMANCER:
        case ENCHANTER: {
            if (level < 70) {
                multiplier = 120;
            }
            else {
                multiplier = 127;
            }
            break;
        }
        default: {
            if (level < 35) {
                multiplier = 210;
            }
            else if (level < 45) {
                multiplier = 220;
            }
            else if (level < 51) {
                multiplier = 230;
            }
            else if (level < 56) {
                multiplier = 240;
            }
            else if (level < 60) {
                multiplier = 250;
            }
            else {
                multiplier = 260;
            }
            break;
        }
    }

    return multiplier;
}
Reply With Quote
  #3  
Old 11-10-2019, 01:14 AM
woton
Sarnak
 
Join Date: Mar 2019
Posts: 46
Default

Sorry for the late reply, I appreciate the info!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:56 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3