[1.10] SaveFile Limit
Moderators: Nefarius, Havvoric
[1.10] SaveFile Limit
Since I know the limit is something lke 6 KB (Correct me if I'm wrong)
Is it possible to increase this value to 1MB for example? And how hard it would it be?
Is it possible to increase this value to 1MB for example? And how hard it would it be?
- Necrolis
- Throne
- Posts: 9125
- Joined: Sat Mar 25, 2006 1:22 pm
- Location: The Land of the Dead
- Contact:
Re: [1.10] SaveFile Limit
The limit is 8192 bytes to be exact. expanding the limit itself isn't too hard, just look for all occurrences of 0x2000 in D2Game.dll and up those (there shouldn't be many, the main on yeilds an assertion in 1.10, so its very easy to find).
As for the side effects of doing this, I have no clue as I've never bothered with expanding the vanilla save file code, so its up to you to test.
EDIT: actually there is only one location, being the one that yields the assertion, so just look for a CMP vs 0x2000, those other 0x2000's are all bitflags
As for the side effects of doing this, I have no clue as I've never bothered with expanding the vanilla save file code, so its up to you to test.
EDIT: actually there is only one location, being the one that yields the assertion, so just look for a CMP vs 0x2000, those other 0x2000's are all bitflags
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
- kidpaddle94
- Principality
- Posts: 2057
- Joined: Thu Aug 13, 2009 2:54 pm
- Location: localhost
Re: [1.10] SaveFile Limit
I think the assertion in D2Game was only in Multiplayer. I could allow clients to join my game with higher filesize, but couldn't get my own character to join with higher filesize.
For example, if I made a TCP/IP game with this location increased to 9000 bytes, my host couldn't enter game. But if I created a game with a new character, joiners could join with 8250 bytes for example.
I also recall there was a second assertion when the client would leave the game.
Trying in single player would have the same effect as trying to host with oversized characters.
For example, if I made a TCP/IP game with this location increased to 9000 bytes, my host couldn't enter game. But if I created a game with a new character, joiners could join with 8250 bytes for example.
I also recall there was a second assertion when the client would leave the game.
Trying in single player would have the same effect as trying to host with oversized characters.
- Necrolis
- Throne
- Posts: 9125
- Joined: Sat Mar 25, 2006 1:22 pm
- Location: The Land of the Dead
- Contact:
Re: [1.10] SaveFile Limit
I lie, was checking an already altered dll, the exact locations are (copied from my actual code that replaces ALL of D2's save crap):
There are also a few places where the save file is copied onto the STACK (LIKE WTF?!?!), which lead to an infamous dupe (just like the assertion did). so you need to fixup (IMO its much more secure to recode) the following functions to get it done correctly:
judging by the addresses, some might be in the middle of another function (only have access to my SVN atm).
There is also code in D2Launch for save files, but IIRC it doesn't have a limit check (it might still be dumb and copy crap to a stack buffer). The only other code is the code in D2Client that splits or join the savefile parts for sending or receiving characters when joining or hosting an MP game, it has no limit (it infact does very little other than checking for the 0xAA55AA55 header stamp...).
In terms of the stack buffers, I'm not sure on its size (didn't make notes...), IIRC its more like 10KB, but its easy to expand, just find the call to _alloca (it'll be right at the start of a function), and increase that, just beware not to go crazy (you could probably double or triple it with ease).
If you are gonna expand the file size, remove the artificial delay the game adds between sending each ~500 byte chunk, this is handled by a Sleep call in D2Client's save part sending code, drop the 250ms delay (between each part) down to like 20 or 10ms.
Code: Select all
{0x6FC31B23,SAVEFILE_MAX_SIZE,FT_NON_RELOC},
{0x6FC8A1EF,SAVEFILE_MAX_SIZE,FT_NON_RELOC},
{0x6FC8A65F,SAVEFILE_MAX_SIZE,FT_NON_RELOC},
{0x6FC8A702,SAVEFILE_MAX_SIZE,FT_NON_RELOC},
{0x6FC8CA41,SAVEFILE_MAX_SIZE,FT_NON_RELOC},
{0x6FC90C98,SAVEFILE_MAX_SIZE,FT_NON_RELOC},
{0x6FC92808,SAVEFILE_MAX_SIZE,FT_NON_RELOC},
{0x6FC92828,SAVEFILE_MAX_SIZE,FT_NON_RELOC},
Code: Select all
D2Game.0x6FC8A6E8
D2Game.0x6FC8A60A
D2Game.0x6FC8C9D0
There is also code in D2Launch for save files, but IIRC it doesn't have a limit check (it might still be dumb and copy crap to a stack buffer). The only other code is the code in D2Client that splits or join the savefile parts for sending or receiving characters when joining or hosting an MP game, it has no limit (it infact does very little other than checking for the 0xAA55AA55 header stamp...).
In terms of the stack buffers, I'm not sure on its size (didn't make notes...), IIRC its more like 10KB, but its easy to expand, just find the call to _alloca (it'll be right at the start of a function), and increase that, just beware not to go crazy (you could probably double or triple it with ease).
If you are gonna expand the file size, remove the artificial delay the game adds between sending each ~500 byte chunk, this is handled by a Sleep call in D2Client's save part sending code, drop the 250ms delay (between each part) down to like 20 or 10ms.
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
Re: [1.10] SaveFile Limit
I've found something about the topic here
And would it be hard to make something simmilar for 1.10?
Thanks.
I'm wondering how much the increasement is (Increases the maximum save file size from 0x2000 to 0x8000)?ReadmeFile" wrote:*** CURRENTLY FOR 1.12A ONLY ***
Increases the maximum save file size from 0x2000 to 0x8000.
Ported from ES 3.00 R6D's direct dll hacks.
Install:
* Copy savesize.dll to your game or mod dir
* Load savesize.dll with a loader (PlugY, etc)
Site:
http://zenthought.org/project/diablo2
- zinx <zinx@zenthought.org>
And would it be hard to make something simmilar for 1.10?
Thanks.
Re: [1.10] SaveFile Limit
I would also be wary interested in a 1.10 version that wont conflict with d2mod system. Been browsing old topics on the subject for several months with no luck. A small increase would be enough, actually an increase of 2kb-4kb would be a lifesaver.
- kidpaddle94
- Principality
- Posts: 2057
- Joined: Thu Aug 13, 2009 2:54 pm
- Location: localhost
Re: [1.10] SaveFile Limit
edited
Last edited by kidpaddle94 on Sat Nov 28, 2020 9:12 am, edited 1 time in total.
Re: [1.10] SaveFile Limit
kidpaddle94" wrote:1.13c
As Necrolis said, it's better to replace those functions where the filesize is on the stack, but for now I went with the patch fixup techniqueThere is also an additional fixup to patch in plugy.dll if you use the expanded stash. On Plugy 10 it would be at plugy.0x17566Code: Select all
#define SAVEFILE_MAX_SIZE 0x00006000 {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F73, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53887, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x538AB, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x538D1, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x538FF, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5391D, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x562BD, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0xCB0DE, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F73, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53E82, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x54023, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x70FEE, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x71000, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x7167E, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F11, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F3C, (DWORD)SAVEFILE_MAX_SIZE+0x608, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F5B, (DWORD)SAVEFILE_MAX_SIZE+0x620, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F62, (DWORD)SAVEFILE_MAX_SIZE+0x61C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F6E, (DWORD)SAVEFILE_MAX_SIZE+0x60C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F7F, (DWORD)SAVEFILE_MAX_SIZE+0x610, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53FF4, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x537D1, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x537DE, (DWORD)SAVEFILE_MAX_SIZE+0x02C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x537FC, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5383F, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x538ED, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5396C, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x539C1, (DWORD)SAVEFILE_MAX_SIZE+0x03C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53A34, (DWORD)SAVEFILE_MAX_SIZE+0x03C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53A7D, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53AB9, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53AFC, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53B38, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56251, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5625D, (DWORD)SAVEFILE_MAX_SIZE+0x608, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56283, (DWORD)SAVEFILE_MAX_SIZE+0x614, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5630A, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56319, (DWORD)SAVEFILE_MAX_SIZE+0x624, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56320, (DWORD)SAVEFILE_MAX_SIZE+0x620, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56327, (DWORD)SAVEFILE_MAX_SIZE+0x61C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5632F, (DWORD)SAVEFILE_MAX_SIZE+0x614, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56337, (DWORD)SAVEFILE_MAX_SIZE+0x614, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56354, (DWORD)SAVEFILE_MAX_SIZE+0x624, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5635B, (DWORD)SAVEFILE_MAX_SIZE+0x620, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56362, (DWORD)SAVEFILE_MAX_SIZE+0x61C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5636C, (DWORD)SAVEFILE_MAX_SIZE+0x61C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56378, (DWORD)SAVEFILE_MAX_SIZE+0x61C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5639C, (DWORD)SAVEFILE_MAX_SIZE+0x618, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x563B1, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53E51, (DWORD)SAVEFILE_MAX_SIZE+0x004, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53E7A, (DWORD)SAVEFILE_MAX_SIZE+0x014, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53E8E, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53E9A, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F00, (DWORD)SAVEFILE_MAX_SIZE+0x004, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53FD7, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F781, (DWORD)SAVEFILE_MAX_SIZE+0x00C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F7F5, (DWORD)SAVEFILE_MAX_SIZE+0x034, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F80A, (DWORD)SAVEFILE_MAX_SIZE+0x030, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F811, (DWORD)SAVEFILE_MAX_SIZE+0x024, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F818, (DWORD)SAVEFILE_MAX_SIZE+0x02C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F820, (DWORD)SAVEFILE_MAX_SIZE+0x02C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F831, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F88D, (DWORD)SAVEFILE_MAX_SIZE+0x024, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F8DA, (DWORD)SAVEFILE_MAX_SIZE+0x00C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F8E9, (DWORD)SAVEFILE_MAX_SIZE+0x00C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F8F1, (DWORD)SAVEFILE_MAX_SIZE+0x008, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F953, (DWORD)SAVEFILE_MAX_SIZE+0x028, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F95A, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F962, (DWORD)SAVEFILE_MAX_SIZE+0x028, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F973, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F9CC, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FA1B, (DWORD)SAVEFILE_MAX_SIZE+0x008, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FA29, (DWORD)SAVEFILE_MAX_SIZE+0x008, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FA31, (DWORD)SAVEFILE_MAX_SIZE+0x008, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FA93, (DWORD)SAVEFILE_MAX_SIZE+0x028, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FA9A, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FAA2, (DWORD)SAVEFILE_MAX_SIZE+0x028, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FAB3, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FB0C, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FB5B, (DWORD)SAVEFILE_MAX_SIZE+0x008, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FB69, (DWORD)SAVEFILE_MAX_SIZE+0x008, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x54001, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5401C, (DWORD)SAVEFILE_MAX_SIZE+0x054, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5402F, (DWORD)SAVEFILE_MAX_SIZE+0x054, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x54051, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x54245, (DWORD)SAVEFILE_MAX_SIZE+0x054, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5424C, (DWORD)SAVEFILE_MAX_SIZE+0x050, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5401C, (DWORD)SAVEFILE_MAX_SIZE+0x054, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x54254, (DWORD)SAVEFILE_MAX_SIZE+0x064, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5425D, (DWORD)SAVEFILE_MAX_SIZE+0x060, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5426C, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x54276, (DWORD)SAVEFILE_MAX_SIZE+0x060, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x542C4, (DWORD)SAVEFILE_MAX_SIZE+0x058, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x542CF, (DWORD)SAVEFILE_MAX_SIZE+0x054, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x542D7, (DWORD)SAVEFILE_MAX_SIZE+0x054, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x542EA, (DWORD)SAVEFILE_MAX_SIZE+0x070, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5430B, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0},
Code: Select all
046B7560 FF15 D87E6D04 CALL DWORD PTR DS:[46D7ED8] ; Fog.#10115 046B7566 36:FFB424 08260000 PUSH DWORD PTR SS:[ESP+2608] 046B756E E8 1DFEFFFF CALL plugy.046B7390 046B7573 C3 RETN
can you please share the updated dlls? thanks a lot.
- weapon-x
- Arch-Angel
- Posts: 1047
- Joined: Wed Mar 18, 2009 4:52 am
- Location: Mindanao, Philippines
- Contact:
Re: [1.10] SaveFile Limit
i would be delighted to see a plugin for this increased savefile size v1.10
right now i cant seem to track em down
right now i cant seem to track em down
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "
~Mark Twain
~Mark Twain
Re: [1.10] SaveFile Limit
Someone has any progress about that in 1.10? Thanks.
Re: [1.10] SaveFile Limit
I have done it for 1.10, but waiting on weapon-x to see what bug he found with it.Lurix" wrote:Someone has any progress about that in 1.10? Thanks.
Re: [1.10] SaveFile Limit
I'll be more than happy to be able to use it soon. Thanks in advance!
- weapon-x
- Arch-Angel
- Posts: 1047
- Joined: Wed Mar 18, 2009 4:52 am
- Location: Mindanao, Philippines
- Contact:
Re: [1.10] SaveFile Limit
there is a juicy c0000005 error when loading a char
with over 8192 bytes...
haven't attached olly when this happened so i got no clue as where i should
start looking (honestly i am super rusty, haven't touched my files for over 3 weeks) hehe
anyhow, i think my internet connection is back to normal (for now) so i'll re-create the error
and try to share more stuff for us to debug
with over 8192 bytes...
haven't attached olly when this happened so i got no clue as where i should
start looking (honestly i am super rusty, haven't touched my files for over 3 weeks) hehe
anyhow, i think my internet connection is back to normal (for now) so i'll re-create the error
and try to share more stuff for us to debug
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "
~Mark Twain
~Mark Twain
Re: [1.10] SaveFile Limit
Nice, hope you got luck on this, since a lloy are looking forward this.
- weapon-x
- Arch-Angel
- Posts: 1047
- Joined: Wed Mar 18, 2009 4:52 am
- Location: Mindanao, Philippines
- Contact:
Re: [1.10] SaveFile Limit
errr... is there any other known method to pump-up character save file
aside from acquiring lots of items (rings and amulets from gamble in my case...)
?? i finally have free time this weekend, and tonight
aside from acquiring lots of items (rings and amulets from gamble in my case...)
?? i finally have free time this weekend, and tonight
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "
~Mark Twain
~Mark Twain
- kidpaddle94
- Principality
- Posts: 2057
- Joined: Thu Aug 13, 2009 2:54 pm
- Location: localhost
Re: [1.10] SaveFile Limit
Just get hero editor and fill the character with 30 properties items. That's what I did to test this on 1.13c
Also, a quick list of the stuff to test:
- load an oversized character in Single Player
- exit a Single Player game using an oversized character
- create a TCP/IP game using an oversized character
- join a game using an oversized character
- exit a TCP/IP game (while you're not the host) with an oversized character
- init a Multiplayer trade session with an oversized character
- end a trade session with an oversized character
And there is also an additional problem with plugy, which will occur when you leave a game, as far as I remember (SP/MP)
Also, a quick list of the stuff to test:
- load an oversized character in Single Player
- exit a Single Player game using an oversized character
- create a TCP/IP game using an oversized character
- join a game using an oversized character
- exit a TCP/IP game (while you're not the host) with an oversized character
- init a Multiplayer trade session with an oversized character
- end a trade session with an oversized character
And there is also an additional problem with plugy, which will occur when you leave a game, as far as I remember (SP/MP)
- weapon-x
- Arch-Angel
- Posts: 1047
- Joined: Wed Mar 18, 2009 4:52 am
- Location: Mindanao, Philippines
- Contact:
Re: [1.10] SaveFile Limit
i think the best thing to do is port your edit to 1.10,
as i believe you already tested all this stuff...
but then, how does one re-trace the codes/offsets of 1.13 to 1.10,
when things look different from all directions...
i remember doing this once but it took me a week or so just to find a specific code...
as i believe you already tested all this stuff...
but then, how does one re-trace the codes/offsets of 1.13 to 1.10,
when things look different from all directions...
i remember doing this once but it took me a week or so just to find a specific code...
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "
~Mark Twain
~Mark Twain
- weapon-x
- Arch-Angel
- Posts: 1047
- Joined: Wed Mar 18, 2009 4:52 am
- Location: Mindanao, Philippines
- Contact:
Re: [1.10] SaveFile Limit
urg, perhaps it is better to compile the code and open it to the community
so people can help test it...
what needs to be done:
*systematic testing
*increase/remove the artificial delay the game adds (just like what necrolis posted)
here is the link
http://www.mediafire.com/download/ruhdv ... veFile.zip
this is for 1.10, just load this using SVR's d2mod
*extends the savefile limit from 8192k to 16000k
the client delay is at DLLBASE_D2CLIENT+0xD73D
known errors
*anyhow thanks to this testing stuff, i managed to fix one of my custom pSpells bug, which was done
erroneously due to me, being naive, and making noob codes
so people can help test it...
what needs to be done:
*systematic testing
*increase/remove the artificial delay the game adds (just like what necrolis posted)
here is the link
http://www.mediafire.com/download/ruhdv ... veFile.zip
this is for 1.10, just load this using SVR's d2mod
*extends the savefile limit from 8192k to 16000k
the client delay is at DLLBASE_D2CLIENT+0xD73D
known errors
Code: Select all
1. When the client leaves a multi-player session
2. Sometimes joining generates a "Bad Generic Character File" or something like that
erroneously due to me, being naive, and making noob codes
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "
~Mark Twain
~Mark Twain
Re: [1.10] SaveFile Limit
Is this a serious problem?kidpaddle94" wrote: And there is also an additional problem with plugy, which will occur when you leave a game, as far as I remember (SP/MP)
And does anyone know if there are any consequences to using the patch fixup method instead of just replacing functions?
For some reason, Diablo II won't start if I use the patch fixup method with 1.13c (by using Diablo II template)
I put: "#define SAVEFILE_MAX_SIZE 0x00006000" inside "D2PatchConst.h"
I put "{D2DLL_D2GAME, DLLBASE_D2GAME+0x53F73, (DWORD)SAVEFILE_MAX_SIZE, 0}," inside "gptTemplatePatches".
The result is
Problem Event Name: BEX
Application Name: Game.exe
Application Version: 1.0.13.60
Application Timestamp: 4b95ca4b
Fault Module Name: StackHash_e98d
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Offset: 00000000
Exception Code: c0000005
Exception Data: 00000008
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 2057
Additional Information 1: e98d
Additional Information 2: e98dfca8bcf81bc1740adb135579ad53
Additional Information 3: 6eab
Additional Information 4: 6eabdd9e0dc94904be3b39a1c0583635
- Necrolis
- Throne
- Posts: 9125
- Joined: Sat Mar 25, 2006 1:22 pm
- Location: The Land of the Dead
- Contact:
Re: [1.10] SaveFile Limit
YIp, there is a major one, stackoverflows; It shouldn't happen too easily; however 1.13c doesn't use a checked stack allocator (_alloca), so you would wind up with bogus crashes... TBH the better way is to allocate a 32KB buffer in the BSS section and rewrite the epilogues and prologues to use that as the basis for the buffer.Sampson" wrote:And does anyone know if there are any consequences to using the patch fixup method instead of just replacing functions?
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
Re: [1.10] SaveFile Limit
how to modify it on 1.09d
- luoriming-ansys
- Posts: 25
- Joined: Sat Jun 11, 2016 6:36 am
Re: [1.10] SaveFile Limit
kidpaddle94" wrote:1.13c
As Necrolis said, it's better to replace those functions where the filesize is on the stack, but for now I went with the patch fixup techniqueThere is also an additional fixup to patch in plugy.dll if you use the expanded stash. On Plugy 10 it would be at plugy.0x17566Code: Select all
#define SAVEFILE_MAX_SIZE 0x00006000 {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F73, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53887, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x538AB, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x538D1, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x538FF, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5391D, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x562BD, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0xCB0DE, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F73, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53E82, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x54023, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x70FEE, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x71000, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x7167E, (DWORD)SAVEFILE_MAX_SIZE, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F11, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F3C, (DWORD)SAVEFILE_MAX_SIZE+0x608, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F5B, (DWORD)SAVEFILE_MAX_SIZE+0x620, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F62, (DWORD)SAVEFILE_MAX_SIZE+0x61C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F6E, (DWORD)SAVEFILE_MAX_SIZE+0x60C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F7F, (DWORD)SAVEFILE_MAX_SIZE+0x610, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53FF4, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x537D1, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x537DE, (DWORD)SAVEFILE_MAX_SIZE+0x02C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x537FC, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5383F, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x538ED, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5396C, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x539C1, (DWORD)SAVEFILE_MAX_SIZE+0x03C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53A34, (DWORD)SAVEFILE_MAX_SIZE+0x03C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53A7D, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53AB9, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53AFC, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53B38, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56251, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5625D, (DWORD)SAVEFILE_MAX_SIZE+0x608, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56283, (DWORD)SAVEFILE_MAX_SIZE+0x614, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5630A, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56319, (DWORD)SAVEFILE_MAX_SIZE+0x624, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56320, (DWORD)SAVEFILE_MAX_SIZE+0x620, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56327, (DWORD)SAVEFILE_MAX_SIZE+0x61C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5632F, (DWORD)SAVEFILE_MAX_SIZE+0x614, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56337, (DWORD)SAVEFILE_MAX_SIZE+0x614, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56354, (DWORD)SAVEFILE_MAX_SIZE+0x624, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5635B, (DWORD)SAVEFILE_MAX_SIZE+0x620, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56362, (DWORD)SAVEFILE_MAX_SIZE+0x61C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5636C, (DWORD)SAVEFILE_MAX_SIZE+0x61C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x56378, (DWORD)SAVEFILE_MAX_SIZE+0x61C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5639C, (DWORD)SAVEFILE_MAX_SIZE+0x618, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x563B1, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53E51, (DWORD)SAVEFILE_MAX_SIZE+0x004, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53E7A, (DWORD)SAVEFILE_MAX_SIZE+0x014, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53E8E, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53E9A, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F00, (DWORD)SAVEFILE_MAX_SIZE+0x004, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x53FD7, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F781, (DWORD)SAVEFILE_MAX_SIZE+0x00C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F7F5, (DWORD)SAVEFILE_MAX_SIZE+0x034, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F80A, (DWORD)SAVEFILE_MAX_SIZE+0x030, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F811, (DWORD)SAVEFILE_MAX_SIZE+0x024, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F818, (DWORD)SAVEFILE_MAX_SIZE+0x02C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F820, (DWORD)SAVEFILE_MAX_SIZE+0x02C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F831, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F88D, (DWORD)SAVEFILE_MAX_SIZE+0x024, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F8DA, (DWORD)SAVEFILE_MAX_SIZE+0x00C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F8E9, (DWORD)SAVEFILE_MAX_SIZE+0x00C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F8F1, (DWORD)SAVEFILE_MAX_SIZE+0x008, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F953, (DWORD)SAVEFILE_MAX_SIZE+0x028, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F95A, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F962, (DWORD)SAVEFILE_MAX_SIZE+0x028, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F973, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0F9CC, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FA1B, (DWORD)SAVEFILE_MAX_SIZE+0x008, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FA29, (DWORD)SAVEFILE_MAX_SIZE+0x008, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FA31, (DWORD)SAVEFILE_MAX_SIZE+0x008, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FA93, (DWORD)SAVEFILE_MAX_SIZE+0x028, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FA9A, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FAA2, (DWORD)SAVEFILE_MAX_SIZE+0x028, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FAB3, (DWORD)SAVEFILE_MAX_SIZE+0x01C, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FB0C, (DWORD)SAVEFILE_MAX_SIZE+0x020, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FB5B, (DWORD)SAVEFILE_MAX_SIZE+0x008, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x0FB69, (DWORD)SAVEFILE_MAX_SIZE+0x008, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x54001, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5401C, (DWORD)SAVEFILE_MAX_SIZE+0x054, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5402F, (DWORD)SAVEFILE_MAX_SIZE+0x054, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x54051, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x54245, (DWORD)SAVEFILE_MAX_SIZE+0x054, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5424C, (DWORD)SAVEFILE_MAX_SIZE+0x050, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5401C, (DWORD)SAVEFILE_MAX_SIZE+0x054, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x54254, (DWORD)SAVEFILE_MAX_SIZE+0x064, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5425D, (DWORD)SAVEFILE_MAX_SIZE+0x060, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5426C, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x54276, (DWORD)SAVEFILE_MAX_SIZE+0x060, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x542C4, (DWORD)SAVEFILE_MAX_SIZE+0x058, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x542CF, (DWORD)SAVEFILE_MAX_SIZE+0x054, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x542D7, (DWORD)SAVEFILE_MAX_SIZE+0x054, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x542EA, (DWORD)SAVEFILE_MAX_SIZE+0x070, 0}, {D2DLL_D2GAME, DLLBASE_D2GAME+0x5430B, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0},
Code: Select all
046B7560 FF15 D87E6D04 CALL DWORD PTR DS:[46D7ED8] ; Fog.#10115 046B7566 36:FFB424 08260000 PUSH DWORD PTR SS:[ESP+2608] 046B756E E8 1DFEFFFF CALL plugy.046B7390 046B7573 C3 RETN
How can we input "SAVEFILE_MAX_SIZE+0x5F8," in the offset 0x53F11?What does {D2DLL_D2GAME, DLLBASE_D2GAME+0x53F11, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0} means?
- devurandom
- Angel
- Posts: 897
- Joined: Sat Mar 07, 2015 9:07 pm
Re: [1.10] SaveFile Limit
These are patches for use with Kidpaddles D2Template, otherwise you have to patch each DLL offset manually with Ollydbg.luoriming-ansys" wrote: How can we input "SAVEFILE_MAX_SIZE+0x5F8," in the offset 0x53F11?What does {D2DLL_D2GAME,
DLLBASE_D2GAME+0x53F11, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0} means?
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..
- luoriming-ansys
- Posts: 25
- Joined: Sat Jun 11, 2016 6:36 am
Re: [1.10] SaveFile Limit
Last edited by luoriming-ansys on Sat Oct 07, 2017 1:25 am, edited 1 time in total.
- luoriming-ansys
- Posts: 25
- Joined: Sat Jun 11, 2016 6:36 am
Re: [1.10] SaveFile Limit
Now I know how to change the value,it works fine,thank kidpaddle94 for his code.
Last edited by luoriming-ansys on Sat Oct 07, 2017 1:14 am, edited 1 time in total.