Help needed with D2LOD "Next Hit Always Miss" bug

This is the place for people to research themes and ideas for their mods as well as for others to post their suggestions for mod makers to make use of.

Moderator: Nefarius

Post Reply
User avatar
julealgon
Posts: 5
Joined: Fri Mar 13, 2009 4:34 pm
Brazil

Help needed with D2LOD "Next Hit Always Miss" bug

Post by julealgon » Wed Jul 18, 2018 4:48 am

Some time ago (around 2009) I posted about a D2 LOD bug that I named the NHAM (Next Hit Always Miss) bug in the Amazon Basin forums. A few months later, I exchanged some messages with Nefarius in this forum about the issue, and at the time he mentioned it was something that had already been fixed in the Metalstorm codebase.

Recently I started playing the Path of Diablo MOD and posted this same issue on heir reddit page. Once again, I stumbled on quite a few folks who had never heard about the problem before. Unfortunately, most of PoD is done through softcoding so fixing this kind of bug would be unfeasible for them.

GreenDude, the man behind the mod, then suggested moving the discussion over here to see if we could maybe get a solution going for this issue. Here it it:

The Bug

The following describes the bug:
Every "hit interuption animation" inflicted on your charecter (namely: stun, knockback, hit recovery, block, dodge) causes the next attack you make to always miss the target. This is the case no matter the type of skill: even "auto-hit" attacks like smite, or spells like firebolt etc, will be a guaranteed miss if you attack right out of a recovery. For ranged spells, the spell will actually go in a weird direction most of the time instead of going where you are pointing (what Nefarius refers to as client-side-only "ghost missiles").
This severe bug is not immediately apparent for average spell-based builds that keep far away from monsters, but is a massive dealbreaker for any melee builds that rely on blocking/dodging/etc. The real issue is because this cycle can continue indefinitely, like the following:
  1. You start swinging
  2. You are interrupted by the moster in the middle of your attack, by blocking its hit with a shield
  3. You swing again, missing the hit due to the bug (100% miss chance)
  4. You are now interrupted again, due to a hit recovery (for example)
  5. You swing yet again, missing once again
  6. The cycle continues indefinitely until either the monster misses you and you are able to swing twice (in which case the second swing will be a normal swing), or you actively move away or stop attacking for a few frames.
While I don't have much knowledge of the internals of the game, Nefarius told me this was a desync issue between the client and server componen'ts of the game.

Impact
  • Melee builds (especially defense-based ones) become nearly unplayable
    I tried playing multiple max block high def paladins, but it is too frustrating. Even with a couple monsters attacking you, you already start too see the problems. I had a daggerzon in vanilla, but it also becomes nearly impossible to play due to constant whiffs due to all the recovery animations. Each and every attack needs to be planned and you can never hold down the attack button, even with a fast dagger.
    .
  • Shields become a lot less useful
    They will help you by blocking the hits, but at the same time they will hinder you by making you miss every hit after. It becomes an unintended double edged sword. It doesn't matter how fast your blocking is also: even with a pally + holy shield, the issue will remain exactly the same.
    .
  • Slow weapons become unviable
    I love slow weapons. I have an impale zon in vanilla. Try playing with impale and a slow pike and see this bug shine. Every whiff now costs you nearly 2 seconds.
    .
  • Battlemages are heavily impacted
    As a melee lover, I had my share of dagger necros, and even melee sorcs. You'd want a shield, in which case you'll also be affected constantly by this bug.
    .
  • Lots of folks will keep dying due to whiffed teleports
    Read above. I watch mrllamasc a lot. I've seen him losing HC sorcs more than once due to this.
    .
  • Issue is attributed to zeal/fend/amazon dodges
    This is a big mistake. The problem is at the core of the game and affects all attacks.
Testing

One can very easily test this by taking a slow recovery character (or high block chance) and attempting to cast/attack in the middle of a mob. Not sure if you have noticed this, but this bug has killed many Sorceresses before while trying to teleport away from a pack: you'll notice that sometimes the teleport animation will play to the end, but nothing happens. Other times, you'll cast a frost nova, see the ring expanding and going through the monsters, but it will not deal any damage or even slow enemies.

Final considerations

I'd like to bring attention for this bug and see about the possibility of getting it fixed by the community.

Fixing this bug would bring new life to many builds that are currently considered unplayable.

If you have any idea of how this could be fixed, I'd be glad to help with what I can. I'm not an experienced C++ dev or ASM, but I'm an experienced C# programmer. Just let me know.

Original post on PoD's Reddit:
https://www.reddit.com/r/pathofdiablo/c ... _fixed_in/

The Amazon Basin post has since disappeared with the forum restructure, so I was unable to find it.

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Help needed with D2LOD "Next Hit Always Miss" bug

Post by Necrolis » Wed Jul 18, 2018 8:27 pm

The work required to fix this isn't simple, but it was published years ago, read Nefarius' post on it here.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
julealgon
Posts: 5
Joined: Fri Mar 13, 2009 4:34 pm
Brazil

Re: Help needed with D2LOD "Next Hit Always Miss" bug

Post by julealgon » Wed Jul 18, 2018 10:48 pm

Oh my! How on earth did I miss that post! It was also published in 2009, the same year I approached Nefarius via PM to discuss it!

Necrolis, who do you think could help fixing this bug on 1.14? It appears that Nefarius knew exactly how to solve it and the post looks very detailed to the point where someone with a little bit of understanding of D2 code could also fix it.

Is Nefarius even around at all these days? His last activity on the forum is from 2 years ago.

Kaezin
Posts: 3
Joined: Sun Jun 17, 2018 7:13 pm
United States of America

Re: Help needed with D2LOD "Next Hit Always Miss" bug

Post by Kaezin » Wed Jul 18, 2018 11:38 pm

I believe you're looking for a fix for 1.13d, not 1.14.

User avatar
julealgon
Posts: 5
Joined: Fri Mar 13, 2009 4:34 pm
Brazil

Re: Help needed with D2LOD "Next Hit Always Miss" bug

Post by julealgon » Thu Jul 19, 2018 3:39 am

Kaezin wrote:
Wed Jul 18, 2018 11:38 pm
I believe you're looking for a fix for 1.13d, not 1.14.
Not sure what you mean exactly. Latest version is 1.14e, isn't it? Fixing the problem against the latest version would probably make the most sense I feel.

User avatar
Burznazg
Posts: 12
Joined: Tue Jul 12, 2016 1:31 pm
Poland

Re: Help needed with D2LOD "Next Hit Always Miss" bug

Post by Burznazg » Thu Jul 19, 2018 8:26 am

If you want fix for PoD then it runs on 1.13d.

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Help needed with D2LOD "Next Hit Always Miss" bug

Post by Necrolis » Thu Jul 19, 2018 11:06 am

I'd recommend chatting to firehawk on our Discord if you are interested in 1.13d; I started doing this in 1.10, it requires a lot of supporting code
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
marques
Posts: 47
Joined: Sat Mar 05, 2005 8:12 pm
Slovakia

Re: Help needed with D2LOD "Next Hit Always Miss" bug

Post by marques » Thu Jul 19, 2018 2:39 pm

Necrolis have you fixed it completely for 1.10? Could it be released as plugin?

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Help needed with D2LOD "Next Hit Always Miss" bug

Post by Necrolis » Thu Jul 19, 2018 4:41 pm

marques wrote:
Thu Jul 19, 2018 2:39 pm
Necrolis have you fixed it completely for 1.10? Could it be released as plugin?
There are a few more things I need to do, my attention is on other things at the moment; as for extracting it out into a plugin; I'm not sure if I have the time. I can always see if kingpin can add it to dreamlands, but to fix this one requires space to store the frames, which means at least 4 free/extra bytes in the pUnit. The required work isn't difficult, its basically a bunch of loops that handle the unit frame events.

As a note, in 1.10, these four functions need to be replaced (I have only replaced the first) apart from the skill funcs (which may be a lot more than the ones Nefarius mentions).

Code: Select all

6FCBCE70
6FCBCFD0
6FCBD120
6FCBD260
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

Post Reply

Return to “Mod Concepts & Research”