Any idea to extend AutoMagic.txt?

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
huohuowu2
Junior Member
Paladin
Posts: 154
Joined: Sat Feb 28, 2015 4:20 am
China

Any idea to extend AutoMagic.txt?

Post by huohuowu2 » Tue Jun 18, 2019 8:09 am

Any idea to extend AutoMagic.txt?

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

Hand-picked

Re: Any idea to extend AutoMagic.txt?

Post by Necrolis » Tue Jun 18, 2019 12:58 pm

Extend it how exactly? The only limits are the affix id, which are capped at a WORD in size; affix ids are build from the combination of automagic + prefixes + suffixes, so you cannot exceed more than 65k in total.
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

User avatar
huohuowu2
Junior Member
Paladin
Posts: 154
Joined: Sat Feb 28, 2015 4:20 am
China

Re: Any idea to extend AutoMagic.txt?

Post by huohuowu2 » Wed Jun 19, 2019 2:57 am

I mean to extend it to more than 4096 rows. For example, 20480 rows.

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

Hand-picked

Re: Any idea to extend AutoMagic.txt?

Post by Necrolis » Wed Jun 19, 2019 1:50 pm

The save code uses 2048 as the upper limit, but just increase this to the number of save bits (this one is the row count, but keep in mind the total limit of all three files must be less than 2^16-1):

Code: Select all

D2Common, 1.10
//Read
00060CD0    6A 0B           PUSH 0B
00060CD2    53              PUSH EBX
00060CD3    E8 0A370200     CALL 000843E2

//Write
00063569    6A 0B           PUSH 0B
0006356B    50              PUSH EAX
0006356C    53              PUSH EBX
0006356D    E8 8E0E0200     CALL 00084400
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

User avatar
huohuowu2
Junior Member
Paladin
Posts: 154
Joined: Sat Feb 28, 2015 4:20 am
China

Re: Any idea to extend AutoMagic.txt?

Post by huohuowu2 » Wed Jun 19, 2019 4:03 pm

:D
thank you very much!

User avatar
huohuowu2
Junior Member
Paladin
Posts: 154
Joined: Sat Feb 28, 2015 4:20 am
China

Re: Any idea to extend AutoMagic.txt?

Post by huohuowu2 » Tue Jun 25, 2019 3:43 pm

Necrolis wrote:
Wed Jun 19, 2019 1:50 pm
The save code uses 2048 as the upper limit, but just increase this to the number of save bits (this one is the row count, but keep in mind the total limit of all three files must be less than 2^16-1):

Code: Select all

D2Common, 1.10
//Read
00060CD0    6A 0B           PUSH 0B
00060CD2    53              PUSH EBX
00060CD3    E8 0A370200     CALL 000843E2

//Write
00063569    6A 0B           PUSH 0B
0006356B    50              PUSH EAX
0006356C    53              PUSH EBX
0006356D    E8 8E0E0200     CALL 00084400
hi,man.these words are wrong.the game crushed when i use some equipments with automagic.

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

Hand-picked

Re: Any idea to extend AutoMagic.txt?

Post by Necrolis » Tue Jun 25, 2019 4:55 pm

What was the crash? what changes did you make?
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

User avatar
huohuowu2
Junior Member
Paladin
Posts: 154
Joined: Sat Feb 28, 2015 4:20 am
China

Re: Any idea to extend AutoMagic.txt?

Post by huohuowu2 » Wed Jun 26, 2019 10:22 am

Image
Image
The game can be running.but crush when get some equiipment.

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

Hand-picked

Re: Any idea to extend AutoMagic.txt?

Post by Necrolis » Wed Jun 26, 2019 2:32 pm

Thats cause you changed the wrong code, you are meant to change the PUSH 0x0B to something higher (they must both match), as an example PUSH 0x0D will give you 4 times the space.
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

User avatar
huohuowu2
Junior Member
Paladin
Posts: 154
Joined: Sat Feb 28, 2015 4:20 am
China

Re: Any idea to extend AutoMagic.txt?

Post by huohuowu2 » Wed Jun 26, 2019 4:03 pm

Necrolis wrote:
Wed Jun 26, 2019 2:32 pm
E8 8E0E0200
i change this to
6A 0D
50
53
E8 8E0E0200
game crush again.
did i chanege the wrong code address?

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

Hand-picked

Re: Any idea to extend AutoMagic.txt?

Post by Necrolis » Wed Jun 26, 2019 4:38 pm

You need only change the 6A 0A to 6A 0D.
Also note that this will break any old chars that have items with automagic.
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

User avatar
huohuowu2
Junior Member
Paladin
Posts: 154
Joined: Sat Feb 28, 2015 4:20 am
China

Re: Any idea to extend AutoMagic.txt?

Post by huohuowu2 » Thu Jun 27, 2019 7:19 am

Necrolis wrote:
Wed Jun 26, 2019 4:38 pm
E8 0A370200
Image
Thank you very much!The game is working properly.

Post Reply

Return to “Code Editing”