Surviving the Grand Regent Death Bug

JengererJengerer Posts: 6
edited February 2015 in TL2 Hardcore Mode
So I've been debugging the Torchlight II assembly for the past few days to try to figure out why players will sometimes get instagibbed by the Grand Regent long after he's dead. I even have a possible patch that might work, but I can't seem to modify the EXE without Steam complaining about it (assuming it's some kind of anti-cheat protection).

If you're curious why it happens, open the following spoiler. Otherwise read ahead for a strategy on how to avoid the bug.

=== WHY IT HAPPENS ===
The Grand Regent has a spell that's intended to kill all monsters after he dies (and it repeatedly triggers for any new units that spawn/appear). The bug arises initially because the game doesn't allow dead units to set their "target" to a live unit.

So after the boss dies, two things can happen:

1) The boss dies and you witness the transformation of the guardian. As soon as the transformation completes, it triggers an entity spawn for the guardian, and the Regent tries to target it with its death spell. Because the guardian is alive, and the boss is dead, it doesn't allow the spell to target the guardian unit. Instead, the game looks for the nearest valid target, which as, you may have guessed, can be the player.
2) Units that are off-screen aren't updated by the game, so if the boss dies and you walk into an area with a unit that was out of vision, the boss's spell will trigger for the unit (but again, won't consider them a valid target because the boss is dead).

The strange part is that when the game looks for a fallback target after an attack has no initially valid target, it doesn't seem to take into consideration who the spell was intended for (that I saw, at least). It only takes into account whether a unit of the attacker's "type" can hit a unit of the victim's "type". Since bosses can indeed damage players, this makes the player a candidate for gibbing.

Fortunately, the conditions for being fallback-targeted by the Regent are pretty strict (and insane):
  1. The player has to be very close to the spot that the Grand Regent died at (the numbers came from somewhere in the boss unit's data, but I couldn't figure out what exactly they meant; possibly base attack range).
  2. The player has to be within the 60-degree cone of the last direction that the Regent was facing (from the position he died at). If no default attack FOV is specified, it uses 60 as a default.
  3. The above conditions have to be met while the spell is triggered (as described above with a unit spawn or out of view unit becoming visible).
A possible fix I had for this was simply to allow dead units to target live ones. I don't really see when this would be a problem since most dead units don't trigger attacks (besides the Regent, in which case it's a legitimate target).
=== HOW TO AVOID ===
  1. Kill the Regent far from the spot that the Guardian appears (the left hand side of the "arena") and move all players away from his death spot.
  2. Reveal the Guardian (the Regent's corpse should be nowhere near at this point) and wait until he fully transforms to the Wood Guardian.
  3. Walk around the area to reveal any off-screen units without getting any players near the Regent's death spot.
  4. Go back to collect loot and live happily ever after.
Good luck!

Comments

  • RustyRusty Posts: 1,640
    Interesting find! I haven't run into this since the beta, but I know that other people have. Good work sir!
  • thanks for the "debugging" now we have a 100% certain explanation of it
    I tought the bug was in the guardian transformation because I was standing next to him when I died, same another day when someone else did I'll tell people to avoid standing in the regent death area

    from memory it did 60'000+hp to my character at least that's what the highets damage taken was saying and I doubt it was Grell that did that :lol:
Sign In or Register to comment.