[1.13d] Make 'attack' always hit

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Post Reply
User avatar
imakeigloos_pat
Posts: 91
Joined: Wed Dec 10, 2008 12:13 am

[1.13d] Make 'attack' always hit

Post by imakeigloos_pat » Tue Aug 22, 2017 10:02 am

Hi,
I have been able to make the missile thrown from a javelin to be able to always hit a monster by removing the '1' from the 'ToHit' column in missiles.txt. However, I would like to do this with the normal skill 'attack' as well, thus making normal melee attacks always hit.

I've searched through many of the text files now and the forums, but it has led me nowhere. Does anyone know how one would do this?

Appreciated,
Patrik


User avatar
imakeigloos_pat
Posts: 91
Joined: Wed Dec 10, 2008 12:13 am

Re: [1.13d] Make 'attack' always hit

Post by imakeigloos_pat » Fri Aug 25, 2017 1:59 pm

Thanks for your help, I will try that out.

However, one thing that comes to mind quickly is that the character level and monster level in the equation is not dealt with then, thus leaving me not hitting monsters which are higher level than me. I wish to be able to hit high level monsters as well, such as Guided Arrow would.¨

Edit:
I have not been able to get this to work, so I guess I will have do this in form of a code edit. Necrolis helped me in viewtopic.php?f=8&t=59863 with 1.10f, I'll see if I can pick up on that.

User avatar
devurandom
Forum Regular
Angel
Posts: 897
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.13d] Make 'attack' always hit

Post by devurandom » Fri Aug 25, 2017 7:01 pm

For 1.13d nop these lines in D2Game.dll

Code: Select all

6FCAAFAE    83F8 01     CMP EAX,1
6FCAAFB1    75 7B       JNE SHORT 6FCAB02E
ported from the original edit in 1.10f
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..

User avatar
csguak
Posts: 61
Joined: Fri Jul 06, 2012 7:15 am
Location: USA

Re: [1.13d] Make 'attack' always hit

Post by csguak » Tue Aug 29, 2017 8:54 pm

devurandom" wrote:For 1.13d nop these lines in D2Game.dll

Code: Select all

6FCAAFAE    83F8 01     CMP EAX,1
6FCAAFB1    75 7B       JNE SHORT 6FCAB02E
ported from the original edit in 1.10f
Hello, I tried this for 1.13c and it doesn't seem to affect anything.
I basically tried NOPing every function that had JNE SHORT command and only reverting it back when the game crashes, but it didn't seem to affect the Attack Rating mechanic.

I've looking for a solution for a "100% melee hit chance" for years now, with no success. But, I greatly appreciate your post Devurandom, it at least gives me something to go on.

User avatar
devurandom
Forum Regular
Angel
Posts: 897
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.13d] Make 'attack' always hit

Post by devurandom » Wed Aug 30, 2017 4:28 am

csguak" wrote:
Hello, I tried this for 1.13c and it doesn't seem to affect anything.
I basically tried NOPing every function that had JNE SHORT command and only reverting it back when the game crashes, but it didn't seem to affect the Attack Rating mechanic.

I've looking for a solution for a "100% melee hit chance" for years now, with no success. But, I greatly appreciate your post Devurandom, it at least gives me something to go on.

for 1.13c you should nop this out

Code: Select all

6FCFCE8E   83F8 01      CMP EAX,1
6FCFCE91   75 7B        JNE SHORT 6FCFCF0E
The original function changed since 1.10, yet these edits are found in the only in code block that
matches up to the 1.10 function posted by necrolis for 1.10.

It seems to work in short testing but hits can still be blocked, as mentioned in the original post.
viewtopic.php?f=8&t=59863
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..

User avatar
csguak
Posts: 61
Joined: Fri Jul 06, 2012 7:15 am
Location: USA

Re: [1.13d] Make 'attack' always hit

Post by csguak » Wed Aug 30, 2017 4:29 am

ahh okay thank you.
I made a mistake of looking for JNZ SHORT functions instead of JNE.





Edit: For some reason I am not able to find any JNE function inside d2game.dll LOL
There are plenty of these,
Image

But, I wasn't able to locate a single JNE function...
Do you remember where this particular function was being held in d2game.dll? Is it located around the middle of the code?

Here is hoping that I finally track down this mechanic once and for all :D
Last edited by csguak on Wed Aug 30, 2017 5:04 am, edited 1 time in total.

User avatar
devurandom
Forum Regular
Angel
Posts: 897
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.13d] Make 'attack' always hit

Post by devurandom » Wed Aug 30, 2017 5:12 am

Ollydbg can interpret the same opcode differently in some situations. I use version 2.01 latest.
if your not sure.. calculate the offsets for whats posted above.

Cheers!
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..

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: [1.13d] Make 'attack' always hit

Post by Necrolis » Wed Aug 30, 2017 9:53 am

csguak" wrote:Edit: For some reason I am not able to find any JNE function inside d2game.dll LOL
JNE and JNZ are the same opcode; for jumps there are two equivalent sets of mnemonics that get used, you should be able to toggle between them in the options (one set relates the the semantic function "NOT EQUAL", the other relates to the EFlag that is tested by the jump, "NOT Z").
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
csguak
Posts: 61
Joined: Fri Jul 06, 2012 7:15 am
Location: USA

Re: [1.13d] Make 'attack' always hit

Post by csguak » Thu Aug 31, 2017 2:06 am

imakeigloos_pat" wrote:
Edit:
I have not been able to get this to work, so I guess I will have do this in form of a code edit. Necrolis helped me in viewtopic.php?f=8&t=59863 with 1.10f, I'll see if I can pick up on that.
oh by the way, I NOPed every function that had

Code: Select all

CMP DWORD PTR SS:[EBP],1
JNZ SHORT
and lvl 1 monsters still could not hit me. (5% hit chance)
Also my lvl 1 character still could not hit Hell fallens.

I am pretty sure "chance to hit" function is hiding somewhere else.

In the mean time, you can increase the 95% cap to 100% using this method as Devurandom helped us out two years ago.
viewtopic.php?f=8&t=62439

User avatar
imakeigloos_pat
Posts: 91
Joined: Wed Dec 10, 2008 12:13 am

Re: [1.13d] Make 'attack' always hit

Post by imakeigloos_pat » Sat Sep 16, 2017 9:31 am

Thanks for your help devurandom and Necrolis. I just got back from vacation and got some time to test this, but unfortunately this does not work.

I remember Necrolis had to check for a second place to edit as well but never came back to me. Maybe there is more that needs to be done here?

Post Reply

Return to “General Mod Making”