View Full Version : NPC scaling/maxlevel interaction
Splose
05-13-2019, 01:07 PM
If you are using the maxlevel field to scale NPC level dynamically and the NPC is not its base level the maxhit and health get a bit wonky. In this example I am using a level 5 NPC with a maxlevel of 6.
It looks like everything else is scaling properly except for the HP/Maxhit.
https://i.gyazo.com/f21905f2c6cd9ace2736a4510533de52.pnghttps://i.gyazo.com/36d8460855dc145d78c99db517bba769.png
Randymarsh9
05-05-2020, 05:41 PM
Did you ever figure out what was going on with this? I'm seeing the same issue.
It looks like it might have been a bug with NPCs with a 0 scale rate or under level 25.
I submitted a pull request with a fix.
Splose
05-06-2020, 06:09 AM
I haven't updated my source in awhile but as far as I know this is still a bug.
C++ is chinese to me so I just changed my zone_controller.pl to point towards the new table that #scale is using since I was already using it to scale player pets.
sub LoadScaling{
$connect = plugin::LoadMysql();
$query = "SELECT
npc_scale_global_base.level,
npc_scale_global_base.type,
npc_scale_global_base.ac,
npc_scale_global_base.hp,
npc_scale_global_base.accuracy,
npc_scale_global_base.slow_mitigation,
npc_scale_global_base.attack,
npc_scale_global_base.min_dmg,
npc_scale_global_base.max_dmg,
npc_scale_global_base.hp_regen_rate,
npc_scale_global_base.attack_delay,
npc_scale_global_base.special_abilities
FROM
npc_scale_global_base
ORDER BY npc_scale_global_base.level, npc_scale_global_base.type";
$query_handle = $connect->prepare($query);
$query_handle->execute();
while (@row = $query_handle->fetchrow_array()){ $SD[$row[0]][$row[1]] = [@row]; }
#quest::gmsay("[ZC] - Scaling Definitions have been reloaded..", 18);
}
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.