RowVar [2+]

Changes the function of the row- and order-commands in the default menu. The player has to select an actor as operand whose ID then will be stored in variable #3340 (row) or #3337 (order) respectively and switch #1007 (row) or #1008 (order) will activate. After that, the menu will exit.

This is an extended version of RowVar, for even more there also is [3+].

Originally made and first released by bugmenot.

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

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
004A0D66h
000A0166h
004A009Ah
0009F49Ah

Sourcecode

			MOV EDI, 0
			MOV EDI, 0

Bytes

BF00000000
BF00000000

Segment 2/4

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
004A2516h
000A1916h
004A184Ah
000A0C4Ah

Sourcecode

			dd __004A2570h			; SelectPartyActor
			dd __004A18A4h			; SelectPartyActor

Bytes

70 25 4A 00
A4 18 4A 00

Segment 3/4

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
004A282Dh
000A1C2Dh
004A1B61h
000A0F61h

Sourcecode

__ConfigRow:
			MOV EDX, 1007			; RowSwitch
			PUSH EDX			; Backup SwitchID
			MOV EDX, 3340			; RowVariable
			PUSH EDX			; Backup VariableID
			JMP __MainProc
__ConfigOrder:
			MOV EDX, 1008			; OrderSwitch
			PUSH EDX			; Backup SwitchID
			MOV EDX, 3337			; OrderVariable
			PUSH EDX			; Backup VariableID
__MainProc:
			MOV EAX, [EBX+18h]
			MOV EDX, [EAX+44h]		; PartySlot
			MOV EAX, [004CDB74h]		; TLcfgPartyInfo
			MOV EAX, [EAX]
			CALL PROC__004A6014h		; TLcfgPartyInfo.GetSlotActor
			MOV ECX, [EAX+04h]		; ActorID
			POP EDX				; Restore VariableID
			MOV EAX, [004CDC7Ch]		; TLcfgSystem
			MOV EAX, [EAX]
			CALL PROC__0048B3B0h		; TLcfgSystem.SetVariable
			MOV EAX, [004CDC7Ch]		; TLcfgSystem
			MOV EAX, [EAX]
			POP EDX				; Restore SwitchID
			MOV CL, 01h			; Set ON
			CALL PROC__0048B33Ch		; TLcfgSystem.SetSwitch
			JMP __004A2740h			; ExitMenu
__ConfigRow:
			MOV EDX, 1007			; RowSwitch
			PUSH EDX			; Backup SwitchID
			MOV EDX, 3340			; RowVariable
			PUSH EDX			; Backup VariableID
			JMP __MainProc
__ConfigOrder:
			MOV EDX, 1008			; OrderSwitch
			PUSH EDX			; Backup SwitchID
			MOV EDX, 3337			; OrderVariable
			PUSH EDX			; Backup VariableID
__MainProc:
			MOV EAX, [EBX+18h]
			MOV EDX, [EAX+44h]		; PartySlot
			MOV EAX, [004CDB74h]		; TLcfgPartyInfo
			MOV EAX, [EAX]
			CALL PROC__004A439Ch		; TLcfgPartyInfo.GetSlotActor
			MOV ECX, [EAX+04h]		; ActorID
			POP EDX				; Restore VariableID
			MOV EAX, [004CDC7Ch]		; TLcfgSystem
			MOV EAX, [EAX]
			CALL PROC__0048B36Ch		; TLcfgSystem.SetVariable
			MOV EAX, [004CDC7Ch]		; TLcfgSystem
			MOV EAX, [EAX]
			POP EDX				; Restore SwitchID
			MOV CL, 01h			; Set ON
			CALL PROC__0048B2F8h		; TLcfgSystem.SetSwitch
			JMP __004A1A74h			; ExitMenu

Bytes

BAEF030000 52 BA0C0D0000 52 EB0C
BAF0030000 52 BA090D0000 52 8B4318 8B5044 A174DB4C00 8B00 E8BB370000
8B4804 5A A17CDC4C00 8B00 E8478BFEFF
A17CDC4C00 8B00 5A B101 E8C48AFEFF
E9C3FEFFFF
BAEF030000 52 BA0C0D0000 52 EB0C
BAF0030000 52 BA090D0000 52 8B4318 8B5044 A174DB4C00 8B00 E80F280000
8B4804 5A A17CDC4C00 8B00 E8CF97FEFF
A17CDC4C00 8B00 5A B101 E84C97FEFF
E9C3FEFFFF

Segment 4/4

Offsets

RPG2003
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414
004A290Eh
000A1D0Eh
004A1C42h
000A1042h

Sourcecode

			NOP
			NOP
			JMP __ConfigOrder			; 004A283Bh
			NOP
			NOP
			JMP __ConfigOrder			; 004A1B71h

Bytes

90 90 E926FFFFFF
90 90 E928FFFFFF