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

[Graphics] Animated Battle Sprites In the Style of Black and White in Pokeemerald

  • 7
    Posts
    1
    Years
    • Seen Nov 17, 2023
    I would like to start that I did not discover/create this, this was started and on Whack-a-Hack by Thorec_A_C and posted on November 9th 2022. If there are any new developments or mistranslations please let me know and I will do my best to keep this post updated!

    [Original Link]: https://whackahack.com/foro/threads/animacion-pokemon-al-estilo-blanco-y-negro-en-pokeemerald.67772/

    Now that the credits are out of the way, I will post a very rough translation (someone that doesnt know spanish well) for folk that don't know Spanish at all

    Thorec_A_C:
    "Cleaning up the PC I have found this, which comes from the following post [https://whackahack.com/foro/threads/animacion-pokemon-estilo-blanco-y-negro.65464/#post-470531], more than a year and a half has passed, almost nothing... Total, I no longer remembered it and so that it is lost forever, I publish it although it is a bit halfway done, that's why I put it in research and not in tutorials.

    The question, this is a way to implement animations of the Pokémon "Black and White style" in decomp, specifically in pokeemerald. I'm going to explain it to the best of my ability, though I'm not very familiar with decomp code.

    This implementation is far from professional, it was a bit of trial and error, and it has some bugs. Curiously, these bugs are the same as the famous BugMania patch for Fire red that recreates these same animations.

    To begin, explain that Emerald's animations have 2 parts: one where the sprite frames are loaded and repeated x number of times with x duration each repetition; the other that modifies the sprites giving them effects, a twist, stretching them, etc.

    To start we are going to make the frames repeat indefinitely to simulate a continuous animation like Black and White:
    Spoiler:


    With this we would already have implemented the system.

    Now comes the bad, there are 3 bugs with this:
    When we access the menu of the Pokémon team or the backpack in a battle, when we return to the battle scene, the animation does not run.
    Stat changes and the effects of some attacks like Fortitude or Curse give graphical errors.
    When switching Pokémon in a battle with a trainer, the animation of the second and subsequent Pokémon does not start.

    The first bug I know how to fix, all credits and thanks go to kakarotto , another forum user who helped me fix it at the time.

    To fix this we do the following:
    Spoiler:

    This fixes the first bug I mentioned.

    Regarding the other 2 I don't know how to solve them, as I mentioned I think they are also present in the BugMania patch. In this gif you can see both bugs:

    https://i.ibb.co/PY1jcBQ/bugs.gif
    Animated Battle Sprites In the Style of Black and White in Pokeemerald

    For the visual effects error, I think the key is to make the animation stop while the effect is taking place, in many attacks it already does, you can see if you implement this, for a few tenths of a second while doing the attack animation. This should be added to attacks that fail like Fortitude or Curse.

    Regarding the stat changes I understand that you should look at pokeemerald\src\battle_anim_utility_funcs.c but I'm not sure.

    And with the bug of the trainers I have no idea, what I investigated at the time did not lead me to anything. Maybe some decomp expert who is interested in this topic can contribute something.

    Finally comment that although this works with the sprites of Emerald, the result is not very good since when using only 2 frames the animations are abrupt. However with 4 frames the result is quite good. Important, do not use more than 4 frames per Pokémon since, according to what I have read, it exceeds what the ram memory of the game can support in double combat, although I am not very sure about it.

    Visual example, animation with 2 frames:

    https://whackahack.com/foro/attachments/2frames-gif.12216/
    Animated Battle Sprites In the Style of Black and White in Pokeemerald

    Animations with 4 frames:

    https://whackahack.com/foro/attachments/4frames-gif.12214/
    Animated Battle Sprites In the Style of Black and White in Pokeemerald
    https://whackahack.com/foro/attachments/4frames2-gif.12215/
    Animated Battle Sprites In the Style of Black and White in Pokeemerald

    Another thing to take into account of this is the space of the rom, since we are putting twice as many frames per Pokémon.

    I have little more to add to this. I hope it will be useful to someone and if any member manages to fix the bugs and share it with the community I would be very grateful."
     

    Lunos

    Random Uruguayan User
  • 3,118
    Posts
    15
    Years
    Is this posted as a formal request for help to fill in the missings, or is it just something you brought here because you thought it'd be useful for others?
    If it's the latter, it would probably be better suited for the Decomp & Disassembly Tutorials section.
    You could ask a moderator to move it. Otherwise it may get lost eventually in a sea of help-requesting threads.

    I'm not personally interested in this because it adds a gigantic amount of work (having to draw or commission extra frames for each species in the game) for fanmade for-hobby projects like ROM Hacks are.
    It's cool that you're spreading some knowledge though, so thanks for that
    Animated Battle Sprites In the Style of Black and White in Pokeemerald
     
  • 21
    Posts
    7
    Years
    • Seen Jun 8, 2024
    Hi! Thorec here. I didn't think that my research about this it was publicated for other person in Pokecommunity. Don't misunderstand me, this don't bother me at all, thanks for the work to translate it.

    I thought post it sometimes by myself but my english is so so, and the research has many flaws.

    Once I said this, I must correct a little mistake in the orginal publication and adding some new information that I discovered to fix the "no animation" in trainer battle. I'll edit the original post and I'll tell it here.
     
  • 21
    Posts
    7
    Years
    • Seen Jun 8, 2024
    I haven't been able to update the original post yet because the post has been "closed" so I'm posting the corrected and updated research here.

    This is a way to implement animations of the Pokémon "Black and White style" in decomp, specifically in pokeemerald. I'm going to explain it to the best of my ability, though I'm not very familiar with decomp code.

    This implementation is far from professional, it was a bit of trial and error, and it has some weird behaviors.

    To begin, explain that Emerald's animations have 2 parts: one where the sprite frames are loaded and repeated x number of times with x duration each repetition; the other that modifies the sprites giving them effects, a twist, stretching them, etc.

    To start we are going to make the frames repeat indefinitely to simulate a continuous animation like Black and White:

    Spoiler:


    With this we would already have implemented the system.

    Now comes the bad, there are weird behaviors with this:

    1. When we access the menu of the Pokémon team or the backpack in a battle, when we return to the battle scene, the animation does not run.
    2. When switching Pokémon in a battle with a trainer, the animation of the second and subsequent Pokémon does not start.
    3. Stat changes and the effects of some attacks like Harden or Curse give graphical errors.

    To solve the first case (1) in pokeemerald\src\reshow_battle_screen.c we add in the static void CreateBattlerSprite(u8 battler) we add:

    Spoiler:


    To solve the second case (2) in battle_controller_opponent.c we modify static void CreateBattlerSprite(u8 battler):

    Spoiler:


    For the visual effects error (3), I think the key is to make the animation stop while the effect is taking place, in many attacks it already does, you can see if you implement this, for a few tenths of a second while doing the attack animation. This should be added to attacks that fail like Harden or Curse.

    Regarding the stat changes I understand that you should look at pokeemerald\src\battle_anim_utility_funcs.c but I'm not sure.

    Another option is to directly remove the mask in these situations. The pictures are there if you want to take a look: pokeemerald\graphics\battle_anims\masks.

    Finally comment that although this works with the sprites of Emerald, the result is not very good since when using only 2 frames the animations are abrupt (Examples in first post). However with 4 frames the result is quite good. Important, do not use more than 4 frames per Pokémon since, according to what I have read, it exceeds what the ram memory of the game can support in double combat, although I am not very sure about it.

    Another thing to take into account of this is the space of the rom, since we are putting twice as many frames per Pokémon.

    An example in game:

    Animated Battle Sprites In the Style of Black and White in Pokeemerald


    Sorry for my english and I hope it will be useful to someone. And if any member manages to fix the weird behaviors of stat changes animation and share it with the community I would be very grateful.
     
    Back
    Top