[NPC111]
Address Hex dump Command Comments
0043D003 |> \8B0D 50E64900 MOV ECX,DWORD PTR DS:[49E650]
0043D009 |. 83E1 40 AND ECX,00000040
0043D00C |. 74 1E JE SHORT 0043D02C
0043D00E |. 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8] !
0043D011 |. 8B42 58 MOV EAX,DWORD PTR DS:[EDX+58] !
0043D014 |. 83C0 20 ADD EAX,20
[NPC112]
Address Hex dump Command Comments
0043D291 |> \8B15 50E64900 MOV EDX,DWORD PTR DS:[49E650]
0043D297 |. 83E2 40 AND EDX,00000040
0043D29A |. 74 1E JE SHORT 0043D2BA
0043D29C |. 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8] !
0043D29F |. 8B48 58 MOV ECX,DWORD PTR DS:[EAX+58] !
0043D2A2 |. 83C1 20 ADD ECX,20
[NPC150]
Address Hex dump Command Comments
00445D57 |> \8B0D 50E64900 MOV ECX,DWORD PTR DS:[49E650]
00445D5D |. 83E1 40 AND ECX,00000040
00445D60 |. 74 1E JE SHORT 00445D80
00445D62 |. 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8] !
00445D65 |. 8B42 58 MOV EAX,DWORD PTR DS:[EDX+58] !
00445D68 |. 83C0 20 ADD EAX,20
Address Hex dump Command Comments
004154B8 |. A1 50E64900 MOV EAX,DWORD PTR DS:[49E650]
004154BD |. 83E0 40 AND EAX,00000040
004154C0 |. 74 12 JE SHORT 004154D4
004154C2 |. 8B4D F4 MOV ECX,DWORD PTR SS:[EBP-0C] ?????
004154C5 |. 83C1 20 ADD ECX,20
Address Hex dump Command Comments
004154B8 |. A1 84E14900 MOV EAX,DWORD PTR DS:[49E184]
004154BD |. C1E0 05 SHL EAX,5
004154C0 |. 0145 F4 ADD DWORD PTR SS:[EBP-0C],EAX
004154C3 |. 0145 FC ADD DWORD PTR SS:[EBP-4],EAX
004154C6 \. EB 0C JMP SHORT 004154D4
[NPC111, and NPC150]
CPU Disasm
Address Hex dump Command Comments
0043D003 |> \8B0D 84E14900 MOV ECX,DWORD PTR DS:[49E184] ! Changed to the IMM flags.
0043D009 |. C1E1 05 SHL ECX,5 ! Bit shifted by 5.
0043D00C 90 NOP ! Jump removed.
0043D00D 90 NOP
0043D00E 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8]
0043D011 8B42 58 MOV EAX,DWORD PTR DS:[EDX+58]
0043D014 01C8 ADD EAX,ECX ! Adds the bit-shifted IMM
0043D016 90 NOP ! flags instead of 0x20 (32)
0043D017 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8] ! ECX changed to EDX, so ECX
0043D01A 8942 58 MOV DWORD PTR DS:[EDX+58],EAX ! could retain the IMM flags.
0043D01D 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8]
0043D020 8B42 60 MOV EAX,DWORD PTR DS:[EDX+60]
0043D023 01C8 ADD EAX,ECX ! Adds the bit-shifted IMM
0043D025 |. 90 NOP ! flags instead of 0x20 (32)
[NPC112]
CPU Disasm
Address Hex dump Command Comments
0043D291 \8B15 84E14900 MOV EDX,DWORD PTR DS:[49E184]
0043D297 C1E2 05 SHL EDX,5
0043D29A 90 NOP
0043D29B 90 NOP
0043D29C 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8]
0043D29F 8B48 58 MOV ECX,DWORD PTR DS:[EAX+58]
0043D2A2 01D1 ADD ECX,EDX
0043D2A4 90 NOP
0043D2A5 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8]
0043D2A8 8948 58 MOV DWORD PTR DS:[EAX+58],ECX
0043D2AB 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8]
0043D2AE 8B48 60 MOV ECX,DWORD PTR DS:[EAX+60]
0043D2B1 01D1 ADD ECX,EDX
0043D2B3 90 NOP
It is. If I can recall, someone used it for a lighting system. It was BLink.zxin said:Wow, that sounds useful o .o
So I applied this to my mod that uses the <MIM command and it seems to work very well. The only problem I'm having with it is when the player goes into a room and before the player gets off the teleporter, it doesn't show any sprite from MyChar when the teleport fade-in effect happens.Code:[NPC111] Address Hex dump Command Comments 0043D003 |> \8B0D 50E64900 MOV ECX,DWORD PTR DS:[49E650] 0043D009 |. 83E1 40 AND ECX,00000040 0043D00C |. 74 1E JE SHORT 0043D02C 0043D00E |. 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8] ! 0043D011 |. 8B42 58 MOV EAX,DWORD PTR DS:[EDX+58] ! 0043D014 |. 83C0 20 ADD EAX,20
Code:[NPC112] Address Hex dump Command Comments 0043D291 |> \8B15 50E64900 MOV EDX,DWORD PTR DS:[49E650] 0043D297 |. 83E2 40 AND EDX,00000040 0043D29A |. 74 1E JE SHORT 0043D2BA 0043D29C |. 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8] ! 0043D29F |. 8B48 58 MOV ECX,DWORD PTR DS:[EAX+58] ! 0043D2A2 |. 83C1 20 ADD ECX,20
Not sure how to proceed. Marked 'problem' lines with exclamations. The One the OP fixes is:Code:[NPC150] Address Hex dump Command Comments 00445D57 |> \8B0D 50E64900 MOV ECX,DWORD PTR DS:[49E650] 00445D5D |. 83E1 40 AND ECX,00000040 00445D60 |. 74 1E JE SHORT 00445D80 00445D62 |. 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8] ! 00445D65 |. 8B42 58 MOV EAX,DWORD PTR DS:[EDX+58] ! 00445D68 |. 83C0 20 ADD EAX,20
Which has only one MOV line. So I suck at machine code, and assume the same changes won't work, but one change should fix all three NPCs (and any other ones there may be).Code:Address Hex dump Command Comments 004154B8 |. A1 50E64900 MOV EAX,DWORD PTR DS:[49E650] 004154BD |. 83E0 40 AND EAX,00000040 004154C0 |. 74 12 JE SHORT 004154D4 004154C2 |. 8B4D F4 MOV ECX,DWORD PTR SS:[EBP-0C] ????? 004154C5 |. 83C1 20 ADD ECX,20
For reference, the OP changes the previous codebox into:
Code:Address Hex dump Command Comments 004154B8 |. A1 84E14900 MOV EAX,DWORD PTR DS:[49E184] 004154BD |. C1E0 05 SHL EAX,5 004154C0 |. 0145 F4 ADD DWORD PTR SS:[EBP-0C],EAX 004154C3 |. 0145 FC ADD DWORD PTR SS:[EBP-4],EAX 004154C6 \. EB 0C JMP SHORT 004154D4
EDIT:
Alright, I got it working. I don't know HOW, but...
Let me know if my fluke broke anything important.Code:[NPC111, and NPC150] CPU Disasm Address Hex dump Command Comments 0043D003 |> \8B0D 84E14900 MOV ECX,DWORD PTR DS:[49E184] ! Changed to the IMM flags. 0043D009 |. C1E1 05 SHL ECX,5 ! Bit shifted by 5. 0043D00C 90 NOP ! Jump removed. 0043D00D 90 NOP 0043D00E 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8] 0043D011 8B42 58 MOV EAX,DWORD PTR DS:[EDX+58] 0043D014 01C8 ADD EAX,ECX ! Adds the bit-shifted IMM 0043D016 90 NOP ! flags instead of 0x20 (32) 0043D017 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8] ! ECX changed to EDX, so ECX 0043D01A 8942 58 MOV DWORD PTR DS:[EDX+58],EAX ! could retain the IMM flags. 0043D01D 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8] 0043D020 8B42 60 MOV EAX,DWORD PTR DS:[EDX+60] 0043D023 01C8 ADD EAX,ECX ! Adds the bit-shifted IMM 0043D025 |. 90 NOP ! flags instead of 0x20 (32)
Code:[NPC112] CPU Disasm Address Hex dump Command Comments 0043D291 \8B15 84E14900 MOV EDX,DWORD PTR DS:[49E184] 0043D297 C1E2 05 SHL EDX,5 0043D29A 90 NOP 0043D29B 90 NOP 0043D29C 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8] 0043D29F 8B48 58 MOV ECX,DWORD PTR DS:[EAX+58] 0043D2A2 01D1 ADD ECX,EDX 0043D2A4 90 NOP 0043D2A5 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8] 0043D2A8 8948 58 MOV DWORD PTR DS:[EAX+58],ECX 0043D2AB 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8] 0043D2AE 8B48 60 MOV ECX,DWORD PTR DS:[EAX+60] 0043D2B1 01D1 ADD ECX,EDX 0043D2B3 90 NOP
Well, you need Zarrot's patch for NPC111, NPC112, and NPC150 for the extra animations part.Bionicobot said:This is going to be great! This means that I can make clothes, add extra animations using the command, and even add armor or something.
Bionicobot, you forgot to put in the third fix, which the fix 1 files for NPC111 starting at 43D003 can also work for NPC150 starting on 445D57.Bionicobot said:So, I made a Doukutsu Assembler version of the patch for the Quote NPCs.
Link:
https://www.dropbox.com/s/n26c1at9776pnrv/Fix%20for%20MIM%20Command.zip?dl=0