You may wonder what this is doing in CE forum? Anyone who has tried to use Holy Shield "state" on a character that isn't Paladin may have seen that it doesn't show the Holy Shield and also that we are stuck to use for Paladin the Holy Shield animation. First we will start look into what happend then using the Holy Shield skills.
Paladin Shield token HSH
Before I looked into this I didn't know that Paladin has an own shield token for Holy Shield callled HSH. I have always thougth it was an "overlay" and never pay attention to that it would be needed to have own shield animation. There are 17 different animations for HSH token as you can see down here.
The files are located in: data\global\CHARS\PA\SH
If you don't like the holy shield animation you could make an own custom animation and re-name it to use same token as Holy Shield originally does.
Make Holy Shield animation available for every class
If the offsets isn't to different between the characters you can copy the HSH animation to another class to be able to it for the class.
If we take a look another class as example Sorceress we will find that Sorceress and Paladin aren't using same animation modes. So, to make Holy Shield anim work for Sorceress we would need to know what's the difference between those too.
Down here is the BUC token for sorceress.
The files are located in: data\global\CHARS\SO\SH
SOSHBUCA1HTH.dcc = PASHHSHA1HTH.dcc
SOSHBUCA11HS.dcc = PASHHSHA11HS.dcc
SOSHBUCA11HT.dcc = PASHHSHA11HT.dcc
SOSHBUCA21HS.dcc = PASHHSHA21HS.dcc
SOSHBUCA21HT.dcc = PASHHSHA21HT.dcc
SOSHBUCBLHTH.dcc = Not used by Paladin
SOSHBUCGHHTH.dcc = Not used by Paladin
SOSHBUCNUHTH.dcc = Not used by Paladin
SOSHBUCKKHTH.dcc = Not used by Paladin
SOSHBUCS1HTH.dcc = Not used by Paladin
SOSHBUCSCHTH.dcc = Not used by Paladin
SOSHBUCTH1HT.dcc = Not used by Paladin
SOSHBUCTNHTH.dcc = Not used by Paladin
SOSHBUCTWHTH.dcc = Not used by Paladin
SOSHBUCWLHTH.dcc = PASHHSHWLHTH.dcc
SOSHBUCRNHTH.dcc = Not used by Paladin
Those down here is not use by Sorceress
As we can see here there are 11 modes that doesn't match Paladin and Sorceress and sorceress only need 10 of them. Since Paladin have an additional WL mode "1HS" that Sorceress are missing. Since it's only Paladin that have shield attack Sorecress are missing all animations related to one handes swing.
We will start with renaming all modes that are same for both classes.
PASHHSHA1HTH.dcc -> SOSHHSHA1HTH.dcc
PASHHSHA11HS.dcc -> SOSHHSHA11HS.dcc
PASHHSHA11HT.dcc -> SOSHHSHA11HT.dcc
PASHHSHA21HS.dcc -> SOSHHSHA21HS.dcc
PASHHSHA21HT.dcc -> SOSHHSHA21HT.dcc
PASHHSHWLHTH.dcc -> SOSHHSHWLHTH.dcc
and now we will add those modes that doesn't exist and instead use a similar mode that Sorceress have. If you want it to have the mode Paladin are using it will need a cof for it.
PASHHSHBL1HS.dcc -> SOSHHSHBLHTH.dcc
PASHHSHGH1HS.dcc -> SOSHHSHGHHTH.dcc
PASHHSHKK1HS.dcc -> SOSHHSHKKHTH.dcc
PASHHSHNU1HS.dcc -> SOSHHSHNUHTH.dcc
PASHHSHRN1HS.dcc -> SOSHHSHRNHTH.dcc
PASHHSHSC1HS.dcc -> SOSHHSHSCHTH.dcc
PASHHSHS11HS.dcc -> SOSHHSHS1HTH.dcc
PASHHSHTH1HS.dcc -> SOSHHSHTH1HT.dcc
PASHHSHTN1HS.dcc -> SOSHHSHTNHTH.dcc
PASHHSHTW1HS.dcc -> SOSHHSHTWHTH.dcc
The only we need now is to copy our new HSH token to The files are located in: data\global\CHARS\SO\SH and make a copy of Holy Shield skill and play with Sorceress using Holy Shield.
Add custom state that uses own animation mode
In d2client.dll they are handling the switch between normal animation mode and holy shield HSH animation mode. They do this switch then you have activate the state, there are a check for Holy Shield state in the code to handle this.
The code that is of interest for us is located here (in d2client.dll)
6FB5E801 6A 65 PUSH 65 ; State_id
6FB5E803 57 PUSH EDI ; ptUnit
6FB5E804 E8 09C30000 CALL <JMP.&D2Common.#10487> ; check state
6FB5E809 85C0 TEST EAX,EAX ; check state
6FB5E80B 74 13 JE SHORT D2Client.6FB5E820 ; no state active jump
6FB5E80D 6A 00 PUSH 0
6FB5E80F 55 PUSH EBP ; ptInventory
6FB5E810 E8 C3C60000 CALL <JMP.&D2Common.#10273> ; Check if shield is equipped
6FB5E815 85C0 TEST EAX,EAX ; Check shield
6FB5E817 74 07 JE SHORT D2Client.6FB5E820 ; No shield equipped, jump
6FB5E819 B8 68736820 MOV EAX,20687368 ; add HSH token
6FB5E81E EB 02 JMP SHORT D2Client.6FB5E822 ; jump to code that handle the weapon token change
What they does here is to check if Holy Shield state is active and change the shield token to HSH
Change what shield token that is used:
Since the code for add HSH token is simply ascii code. I know someone who got a .......... and forgott how ascii worked yesterday, just ask SVR
We will change the shields token to TOW (tower shield) instead.
Ascii code for this:
74 = t
6F = o
77 = w
6FB5E819 B8 746F7720 MOV EAX,20776F74 ; Remember its written backwards, now then we use Holy Shield we will have the Tower animation instead of Holy Shield animation.
Write your own custom check
Code: Select all
6FB5E809 85C0 TEST EAX,EAX ; check state 6FB5E80B 74 13 JE SHORT D2Client.6FB5E820 ; no state active jump 6FB5E80D 6A 00 PUSH 0
Custom Code in D2Client.dll:
Code: Select all
6FB5E809 E9 46DE0000 JMP D2Client.6FB6C654 ; Jump to custom code 6FB5E80E 90 NOP 6FB6C654 85C0 TEST EAX,EAX 6FB6C656 75 2A JNZ SHORT D2Client.6FB6C682 ; If holy shield state is active jump and let the game handle the normal check that we have moved around a bit 6FB6C658 68 DD000000 PUSH 0DD ; check custom id 221 6FB6C65D 57 PUSH EDI ; ptUnit 6FB6C65E E8 AFE4FFFF CALL <JMP.&D2Common.#10487> ; Check if our custom shield state is used 6FB6C663 85C0 TEST EAX,EAX ; Not used? 6FB6C665 74 16 JE SHORT D2Client.6FB6C67D ; Then jump 6FB6C667 6A 00 PUSH 0 ; 6FB6C669 55 PUSH EBP ; ptInventory 6FB6C66A E8 69E8FFFF CALL <JMP.&D2Common.#10273> ; Check if shield equipped 6FB6C66F 85C0 TEST EAX,EAX ; Is equipped? 6FB6C671 74 0A JE SHORT D2Client.6FB6C67D ; If not jump 6FB6C673 B8 746F7720 MOV EAX,20776F74 ; Change shield token to TOW 6FB6C678 ^E9 A521FFFF JMP D2Client.6FB5E822 ; jump to code that change what token is used 6FB6C67D ^E9 9E21FFFF JMP D2Client.6FB5E820 ; No state active, or no shield equipped 6FB6C682 6A 00 PUSH 0 6FB6C684 ^E9 8621FFFF JMP D2Client.6FB5E80F ; jump to code that check if shield equipped
If you look into other monsters animations you can If you are lucky armor, shield, weapon or anything else that works for characters. Also, by change the code in here you will be able to do armor/weapon switch also. You will need to find where it do SH directory check. It's located in this code somewhere, I forgott to take note where it was located.
You will need to make a copy of holyshield state and change it to 221 and custom name as ID. If you don't want to use 221 as ID you can offcourse use whatever you want.
Make a clone of Holy Shield skill and add your cust om state to it.
That was all I think