The palshift.dat for each monster has 8 entries in it, but only 6 are actually read (indices 2-7). This is because the Necromancer skeletons have two reserved slots at 0 and 1.
After applying this code edit, the Translvl column in monstats.txt will match the exact palshift entry and you'll have access to 8 palshifts instead of just 6.
First edit: change byte 0x6FB27A24 in D2Client to be 0x00.
It is 0x02 - the amount to shift the translvl by.
Second edit: change bytes 0x6FAAE408 to 0x6FAAE423 in D2Client to be 0x90 (NOP).
If your Carvers are red like Fallen, the patch is successful. You'll need to add 2 to all Translvls in monstats.txt, but now indices 0 and 1 are usable.
[1.10f] Allow full range of palshifts
Moderators: Nefarius, Havvoric
[1.10f] Allow full range of palshifts
11/1/08 - COTL; 5/10/09 - Angel; 11/11/09 - ArchangelAlthough done for our needs, mod-makers should like these changes, too.
Re: [1.10f] Allow full range of palshifts
Nice tweak! Just to be sure I understand and something for me to test, I have translvl 0 through 4 for the various fallen types, which the existing code is treating as if 2 through 6. So existing Fallen translvl 1 (Carvers) are shown as if translvl 3 because of the code shift, so I need to make Carvers translvl 3 after the tweak to get the same coloring effect they have in vanilla. TFW has additional members of certain monster chains so extra translvls will be useful.
0 Fallen
1 Carver
2 Devilkin
3 DarkOne
4 WarpedFallen
Did you see what happens to the Necro skellies when this is done?
There are two different simpler fixes for the second change, which I will test as these are quicker to apply using d2mod. The vanilla code is
#1: Change the jmp at 6FAAE401 to a mandatory jump:
#2: Change the switch table so the second option is the only option. The existing table is
Either make the four bytes at 6FAAE4F4 the same as the bytes at 6FAAE4F8, or change the two 00 bytes at 6FAAE4FC into 01 bytes.
0 Fallen
1 Carver
2 Devilkin
3 DarkOne
4 WarpedFallen
Did you see what happens to the Necro skellies when this is done?
There are two different simpler fixes for the second change, which I will test as these are quicker to apply using d2mod. The vanilla code is
Code: Select all
6FAAE3FB |. 8A96 FCE4AA6F MOV DL,BYTE PTR DS:[ESI+6FAAE4FC]
6FAAE401 |. FF2495 F4E4AA6F JMP DWORD PTR DS:[EDX*4+6FAAE4F4]
6FAAE408 |> 8B7F 04 MOV EDI,DWORD PTR DS:[EDI+4] ; Cases 0,1 of switch 6FAAE3F4
6FAAE40B |. 81FF 6B010000 CMP EDI,16B
6FAAE411 |. 0F82 D4000000 JB D2Client.6FAAE4EB
6FAAE417 |. 81FF 6C010000 CMP EDI,16C
6FAAE41D |. 0F87 C8000000 JA D2Client.6FAAE4EB
6FAAE423 |> C1E6 08 SHL ESI,8
Code: Select all
6FAAE401 /EB 20 JMP SHORT D2Client.6FAAE423
6FAAE403 |90 NOP
6FAAE404 |90 NOP
6FAAE405 |90 NOP
6FAAE406 |90 NOP
6FAAE407 |90 NOP
Code: Select all
6FAAE4F4 08 E4 AA 6F 6D E4 AA 6F 00 00 01 01 01 01 01 01 äªomäªo..
Do the right thing. It will gratify some people and astonish the rest.
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening