1.13c saving stacks over 511

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
jean10451
Posts: 14
Joined: Sun Nov 18, 2012 6:52 am

1.13c saving stacks over 511

Post by jean10451 » Sat Dec 01, 2012 12:24 pm

I increased the maximum stack size the game will allow by modifying d2common.dll and changing the following two lines

00026170 81FD FF010000 CMP EBP,1FF
00026178 BD FF010000 MOV EBP,1FF

The problem is that if I save and re-enter the game, the stack size becomes 511 even if you had 2000 when you saved the game.

Quantity in itemstatcost.txt has a blank savebits value and putting numbers in it such 12 doesn't do anything so I think this is a code problem and quantity is not saved in the same way as other stats.

Another problem is that when stacks are equipped the displayed value shows as 511 even if it is really 2000 and it stays bugged until you use one of the stack

User avatar
kingpin
Senior Admin
Cherub
Posts: 10918
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: 1.13c saving stacks over 511

Post by kingpin » Sun Dec 02, 2012 1:14 am

there is more locations that just in d2common.dll you need to change.

You need to change the savefile / client checks aswell. Do a search for 0x1FF and you should find all the locations

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

Hand-picked

Re: 1.13c saving stacks over 511

Post by Necrolis » Sun Dec 02, 2012 6:12 am

I've posted the 1.10 locations here, they should help find the remaining locations needed.
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

jean10451
Posts: 14
Joined: Sun Nov 18, 2012 6:52 am

Re: 1.13c saving stacks over 511

Post by jean10451 » Sun Dec 02, 2012 1:44 pm

This was helpful thank you

I had to change the following to make it work

Change 1FF:
00026170 81FD FF010000 CMP EBP,1FF
00026176 7C 05 JL SHORT 0002617D
00026178 BD FF010000 MOV EBP,1FF

Change 1FF and 9 in Push 9:
00027F52 3D FF010000 CMP EAX,1FF
00027F57 7C 05 JL SHORT 00027F5E
00027F59 B8 FF010000 MOV EAX,1FF
00027F5E 8B4D 0C MOV ECX,DWORD PTR SS:[EBP+C]
00027F61 6A 09 PUSH 9

Change the 9:
0002B1F6 6A 09 PUSH 9

Aught
Junior Member
Champion of the Light
Posts: 442
Joined: Mon Nov 21, 2011 6:12 pm
Location: Russia
Contact:
Russia

Re: 1.13c saving stacks over 511

Post by Aught » Sun Dec 02, 2012 3:25 pm

Nice stuff, thank you both ;) btw how did you find this, jean? :D

User avatar
MarcoNecroX
Junior Member
Paladin
Posts: 179
Joined: Sun Apr 22, 2012 10:55 pm

Re: 1.13c saving stacks over 511

Post by MarcoNecroX » Wed Dec 19, 2012 11:06 am

Aught" wrote:Nice stuff, thank you both ;) btw how did you find this, jean? :D
not hard you just search for similar commands / constants , as long as command doesnt use an adress it should be equal on different versions

Aught
Junior Member
Champion of the Light
Posts: 442
Joined: Mon Nov 21, 2011 6:12 pm
Location: Russia
Contact:
Russia

Re: 1.13c saving stacks over 511

Post by Aught » Wed Dec 19, 2012 4:35 pm

ye, i use this metod but what if i need something that is not explained? f.e. hireling's weapons.

User avatar
MarcoNecroX
Junior Member
Paladin
Posts: 179
Joined: Sun Apr 22, 2012 10:55 pm

Re: 1.13c saving stacks over 511

Post by MarcoNecroX » Wed Dec 19, 2012 4:44 pm

Aught" wrote:ye, i use this metod but what if i need something that is not explained? f.e. hireling's weapons.
well , there are differnt ways to approach things to edit, you can always use constants (in this case 1ff), check for strings hash values, etc.
hireling weapons are a bit more complicated, it would be easy to swap the weapons they can use but adding more would be more tricky..


the best way to do many stuff is to look at older version edits and find the offsets on your own.. search -> win
older threads can give you info on what file to look and if you're lucky even the same command/func you're looking for,
thats why showing previous/next lines of an offset make it a lot easier to locate those in other versions :)

Post Reply

Return to “Code Editing”