azerothcore / mod-autobalance

Module for AzerothCore(MaNGOS -> TrinityCore -> SunwellCore)
http://www.azerothcore.org
103 stars 109 forks source link

Bug: Kiggler the Crazed not scaling down, Gruul's Lair - High King Maulgar #169

Closed alca-00 closed 1 year ago

alca-00 commented 1 year ago

Current Behaviour

High King Maulgar encounter in Gruul's Lair consists of one main boss and four allies.

Kiggler specifically, for some reason does not follow the same rules as his other members, his health & mana remains in an unscaled state. The rest of his members are scaling down as intended. Original stats for reference: Kiggler the Crazed (creature ID 18835) Health: 212,450 Mana: 101,610 Armor: 7,604 Melee: 4,635 - 6,546

My mapstat and how Kiggler looks upon entering Gruul's Lair Gruuls stats

Expected Behaviour

Kiggler should scale down to your autobalance settings.

Steps to reproduce the problem

.tele gruul Fly up towards High King Maulgar, compare their stats to your settings

Extra Notes

No response

AutoBalance Debug Commands

No response

AC rev. hash/commit

AzerothCore rev. fb83c22dd292+ 2023-11-02 12:30:03 -0300 (master branch) (Win64, RelWithDebInfo, Static)

Operating system

Windows 10 x64

Custom changes or Modules

No response

csampson01 commented 1 year ago

I am seeing the same with a couple of summons in Deadmines at least (not checked other instances yet, I'm new to AC, found this issue and went looking for info etc.).

When running .ab creaturestat, the multipliers look normal, but the HP (at least) of the summoned creature seems to be at max. After running .reload config, HP drops to expected level.

The first one I noticed was in Gilnid's room:

Remote-Controlled Golem (ID: 2520) Summoned by: Goblin Engineer (ID: 622)

HP when summoned was 1.3k. After doing .reload config (while fighting it), HP dropped to 154 and I was able to kill it easily.

.ab creaturestat

Remote-Controlled Golem (18), Ignored for Map Stats Creature difficulty level: 1 player(s) Summon of Goblin Engineer (18) Health multiplier: 0.123 Mana multiplier: 0.000 Armor multiplier: 0.123 Damage multiplier: 0.123 CC Duration multiplier: 1.000 XP multiplier: 0.123 Money multiplier: 0.123

The second instance of this issue, in the same dungeon, was the 2 summoned adds on Edwin VanCleef fight:

Defias Blackguard (ID: 636) Summoned by: Edwin VanCleef (ID: 639)

I didn't get a .ab creaturestat for this, but it was the exact same issue where they started at max HP, and dropped to expected level after running .reload config.

.ab mapstat output

Deadmines (5-player Normal) | ID 36-6 Players on map: 1 (Lvl 19 - 19) Adjusted Player Count: 1 LFG Range: Lvl 15 - 25 (Target: Lvl 19) Map Level: 18 (Level Scaling Disabled) World health multiplier: 0.123 World hostile damage and healing multiplier: 0.123 Original Creature Level Range: 16 - 20 (Avg: 18.43) Active | Total Creatures in map: 202 | 202

This is all on a fresh (within the last 2 days) install of AC, running in Docker on an Ubuntu VM. I have the following modules included:

autobalance, ah-bot, solo-lfg, individual-xp, reagent-bank, transmog.

kjack9 commented 1 year ago

Kiggler confirmed, isn't adjusted down correctly. Thank you both for all the information, very helpful. I'll see what's going on.

kjack9 commented 1 year ago

Initial testing bears no answers, and an oddity.

If I enter the instance through the instance portal, Kiggler ends up with his original (high) health value.

However, if I teleport to Kiggler with .go c 81643, he has his correct health!

I did a diff on the debug log files for AutoBalance between the two scenarios and AB didn't handle it any differently each time. I also don't see anything in Kiggler's script that would account for why his health is being reset.

Something is different depending on which way I enter the instance. I don't know what that difference is yet.


EDIT 1:

Every indication is that his max health is being changed. image This is the last time I touch his stats. If you do anything that re-adjusts everything (like a reload), it correctly sets his health.


EDIT 2:

Well that's interesting! image It looks like this is a client update bug, not an actual issue with AutoBalance setting the health!

In fact, if you hit him his health immediately drops down to where it's supposed to be (although the max health is still wrong).

Here's what he looks like after I hit him once and then reset the fight.

image

kjack9 commented 1 year ago

Apparently AC isn't sending to the client that I'm updating the max health after the creature is created. I have no idea why, but I have a fix on the AutoBalance side. Should be pushing it shortly for testing.

EDIT: Nevermind, the fix I put in didn't work. I will work on this more tomorrow.

kjack9 commented 1 year ago

By tomorrow I meant "stay up way too late working on this tonight", apparently.

I have uploaded what I believe is a fix for this issue. Please try this version:

https://github.com/kjack9/mod-autobalance/archive/refs/heads/kjack9/issue169.zip

Note that you will need to rename the folder to mod-autobalance in order to test.

Let me know if this fixes the issue you're having.

csampson01 commented 1 year ago

Thanks for taking the time to work on this... I just did a run through Deadmines after switching to your new version and it fixes the issue for both of the summons I saw issues with.

alca-00 commented 1 year ago

Teleporting to Gruul, entering the instance normally or teleporting directly to Kiggler all result in a properly scaled-down version. Looks good on my end! Will fly around and check out some more instances to see if anything else had changed.

kjack9 commented 1 year ago

I have one optimization I'm going to try to reduce the processing load on map creation - this change essentially processes every creature twice, which I don't love. But once I have that worked out (or realize I can't do it), I'll propose this as a fix for these issues.

Thanks for testing!

alca-00 commented 1 year ago

BWL Vael

Entered BWL, Vaelastrasz is scaled down but appears at full health. Beginning the encounter & resetting it fixes him and places him at the intended 30% HP. Unsure if this is AB-related or something to do with the boss script itself. Throwing this in just in case

kjack9 commented 1 year ago

Entered BWL, Vaelastrasz is scaled down but appears at full health. Beginning the encounter & resetting it fixes him and places him at the intended 30% HP. Unsure if this is AB-related or something to do with the boss script itself. Throwing this in just in case

Had a similar issue with the healing dragon in ICC - probably the script setting max health to the creature_template value instead of the one I set.

If you have time to pop another issue for it, I don't think it's related to this one.

kjack9 commented 1 year ago

I made one more change to reduce the amount of stat generation runs get called when an instance is created. Can you please re-test and make sure this still fixes the issue?

https://github.com/kjack9/mod-autobalance/archive/refs/heads/kjack9/issue169.zip

This SHOULD resolve the issue where Kiggler appears to have the wrong health at the beginning. However, you may still get weirdness for different players as players enter/exit the instance until https://github.com/azerothcore/azerothcore-wotlk/issues/17655 is resolved. Rest assured that he actually DOES have the right amount of health (confirm with .npc info) even if your client is lying to you about it.

csampson01 commented 1 year ago

I just tried Deadmines (since that's the only one I've seen so far) with your latest version, and it's back to those summons being full HP. The only way I get them down to the adjusted HP is to .reload config (hitting them doesn't change anything). I did ".npc info" and it shows base and max health as 1251, which is full and unadjusted.

I tried this with both teleporting to the dungeon with ".tele deadmines", and by entering through the portal. Same both times.

Unfortunately I didn't keep a copy of the last version, that did work, so can't switch back to check it again with that one... any chance you can upload it again?

Thanks.

PkllonG commented 1 year ago

Does it only occur during biological rebirth and when first summoned?

alca-00 commented 1 year ago

I made one more change to reduce the amount of stat generation runs get called when an instance is created. Can you please re-test and make sure this still fixes the issue?

https://github.com/kjack9/mod-autobalance/archive/refs/heads/kjack9/issue169.zip

This SHOULD resolve the issue where Kiggler appears to have the wrong health at the beginning. However, you may still get weirdness for different players as players enter/exit the instance until azerothcore/azerothcore-wotlk#17655 is resolved. Rest assured that he actually DOES have the right amount of health (confirm with .npc info) even if your client is lying to you about it.

The second fix does work for Kiggler. Entering through Gruul's portal or teleporting there through .gm commands both display a scaled-down health pool for me. Also tested beginning the fight, resetting it. Slaying Kiggler specifically and resetting. Seems good.

kjack9 commented 1 year ago

Okay, I blame me pushing that update out when I was way too tired to be doing so. I have actually checked all the bug report examples now and I think everything is fixed. Something in AC is altering the max health of the creature after I change it but before its added to the world. I now check for this and fix the max health if needed.

Try this one more time: https://github.com/kjack9/mod-autobalance/archive/refs/heads/kjack9/issue169.zip

Tip: if you need a previous version from that branch, you can view the commits here: https://github.com/kjack9/mod-autobalance/commits/kjack9/issue169

csampson01 commented 1 year ago

No problem, really appreciate the work you've put into this.

I've tried with the latest version, resolves the issues I was seeing with summons.