Well, I have finally hunted down the final lycanthropy error that I was discussing before...
The is STILL an error with lycanthropy, but not when its points are over 20, instead the error occurs when the + to skills is around 13 or higher. At this point, shapeshifting causes a crash with an error.
Assertion Failure
Location : C:\Projects\Diablo2\Source\D2Client\UNIT\PlrSkills.cpp, line #335
Expression : nBearBonus >= 0 && nBearBonus <= MAX_SKILL_LEVEL - MAX_SKILL_BASE_LEVEL
Lycanthropy, Skills over 20, and still more errors...
Moderators: Nefarius, Havvoric
-
- Posts: 92
- Joined: Thu Jun 20, 2002 8:41 pm
- Contact:
Lycanthropy, Skills over 20, and still more errors...
"Your destruction is the will of the Gods
And we are the instrument..."
-Unnamed Covenant Warrior
And we are the instrument..."
-Unnamed Covenant Warrior
Shapechanging Blues
There are two procedures governing shapechanging skill limits that I found with Ollydbg, in D2Client.dll 1.09b. Both procedures use EAX for the Werewolf or Werebear current skill level, EDI for the Lycanthropy current skill level, EBX for the Werewolf or Werebear current skill bonus from items, and EBP for the Lycanthropy current skill bonus from items. The level checks agree with spin's offset spreadsheet, so the bonus checks should complete that story.
This is the restricting code for Werewolf:
Error handling for above restrictions:
And this is the restricting code for Werebear
Error handling for above restrictions:
D2Client.6FB60FA3 is an exit procedure which terminates the game.
This is the restricting code for Werewolf:
Code: Select all
6FB497B0 . 83EC 1C SUB ESP,1C
6FB497B3 . 8BC2 MOV EAX,EDX
6FB497B5 . 25 FFFF0000 AND EAX,0FFFF
6FB497BA . 53 PUSH EBX
6FB497BB . 55 PUSH EBP
6FB497BC . 56 PUSH ESI
6FB497BD . 8BF1 MOV ESI,ECX
6FB497BF . 8B4C24 2C MOV ECX,[DWORD SS:ESP+2C]
6FB497C3 . 57 PUSH EDI
6FB497C4 . 8BF9 MOV EDI,ECX
6FB497C6 . C1FA 10 SAR EDX,10
6FB497C9 . 81E7 FFFF0000 AND EDI,0FFFF
6FB497CF . 8BDA MOV EBX,EDX
6FB497D1 . C1F9 10 SAR ECX,10
6FB497D4 . 85C0 TEST EAX,EAX
6FB497D6 . 8BE9 MOV EBP,ECX
6FB497D8 . 0F8C C1010000 JL D2Client.6FB4999F
6FB497DE . 83F8 14 CMP EAX,14 [color=#ff0009]<--- Werewolf skill above level 20?[/color]
6FB497E1 . 0F8F B8010000 JG D2Client.6FB4999F
6FB497E7 . 85FF TEST EDI,EDI14
6FB497E9 . 0F8C 92010000 JL D2Client.6FB49981
6FB497EF . 83FF 14 CMP EDI,14 [color=#ff0009]<--- Lycanthropy skill above level 20?[/color]
6FB497F2 . 0F8F 89010000 JG D2Client.6FB49981
6FB497F8 . 85DB TEST EBX,EBX
6FB497FA . 0F8C 63010000 JL D2Client.6FB49963
6FB49800 . 83FB 0C CMP EBX,0C [color=#ff0009]<--- Werewolf bonus above +12?[/color]
6FB49803 . 0F8F 5A010000 JG D2Client.6FB49963
6FB49809 . 85ED TEST EBP,EBP
6FB4980B . 0F8C 34010000 JL D2Client.6FB49945
6FB49811 . 83FD 0C CMP EBP,0C [color=#ff0009]<--- Lycanthropy bonus above +12?[/color]
6FB49814 . 0F8F 2B010000 JG D2Client.6FB49945
Code: Select all
6FB49945 > 68 19010000 PUSH 119
6FB4994A . 68 C494B96F PUSH D2Client.6FB994C4 ; ASCII "C:\Projects\Diablo2\Source\D2Client\UNIT\PlrSkills.cpp"
6FB4994F . 68 7C94B96F PUSH D2Client.6FB9947C ; ASCII "nLycBonus >= 0 && nLycBonus <= MAX_SKILL_LEVEL - MAX_SKILL_BASE_LEVEL"
6FB49954 . E8 BD6F0100 CALL <JMP.&Fog.#10023>
6FB49959 . 83C4 0C ADD ESP,0C
6FB4995C . 6A FF PUSH -1
6FB4995E . E8 40760100 CALL D2Client.6FB60FA3
6FB49963 > 68 18010000 PUSH 118
6FB49968 . 68 C494B96F PUSH D2Client.6FB994C4 ; ASCII "C:\Projects\Diablo2\Source\D2Client\UNIT\PlrSkills.cpp"
6FB4996D . 68 3494B96F PUSH D2Client.6FB99434 ; ASCII "nWolfBonus >= 0 && nWolfBonus <= MAX_SKILL_LEVEL - MAX_SKILL_BASE_LEVEL"
6FB49972 . E8 9F6F0100 CALL <JMP.&Fog.#10023>
6FB49977 . 83C4 0C ADD ESP,0C
6FB4997A . 6A FF PUSH -1
6FB4997C . E8 22760100 CALL D2Client.6FB60FA3
6FB49981 > 68 17010000 PUSH 117
6FB49986 . 68 C494B96F PUSH D2Client.6FB994C4 ; ASCII "C:\Projects\Diablo2\Source\D2Client\UNIT\PlrSkills.cpp"
6FB4998B . 68 0094B96F PUSH D2Client.6FB99400 ; ASCII "nLycLevel >= 0 && nLycLevel <= MAX_SKILL_BASE_LEVEL"
6FB49990 . E8 816F0100 CALL <JMP.&Fog.#10023>
6FB49995 . 83C4 0C ADD ESP,0C
6FB49998 . 6A FF PUSH -1
6FB4999A . E8 04760100 CALL D2Client.6FB60FA3
6FB4999F > 68 16010000 PUSH 116
6FB499A4 . 68 C494B96F PUSH D2Client.6FB994C4 ; ASCII "C:\Projects\Diablo2\Source\D2Client\UNIT\PlrSkills.cpp"
6FB499A9 . 68 C893B96F PUSH D2Client.6FB993C8 ; ASCII "nWolfLevel >= 0 && nWolfLevel <= MAX_SKILL_BASE_LEVEL"
6FB499AE . E8 636F0100 CALL <JMP.&Fog.#10023>
6FB499B3 . 83C4 0C ADD ESP,0C
6FB499B6 . 6A FF PUSH -1
6FB499B8 . E8 E6750100 CALL D2Client.6FB60FA3
Code: Select all
6FB49A20 . 83EC 1C SUB ESP,1C
6FB49A23 . 8BC2 MOV EAX,EDX
6FB49A25 . 25 FFFF0000 AND EAX,0FFFF
6FB49A2A . 53 PUSH EBX
6FB49A2B . 55 PUSH EBP
6FB49A2C . 56 PUSH ESI
6FB49A2D . 8BF1 MOV ESI,ECX
6FB49A2F . 8B4C24 2C MOV ECX,[DWORD SS:ESP+2C]
6FB49A33 . 57 PUSH EDI
6FB49A34 . 8BF9 MOV EDI,ECX
6FB49A36 . C1FA 10 SAR EDX,10
6FB49A39 . 81E7 FFFF0000 AND EDI,0FFFF
6FB49A3F . 8BDA MOV EBX,EDX
6FB49A41 . C1F9 10 SAR ECX,10
6FB49A44 . 85C0 TEST EAX,EAX
6FB49A46 . 8BE9 MOV EBP,ECX
6FB49A48 . 0F8C C1010000 JL D2Client.6FB49C0F
6FB49A4E . 83F8 14 CMP EAX,14 [color=#ff0009]<--- Werebear skill above level 20?[/color]
6FB49A51 . 0F8F B8010000 JG D2Client.6FB49C0F
6FB49A57 . 85FF TEST EDI,EDI
6FB49A59 . 0F8C 92010000 JL D2Client.6FB49BF1
6FB49A5F . 83FF 14 CMP EDI,14 [color=#ff0009]<--- Lycanthropy skill above level 20?[/color]
6FB49A62 . 0F8F 89010000 JG D2Client.6FB49BF1
6FB49A68 . 85DB TEST EBX,EBX
6FB49A6A . 0F8C 63010000 JL D2Client.6FB49BD3
6FB49A70 . 83FB 0C CMP EBX,0C [color=#ff0009]<--- Werebear bonus above +12?[/color]
6FB49A73 . 0F8F 5A010000 JG D2Client.6FB49BD3
6FB49A79 . 85ED TEST EBP,EBP
6FB49A7B . 0F8C 34010000 JL D2Client.6FB49BB5
6FB49A81 . 83FD 0C CMP EBP,0C [color=#ff0009]<--- Lycanthropy bonus above +12?[/color]
6FB49A84 . 0F8F 2B010000 JG D2Client.6FB49BB5
Code: Select all
6FB49BB5 > 68 50010000 PUSH 150
6FB49BBA . 68 C494B96F PUSH D2Client.6FB994C4 ; ASCII "C:\Projects\Diablo2\Source\D2Client\UNIT\PlrSkills.cpp"
6FB49BBF . 68 7C94B96F PUSH D2Client.6FB9947C ; ASCII "nLycBonus >= 0 && nLycBonus <= MAX_SKILL_LEVEL - MAX_SKILL_BASE_LEVEL"
6FB49BC4 . E8 4D6D0100 CALL <JMP.&Fog.#10023>
6FB49BC9 . 83C4 0C ADD ESP,0C
6FB49BCC . 6A FF PUSH -1
6FB49BCE . E8 D0730100 CALL D2Client.6FB60FA3
6FB49BD3 > 68 4F010000 PUSH 14F
6FB49BD8 . 68 C494B96F PUSH D2Client.6FB994C4 ; ASCII "C:\Projects\Diablo2\Source\D2Client\UNIT\PlrSkills.cpp"
6FB49BDD . 68 3495B96F PUSH D2Client.6FB99534 ; ASCII "nBearBonus >= 0 && nBearBonus <= MAX_SKILL_LEVEL - MAX_SKILL_BASE_LEVEL"
6FB49BE2 . E8 2F6D0100 CALL <JMP.&Fog.#10023>
6FB49BE7 . 83C4 0C ADD ESP,0C
6FB49BEA . 6A FF PUSH -1
6FB49BEC . E8 B2730100 CALL D2Client.6FB60FA3
6FB49BF1 > 68 4E010000 PUSH 14E
6FB49BF6 . 68 C494B96F PUSH D2Client.6FB994C4 ; ASCII "C:\Projects\Diablo2\Source\D2Client\UNIT\PlrSkills.cpp"
6FB49BFB . 68 0094B96F PUSH D2Client.6FB99400 ; ASCII "nLycLevel >= 0 && nLycLevel <= MAX_SKILL_BASE_LEVEL"
6FB49C00 . E8 116D0100 CALL <JMP.&Fog.#10023>
6FB49C05 . 83C4 0C ADD ESP,0C
6FB49C08 . 6A FF PUSH -1
6FB49C0A . E8 94730100 CALL D2Client.6FB60FA3
6FB49C0F > 68 4D010000 PUSH 14D
6FB49C14 . 68 C494B96F PUSH D2Client.6FB994C4 ; ASCII "C:\Projects\Diablo2\Source\D2Client\UNIT\PlrSkills.cpp"
6FB49C19 . 68 FC94B96F PUSH D2Client.6FB994FC ; ASCII "nBearLevel >= 0 && nBearLevel <= MAX_SKILL_BASE_LEVEL"
6FB49C1E . E8 F36C0100 CALL <JMP.&Fog.#10023>
6FB49C23 . 83C4 0C ADD ESP,0C
6FB49C26 . 6A FF PUSH -1
6FB49C28 . E8 76730100 CALL D2Client.6FB60FA3
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
-
- Posts: 92
- Joined: Thu Jun 20, 2002 8:41 pm
- Contact:
Myhrginoc...
Is it as simple as changing those other 4 lines of code to something other than 12? If so, how do I find out the hard-file addresses?
---------------
[EDIT] Alright, I think I found it already, I just did a hex search for 83FD0C and I found the 2 locations fairly quickly. I changed 0C into 1C ( 12 into 28 ) and it worked like a charm. The game had a slight pause that was noticable during the shift, but it allowed me to shapeshift without crashing with full benifits. Thanks for that bit of code, this is why I was having crashes while everyone else told me it was working perfectly for them....
Is it as simple as changing those other 4 lines of code to something other than 12? If so, how do I find out the hard-file addresses?
---------------
[EDIT] Alright, I think I found it already, I just did a hex search for 83FD0C and I found the 2 locations fairly quickly. I changed 0C into 1C ( 12 into 28 ) and it worked like a charm. The game had a slight pause that was noticable during the shift, but it allowed me to shapeshift without crashing with full benifits. Thanks for that bit of code, this is why I was having crashes while everyone else told me it was working perfectly for them....
"Your destruction is the will of the Gods
And we are the instrument..."
-Unnamed Covenant Warrior
And we are the instrument..."
-Unnamed Covenant Warrior
Re: Lycanthropy, Skills over 20, and still more errors...
Heres' the 1.09d locations:
Werewolf/Lycan/Bear skill *bonus* fix
A8B82: XX
A8B93: XX
A8DFO: XX
A8E01: XX
The normal skill limit is right above each set of course, just look for the "14h" and change them to whatever.
Edit: oops, they are already in spin's offsets list...
Werewolf/Lycan/Bear skill *bonus* fix
A8B82: XX
A8B93: XX
A8DFO: XX
A8E01: XX
The normal skill limit is right above each set of course, just look for the "14h" and change them to whatever.
Edit: oops, they are already in spin's offsets list...
Last edited by FoxBat on Thu Jan 09, 2003 5:46 am, edited 1 time in total.