Page 1 of 1

Remove "Slain by" message

Posted: Wed Jun 12, 2019 5:24 am
by csguak
Hello, modders!
I have been trying to remove the message that pops up whenever you die, specifically this one:

Image

I tried Kidpaddle's "Disable chat" method,

Code: Select all

"Disable the chat"

D2Lang.dll - B0E9

0033B0E9    66:890F         MOV WORD PTR DS:[EDI],CX

TO

0033B0E9    90              NOP
0033B0EA    90              NOP
0033B0EB    90              NOP

;This edit will disable the chat. You still can press enter and open the box where you type messages, but it has no effect.

but I ran into a few problems,
First of all, Waypoint names are all gone, and I can't use NPCs due to this problem lol
Image

If you only remove "slain by" message with AFJ tbl editor,
The message still appears as:
AmazonBlood Hawk

The message lasts exactly 10 seconds, so I tried to find the command line in hopes to make it last 0 second.

Code: Select all

CMP EAX, 10           <-- 10 seconds or 250 frames? Hex A or FA doesn't show up anywhere
in D2client, D2common, D2game, D2lang but all the breakpoints gets skipped at the time of character death.

Anyone know what I can do to completely remove the message from showing up?
Or any way of disabling chat display on the left side or screen?

Thank you.

Re: Remove "Slain by" message

Posted: Wed Jun 12, 2019 8:46 am
by devurandom
Have you searched D2Client for the string constants associated with "Slain By"?

0xE3F
0xE40

Re: Remove "Slain by" message

Posted: Wed Jun 12, 2019 6:14 pm
by csguak
yay devurandom to the rescue! Thank you for the quick reply.
devurandom wrote:
Wed Jun 12, 2019 8:46 am
0xE3F
0xE40
Image
wow totally missed those values. What a wonderful tool we have here.

according to this post,
viewtopic.php?t=62764
D2client seems to be the usual suspect, like you mentioned.

0xE3F is 63
0xE40 is 64

So, I tired NOPing all the command line that had this
Image

1 match for 3F,
6 or 7 match for 40
all NOPed

but message still appears. Did I do something wrong or look for a wrong command?

Re: Remove "Slain by" message

Posted: Thu Jun 13, 2019 3:18 am
by devurandom
Its a little confusing, but I find clicking the id# more helpful to understand what constant to search for.

Image

The constants are 0xE3F and 0xE40, not 0x3F or 0x40.

Since the constant is in string.tbl you'd need to search for the constant 0xE3F and 0xE40 since sysmsg8 also has the same string your looking for and we don't know which of the 2 strings they used.

Might be better to put a break point on those constants when you find it then let the player die and see which breakpoint gets triggered.

Re: Remove "Slain by" message

Posted: Tue Jun 18, 2019 7:40 am
by csguak
YES! Thank you for the correction, I have found the code responsible, however:
Image
When I NOPed the top two break pointed lines, I got unhanded exception crash when my character died. Why is 'no operation' causing the game to crash??


Code: Select all

MOV EDI,0E3F
wasn't much of a problem, since I could just delete the "slain by" message with tbl editor. Although, NOPing that line gave me weird jibberish lol


EDIT:
Okay I figured it out. Huge thanks to Devurandom! :D These addresses are for 1.13c
Image

If you just NOP the bottom two lines I marked, you can get rid of the message. I have no idea how it happened. :mrgreen: