Stash gold penalty for death in TCP/IP game

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

Post Reply
User avatar
Darion
Posts: 14
Joined: Mon Aug 27, 2018 12:22 pm

Stash gold penalty for death in TCP/IP game

Post by Darion » Fri Mar 29, 2019 8:19 pm

Hello members of the keep,

So in D2's TCP/IP games, there is also this annoying stash gold death penalty (like games on BN), which I'm trying to remove on 1.13d, and I found one relevant (and ancient) thread: Gold loss from stash on death

Unfortunately these CEs are for 1.10, and I wasn't able to track them down in 1.13d, also I found no information on the the GetStashGold function that SVR mentioned. I wonder if they somehow redone this part of code in later versions? Any help on this would be appreciated.
Last edited by Darion on Sat Mar 30, 2019 4:17 am, edited 1 time in total.

User avatar
Darion
Posts: 14
Joined: Mon Aug 27, 2018 12:22 pm

Re: Stash gold penalty for death in TCP/IP game

Post by Darion » Fri Mar 29, 2019 8:25 pm

BTW, I also found this thread: 1.13c death gold penalty/tax. But this one completely removes the gold penalty function, BOTH from stash and from inventroy, it also affects SP games, which is not what I intended.

User avatar
Darion
Posts: 14
Joined: Mon Aug 27, 2018 12:22 pm

Re: Stash gold penalty for death in TCP/IP game

Post by Darion » Mon May 20, 2019 5:44 pm

Solved this when reviewed it after a while. Codes are a bit different indeed but basically do the same thing.

Here is the section that SVR mentioned for v1.13d.

Code: Select all

0009A57C   6A 00	PUSH 0
0009A57E   6A 0F	PUSH 0F
0009A580   8BD8		MOV EBX,EAX
0009A582   56		PUSH ESI
0009A583   895C24 20	MOV DWORD PTR SS:[ESP+20],EBX
0009A587   E8 2CFEF6FF	CALL 0000A3B8		; Patch new call here
0009A58C   83FF 14	CMP EDI,14
0009A58F   8BE8		MOV EBP,EAX
0009A591   8D0C2B	LEA ECX,DWORD PTR DS:[EBX+EBP]
EDIT: After some testing, I have to say this isn't the perfect fix for 1.13 or other later versions. As new mechanics were added to the gold penalty function, thus simply "telling" the game there is 0 gold in stash would not mimic the same results as in single player. Here is the new patch for D2Game.dll v1.13d:

Code: Select all

0009A60E   8A50 6A	MOV DL,BYTE PTR DS:[EAX+6A]
0009A611   80FA 03	CMP DL,3
0009A614   75 1C	JNZ SHORT 0009A632	; NOP here, TCP/IP JMP
0009A616   8B4424 18	MOV EAX,DWORD PTR SS:[ESP+18]
0009A61A   3BF8		CMP EDI,EAX
0009A61C   7D 08	JGE SHORT 0009A626	; SP JMP

Post Reply

Return to “Code Editing”