Cow Portal Crashing with Basemod.dll
Moderator: Nizari
Cow Portal Crashing with Basemod.dll
HI guys...
I was using basemod on my mod, but when I open cow portal it crashes, dunno if its something about the cow quest check I removed so I can kill king cow? I have the CowLevelCheck code edit from Kidpaddle on my mod... any solution that I can use and still have the cow king quest not checking?
I was using basemod on my mod, but when I open cow portal it crashes, dunno if its something about the cow quest check I removed so I can kill king cow? I have the CowLevelCheck code edit from Kidpaddle on my mod... any solution that I can use and still have the cow king quest not checking?
Be Xtreme!
- devurandom
- Angel
- Posts: 897
- Joined: Sat Mar 07, 2015 9:07 pm
Re: Cow Portal Crashing with Basemod.dll
Cow portal uses the original code, but if using custom cube red portals to go to the cow level it won't work.. There's a level check in custom red portals that rejects destination to the cow level to force people to use the original cow portal code.
Just retested this and cow portal works in BaseMod.
From my notes the Cow Portal level check done with CE shows this for 1.13c
Just retested this and cow portal works in BaseMod.
From my notes the Cow Portal level check done with CE shows this for 1.13c
Code: Select all
reference
https://d2mods.info/forum/viewtopic.php?t=38611
Code section
00067503 E8 6030FAFF CALL 0000A568
00067508 85C0 TEST EAX,EAX
0006750A ▼0F85 C5010000 JNE 000676D5
00067510 8B45 70 MOV EAX,DWORD PTR [EBP+70]
Change
0006750A ▼0F85 C5010000 JNE 000676D5
to
0006750A 90 NOP
0006750B 90 NOP
0006750C 90 NOP
0006750D 90 NOP
0006750E 90 NOP
0006750F 90 NOP
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Re: Cow Portal Crashing with Basemod.dll
Mine is just like this:devurandom wrote: ↑Thu Dec 05, 2019 1:11 amCow portal uses the original code, but if using custom cube red portals to go to the cow level it won't work.. There's a level check in custom red portals that rejects destination to the cow level to force people to use the original cow portal code.
Just retested this and cow portal works in BaseMod.
From my notes the Cow Portal level check done with CE shows this for 1.13c
Code: Select all
reference https://d2mods.info/forum/viewtopic.php?t=38611 Code section 00067503 E8 6030FAFF CALL 0000A568 00067508 85C0 TEST EAX,EAX 0006750A ▼0F85 C5010000 JNE 000676D5 00067510 8B45 70 MOV EAX,DWORD PTR [EBP+70] Change 0006750A ▼0F85 C5010000 JNE 000676D5 to 0006750A 90 NOP 0006750B 90 NOP 0006750C 90 NOP 0006750D 90 NOP 0006750E 90 NOP 0006750F 90 NOP
6FC87503 |. E8 6030FAFF CALL 6FC2A568 ; <JMP.&D2Common.#10174>
6FC87508 |. 85C0 TEST EAX,EAX
6FC8750A |. 90 NOP
6FC8750B |. 90 NOP
6FC8750C |. 90 NOP
6FC8750D |. 90 NOP
6FC8750E |. 90 NOP
6FC8750F |. 90 NOP
But still crashing when opening cow level, using the original cube recipe...
When I remove basemod.dll from D2 folder it opens ok...
I'll try testing from original dlls and make every modification I have on them and test after each one... Maybe I find what is corrupting when put together...
Be Xtreme!
Re: Cow Portal Crashing with Basemod.dll
Got it...
Using basemod makes the CowLevelCheck edit unnecessary... just made it back to original code on d2game.dll and now its ok...
Using basemod makes the CowLevelCheck edit unnecessary... just made it back to original code on d2game.dll and now its ok...
Be Xtreme!
- devurandom
- Angel
- Posts: 897
- Joined: Sat Mar 07, 2015 9:07 pm
Re: Cow Portal Crashing with Basemod.dll
This is likely the reason why it crashed with the normal code edit patch listed above. It's because you'd endup with a hybrid patch, after BaseMod applies its patch.
In BaseMod the Cow Level patch is made differently than using NOP's with a 2 byte patch instead of a 6 byte patch.
CowLevelCheck Alternate CE [1.13c]
I wished I'd added less Code Edits to BaseMod, but If I take them out some will complain.
In BaseMod the Cow Level patch is made differently than using NOP's with a 2 byte patch instead of a 6 byte patch.
CowLevelCheck Alternate CE [1.13c]
Code: Select all
change
6FC8750A 0F85 C5010000 JNZ 6FC876D5
to
6FC8750A 0F85 00000000 JNZ 6FC87510
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Re: Cow Portal Crashing with Basemod.dll
If I'd read ALL the features before using it I'd see it was gonna happen...devurandom wrote: ↑Sun Dec 08, 2019 10:18 amThis is likely the reason why it crashed with the normal code edit patch listed above. It's because you'd endup with a hybrid patch, after BaseMod applies its patch.
In BaseMod the Cow Level patch is made differently than using NOP's with a 2 byte patch instead of a 6 byte patch.
CowLevelCheck Alternate CE [1.13c]I wished I'd added less Code Edits to BaseMod, but If I take them out some will complain.Code: Select all
change 6FC8750A 0F85 C5010000 JNZ 6FC876D5 to 6FC8750A 0F85 00000000 JNZ 6FC87510
Be Xtreme!