• 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?".
  • A reminder that our new forum software has 2FA! It can be accessed by clicking your username and then "Password and security" from the menu. We strongly suggest not reusing passwords for your online accounts and enabling 2FA if possible.
  • Welcome to PokéCommunity! Register now and join one of the best places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Adding Move Animations?

4
Posts
3
Years
  • Age 18
  • Seen Nov 23, 2023
I'm getting into editing the decomp for some qol/update changes, and I wanted to make some extra moves too
I made the power, pp, description, etc. Everything transfers perfectly to the game.

...but I can't for the life of me find a way to give it an animation in battle.

And I don't mean add an animation. Just frankenstein-ing existing moves.
But not even copy-pasting already existing animations worked.

Is there something I'm missing? What is the "formula" for a move animation? What files do I have to edit?
 

Lunos

Random Uruguayan User
3,106
Posts
15
Years
I'm getting into editing the decomp for some qol/update changes, and I wanted to make some extra moves too
I made the power, pp, description, etc. Everything transfers perfectly to the game.

...but I can't for the life of me find a way to give it an animation in battle.

And I don't mean add an animation. Just frankenstein-ing existing moves.
But not even copy-pasting already existing animations worked.

Is there something I'm missing? What is the "formula" for a move animation? What files do I have to edit?
The only file you have to edit is data/battle_anim_scripts.s.
You just add an entry for your new move to gBattleAnims_Moves before Move_COUNT, making sure that the order of the table matches the same order in which your moves are defined at include/constants/moves.h, then write an animation script somewhere below gBattleAnims_Special following the lead of any animation script in the file, and that's basically it.
 
4
Posts
3
Years
  • Age 18
  • Seen Nov 23, 2023
The only file you have to edit is data/battle_anim_scripts.s.
You just add an entry for your new move to gBattleAnims_Moves before Move_COUNT, making sure that the order of the table matches the same order in which your moves are defined at include/constants/moves.h, then write an animation script somewhere below gBattleAnims_Special following the lead of any animation script in the file, and that's basically it.

YESS! That finally worked! ^v^
I had put my moves on top for ease of access lol. Had no idea the order mattered when I was already calling the move anyways...

Thank you so much!

Also, in some animations, ie Wrap, there are 5 numbers. What do these mean?
Code:
createvisualtask AnimTask_ScaleMonAndRestore, 5, 10, -5, 5, ANIM_TARGET, 0
 
Last edited:

Lunos

Random Uruguayan User
3,106
Posts
15
Years
YESS! That finally worked! ^v^
I had put my moves on top for ease of access lol. Had no idea the order mattered when I was already calling the move anyways...

Thank you so much!

Also, in some animations, ie Wrap, there are 5 numbers. What do these mean?
Code:
createvisualtask AnimTask_ScaleMonAndRestore, 5, 10, -5, 5, ANIM_TARGET, 0
They're parameters read by the AnimTask_ScaleMonAndRestore function that createvisualtask is executing.
See: https://github.com/pret/pokeemerald/blob/master/src/battle_anim_mon_movement.c#L818-L822
 
Back
Top