Cow Portal Crashing with Basemod.dll

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Post Reply
User avatar
Specktro
Posts: 78
Joined: Sat Jun 10, 2017 12:49 am
Location: Rio Grande do Sul, Brasil
Brazil

Cow Portal Crashing with Basemod.dll

Post by Specktro » Wed Dec 04, 2019 8:45 pm

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?
Image
Be Xtreme!

User avatar
devurandom
Forum Regular
Angel
Posts: 897
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: Cow Portal Crashing with Basemod.dll

Post by devurandom » Thu Dec 05, 2019 1:11 am

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

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..

User avatar
Specktro
Posts: 78
Joined: Sat Jun 10, 2017 12:49 am
Location: Rio Grande do Sul, Brasil
Brazil

Re: Cow Portal Crashing with Basemod.dll

Post by Specktro » Fri Dec 06, 2019 3:10 am

devurandom wrote:
Thu Dec 05, 2019 1:11 am
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

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
Mine is just like this:
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...
Image
Be Xtreme!

User avatar
Specktro
Posts: 78
Joined: Sat Jun 10, 2017 12:49 am
Location: Rio Grande do Sul, Brasil
Brazil

Re: Cow Portal Crashing with Basemod.dll

Post by Specktro » Fri Dec 06, 2019 3:39 am

Got it...

Using basemod makes the CowLevelCheck edit unnecessary... just made it back to original code on d2game.dll and now its ok...
Image
Be Xtreme!

User avatar
devurandom
Forum Regular
Angel
Posts: 897
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: Cow Portal Crashing with Basemod.dll

Post by devurandom » Sun Dec 08, 2019 10:18 am

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]

Code: Select all

change

6FC8750A    0F85 C5010000  JNZ 6FC876D5

to

6FC8750A    0F85 00000000  JNZ 6FC87510
I wished I'd added less Code Edits to BaseMod, but If I take them out some will complain.
:roll:
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..

User avatar
Specktro
Posts: 78
Joined: Sat Jun 10, 2017 12:49 am
Location: Rio Grande do Sul, Brasil
Brazil

Re: Cow Portal Crashing with Basemod.dll

Post by Specktro » Sun Dec 08, 2019 3:23 pm

devurandom wrote:
Sun Dec 08, 2019 10:18 am
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]

Code: Select all

change

6FC8750A    0F85 C5010000  JNZ 6FC876D5

to

6FC8750A    0F85 00000000  JNZ 6FC87510
I wished I'd added less Code Edits to BaseMod, but If I take them out some will complain.
:roll:
If I'd read ALL the features before using it I'd see it was gonna happen... :oops:
Image
Be Xtreme!

Post Reply

Return to “General Mod Making”