[1.10] SaveFile Limit

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

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

Re: [1.10] SaveFile Limit

Post by devurandom » Mon Jul 11, 2016 6:47 pm

There's about 100 offsets to patch for SaveFile Limit.. would be easier in Ollydbg than a hex editor.
And better to do in D2Template.
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..

Rexxar
Posts: 7
Joined: Wed Sep 23, 2015 1:38 pm

Re: [1.10] SaveFile Limit

Post by Rexxar » Thu Sep 20, 2018 9:12 pm

situm wrote:
Sat Oct 12, 2013 4:49 pm
can you please share the updated dlls? thanks a lot.
Are there any changes need to be made except the offsets in d2game.dll? Anyone had any problems so far with the file size limit increase?

Complete beginner here could anyone please be kind and share a download link of a clean d2game.dll for 1.13c version with the 8KB save file limit fix increased ? Or what offsets i need to change if I use a hex editor like xvi32 as I'm atleast more familiar with using that one if you guys don't mind? I'm sure other beginners would appreciate too.

Rexxar
Posts: 7
Joined: Wed Sep 23, 2015 1:38 pm

Re: [1.10] SaveFile Limit

Post by Rexxar » Fri Sep 21, 2018 6:37 pm

Could i get some guidance please, I am using hex editor to make the changes I don't mind if they are over 100 willing to work for them as I'm clueless otherwise.
I want to apply the fix directly to D2Game.dll 1.13c, post by @kidpaddle94 viewtopic.php?p=474839#p474839

I am aware the following are for D2Template but I want to make the change in D2Game.dll offsents directly with something atleast I'm more capable to change which is a hex editor. Wish a clean d2game.dll could have been shared with the increased size limit.

{D2DLL_D2GAME, DLLBASE_D2GAME+0x53F73, (DWORD)SAVEFILE_MAX_SIZE, 0}
I searched for 0x53F73 in hex editor and changed I changed 00 20 00 00 to 00 60 00 00
All good here I think?


Problem is on these lines
{D2DLL_D2GAME, DLLBASE_D2GAME+0x56327, (DWORD)SAVEFILE_MAX_SIZE+0x61C, 0},
What exactly I need to edit with hex editor in this case?
I searched for 0x56327 in hex editor and I have for this line 1C 26 00 00 What should I change it with in this case? Should it be 1C 60 00 00 or maybe 1C 06 00 00 ?
little update, tried to change it with 38 00 00 00 and i did the same for every single line, no luck everything crashed. guess that's not the correct approach

Another line
{D2DLL_D2GAME, DLLBASE_D2GAME+0x53A7D, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0},
I searched for 0x53A7D in hex editor and I have for this line 38 20 00 00 What should I change it with in this case? Should it be 38 00 00 00 ?
little update, tried to change it with 38 00 00 00 and id the same for every single line, no luck everything crashed. guess that's not the correct approach

User avatar
kidpaddle94
Forum Legend
Principality
Posts: 2057
Joined: Thu Aug 13, 2009 2:54 pm
Location: localhost
Canada

Re: [1.10] SaveFile Limit

Post by kidpaddle94 » Sat Sep 22, 2018 2:29 am

Rexxar wrote:
Fri Sep 21, 2018 6:37 pm
Could i get some guidance please, I am using hex editor to make the changes I don't mind if they are over 100 willing to work for them as I'm clueless otherwise.
I want to apply the fix directly to D2Game.dll 1.13c, post by @kidpaddle94 viewtopic.php?p=474839#p474839

I am aware the following are for D2Template but I want to make the change in D2Game.dll offsents directly with something atleast I'm more capable to change which is a hex editor. Wish a clean d2game.dll could have been shared with the increased size limit.

{D2DLL_D2GAME, DLLBASE_D2GAME+0x53F73, (DWORD)SAVEFILE_MAX_SIZE, 0}
I searched for 0x53F73 in hex editor and changed I changed 00 20 00 00 to 00 60 00 00
All good here I think?


Problem is on these lines
{D2DLL_D2GAME, DLLBASE_D2GAME+0x56327, (DWORD)SAVEFILE_MAX_SIZE+0x61C, 0},
What exactly I need to edit with hex editor in this case?
I searched for 0x56327 in hex editor and I have for this line 1C 26 00 00 What should I change it with in this case? Should it be 1C 60 00 00 or maybe 1C 06 00 00 ?
little update, tried to change it with 38 00 00 00 and i did the same for every single line, no luck everything crashed. guess that's not the correct approach

Another line
{D2DLL_D2GAME, DLLBASE_D2GAME+0x53A7D, (DWORD)SAVEFILE_MAX_SIZE+0x038, 0},
I searched for 0x53A7D in hex editor and I have for this line 38 20 00 00 What should I change it with in this case? Should it be 38 00 00 00 ?
little update, tried to change it with 38 00 00 00 and id the same for every single line, no luck everything crashed. guess that's not the correct approach

Code: Select all

#define SAVEFILE_MAX_SIZE		0x6000
So basically, this:

Code: Select all

SAVEFILE_MAX_SIZE+0x61C
Translates to this:

Code: Select all

0x661C

Rexxar
Posts: 7
Joined: Wed Sep 23, 2015 1:38 pm

Re: [1.10] SaveFile Limit

Post by Rexxar » Sat Sep 22, 2018 2:43 am

kidpaddle94 wrote:
Sat Sep 22, 2018 2:29 am

Code: Select all

#define SAVEFILE_MAX_SIZE		0x6000
So basically, this:

Code: Select all

SAVEFILE_MAX_SIZE+0x61C
Translates to this:

Code: Select all

0x661C
Thanks so much for replying, just to make sure I'm on the right path could you confirm if this is correct editing for this line? {D2DLL_D2GAME, DLLBASE_D2GAME+0x56327, (DWORD)SAVEFILE_MAX_SIZE+0x61C, 0},

Editing offset 56327. Original value is 1C 26 00 00
I'm modifying this to 1C 66 00 00
Is this correct?


If I got it right then for this line {D2DLL_D2GAME, DLLBASE_D2GAME+0x53FF4, (DWORD)SAVEFILE_MAX_SIZE+0x5F8, 0},
Original is F8 25 00 00 and I need to change it to F8 65 00 00 in this case?
Last edited by Rexxar on Sun Sep 23, 2018 9:51 pm, edited 1 time in total.

User avatar
kidpaddle94
Forum Legend
Principality
Posts: 2057
Joined: Thu Aug 13, 2009 2:54 pm
Location: localhost
Canada

Re: [1.10] SaveFile Limit

Post by kidpaddle94 » Sat Sep 22, 2018 2:45 am

Yeah, that looks okay

Rexxar
Posts: 7
Joined: Wed Sep 23, 2015 1:38 pm

Re: [1.10] SaveFile Limit

Post by Rexxar » Thu Oct 04, 2018 7:34 pm

kidpaddle94 wrote:
Sat Sep 22, 2018 2:45 am
Yeah, that looks okay
You sir are great, thanks for helping out. So far looks good I will be testing some more to make sure everything is fine, if anyone wants the edits and help testing let me know and I will share.


If you don't mind, I have a couple extra questions about the size limit changes. I will quote the following here:
situm wrote:
Sat Oct 12, 2013 4:49 pm
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 technique
Sampson wrote:
Sat Jul 25, 2015 1:13 am
And does anyone know if there are any consequences to using the patch fixup method instead of just replacing functions?
Necrolis wrote:
Sat Jul 25, 2015 9:24 am
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.
The current offset changes do or do not replace those functions where the filesize is on the stack? Is there a way to do so if it doesn't replaces the functions?
How would the stackoverflow errors behave if it doesn't replace the functions? My savefiles will most likely reach maximum of 13KB-14KB not more but just making sure this doesn't becomes a real problem later on.


Thanks again, much appreciated. :)

Gobo
Posts: 9
Joined: Tue Mar 12, 2019 10:00 pm

Re: [1.10] SaveFile Limit

Post by Gobo » Tue May 14, 2019 4:50 pm

Hi -

Is there any known conflicts with weapon-x's d2savefile plugin for 1.10 d2mod? When I add it to the mix I get bad generic file whenever I load an older character, or a brand new one.
The follower plugins I use,

d2newstats
levelfx
utility
mercmod
portal
extlvl
gemfix
lvlreq
charstart
newtxt
nosock
mercdesc
d2warp
d2respec
d2expres
d2pickup (gold)

Thanks,
Gobo

User avatar
weapon-x
Forum Legend
Arch-Angel
Posts: 1047
Joined: Wed Mar 18, 2009 4:52 am
Location: Mindanao, Philippines
Contact:
Philippines

Re: [1.10] SaveFile Limit

Post by weapon-x » Sat Jun 15, 2019 8:07 am

Gobo wrote:
Tue May 14, 2019 4:50 pm
Hi -

Is there any known conflicts with weapon-x's d2savefile plugin for 1.10 d2mod? When I add it to the mix I get bad generic file whenever I load an older character, or a brand new one.
The follower plugins I use,

d2newstats
levelfx
utility
mercmod
portal
extlvl
gemfix
lvlreq
charstart
newtxt
nosock
mercdesc
d2warp
d2respec
d2expres
d2pickup (gold)

Thanks,
Gobo
hi, that dll is actually broken, if i remember, i edited this when i was still practicing CE, and that a lot of things are not addressed/edited properly due to me being a noob and all... :lol: so i don't recommend using it in anyway ;)
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "

~Mark Twain

Post Reply

Return to “Code Editing”