View Single Post
  #71    
Old June 3rd, 2011, 09:45 AM
Jocaro's Avatar
Jocaro
Beginning Trainer
 
Join Date: May 2011
Gender: Male
Maybe this can help us with this little trouble:

"02037078 is a structure that controls the movement of, and only of, the player. However it can be associated to any NPC on screen.

The first two bits (0x03) of 02037078+0 determine the speed. 1 is normal. 2 is bike speed. 3 gives you a bike and changes itself to 2.

No matter what you write to 02037078+1 it is set to 0 again. If the value was 2 before the reset you get a bike. If you change the bike-byte the NPC turns into the hero.

02037078+2 and 02037078+3 behave like this:
0 0 Nothing pressed
0 0 Nothing pressed
1 1 Pressed forward
2 1 Pressed forward
2 1 Pressed forward
2 1 Pressed forward
0 0 Nothing pressed
2 1 Pressed forward
2 1 Pressed forward
0 0 Nothing pressed
0 0 Nothing pressed
1 1 Pressed forward
2 1 Pressed forward
2 1 Pressed forward

I don't know about 02037078+4.
02037078+5 sets the npc-id that is controlled by the keypad. (I wonder which numbers the npcs from connected maps have)
02037078+6 locks all movement when set to 1

More info about the NPCs is stored at 02036E38 in 16 0x24-byte long structures (Does that mean that there can't be more than 16 npcs in the overworld at the same time?!)
0x00 bits 7 and 6 are set when this npc is talking
0x01-0x0A unknown
0x0B height
0x0C-0x0F unknown
0x10 from (coords)
0x14 to (coords)
0x18 unknown
0x19 direction (in which the character actually looks)
0x1A unknown
0x1C direction (set when talked to but not always copied to 0x19)
0x1E unknown
0x20 direction (set after talk)
0x21-0x23 unknown

coordinates are saved as two halfwords (x and y)

The code for moving uses a table to convert the direction to relative coordinates.
Table: 083A64C8
Function that uses the table above: 08063A20
Function that uses the function above to move npcs: 0805C4F4

Note that the table contains 9 and not 5 directions. Yes. Game Freak planned to have diagonally moving npcs."

Thanks to Knizz quote in other thread.

I tryed this but the only troubles are that change in
02037078+5 dissapear whit warping or optios menu.

i xpect have contrbute to this theme

Maybe this some Knizz have info about the NPC's moves or moving in a map FR

showthread.php?t=205158&page=4 'in this site
showthread.php?t=205158&page=3 'in this site

Last edited by Jocaro; June 3rd, 2011 at 10:00 AM. Reason: For best info and clarity ;P
Reply With Quote