KillSwitch

Prevents automatic game-over from occuring outside of engine's default battle-system as long as switch #0999 is not activated. When the switch gets activated, automatic game-over will not occur until the next relevant event-command (all commands that possibly could knockout the party have built-in checks for that) has been executed.

Originally made and first released by bugmenot.

RPG2000
1.00UNKNOWN2000-05-072000-06-192000-07-112000-11-132000-11-152000-12-27
1.07
2001-05-05
1.10
2003-03-27
1.50
2003-06-25
1.51/1.52
2015-07-05
1.60
2015-09-15
1.61
2017-09-14
1.62
RPG2003
1.00UNKNOWN1UNKNOWN21.0.2.1
1.0.2.1
1.0.3.0
1.0.4.0
1.0.5.0
1.0.5.0
1.0.6.0
1.0.6.0
1.0.7.0
1.0.7.0
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414

Segment 1/1

Offsets

RPG2000
2000-12-27
1.07
2017-09-14
1.62
0047C3E6h
0007B7E6h
00482C5Ah
0008205Ah
RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
004A43B2h
000A37B2h
004A36E6h
000A2AE6h

Sourcecode

			XCHG EDI, EAX
			DEC EDI
			TEST EDI, EDI
			JL __0047C40Ch
			INC EDI
			XOR ESI, ESI
__0047C3EFh:
			MOV EAX, [0049AA9Ch]			; TLcfgPartyInfo
			MOV EAX, [EAX]
			MOV EDX, ESI
			CALL PROC__0047CE60h			; TLcfgPartyInfo.GetSlotMember
			CALL PROC__00481EE8h
			TEST AL, AL
			JZ __0047C408h
			XOR EBX, EBX
__0047C408h:
			INC ESI
			DEC EDI
			JNZ __0047C3EFh
__0047C40Ch:
			MOV EAX, [0049AA9Ch]
			MOV EAX, [EAX]
			CMP DWORD PTR [EAX+04h], 0
			JNZ __0047C41Bh
			XOR EBX, EBX
__0047C41Bh:
			MOV EAX, [0049ABA4h]			; TLcfgSystem
			MOV EAX, [EAX]
			MOV EDI, EAX
			MOV EDX, 999				; SwitchID
			CALL PROC__00469E6Ch			; TLcfgSystem.GetSwitch
			TEST AL, AL
__0047C430h:
			JZ __0047C494h
			TEST BL, BL
			JZ __0047C430h
			CMP BYTE PTR [EDI+04h], 0
			JNZ __0047C468h
			MOV EAX, [0049ADF8h]
			MOV EAX, [EAX]
			MOV EDX, [EAX]
			CALL [EDX+28h]
			JMP __0047C458h
__0047C44Ah:
			MOV EAX, EBP
			CALL PROC__0047B734h			; TLcfFieldScene.MainLoop
			MOV EAX, EBP
			CALL PROC__0046B474h			; TLcfScene.FrameUpdate
__0047C458h:
			MOV EAX, [0049ADF8h]
			MOV EAX, [EAX]
			CALL PROC__00493E80h
			TEST AL, AL
			JNE __0047C44Ah
__0047C468h:
			MOV EAX, EDI
			CALL PROC__0046A360h			; TLcfgSystem.MusicGetGameOver
			MOV EDX, EAX
			NOP
			MOV EAX, EDI
			XCHG EDI, EAX
			DEC EDI
			TEST EDI, EDI
			JL __00482C80h
			INC EDI
			XOR ESI, ESI
__00482C63h:
			MOV EAX, [004A0A90h]			; TLcfgPartyInfo
			MOV EAX, [EAX]
			MOV EDX, ESI
			CALL PROC__00483718h			; TLcfgPartyInfo.GetSlotMember
			CALL PROC__004887C0h
			TEST AL, AL
			JZ __00482C7Ch
			XOR EBX, EBX
__00482C7Ch:
			INC ESI
			DEC EDI
			JNZ __00482C63h
__00482C80h:
			MOV EAX, [004A0A90h]
			MOV EAX, [EAX]
			CMP DWORD PTR [EAX+04h], 0
			JNZ __00482C8Fh
			XOR EBX, EBX
__00482C8Fh:
			MOV EAX, [004A0B8Ch]			; TLcfgSystem
			MOV EAX, [EAX]
			MOV EDI, EAX
			MOV EDX, 999				; SwitchID
			CALL PROC__0046F758h			; TLcfgSystem.GetSwitch
			TEST AL, AL
__00482CA4h:
			JZ __00482D08h
			TEST BL, BL
			JZ __00482CA4h
			CMP BYTE PTR [EDI+04h], 0
			JNZ __00482CDCh
			MOV EAX, [004A0DD0h]
			MOV EAX, [EAX]
			MOV EDX, [EAX]
			CALL [EDX+28h]
			JMP __00482CCCh
__00482CBEh:
			MOV EAX, EBP
			CALL PROC__00481FB4h			; TLcfFieldScene.MainLoop
			MOV EAX, EBP
			CALL PROC__00470D10h			; TLcfScene.FrameUpdate
__00482CCCh:
			MOV EAX, [004A0DD0h]
			MOV EAX, [EAX]
			CALL PROC__0049ABD8h
			TEST AL, AL
			JNE __00482CBEh
__00482CDCh:
			MOV EAX, EDI
			CALL PROC__0046FC20h			; TLcfgSystem.MusicGetGameOver
			MOV EDX, EAX
			NOP
			MOV EAX, EDI
			XCHG EDI, EAX
			DEC EDI
			TEST EDI, EDI
			JL __004A43D8h
			INC EDI
			XOR ESI, ESI
__004A43BBh:
			MOV EAX, [004CDB74h]			; TLcfgPartyInfo
			MOV EAX, [EAX]
			MOV EDX, ESI
			CALL PROC__004A6014h			; TLcfgPartyInfo.GetSlotMember
			CALL PROC__004C0688h
			TEST AL, AL
			JZ __004A43D4h
			XOR EBX, EBX
__004A43D4h:
			INC ESI
			DEC EDI
			JNZ __004A43BBh
__004A43D8h:
			MOV EAX, [004CDB74h]
			MOV EAX, [EAX]
			CMP DWORD PTR [EAX+04h], 0
			JNZ __004A43E7h
			XOR EBX, EBX
__004A43E7h:
			MOV EAX, [004CDC7Ch]			; TLcfgSystem
			MOV EAX, [EAX]
			MOV EDI, EAX
			MOV EDX, 999				; SwitchID
			CALL PROC__0048B324h			; TLcfgSystem.GetSwitch
			TEST AL, AL
__004A43FCh:
			JZ __004A4460h
			TEST BL, BL
			JZ __004A43FCh
			CMP BYTE PTR [EDI+04h], 0
			JNZ __004A4434h
			MOV EAX, [004CDEF4h]
			MOV EAX, [EAX]
			MOV EDX, [EAX]
			CALL [EDX+2Ch]
			JMP __004A4424h
__004A4416h:
			MOV EAX, EBP
			CALL PROC__004A35D0h			; TLcfFieldScene.MainLoop
			MOV EAX, EBP
			CALL PROC__0048CD40h			; TLcfScene.FrameUpdate
__004A4424h:
			MOV EAX, [004CDEF4h]
			MOV EAX, [EAX]
			CALL PROC__004C6748h
			TEST AL, AL
			JNE __004A4416h
__004A4434h:
			MOV EAX, EDI
			CALL PROC__0048B7ECh			; TLcfgSystem.MusicGetGameOver
			MOV EDX, EAX
			NOP
			MOV EAX, EDI
			XCHG EDI, EAX
			DEC EDI
			TEST EDI, EDI
			JL __004A370Ch
			INC EDI
			XOR ESI, ESI
__004A36EFh:
			MOV EAX, [004CDB74h]			; TLcfgPartyInfo
			MOV EAX, [EAX]
			MOV EDX, ESI
			CALL PROC__004A439Ch			; TLcfgPartyInfo.GetSlotMember
			CALL PROC__004AAA04h
			TEST AL, AL
			JZ __004A3708h
			XOR EBX, EBX
__004A3708h:
			INC ESI
			DEC EDI
			JNZ __004A36EFh
__004A370Ch:
			MOV EAX, [004CDB74h]
			MOV EAX, [EAX]
			CMP DWORD PTR [EAX+04h], 0
			JNZ __004A371Bh
			XOR EBX, EBX
__004A371Bh:
			MOV EAX, [004CDC7Ch]			; TLcfgSystem
			MOV EAX, [EAX]
			MOV EDI, EAX
			MOV EDX, 999				; SwitchID
			CALL PROC__0048B2E0h			; TLcfgSystem.GetSwitch
			TEST AL, AL
__004A3730h:
			JZ __004A3794h
			TEST BL, BL
			JZ __004A3730h
			CMP BYTE PTR [EDI+04h], 0
			JNZ __004A3768h
			MOV EAX, [004CDEF4h]
			MOV EAX, [EAX]
			MOV EDX, [EAX]
			CALL [EDX+2Ch]
			JMP __004A3758h
__004A374Ah:
			MOV EAX, EBP
			CALL PROC__004A2904h			; TLcfFieldScene.MainLoop
			MOV EAX, EBP
			CALL PROC__0048CCFCh			; TLcfScene.FrameUpdate
__004A3758h:
			MOV EAX, [004CDEF4h]
			MOV EAX, [EAX]
			CALL PROC__004C5A74h
			TEST AL, AL
			JNE __004A374Ah
__004A3768h:
			MOV EAX, EDI
			CALL PROC__0048B7A8h			; TLcfgSystem.MusicGetGameOver
			MOV EDX, EAX
			NOP
			MOV EAX, EDI

Bytes

97 4F 85FF 7C20
47 33F6 A19CAA4900 8B00 8BD6 E8630A0000
E8E65A0000
84C0 7402
33DB 46 4F 75E3
A19CAA4900 8B00 83780400 7502
33DB A1A4AB4900 8B00 89C7 BAE7030000 E83EDAFEFF
84C0 7462
84DB 74FA
807F0400 752C
A1F8AD4900 8B00 8B10 FF5228 EB0E
8BC5 E8E3F2FFFF
8BC5 E81CF0FEFF
A1F8AD4900 8B00 E81C7A0100
84C0 75E2
89F8 E8F1DEFEFF
8BD0 90 89F8
97 4F 85FF 7C20
47 33F6 A1900A4A00 8B00 8BD6 E8A70A0000
E84A5B0000
84C0 7402
33DB 46 4F 75E3
A1900A4A00 8B00 83780400 7502
33DB A18C0B4A00 8B00 89C7 BAE7030000 E8B6CAFEFF
84C0 7462
84DB 74FA
807F0400 752C
A1D00D4A00 8B00 8B10 FF5228 EB0E
8BC5 E8EFF2FFFF
8BC5 E844E0FEFF
A1D00D4A00 8B00 E8007F0100
84C0 75E2
89F8 E83DCFFEFF
8BD0 90 89F8
97 4F 85FF 7C20
47 33F6 A174DB4C00 8B00 8BD6 E84B1C0000
E8BAC20100
84C0 7402
33DB 46 4F 75E3
A174DB4C00 8B00 83780400 7502
33DB A17CDC4C00 8B00 89C7 BAE7030000 E82A6FFEFF
84C0 7462
84DB 74FA
807F0400 752C
A1F4DE4C00 8B00 8B10 FF522C EB0E
8BC5 E8B3F1FFFF
8BC5 E81C89FEFF
A1F4DE4C00 8B00 E818230200
84C0 75E2
89F8 E8B173FEFF
8BD0 90 89F8
97 4F 85FF 7C20
47 33F6 A174DB4C00 8B00 8BD6 E89F0C0000
E802730000
84C0 7402
33DB 46 4F 75E3
A174DB4C00 8B00 83780400 7502
33DB A17CDC4C00 8B00 89C7 BAE7030000 E8B27BFEFF
84C0 7462
84DB 74FA
807F0400 752C
A1F4DE4C00 8B00 8B10 FF522C EB0E
8BC5 E8FFFFF1B3
8BC5 E8A495FEFF
A1F4DE4C00 8B00 E810230200
84C0 75E2
89F8 E83980FEFF
8BD0 90 89F8