Skip to content

Fix For Mobs Not Always Scaling Properly In Raids #202

@whipowill

Description

@whipowill

Current Behaviour

I think this is a dupe of issue #172 but I wanted to make my own thread and post my theories on this bug.

The issue is cases where mobs are not scaled properly in an instance, despite all the settings being correct. I think the issue is limited to large instances, meaning only raids. I think it has to do with how mobs are loaded into memory, where in a dungeon maybe everything will load all at once bc it's relatively small, but in a raid the area is so large not every mob is loaded at once. I think it's the mobs loaded later who are failing to be scaled.

For a while, I would use a macro .ab setoffset 0 and just click it whenever I found a mob not properly scaled, and it would work fine. But after this became annoying, I amended the autobalance mod to add a 1 minute map update.

In ABPlayerScript.cpp:

void AutoBalance_PlayerScript::OnUpdate(Player* player, uint32 /*p_time*/)
{
    // if it's been less than 60 seconds since last check, bail...
    if (GetEpochTime().count() % 60 != 0) return;

    Map* map = player->GetMap();
    if (!map || !map->IsDungeon())
    {
        return;
    }

    // update the map's player stats
    UpdateMapPlayerStats(map);

    // schedule all creatures for an update
    AutoBalanceMapInfo* mapABInfo = map->CustomData.GetDefault<AutoBalanceMapInfo>("AutoBalanceMapInfo");
    mapABInfo->mapConfigTime = GetCurrentConfigTime();
}

So though I don't know why this bug exists, I can only speculate, this new onupdate method has resolved it. It just forces the map to check scaling on creatures every minute.

Expected Behaviour

I've presented a proposed fix for this bug.

Steps to reproduce the problem

I've experience scaling failures in large raids, such as AQ20 and AQ40.

Extra Notes

No response

AutoBalance Debug Commands

No response

AC rev. hash/commit

NA

Operating system

Ubuntu 24

Custom changes or Modules

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions