Page 1 of 1
Any idea to extend AutoMagic.txt?
Posted: Tue Jun 18, 2019 8:09 am
by huohuowu2
Any idea to extend AutoMagic.txt?
Re: Any idea to extend AutoMagic.txt?
Posted: Tue Jun 18, 2019 12:58 pm
by Necrolis
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.
Re: Any idea to extend AutoMagic.txt?
Posted: Wed Jun 19, 2019 2:57 am
by huohuowu2
I mean to extend it to more than 4096 rows. For example, 20480 rows.
Re: Any idea to extend AutoMagic.txt?
Posted: Wed Jun 19, 2019 1:50 pm
by Necrolis
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
Re: Any idea to extend AutoMagic.txt?
Posted: Wed Jun 19, 2019 4:03 pm
by huohuowu2
thank you very much!
Re: Any idea to extend AutoMagic.txt?
Posted: Tue Jun 25, 2019 3:43 pm
by huohuowu2
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.
Re: Any idea to extend AutoMagic.txt?
Posted: Tue Jun 25, 2019 4:55 pm
by Necrolis
What was the crash? what changes did you make?
Re: Any idea to extend AutoMagic.txt?
Posted: Wed Jun 26, 2019 10:22 am
by huohuowu2
The game can be running.but crush when get some equiipment.
Re: Any idea to extend AutoMagic.txt?
Posted: Wed Jun 26, 2019 2:32 pm
by Necrolis
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.
Re: Any idea to extend AutoMagic.txt?
Posted: Wed Jun 26, 2019 4:03 pm
by huohuowu2
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?
Re: Any idea to extend AutoMagic.txt?
Posted: Wed Jun 26, 2019 4:38 pm
by Necrolis
You need only change the 6A 0A to 6A 0D.
Also note that this will break any old chars that have items with automagic.
Re: Any idea to extend AutoMagic.txt?
Posted: Thu Jun 27, 2019 7:19 am
by huohuowu2
Necrolis wrote: ↑Wed Jun 26, 2019 4:38 pm
E8 0A370200
Thank you very much!The game is working properly.