Making it so dodge/avoid/evade doesn't break skills
Moderator: Nizari
-
- Posts: 37
- Joined: Sat Apr 28, 2012 3:59 pm
Making it so dodge/avoid/evade doesn't break skills
If you use skills like zeal/fend or pretty much anything, if dodge or avoid or evade trigger then the attack will miss.
Shield block and assassin claw block don't behave like this.
I'm not sure exactly what part of the skill is making this happen but I did find this
http://classic.battle.net/diablo2exp/sk ... sive.shtml
Dodge/Avoid/Evade Skills
The Dodge/Avoid/Evade skills will kick-in and work if your Amazon is in the middle of an attack animation, without showing the Dodge/Avoid/Evade animation.
So the skills should just be blocking damage and not doing animations which interrupt anything if your hero is busy.
Can anyone think of a way of fixing this? such as disabling the animation if your hero is busy if this is the issue, or even basing the skill off shield block or assassin claw block or something, is that possible? Or anything anyone can think of that would fix this?
Shield block and assassin claw block don't behave like this.
I'm not sure exactly what part of the skill is making this happen but I did find this
http://classic.battle.net/diablo2exp/sk ... sive.shtml
Dodge/Avoid/Evade Skills
The Dodge/Avoid/Evade skills will kick-in and work if your Amazon is in the middle of an attack animation, without showing the Dodge/Avoid/Evade animation.
So the skills should just be blocking damage and not doing animations which interrupt anything if your hero is busy.
Can anyone think of a way of fixing this? such as disabling the animation if your hero is busy if this is the issue, or even basing the skill off shield block or assassin claw block or something, is that possible? Or anything anyone can think of that would fix this?
Re: Making it so dodge/avoid/evade doesn't break skills
this is a bug deep in the core of D2, its only real fix is to recode the portions of code handling server and client frame management (see some of Nefarius' posts in CE).
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
-
- Posts: 37
- Joined: Sat Apr 28, 2012 3:59 pm
Re: Making it so dodge/avoid/evade doesn't break skills
I see, thank you. This is all I could find about it, but it doesn't appear to be the kind of fix I think I could make such as making a new skill based on assa claw block or something viewtopic.php?f=8&t=53570
It seems that Nefarius has managed to fix this bug, but didn't post the fix as it was alot of code. Do you know if it's available anywhere like the "Nefarius's Fixed TXT Files"?
By the way do you know if "Nefarius's Fixed TXT Files" is safe to use with 1.13d or if the patch changes since it was released will break things?
It seems that Nefarius has managed to fix this bug, but didn't post the fix as it was alot of code. Do you know if it's available anywhere like the "Nefarius's Fixed TXT Files"?
By the way do you know if "Nefarius's Fixed TXT Files" is safe to use with 1.13d or if the patch changes since it was released will break things?
Re: Making it so dodge/avoid/evade doesn't break skills
No, code fixes generally aren't available as plugins (if they were, I guarantee you they wouldn't be for 1.13 as most code editors around here work with 1.10 or 1.11, the latter of which Nefarius works extensively with)
Nefarius's Fixed Text files work for any version past 1.10.
Nefarius's Fixed Text files work for any version past 1.10.
11/1/08 - COTL; 5/10/09 - Angel; 11/11/09 - ArchangelAlthough done for our needs, mod-makers should like these changes, too.
-
- Arch-Angel
- Posts: 1218
- Joined: Sun Sep 11, 2005 10:04 am
Re: Making it so dodge/avoid/evade doesn't break skills
"Each of those few chords separated by complete silence feels like a knife wound to the heart"
There is no greater sorrow than to recall happiness in times of misery. Draconian
There is no greater sorrow than to recall happiness in times of misery. Draconian
-
- Posts: 70
- Joined: Sat Mar 05, 2011 10:03 am
Re: Making it so dodge/avoid/evade doesn't break skills
Nefarius has been so kind to provide this information on my inquiry of similar nature, where I asked if I can cancel out all dodge animations while keeping the desired effect:
You'll need to locate D2Game.ApplyAttackResults in the version you're working with and remove the response to three resultflags, namely:
Code: Select all
RESULTFLAG_DODGE = 0x80,
RESULTFLAG_AVOID = 0x100,
RESULTFLAG_EVADE = 0x200,
You'll find three checks there for these flags, the first two set the mode to S1, the last one just tells the client to play a sound as a response to the event.
So, according to him, it is possible and according to my logic it should normalize fend and jab and stuff. The problem on my end is I am not nearly savvy enough to implement this myself, but if someone could walk me and possibly others through it, this could be a solution to this pesky issue.
You'll need to locate D2Game.ApplyAttackResults in the version you're working with and remove the response to three resultflags, namely:
Code: Select all
RESULTFLAG_DODGE = 0x80,
RESULTFLAG_AVOID = 0x100,
RESULTFLAG_EVADE = 0x200,
You'll find three checks there for these flags, the first two set the mode to S1, the last one just tells the client to play a sound as a response to the event.
So, according to him, it is possible and according to my logic it should normalize fend and jab and stuff. The problem on my end is I am not nearly savvy enough to implement this myself, but if someone could walk me and possibly others through it, this could be a solution to this pesky issue.
-
- Posts: 37
- Joined: Sat Apr 28, 2012 3:59 pm
Re: Making it so dodge/avoid/evade doesn't break skills
So disabling the animation is enough to stop dodge, etc from making skills miss?
I have gone through all the MPQ files with an mpq editor and none of the files have the text "ApplyAttackResults" when searched through. Going through D2Game.dll with a hex editor didn't result in anything either.
I have gone through all the MPQ files with an mpq editor and none of the files have the text "ApplyAttackResults" when searched through. Going through D2Game.dll with a hex editor didn't result in anything either.
-
- Posts: 70
- Joined: Sat Mar 05, 2011 10:03 am
Re: Making it so dodge/avoid/evade doesn't break skills
That's the same for me, isn't there a single person except Nefarius who knows where and how to edit this? I really don't wish to bother him again...
-
- Posts: 96
- Joined: Fri Sep 03, 2010 7:20 pm
Re: Making it so dodge/avoid/evade doesn't break skills
Its not a txt file its in d2game.dll I'm not sure where to find it or how to apply it tho
-
- Posts: 37
- Joined: Sat Apr 28, 2012 3:59 pm
Re: Making it so dodge/avoid/evade doesn't break skills
I think you could apply it with a hex editor, the hex address would change depending on the version, but the hex string eg (0F 85 F4 00 00 00) which would just be changed to make the fix, should stay the same because blizzard have not edited the code related to the change we want to make throughout the different versions of D2.
Some people posting on the forum have documented the hex addresses and strings of certain things and even what to change the string to, to make certain fixes.
But as far as I know, nobody has documented anything on "ApplyAttackResults" in D2Game.dll for any version of D2 or the resultflags
Some people posting on the forum have documented the hex addresses and strings of certain things and even what to change the string to, to make certain fixes.
But as far as I know, nobody has documented anything on "ApplyAttackResults" in D2Game.dll for any version of D2 or the resultflags
Re: Making it so dodge/avoid/evade doesn't break skills
all needed informations there: viewtopic.php?f=8&t=49063
-
- Posts: 37
- Joined: Sat Apr 28, 2012 3:59 pm
Re: Making it so dodge/avoid/evade doesn't break skills
For some reason the addresses in d2game.dll are between 77760000 and 77835FFE for me when opened in ollydb, but the addresses shown in that topic are ~6FCB9917 which means I can't find anything in that topic inside d2game.dll
I guess we need to find the function
enum eRESULTFLAG
{
....
RESULTFLAG_NOEVENTS = 32,
RESULTFLAG_DODGE = 128,
RESULTFLAG_AVOID = 256,
RESULTFLAG_EVADE = 512
....
}
and comment out "RESULTFLAG_DODGE = 128","RESULTFLAG_AVOID = 256","RESULTFLAG_EVADE = 512" or replace those lines with 00 in hex editor or even change "128, 256 and 512" with "32" if NOEVENTS lives up to its name.
I guess we need to find the function
enum eRESULTFLAG
{
....
RESULTFLAG_NOEVENTS = 32,
RESULTFLAG_DODGE = 128,
RESULTFLAG_AVOID = 256,
RESULTFLAG_EVADE = 512
....
}
and comment out "RESULTFLAG_DODGE = 128","RESULTFLAG_AVOID = 256","RESULTFLAG_EVADE = 512" or replace those lines with 00 in hex editor or even change "128, 256 and 512" with "32" if NOEVENTS lives up to its name.
-
- Posts: 70
- Joined: Sat Mar 05, 2011 10:03 am
Re: Making it so dodge/avoid/evade doesn't break skills
Tell me how it worked out for you later
Re: Making it so dodge/avoid/evade doesn't break skills
The topic is for v1.11b, so you need to learn how to find the offsets for whatever version you are using.Freddy" wrote:For some reason the addresses in d2game.dll are between 77760000 and 77835FFE for me when opened in ollydb, but the addresses shown in that topic are ~6FCB9917 which means I can't find anything in that topic inside d2game.dll
-
- Posts: 37
- Joined: Sat Apr 28, 2012 3:59 pm
Re: Making it so dodge/avoid/evade doesn't break skills
Ok, I think this will fix it:
Dodge: no more animation, no more dodge sound, and attacks don't miss, but dodge does continue to work.
Avoid: no more animation, and the character makes a hurt sound when they are avoiding, but they don't take damage.
Evade: I don't know if evade even had an animation to begin with, it doesn't seem to. I'm not sure evade needs to be changed as it only triggers when running or walking, and if you are running or walking you are not attacking so it shouldn't make your attacks miss.
This is what was changed, I don't know if there are any unintended consequences, testing was limited:
Dodge:
For the last line the 80 was changed to 0
Avoid and evade:
Removed the last line for each block of code.
using a hex editor like XVI32 on d2game.dll
1.11b fixes:
dodge:
7DA25: change 80 to 00
avoid:
99A2A: change 80 4F 05 01 into 90 90 90 90
evade:
99A22: change 80 4f 05 02 into 90 90 90 90
1.13d fixes
dodge:
8BC3D: change 80 to 00
avoid:
42E32: change 80 4F 05 01 to 90 90 90 90
evade:
42E2A: change 80 4f 05 02 into 90 90 90 90
Dodge: no more animation, no more dodge sound, and attacks don't miss, but dodge does continue to work.
Avoid: no more animation, and the character makes a hurt sound when they are avoiding, but they don't take damage.
Evade: I don't know if evade even had an animation to begin with, it doesn't seem to. I'm not sure evade needs to be changed as it only triggers when running or walking, and if you are running or walking you are not attacking so it shouldn't make your attacks miss.
This is what was changed, I don't know if there are any unintended consequences, testing was limited:
Dodge:
Code: Select all
A8 04 TEST AL,4
74 06 JE SHORT D2Game.084DDA29
81CB 80000000 OR EBX,80
Avoid and evade:
Code: Select all
// BLOCKFLAG_EVADE
6FCB9A1E TEST AL,8
6FCB9A20 JE SHORT D2Game.6FCB9A26
6FCB9A22 OR BYTE PTR DS:[EDI+5],2
// BLOCKFLAG_AVOID
6FCB9A26 TEST AL,2
6FCB9A28 JE SHORT D2Game.6FCB9A2E
6FCB9A2A OR BYTE PTR DS:[EDI+5],1
using a hex editor like XVI32 on d2game.dll
1.11b fixes:
dodge:
7DA25: change 80 to 00
avoid:
99A2A: change 80 4F 05 01 into 90 90 90 90
evade:
99A22: change 80 4f 05 02 into 90 90 90 90
1.13d fixes
dodge:
8BC3D: change 80 to 00
avoid:
42E32: change 80 4F 05 01 to 90 90 90 90
evade:
42E2A: change 80 4f 05 02 into 90 90 90 90
-
- Posts: 70
- Joined: Sat Mar 05, 2011 10:03 am
Re: Making it so dodge/avoid/evade doesn't break skills
Although took me a while to find it in my 1.13 dll, I can verify that this works well. Well done Freddy.
Re: Making it so dodge/avoid/evade doesn't break skills
I've went and found offsets for 1.13c. All code tested using Jab and Fend with a 100% CTC Nova-on-hit javelin to see if the bug persists.
Dodge plays no sound/animation:
Avoid plays "get hurt" sound and no animation:
Evade procs while moving, and according to my experiments there is no animation for Evade in 1.13c so no need to bother.
However, I thought up an aesthetically better workaround: what if, instead of NOPing the code, we fool the game into treating BLOCKFLAG_DODGE and BLOCKFLAG_AVOID in the same manner as BLOCKFLAG_EVADE? Then players can identify when Dodge/Avoid is proccing by listening for the D/A/E "hyah!" cry -- and still have the bug fix.
Alternative hack: Dodge -> Evade
Alternative hack: Avoid -> Evade
Note that Avoid needs two code edits since the game checks this in two places.
Bare-bones testing shows this works fine--Dodge/Avoid/Evade all procs with "Hyah!" and without any animation, allowing Fend/Jab to work perfectly
Dodge plays no sound/animation:
Code: Select all
D2Game.0x000DE673
81 CB 80 00 00 00 => 90 90 90 90 90 90
Code: Select all
D2Game.0x0003AF4A
80 4F 05 01 => 90 90 90 90
However, I thought up an aesthetically better workaround: what if, instead of NOPing the code, we fool the game into treating BLOCKFLAG_DODGE and BLOCKFLAG_AVOID in the same manner as BLOCKFLAG_EVADE? Then players can identify when Dodge/Avoid is proccing by listening for the D/A/E "hyah!" cry -- and still have the bug fix.
Alternative hack: Dodge -> Evade
Code: Select all
D2Game.0x000DE673
81 CB 80 00 00 00 => 81 CB 00 02 00 00
Code: Select all
D2Game.0x000DE669
81 CB 00 01 00 00 => 81 CB 00 02 00 00
D2Game.0x0003AF4A
80 4F 05 01 => 80 4F 05 02
Bare-bones testing shows this works fine--Dodge/Avoid/Evade all procs with "Hyah!" and without any animation, allowing Fend/Jab to work perfectly
D2TXT / D2INI - Python scripts for editing TXT files, or converting between TXT ↔ INI files
-
- Warrior
- Posts: 24
- Joined: Wed Jul 19, 2017 9:41 pm
Re: Making it so dodge/avoid/evade doesn't break skills
Sorry for necroing this thread, anyone has the offsets of the fix below for 1.10?
For some reason, v1.10 doesn't use the same bytes as the other ones...
Help would be appreciated.
EDIT: I still can't find them.mmpx222 wrote: ↑Wed Feb 04, 2015 2:05 pm
Alternative hack: Dodge -> EvadeAlternative hack: Avoid -> EvadeCode: Select all
D2Game.0x000DE673 81 CB 80 00 00 00 => 81 CB 00 02 00 00
Note that Avoid needs two code edits since the game checks this in two places.Code: Select all
D2Game.0x000DE669 81 CB 00 01 00 00 => 81 CB 00 02 00 00 D2Game.0x0003AF4A 80 4F 05 01 => 80 4F 05 02
For some reason, v1.10 doesn't use the same bytes as the other ones...
Help would be appreciated.
Re: Making it so dodge/avoid/evade doesn't break skills
[1.10] Please verify... offsets un-tested
Code: Select all
Dodge
000923D0 A8 04 TEST AL,04
000923D2 74 03 JE SHORT 000923D7
000923D4 80CB 80 OR BL,80
Evade - Avoid
0002F60C A8 08 TEST AL,08
0002F60E 74 04 JE SHORT 0002F614
0002F610 804E 05 02 OR BYTE PTR DS:[ESI+5],02
0002F614 A8 02 TEST AL,02
0002F616 74 04 JE SHORT 0002F61C
0002F618 804E 05 01 OR BYTE PTR DS:[ESI+5],01
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Re: Making it so dodge/avoid/evade doesn't break skills
freddy
I can't find it in 1.13d.
I can't find it in 1.13d.
-
- Paladin
- Posts: 119
- Joined: Sat Nov 30, 2019 1:11 am
Re: Making it so dodge/avoid/evade doesn't break skills
This bug can be somehow fixed in txt:
add 3 new lines in states.txt, copy original 3 lines to them and rename them as "dodgenobug" or something, then use those new states in skills.txt and the bug would not appear again.
But the animation would gone as well, your ama would dodge/avoid/evade without animation.
add 3 new lines in states.txt, copy original 3 lines to them and rename them as "dodgenobug" or something, then use those new states in skills.txt and the bug would not appear again.
But the animation would gone as well, your ama would dodge/avoid/evade without animation.
Re: Making it so dodge/avoid/evade doesn't break skills
Has anyone else tried this? I used mmpx222 's suggestion and Dodge works great! Bravo! However, Avoid does not work. No sound no Avoid. My code edit matches exactly.
-
- Posts: 6
- Joined: Thu Jan 21, 2021 3:50 pm
Re: Making it so dodge/avoid/evade doesn't break skills
greetings,mmpx222 wrote: ↑Wed Feb 04, 2015 2:05 pmHowever, I thought up an aesthetically better workaround: what if, instead of NOPing the code, we fool the game into treating BLOCKFLAG_DODGE and BLOCKFLAG_AVOID in the same manner as BLOCKFLAG_EVADE? Then players can identify when Dodge/Avoid is proccing by listening for the D/A/E "hyah!" cry -- and still have the bug fix.
Alternative hack: Dodge -> EvadeAlternative hack: Avoid -> EvadeCode: Select all
D2Game.0x000DE673 81 CB 80 00 00 00 => 81 CB 00 02 00 00
Note that Avoid needs two code edits since the game checks this in two places.Code: Select all
D2Game.0x000DE669 81 CB 00 01 00 00 => 81 CB 00 02 00 00 D2Game.0x0003AF4A 80 4F 05 01 => 80 4F 05 02
i managed to find the corresponding values for dodge and avoid in the 1.14d game.exe for the positions DE669 and DE673 (from the 1.13c d2game.dll). but can't find the last value for the avoid fix at position 3AF4A.
can't find the corresponding code in the 1.14d game.exe and searched a lot for it. dodge works fine, but avoid didn't work without the second code change.
anybody knows the right position for the 3AF4A value in the 1.14d game.exe?
-
- Posts: 6
- Joined: Thu Jan 21, 2021 3:50 pm
Re: Making it so dodge/avoid/evade doesn't break skills
i managed to find the corresponding entries in the 1.14d game.exe
so here it comes for everybody who wants it (i also put the surrounding code in clings behind it, in case somebody can't use my code for the position, so you alternative can search direct for the code line in game.exe):
Dodge:
at position 17ecfd change 80 00 to 00 02 (A8 04 74 06 81 CB 80 00 00 00)
Avoid:
at position 17ecf4 change 01 to 02 (A8 02 74 06 81 CB 00 01 00 00)
at position 1ad84b change 01 to 02 (A8 02 74 06 66 81 4E 04 00 01)
if you use this with D2 1.14d game.exe, you will have no animation for the Dodge and Avoid actions of your amazon.
but to have also the "hyah" sound when the skills are triggered, like mentioned above in the post from mmpx222, you need to have at least 1 skill point at the Evade skill.
i also can say and have tested it, that the Dodge and Avoid skills (with changed animation to Evade) also working correct without a skill point at Evade, it's really just the "hyah" sound, why you would need a skill point at the Evade skill. so if you also want no sound for the Dodge and Avoid skills and doesn't need the Evade skill, you can left the skill without any point.
hope someone can use this information. have fun.
so here it comes for everybody who wants it (i also put the surrounding code in clings behind it, in case somebody can't use my code for the position, so you alternative can search direct for the code line in game.exe):
Dodge:
at position 17ecfd change 80 00 to 00 02 (A8 04 74 06 81 CB 80 00 00 00)
Avoid:
at position 17ecf4 change 01 to 02 (A8 02 74 06 81 CB 00 01 00 00)
at position 1ad84b change 01 to 02 (A8 02 74 06 66 81 4E 04 00 01)
if you use this with D2 1.14d game.exe, you will have no animation for the Dodge and Avoid actions of your amazon.
but to have also the "hyah" sound when the skills are triggered, like mentioned above in the post from mmpx222, you need to have at least 1 skill point at the Evade skill.
i also can say and have tested it, that the Dodge and Avoid skills (with changed animation to Evade) also working correct without a skill point at Evade, it's really just the "hyah" sound, why you would need a skill point at the Evade skill. so if you also want no sound for the Dodge and Avoid skills and doesn't need the Evade skill, you can left the skill without any point.
hope someone can use this information. have fun.
-
- Posts: 87
- Joined: Sat Nov 28, 2009 1:53 pm
Re: Making it so dodge/avoid/evade doesn't break skills
Tested this and can confirm it works, seems like the easiest way to fix this since you dont need code editing.Nagahaku wrote: ↑Wed Jul 22, 2020 9:47 amThis bug can be somehow fixed in txt:
add 3 new lines in states.txt, copy original 3 lines to them and rename them as "dodgenobug" or something, then use those new states in skills.txt and the bug would not appear again.
But the animation would gone as well, your ama would dodge/avoid/evade without animation.