• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Other] Setting Person Events to specific OW frames

9
Posts
10
Years
    • Seen Oct 28, 2015
    Is there a simple way to set an OW sprite to a specific frame? Say I wanted to change a trainer OW to change to one of their mid-step frames after the player talks to them, until the map is exited.

    Like this frame of this OW for example:
    Setting Person Events to specific OW frames


    Is there a way to script that OW to change to that frame? I tried spriteface for different values but it didn't work. Is there maybe a way to do it with applymovement?

    Thanks in advance.
     

    BrandoSheriff

    Has a tendency to figure things out
    776
    Posts
    16
    Years
  • A simple but slightly weird solution would be to export that frame you want to show, then re-import it over frame 1 so no other work would be required. Though this doesn't work if you plan to have that sprite walk around. xD
     
    9
    Posts
    10
    Years
    • Seen Oct 28, 2015
    A simple but slightly weird solution would be to export that frame you want to show, then re-import it over frame 1 so no other work would be required. Though this doesn't work if you plan to have that sprite walk around. xD

    Yeah I considered this, and I'll probably just use multiple OW's if I can't find a solution.

    I essentially just want to access all frames of an OW so that I can script custom animations easier.
     

    Touched

    Resident ASMAGICIAN
    625
    Posts
    9
    Years
    • Age 122
    • Seen Feb 1, 2018
    It's possible if you want to get your hands dirty with some ASM. You basically need to get your hands on the NPC data, find the associated sprite and manually set the active frame. It's pretty much what the ice sliding "animation" does. It's actually the walking animation stuck on the frame with one foot forward. I wouldn't say the ASM involved is too difficult, but you need to be able to call engine functions and work with the RAM, so you need a fair amount of literacy.
     
    9
    Posts
    10
    Years
    • Seen Oct 28, 2015
    It's possible if you want to get your hands dirty with some ASM. You basically need to get your hands on the NPC data, find the associated sprite and manually set the active frame. It's pretty much what the ice sliding "animation" does. It's actually the walking animation stuck on the frame with one foot forward. I wouldn't say the ASM involved is too difficult, but you need to be able to call engine functions and work with the RAM, so you need a fair amount of literacy.

    Thanks for the informed reply,

    I'm comfortable with ASM in general but not GBA ASM in particular. Looking at DavidJCobb's RAM map, it says that OW data starts at 0x02036E5C. Having played with the memory viewer a little I don't particularly see where explicit frame parameters are. Is there documentation on OW data structures in the RAM?

    Thanks again.
     
    Last edited:

    Touched

    Resident ASMAGICIAN
    625
    Posts
    9
    Years
    • Age 122
    • Seen Feb 1, 2018
    Thanks for the informed reply,

    I'm comfortable with ASM in general but not GBA ASM in particular. Looking at DavidJCobb's RAM map, it says that OW data starts at 0x02036E5C. Having played with the memory viewer a little I don't particularly see where explicit frame parameters are. Is there documentation on OW data structures in the RAM?

    Thanks again.

    You probably want to get yourself a copy of IDA Pro and the Fire Red IDB (in my signature), as it is thousands of times more complete than the tiny RAM maps we have here. It has many structures documented, as well as function names and memory addresses so it's an indispensable tool if you want to do ASM hacking.

    The thing I was talking about is (as you said) at 02036E38. There are 16 "npc_states", each 0x24 bytes in size. The byte at offset 4 inside the structure is the object id, which is an index in the objects list at 0202063C. Each object is 0x44 bytes in size and corresponds to a hardware sprite in the GBA OAM. The byte at offset 0x2B in this is the animation frame, while 0x2A is the animation number (I think this corresponds roughly to applymovement values for NPCs).

    Also, you might want to look at a function which takes a person iD (from advance map) and translates it to an npc_state index, such as the function at 0805DF60.

    Lastly, offset 1 in the NPC states gets logical ORed with 4 when doing the ice sliding animation, so that might be worth a look.
     
    Back
    Top