• 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.

Research: Hacking Emerald's Animations

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
  • For the longest time hackers have wondered how those magical Emerald animations have worked. Well, it turns out it's a bit more complicated than we thought. There are three (or possibly more) tables used for Emerald's animations: One for changing between the two frames, one for rotation/scaling, and a third for deciding how to rotate and scale. More on that further down.

    So the first table has been discovered a while back as a simple animation table, in the usual format for most animations. Nothing to special about it, other than it decides how the two frames are "flip-flopped" between each other. The next two, however, are an interesting pair of tables.

    The first is the actual scaling/rotation animation table, located at 60AA88. Unlike most animations, it doesn't actually use a simple script-like byte interface; It instead uses ASM to do it's job. Now, obviously writing out code for each and every Pokemon's animation is a bit difficult, and takes up a large amount of space, so instead of doing an individual animation for each Pokemon, they reused them, and they have it narrowed down to about 150 different and unique animations. For most people this might be a bit of a dead end, but this does confirm that there is the possibility of changing animations.

    Now obviously if we have a table with less animations than Pokemon we're going to have to have a sort of "index" deciding which animations go where. Luckily, there is such an index, located at 3299EC for front sprites and 60A8C8 for back sprites, both of which contains a single byte for every Pokemon, deciding which animation is used where, meaning that we can change different Pokemon's animations, provided that we know which one we want to use.

    As of now that's all I've discovered. If anyone has anything they'd like to contribute feel free to help.
     
    Last edited:
    1,323
    Posts
    16
    Years
    • Seen Dec 9, 2023
    Here's my code for a blank animation:
    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    .global blankanimation
    
    push {r4,lr}
    ldr r0, .RETURN
    str r0, [r4, #0x1C]
    pop {r4}
    pop {r0}
    bx r0
    
    .align
    .RETURN: .word 0x08180715
    The lines "ldr r0, .RETURN" and "str r0, [r4, #0x1C]" are in there because the game freezes in-battle after the animation is "done" if you don't have that in there. This animation code however, makes it move slightly in the Summary screen (but not in-battle). It appears that for some reason they behave differently. That can be fixed just by changing the bytes at 0x06EE38 to 00 00 and the byte at 0x06ECC4 to 01.

    Also I've been looking for the back sprite animation table to no avail, but I'm 90% sure that either it's in a different format from the front sprite animation table, or it uses another set of animations entirely. I've concluded this because I'm 99% sure Lugia's back sprite animation number would be 0x96 (turn blue and slowly wave side to side), and I've searched "96 __ __ 00 00 00 00 00 00 ..." in a hex editor (the two blank spots are for Ho-oh and Celebi. GoldFinger lets you search strings with missing bytes), and seeing as how the front sprite animation table just has 00 for the Unown placeholders, I figured the back would too, but apparently not... I found the back sprite table, scroll to the bottom of this post.

    EDIT: Scratch that, I'm pretty sure now that the backsprites do use the same set of animations, since I put a breakpoint on the scaling/rotation table pointer right before sending out a Pokémon and the breakpoint was indeed reached.

    Also I'm going to try and make a list of all animations with descriptions of what they do.

    EDIT: Here we go:
    Animation Index:
    00 - tiny bounce (used by Egg)
    01 - small grow,expand,grow,expand
    02 - shake side-to-side really fast
    03 - shake side-to-side normal speed
    04 - shake up-and-down normal speed
    05 - bounce and rotate left and right fast
    06 - hop up and down, hop left and right (used by Bulbasaur)
    07 - rotate left and right kinda slow
    08 - rotate left and right pretty fast twice
    09 - shrink a tiny bit, grow a tiny bit, kinda fast (similar to Growl)
    0A - move around kinda diagonally
    0B - rotate left and right but not that much, slowly
    0C - rotate left and right but not that much, fast
    0D - rotate from top left and right but not that much, slowly
    0E - rotate from top left and right but not that much, fast
    0F - shake left and right really fast, not as much as 02
    10 - shake up and down really fast
    11 - shake in circles really fast
    12 - twist around a bit
    13 - grow, shrink, kinda like a bounce (more than 00)
    14 - circle around really fast then freeze for a split second
    15 - glow a solid black color
    16 - stretch on horizontal axis kinda fast (like a growl)
    17 - stretch on vertical axis kinda fast (like a growl)
    18 - wiggle and rotate up and down
    19 - shake up and down twice
    1A - rotate a little and move to the left a little
    1B - rotate down, rotate up (I think it's used by Deoxys)
    1C - rotate down and up in a zigzag motion
    1D - rotate left and right in a zigzag motion
    1E - hop up and down a little
    1F - 360 degree spin (used by Spheal)
    20 - fade to a yellow
    21 - fade to a red
    22 - fade to blue
    23 - fade to orange-ish
    24 - fade to purple
    25 - move to left really fast
    26 - move toward bottom left and then do a 360 degree spin (used by Pidgeot)
    27 - sprite blinks several times (used by Kecleon?)
    28 - move toward bottom left and then do a backflip
    29 - move toward top right and then do a frontflip
    2A - rotate around really fast in a triangle motion
    2B - move like a wave left and right
    2C - blink yellow several times
    2D - tilt left and right fast
    2E - tilt left and right fast from top axis
    2F - rotate up, and then stomp back down (used by Venusaur)
    30 - squish down and up (Grimer?)
    31 - bounce left and right kinda fast
    32 - bounce back and forth
    33 - rotate left and right really fast
    34 - rotate left and right really really fast
    35 - sprite blinks several times really fast
    36 - rotate almost sideways and then bounce to the left
    37 - rotate left really fast a couple times
    38 - rotate right and shake a little
    39 - move in a square-ish motion really really really fast
    3A - slowly grow bigger (used by Gengar)
    3B - wiggle up and down while squishing
    3C - wiggle up and down while squishing faster
    3D - wiggle up but stay up then come back down while squishing
    3E - wiggle side to side fast while squishing
    3F - wiggle side to side even more while squishing
    40 - wiggle really fast left to right while squishing
    41 - grow freaking huge really fast a couple times (Heracross and Dodrio?)
    42 - move in a small oval kinda fast
    43 - move left and right while shaking
    44 - move left and right and then bounce a little?
    45 - tiny bounce like 00, except a lot slower
    46 - move left to right really slow
    47 - move up and down really slow
    48 - jump and shake kinda fast
    49 - jump and shake kinda slow
    4A - jump and shake really slow
    4B - move around in a zigzag motion kinda slow
    4C - shake left and right kinda slow
    4D - shake up and down kinda slow
    4E - rotate left and right a couple times then do it all again
    4F - move around in a circle-ish shape once
    50 - shake up and down twice
    51 - rotate in a zigzaggy way
    52 - shake up and down a tiny bit
    53 - 360 degree spin again
    54 - move in a triangle motion twice (used by Magnemite)
    55 - squish up and down twice
    56 - bounce around twice
    57 - shake up and down really fast
    58 - shake up and down moderate speed
    59 - shake left and right while moving a relatively long distance
    5A - tense up a little bit vertically
    5B - tense up a little bit horizontally
    5C - shake fast up and down but not that much
    5D - shake fast left and right but not that much
    5E - shake fast left just once
    5F - shake really fast left and right a couple times
    60 - shake really really fast left and right a couple times
    61 - shake really really fast up and down a couple times
    62 - jump-ish motion twice
    63 - jump-ish motion twice faster
    64 - move around in a circle really fast
    65 - grow bigger fast
    66 - move to the right then left while shaking
    67 - move to the right then left really fast while shaking
    68 - move in a triangle motion slow
    69 - move in a triangle motion really fast
    6A - move in a triangle motion twice
    6B - grow big then back to normal
    6C - grow big then back to normal twice
    6D - flutter left and right
    6E - flutter left and right slowly
    6F - flutter left and right really fast
    70 - flutter left and right but more wiggly idk
    71 - grow big fast then shrink fast twice
    72 - shrink and grow a little twice
    73 - get a little bigger like a growl
    74 - stretch fast vertically twice
    75 - stretch fast horizontally twice
    76 - stretch horizontally once
    77 - grow big twice in an erratic way
    78 - shake/growl/grow at the same time
    79 - move left and right in an arc motion
    7A - move left and right in an arc motion fast
    7B - move left and right in an arc motion really fast
    7C - flutter in an arc motion twice
    7D - flutter in an arc motion twice fast
    7E - flutter in an arc motion twice really fast
    7F - barely move in an arc motion
    80 - barely move in an arc motion fast
    81 - barely move in an arc motion really fast
    82 - tilt downwards
    83 - tilt downwards slow
    84 - tilt downwards twice fast
    85 - grow bigger twice in a shaky way
    86 - grow bigger in a shaky way fast
    87 - kinda growl/grow bigger shaky
    88 - charge to the right
    89 - charge to the right fast
    8A - charge to the right really fast
    8B - blink a yellow color several times
    8C - blink a yellow color several times faster
    8D - blink a yellow color several times faster i guess
    8E - turn red then violently shake
    8F - turn red then shake
    90 - turn red then slide left and right
    91 - turn green then violently shake
    92 - turn green then shake
    93 - turn green then slide left and right
    94 - turn blue then violently shake
    95 - turn blue then shake
    96 - turn blue then slide left and right

    Here's what I've found on back sprite animations:
    Right after the main scaling/rotation table is another table, at 0860ACE4. This table is simply a list of animation slots that the back sprites may use. Unfortunately the table that determines which of these animations are apparently in a different format, but I can confirm that this back sprite animation list is indeed referred to thanks to VBA-SDL-H. With VBA-SDL-H, I was also able to determine that the back sprite animations for the first six Pokémon are:
    Bulbasaur = 0x83 (slot 0x38 in the table at 0860ACE4)
    Ivysaur = 0x46 (slot 0x05 in the table at 0860ACE4)
    Venusaur = 0x5D (slot 0x15 in the table at 0860ACE4)
    Charmander = 0x7F (slot 0x35 in the table at 0860ACE4)
    Charmeleon = 0x88 (slot 0x3C in the table at 0860ACE4)
    Charizard = 0x8E (slot 0x42 in the table at 0860ACE4)
    The table for the back sprites is definitely in a different format than the animation index for the front sprites, because the string "38 05 15 35 3C 42" does not show up in the ROM (nor does what the table supposedly would be if I used their 'true' slots, which would be 83 46 5D ...).

    To explain the table at 0860ACE4 a little, you'll see that the first byte at 0860ACE4 is 60. This means in the hypothetical back sprite animation table, 00 actually refers to animation 0x60. If you were to change this value, then all back sprites that used animation 0x60 will instead use whatever value you changed it to.

    To help with testing, I'll just use Bulbasaur as an example. Bulbasaur's back sprite animation is 0x83. In the table that starts at 0860ACE4, skip ahead to 0860AD1C and you'll see byte 0x83. Change this value to another animation, and then all Pokémon that used 0x83 as the back sprite animation will now have a different back sprite animation to whatever you changed it to - not just Bulbasaur, thus confirming there has to be another table for this somewhere.

    To prove this further, Charizard and Ho-oh both use the same back sprite animation: 0x8E. So find 0x8E in the table at 0860ACE4 (8E is located at 0860AD26) and change that byte to something else, which causes Charizard and Ho-oh, and all other Pokémon that use 0x8E as their back sprite animation, to use whatever animation you changed it for the back sprite.



    EDIT: 4/21/14
    Ok, so I found the index table that controls the back sprite animations. It's at 0860A8C8. Apparently there are only up to 0x1A animations available for backsprites. The indexes as I suspected are different from the front sprite animation table, but it doesn't work how I thought it would. It is still somehow related to the table at 0860ACE4 I mentioned earlier but now I'm not quite sure how. But who cares lol, the back sprite table has been found and can be freely changed!
     
    Last edited:
    1,323
    Posts
    16
    Years
    • Seen Dec 9, 2023
    (I think this warrants a second post)

    HOW TO DISABLE EMERALD ANIMATIONS COMPLETELY:
    1. First we're going to overwrite Animation #00 with a blank animation, but makes sure sprites work as normal in-battle. At 0x18080C, put in these bytes:
    Code:
    10 B5 02 48 E0 61 10 BC 01 BC 00 47 15 07 18 08

    2. Now from 0x3299EC to 0x329B87, fill it with 00. This will make every Pokémon use animation number #00 as their front sprite animation.

    3. Now at 0x308CC0, change the bytes there to 38 F5 2F 08.

    4. Now starting at 0x309AAC and ending at 0x30A11B is a table. Change every pointer in that table to the bytes BC 8C 30 08. This will make every Pokémon only have one frame, just like in Ruby and FireRed.

    5. At 0x06EE38, change the bytes to 00 00. This will disable the Pokémon's animation in the Summary screen. Even though we changed every Pokémon's animation to a blank one, this is still necessary because the blank animation code seems to function differently in the Summary screen, but as far as I know is the only way to have it work perfectly in-battle.

    6. At 0x06ECC4, change the byte to 01. The reasoning for this is the same as above, except this is specifically to disable the Egg sprite's animation in the Summary screen. (It still works when hatching)

    7. Starting at 0x60A8C8 to 0x60AA63, fill the bytes with 00. This will change all the Pokémon's back sprite animation to back animation #00.

    8. As a failsafe, fill the bytes starting at 0x60ACE4 to 0x60AD2E with 00. This will ensure that Pokémon will always use the blank animation for back sprites.

    There, that should do it. I might have missed something, as I wrote these steps after I modified my ROM. But either way if I missed something, I'll just upload a patch if anyone wants it.
     
    Last edited:
    89
    Posts
    10
    Years
  • Exactly where are the tables involved? It seems that there is a table for controlling how the frames alternate and the repetition. How is that data edited? Is it possible to expand the table? I understand how you feel on this, Chaos Rush, but one of the reasons I hack Emerald in the first place are the animations. Plus, some of the animation scripts might be usable in move animations (using the 03 command).
     
    11
    Posts
    9
    Years
    • Seen Aug 19, 2016
    Hey Chaos Rush. Thanks for writing down how to disable the anims.

    I did everything but if wild poke's appear, the game freezes, 0.1 sec. before the cry appears.

    A patch isn't good because i have modded my rom already in over parts. For example every sprite.

    Can you help me?
     
    3,044
    Posts
    9
    Years
  • (I think this warrants a second post)

    HOW TO DISABLE EMERALD ANIMATIONS COMPLETELY:
    1. First we're going to overwrite Animation #00 with a blank animation, but makes sure sprites work as normal in-battle. At 0x18080C, put in these bytes:
    Code:
    10 B5 02 48 E0 61 10 BC 01 BC 00 47 15 07 18 08

    2. Now from 0x3299EC to 0x329B87, fill it with 00. This will make every Pokémon use animation number #00 as their front sprite animation.

    3. Now at 0x308CC0, change the bytes there to 38 F5 2F 08.

    4. Now starting at 0x309AAC and ending at 0x30A11B is a table. Change every pointer in that table to the bytes BC 8C 30 08. This will make every Pokémon only have one frame, just like in Ruby and FireRed.

    5. At 0x06EE38, change the bytes to 00 00. This will disable the Pokémon's animation in the Summary screen. Even though we changed every Pokémon's animation to a blank one, this is still necessary because the blank animation code seems to function differently in the Summary screen, but as far as I know is the only way to have it work perfectly in-battle.

    6. At 0x06ECC4, change the byte to 01. The reasoning for this is the same as above, except this is specifically to disable the Egg sprite's animation in the Summary screen. (It still works when hatching)

    7. Starting at 0x60A8C8 to 0x60AA63, fill the bytes with 00. This will change all the Pokémon's back sprite animation to back animation #00.

    8. As a failsafe, fill the bytes starting at 0x60ACE4 to 0x60AD2E with 00. This will ensure that Pokémon will always use the blank animation for back sprites.

    There, that should do it. I might have missed something, as I wrote these steps after I modified my ROM. But either way if I missed something, I'll just upload a patch if anyone wants it.

    Wow, I actually did this...
    Good job!
     
    2
    Posts
    9
    Years
    • Seen Jan 28, 2015
    Chaos Rush i dont know if you ever see this, but if you see please upload a patch thanks :)
     

    MrDollSteak

    Formerly known as 11bayerf1
    858
    Posts
    15
    Years
  • Step 3:
    Spoiler:

    Don't you mean in Step 3 to select 6E0 bytes?

    Because if there are 440 Pokemon and each entry is a pointer (4 bytes) that would mean its 6E0.

    That could explain part of your issues with the sprite movements for Pokemon of a point after something.
     
    89
    Posts
    10
    Years
  • I'm not sure if this has been posted somewhere else, but...
    To those people who want to expand the number of Pokémon on Emerald while retaining the animations:
    Step 1:
    Spoiler:

    Step 2:
    Spoiler:

    Step 3:
    Spoiler:

    Step 4:
    Spoiler:

    Step 5:
    Spoiler:

    ZxXvwuk.gif

    For the front sprite and back sprite animations index, Chaos Rush has an excellent index here on Pokécommunity. Now the only issue will be the creation of 2-frame sprites for Gen IV to Gen VI. Personally, knowing that Flora Sky has sprites for Gen IV to Gen V, I think that if Sky were to let us use and resize his sprites we could come up with a pretty good repository soon. Another method would be to use the Sugimori palettes DS-style sprite repository that MrDollSteak has come up with, which covers Gen I to V.
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • I wrote an easier to read and understand version of this tutorial, just thought I could drop it over here since it does no harm.
    Spoiler:
     
    1
    Posts
    7
    Years
    • Seen Oct 29, 2023
    I know its been almost 5 years ago but could you plz reupload the EmeraldDisableANimations.ips patch. The link doesnt work anymore and neither does this tutorial for my rom hack (or i cant get it to work). Would be very appreciated.
     
    4
    Posts
    5
    Years
    • Seen Apr 17, 2024
    I compiled a list of what Pokemon uses what animation (both index number and Pokemon name):
    Spoiler:

    And here's a list for backsprites (including descriptions, seeing how they're different and not listed here):
    Spoiler:

    Hope this is helpful to everyone, I'm using it to restore animations to a game that have the animation disabled, where several Pokemon where moved around, and many of new Pokemon should be using something different.
     
    Last edited:
    13
    Posts
    5
    Years
    • Seen Apr 18, 2024
    Been a while since this thread's been posted in.

    I pulled the data and offsets from this thread and made them into Nightmare modules for use in vanilla Emerald/binary hacks that don't have an expanded Pokemon table. This sorts each byte of the relevant tables and lines it up with each Pokemon in internal hex, which does beat scrolling through each individual byte in a hex editor and making sure you hit the right byte to edit.

    The .NMM files can be opened and edited in Notepad if you have the tables repointed/expanded and in a different location from the vanilla ROM to change out the number of entries and location of each table. There's an alternate version of the Front anim and Back anim modules that sorts the options in a dropdown list (scroll with the up and down keys, afaik there wasn't an option in Nightmare modules for a scroll bar).

    Does anyone still use Nightmare? ...No? I feel so old-fashioned.

    https://drive.google.com/file/d/1lCMyNogPdOmR1LIDqITYa773_sqoeFFh/
     
    8
    Posts
    3
    Years
    • Seen Jan 21, 2022
    Anyone know how to remove Rayquaza yollow glowing skin in pokemon emerald?
     
    Back
    Top