Jump to content

Recommended Posts

Posted (edited)

Since the arm9.bin file and overlay files are jumbled up for some reason, it is difficult to locate move tutors, and I am no expert in RAM editing a ROM. In the a/0/5/6 narc, how can I locate the move tutor events to locate the move tutor files more easily? Say I want to increase the amount of moves taught by the same move tutor, I'll need a breif explanation of how to do this with the arm9.bin file.

Since Andi didn't give where that RAM was located in the memory (usually in dumps it starts at 0x00000000 rather than 0x02000000), I set out to find it in the RAM myself :P

The string that Andi found is located in the RAM offset : 0x224C048 for the Tutor (edit: this location varies).

scrcmd_shop.c is what is right before it, indicating that script command shop is what's being grabbed.

As for the structure, it looks like u32 & u32 for Move and Shard Quantity.

The script the shopkeeper uses WAS located at 224BC84 (again, it varies), which isn't the typical location for the main scripts. I'm now looking for what script file he's located in. For now, here's a barebones parse of what his script is:

Script 1: 00000014
~~~~~Script 1~~~~~~
SetVarEqVal (0x0028) Var_32 Num_0
SetVarEqVal (0x0028) Var_33 Num_0
SetVarEqVal (0x0028) Var_34 Num_0
SetVar29 (0x0029) Var_33 Var_0
SetVar29 (0x0029) Var_34 Var_1
Logic09 (0x0009)  Var_34
Logic08 (0x0008)  Num_0
Logic11 (0x0011)  Num_5
IfThenGoTo (0x001F) 0xFF jump=0x0000000C
Message1 (0x003C) MID=Num_4 NPC=32785
CompareAtoB (0x0019) A=Var_33 B=Num_246
IfThenGoTo (0x001F) 0x01 jump=0x0000002D
CompareAtoB (0x0019) A=Var_33 B=Num_245
IfThenGoTo (0x001F) 0x01 jump=0x00000020
CompareAtoB (0x0019) A=Var_33 B=Num_244
IfThenGoTo (0x001F) 0x01 jump=0x00000013
CompareAtoB (0x0019) A=Var_33 B=Num_243
IfThenGoTo (0x001F) 0x01 jump=0x00000006
GoTo (0x001E) jump=0x0000000C
CallRoutine (0x0004) 0x000001DE
GoTo (0x001E) jump=0x00000032
CompareAtoB (0x0019) A=Var_33 B=Num_254
IfThenGoTo (0x001F) 0x01 jump=0x00000013
CompareAtoB (0x0019) A=Var_33 B=Num_253
IfThenGoTo (0x001F) 0x01 jump=0x00000006
GoTo (0x001E) jump=0x0000000C
CallRoutine (0x0004) 0x00000153
GoTo (0x001E) jump=0x00000006
CallRoutine (0x0004) 0x00000002
EndStdReturn[**] (0x001D)
0x8023
0x0
SetVarEqVal (0x0028) Var_36 Num_0
SetVarEqVal (0x0028) Var_37 Num_0
Logic09 (0x0009)  Var_34
Logic08 (0x0008)  Num_2
Logic11 (0x0011)  Num_1
IfThenGoTo (0x001F) 0xFF jump=0x00000012
Message1 (0x003C) MID=Num_1 NPC=32785
GoTo (0x001E) jump=0x0000000C
Message1 (0x003C) MID=Num_0 NPC=32785
SetVarEqVal (0x0028) Var_36 Num_1
SetVarEqVal (0x0028) Var_37 Num_1
Logic09 (0x0009)  Var_37
Logic08 (0x0008)  Num_1
Logic11 (0x0011)  Num_1
IfThenGoTo (0x001F) 0xFF jump=0x000000BF
CompareAtoB (0x0019) A=Var_36 B=Num_0
IfThenGoTo (0x001F) 0x01 jump=0x00000006
GoTo (0x001E) jump=0x00000018
Message1 (0x003C) MID=Num_2 NPC=32785
SetVarEqVal (0x0028) Var_36 Num_1
GoTo (0x001E) jump=0x0000008E
CompareAtoB (0x0019) A=Var_36 B=Num_1
IfThenGoTo (0x001F) 0x01 jump=0x00000006
GoTo (0x001E) jump=0x00000012
CallRoutine (0x0004) 0x00000112
SetVar29 (0x0029) Var_36 Var_32
GoTo (0x001E) jump=0x00000069
CompareAtoB (0x0019) A=Var_36 B=Num_2
IfThenGoTo (0x001F) 0x01 jump=0x00000006
GoTo (0x001E) jump=0x00000012
CallRoutine (0x0004) 0x00000143
SetVar29 (0x0029) Var_36 Var_32
GoTo (0x001E) jump=0x00000044
CompareAtoB (0x0019) A=Var_36 B=Num_3
IfThenGoTo (0x001F) 0x01 jump=0x00000006
GoTo (0x001E) jump=0x00000012
CallRoutine (0x0004) 0x0000015F
SetVar29 (0x0029) Var_36 Var_32
GoTo (0x001E) jump=0x0000001F
CompareAtoB (0x0019) A=Var_36 B=Num_255
IfThenGoTo (0x001F) 0x01 jump=0x00000006
GoTo (0x001E) jump=0x0000000C
SetVarEqVal (0x0028) Var_37 Num_0
GoTo (0x001E) jump=0x00000000
GoTo (0x001E) jump=0xFFFFFF2E
Message1 (0x003C) MID=Num_3 NPC=32785
WaitKeyPress (0x0032)
CloseMessage (0x003E)
SetVarEqVal (0x0028) Var_37 Num_0
SetVarEqVal (0x0028) Var_36 Num_0
SetVarEqVal (0x0028) Var_35 Num_0
End???[*TR] (0x0005)
SetVarEqVal (0x0028) Var_38 Num_0
SetVarEqVal (0x0028) Var_39 Num_0
SetVarEqVal (0x0028) Var_40 Num_0
Message1 (0x003C) MID=Num_8 NPC=32785
PopYesNoVar (0x0047) Var_38
Logic09 (0x0009)  Var_38
Logic08 (0x0008)  Num_0
Logic11 (0x0011)  Num_1
IfThenGoTo (0x001F) 0xFF jump=0x00000006
CallRoutine (0x0004) 0x0000008E
Message1 (0x003C) MID=Num_9 NPC=32785
WaitKeyPress (0x0032)
CloseMessage (0x003E)
SetVarEqVal (0x0028) Var_40 Num_0
SetVarEqVal (0x0028) Var_39 Num_0
SetVarEqVal (0x0028) Var_38 Num_0
End???[*TR] (0x0005)
SetVarEqVal (0x0028) Var_41 Num_0
CallRoutine (0x0004) 0x0000005E
SetVarEqVal (0x0028) Var_41 Num_0
End???[*TR] (0x0005)
SetVarEqVal (0x0028) Var_42 Num_0
?????Multi2 (0x00B2) A=0x11F B=0x1 C=0x0 D=0x100 16=0x2A01 E=44928
ScriptText??? (0x00AF) A=Num_5 B=Var_16383 C=Num_2
ScriptText??? (0x00AF) A=Num_6 B=Var_16383 C=Num_3
ScriptText??? (0x00AF) A=Num_7 B=Var_16383 C=Num_255
???? (0x0077)
Logic09 (0x0009)  Var_42
Logic08 (0x0008)  Var_16382
Logic11 (0x0011)  Num_1
IfThenGoTo (0x001F) 0xFF jump=0x0000000C
SetVarEqVal (0x0028) Var_32 Num_255
GoTo (0x001E) jump=0x00000006
SetVar29 (0x0029) Var_32 Var_42
SetVarEqVal (0x0028) Var_42 Num_0
End???[*TR] (0x0005)
SetVarEqVal (0x0028) Var_43 Num_0
SetVarEqVal (0x0028) Var_43 Num_1
CloseMessage (0x003E)
0x149
0x8021
0x802B
Logic09 (0x0009)  Var_43
Logic08 (0x0008)  Num_0
Logic11 (0x0011)  Num_1
IfThenGoTo (0x001F) 0xFF jump=0x0000000C
SetVarEqVal (0x0028) Var_32 Num_255
GoTo (0x001E) jump=0x00000006
SetVarEqVal (0x0028) Var_32 Num_0
SetVarEqVal (0x0028) Var_43 Num_0
End???[*TR] (0x0005)
SetVarEqVal (0x0028) Var_44 Num_0
SetVarEqVal (0x0028) Var_45 Num_0
0x1A4
0x1A7
CloseMessage (0x003E)
0x14B
0x14E
0x0
0x802C
0x802D
0x14A
0x1A3
0x1A7
Logic09 (0x0009)  Var_44
Logic08 (0x0008)  Num_0
Logic11 (0x0011)  Num_1
IfThenGoTo (0x001F) 0xFF jump=0x0000000C
SetVarEqVal (0x0028) Var_32 Num_255
GoTo (0x001E) jump=0x00000006
SetVarEqVal (0x0028) Var_32 Num_0
SetVarEqVal (0x0028) Var_45 Num_0
SetVarEqVal (0x0028) Var_44 Num_0
End???[*TR] (0x0005)
SetVarEqVal (0x0028) Var_34 Num_0
SetVarEqVal (0x0028) Var_33 Num_0
0x0
0x5200
0x46
0x1800
?????Multi2 (0x00B2) A=0x2800 B=0xA928 C=0x24A9 D=0x224 16=0x2 E=0

-- beyond here it errors out due to not all commands being known 

0x0
CallRoutine (0x0004) 0x6373194D
0x6372
0x646D
0x735F
0x6F68
0x2E70
0x63
0xBE34
0xDA00
0x125
0xDFC5
0xBA84
0x7
0xF5
0x1
0x0
0xD
0x0
0x15
0x0
0x1E58
??? (0x0227) A=Cont_10020 B=Num_546
0xDA24
0x221
0x3024
0x222
0x7124
0x222
0xAE24
0x222
0x183
0x0
End (0x0002)
~~~~~~Finish~~~~~~
0x0
script returned but is still running registered functions

script begins in scriptnarc @ 7CC78, corresponds to script file 6_1247.

Depending on what tutor you talk to, the list that Andi gave will be different. No idea where the table is from though!

shardchange.png

Was able to change the move he gives out. Most likely the text of the menu is set within the script, but when selecting a move it loads the proper text.

But that's a whole 'nuther story, how do we locate the moves taught by said move tutors. Not to mention, how do you extend the Humilau move tutor's move range?

:confused::confused::confused::confused:

Edited by OrrominGnome

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...