GuardRevamp

Makes changing the damage-rates of defending with normal or strong protection easier. Both percentages (each being limited to the data-size of one byte) can be adjusted in the sourcecode.

When sticking to default values (50 and 25), the calculation will mostly produce the same results as without the patch.

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/2

Offsets

RPG2000
2000-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
00432DACh
000321ACh
00432D3Ch
0003213Ch
00432E38h
00032238h
00432E7Ch
0003227Ch
00432FD0h
000323D0h
004333E0h
000327E0h
004333E0h
000327E0h
RPG2003
1.001.0.3.0
1.0.4.0
1.0.5.0
1.0.5.0
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00446DF1h
000461F1h
00446DD1h
000461D1h
00446ED5h
000462D5h
00446ED5h
000462D5h
00446ED5h
000462D5h

Sourcecode

PROC__00432DACh:
			MOV CL, 100			; Basevalue for calculation
			XCHG EDI, EAX
			CDQ
			IDIV ECX
			XCHG EDI, EAX
			RET
PROC__00432D3Ch:
			MOV CL, 100			; Basevalue for calculation
			XCHG EDI, EAX
			CDQ
			IDIV ECX
			XCHG EDI, EAX
			RET
PROC__00432E38h:
			MOV CL, 100			; Basevalue for calculation
			XCHG EDI, EAX
			CDQ
			IDIV ECX
			XCHG EDI, EAX
			RET
PROC__00432E7Ch:
			MOV CL, 100			; Basevalue for calculation
			XCHG EDI, EAX
			CDQ
			IDIV ECX
			XCHG EDI, EAX
			RET
PROC__00432FD0h:
			MOV CL, 100			; Basevalue for calculation
			XCHG EDI, EAX
			CDQ
			IDIV ECX
			XCHG EDI, EAX
			RET
PROC__004333E0h:
			MOV CL, 100			; Basevalue for calculation
			XCHG EDI, EAX
			CDQ
			IDIV ECX
			XCHG EDI, EAX
			RET
PROC__004333E0h:
			MOV CL, 100			; Basevalue for calculation
			XCHG EDI, EAX
			CDQ
			IDIV ECX
			XCHG EDI, EAX
			RET
PROC__00446DF1h:
			MOV CL, 100			; Basevalue for calculation
			XCHG ESI, EAX
			CDQ
			IDIV ECX
			XCHG ESI, EAX
			RET
PROC__00446DD1h:
			MOV CL, 100			; Basevalue for calculation
			XCHG ESI, EAX
			CDQ
			IDIV ECX
			XCHG ESI, EAX
			RET
PROC__00446ED5h:
			MOV CL, 100			; Basevalue for calculation
			XCHG ESI, EAX
			CDQ
			IDIV ECX
			XCHG ESI, EAX
			RET
PROC__00446ED5h:
			MOV CL, 100			; Basevalue for calculation
			XCHG ESI, EAX
			CDQ
			IDIV ECX
			XCHG ESI, EAX
			RET
PROC__00446ED5h:
			MOV CL, 100			; Basevalue for calculation
			XCHG ESI, EAX
			CDQ
			IDIV ECX
			XCHG ESI, EAX
			RET

Bytes

B164 97 99 F7F9 97 C3
B164 97 99 F7F9 97 C3
B164 97 99 F7F9 97 C3
B164 97 99 F7F9 97 C3
B164 97 99 F7F9 97 C3
B164 97 99 F7F9 97 C3
B164 97 99 F7F9 97 C3
B164 96 99 F7F9 96 C3
B164 96 99 F7F9 96 C3
B164 96 99 F7F9 96 C3
B164 96 99 F7F9 96 C3
B164 96 99 F7F9 96 C3

Segment 2/2

Offsets

RPG2000
2000-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
004768E2h
00075CE2h
004767EEh
00075BEEh
0047B746h
0007AB46h
0047B862h
0007AC62h
0047C67Eh
0007BA7Eh
0047D0A0h
0007C4A0h
0047D220h
0007C620h
RPG2003
1.001.0.3.0
1.0.4.0
1.0.5.0
1.0.5.0
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
00494880h
00093C80h
00496FC4h
000963C4h
0049B460h
0009A860h
0049D020h
0009C420h
0049C354h
0009B754h

Sourcecode

			MOV EAX, ESI
			MOV EDX, [EAX]
			CALL [EDX+5Ch]
			PUSH 50				; Target is defending normal
			POP ECX
			TEST AL, AL
			JE __Skip
			MOV CL, 25			; Target has strong protection
__Skip:
			IMUL EDI, ECX
			CALL PROC__00432DACh
			NOP
			MOV EAX, ESI
			MOV EDX, [EAX]
			CALL [EDX+5Ch]
			PUSH 50				; Target is defending normal
			POP ECX
			TEST AL, AL
			JE __Skip
			MOV CL, 25			; Target has strong protection
__Skip:
			IMUL EDI, ECX
			CALL PROC__00432D3Ch
			NOP
			MOV EAX, ESI
			MOV EDX, [EAX]
			CALL [EDX+5Ch]
			PUSH 50				; Target is defending normal
			POP ECX
			TEST AL, AL
			JE __Skip
			MOV CL, 25			; Target has strong protection
__Skip:
			IMUL EDI, ECX
			CALL PROC__00432E38h
			NOP
			MOV EAX, ESI
			MOV EDX, [EAX]
			CALL [EDX+5Ch]
			PUSH 50				; Target is defending normal
			POP ECX
			TEST AL, AL
			JE __Skip
			MOV CL, 25			; Target has strong protection
__Skip:
			IMUL EDI, ECX
			CALL PROC__00432E7Ch
			NOP
			MOV EAX, ESI
			MOV EDX, [EAX]
			CALL [EDX+5Ch]
			PUSH 50				; Target is defending normal
			POP ECX
			TEST AL, AL
			JE __Skip
			MOV CL, 25			; Target has strong protection
__Skip:
			IMUL EDI, ECX
			CALL PROC__00432FD0h
			NOP
			MOV EAX, ESI
			MOV EDX, [EAX]
			CALL [EDX+5Ch]
			PUSH 50				; Target is defending normal
			POP ECX
			TEST AL, AL
			JE __Skip
			MOV CL, 25			; Target has strong protection
__Skip:
			IMUL EDI, ECX
			CALL PROC__004333E0h
			NOP
			MOV EAX, ESI
			MOV EDX, [EAX]
			CALL [EDX+5Ch]
			PUSH 50				; Target is defending normal
			POP ECX
			TEST AL, AL
			JE __Skip
			MOV CL, 25			; Target has strong protection
__Skip:
			IMUL EDI, ECX
			CALL PROC__004333E0h
			NOP
			MOV EAX, EBX
			MOV EDX, [EAX]
			CALL [EDX+5Ch]
			PUSH 50				; Target is defending normal
			POP ECX
			TEST AL, AL
			JE __Skip
			MOV CL, 25			; Target has strong protection
__Skip:
			IMUL ESI, ECX
			CALL PROC__00446DF1h
			NOP
			MOV EAX, EBX
			MOV EDX, [EAX]
			CALL [EDX+5Ch]
			PUSH 50				; Target is defending normal
			POP ECX
			TEST AL, AL
			JE __Skip
			MOV CL, 25			; Target has strong protection
__Skip:
			IMUL ESI, ECX
			CALL PROC__00446DD1h
			NOP
			MOV EAX, EBX
			MOV EDX, [EAX]
			CALL [EDX+5Ch]
			PUSH 50				; Target is defending normal
			POP ECX
			TEST AL, AL
			JE __Skip
			MOV CL, 25			; Target has strong protection
__Skip:
			IMUL ESI, ECX
			CALL PROC__00446ED5h
			NOP
			MOV EAX, EBX
			MOV EDX, [EAX]
			CALL [EDX+60h]
			PUSH 50				; Target is defending normal
			POP ECX
			TEST AL, AL
			JE __Skip
			MOV CL, 25			; Target has strong protection
__Skip:
			IMUL ESI, ECX
			CALL PROC__00446ED5h
			NOP
			MOV EAX, EBX
			MOV EDX, [EAX]
			CALL [EDX+60h]
			PUSH 50				; Target is defending normal
			POP ECX
			TEST AL, AL
			JE __Skip
			MOV CL, 25			; Target has strong protection
__Skip:
			IMUL ESI, ECX
			CALL PROC__00446ED5h
			NOP

Bytes

8BC6 8B10 FF525C 6A32 59 84C0 7402
B119 0FAFF9 E8B2C4FBFF
90
8BC6 8B10 FF525C 6A32 59 84C0 7402
B119 0FAFF9 E836C5FBFF
90
8BC6 8B10 FF525C 6A32 59 84C0 7402
B119 0FAFF9 E8DA76FBFF
90
8BC6 8B10 FF525C 6A32 59 84C0 7402
B119 0FAFF9 E80276FBFF
90
8BC6 8B10 FF525C 6A32 59 84C0 7402
B119 0FAFF9 E83A69FBFF
90
8BC6 8B10 FF525C 6A32 59 84C0 7402
B119 0FAFF9 E82863FBFF
90
8BC6 8B10 FF525C 6A32 59 84C0 7402
B119 0FAFF9 E8A861FBFF
90
8BC3 8B10 FF525C 6A32 59 84C0 7402
B119 0FAFF1 E85925FBFF
90
8BC3 8B10 FF525C 6A32 59 84C0 7402
B119 0FAFF1 E8F5FDFAFF
90
8BC3 8B10 FF525C 6A32 59 84C0 7402
B119 0FAFF1 E85DBAFAFF
90
8BC3 8B10 FF5260 6A32 59 84C0 7402
B119 0FAFF1 E89D9EFAFF
90
8BC3 8B10 FF5260 6A32 59 84C0 7402
B119 0FAFF1 E869ABFAFF
90