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

Development: Gen III Animation Scripting: Tasks and Templates

AkameTheBulbasaur

Akame Marukawa of Iyotono
409
Posts
10
Years
  • Attack Animation Scripting​

    Click here to download everything in the thread at once! The file is 265 MB though, so beware if you have a slow internet connection!
    Download last updated on September 18th, 2023

    Firstly, before saying anything, I would like to extend my thanks to everyone who has contributed to Move Animations up to this point. This includes anyone who posted in the Move Resource Thread, ChaosRush (for making one of the first real tutorials), DizzyEgg (for making a list of all the known Tasks and Templates and giving me the idea to use ASM macros), and anyone else I can't remember the name of who contributed to documenting the Animation Scripting language. I would also like to like Ako the Pidgeot and the random Level 6 wild Diglett who helped me test all these Move animations over and over. They were real team players lol.

    Ever since it was discovered that Move Animations were created with a scripting language (much like how Move effects use one too), I've been interested in how to make it as quick and easy as possible for the layman to create custom animations for their new Moves. The commands were discovered and documented, and a rudimentary scripting language exists, but there was a large component of Move Animation scripting that remained mostly unknown and undiscovered: Tasks and Templates.

    Much of the actual animating is done via Tasks and Templates. While some are currently documented, most of them are not. There are 211 unique Tasks and 326 unique Templates. Why so many? It is likely that most of the Tasks and Templates were created specifically for the Moves they are used in. Many are only used in one or two Moves, but a few are more general purpose and are used in a larger number of animations. However, most of the Tasks/Templates that are only used in one Move still have arguments, meaning that they can be further customised! I then began the very long and strenuous process of documenting, to the best of my ability, the full effects of each Task and Template.

    This thread is the result of close to four years worth of research. The hope is that using the information in the documents provided, ROM hackers will be able to create good quality Move Animations that they are satisfied with without needing to understand assembly and without needing to mess around with strings of hexadecimal bytes over and over.

    Although this information was compiled with binary hacking in mind, this is also equally as applicable to anyone using the FireRed or Emerald Decomps since Animation Scripting is (I assume) still a thing there too.

    What Is Here
    • The Animation Scripting Book
      This is a book that contains all of the information needed to start writing animation scripts. When I say it is a book, I mean it! It is over 1,000 pages long!

      You aren't meant to actually read all 1,000 pages, at least not all at once. Most of those pages are dedicated to the reference material for the Tasks and Templates. Still, I will be kind and give you each section separately.

      In this book (in order) we have:
      Of these, probably you will want to actually read the tutorial. The rest of the documents are meant as handy guides to look at in case you forget (or want to learn about) a Task or Template.

      Also of note, the book has three appendices. Appendix A shows all of the Particles, Appendix B lists all of the possible sound effects and Appendix C shows all of the backgrounds.
    • The Animation Script Helper
      This booklet contains the command documentation and the three appendices mentioned above in one document. It's handy when you are writing scripts and want to see what a Particle or background looks like, or you forget what the arguments for a command are.
    • The Sound Effects
      Although I tried to give them descriptive names, it's awfully hard to describe a sound effect in one word. So, I'm including the sound effects as MP3 files so that you can listen to them and decide what you want to use.
    • Task and Template GIFs
      These are a set of .GIF files that show an example of what the Task or Template would look like in a battle. Keep in mind that since most of these have arguments and can be customised, it's impossible to completely convey all that a Task or Template is capable of in one GIF. However, they should give you a basic idea.

      The Task GIFs are here and the Template GIFs are here.
    • Animation Script Macros
      Now, here's the part where you might be wondering how you would insert an animation script into your ROM. The way that I like to do it is by using the THUMB Compiler and an ASM Macro file. I made a tutorial on how to use ASM Macros to compile scripts which you can download as a PDF here.

      The gist of it is that you make a folder on your computer where you can keep the macro file. Then, at the top of your script, you write:

      .include "PATH TO YOUR MACRO FILE HERE"

      Then, you can use the THUMB Compiler to compile your script as a binary file, which you can then copy-paste into your ROM.

      Do you want to know what the fun part about doing it this way is? The language is universal! You heard that right, universal. If you do it my way, you would be able to use the exact same animation for both FireRed and Emerald. All you would need is the correct macro file.

      I've included two macro files here, one for FireRed (named Animation.txt) and one for Emerald (named AnimationE.txt). If you make any changes (such as adding a custom Template), and you keep all your macros in the same place, then you only need to edit the file and recompile your animation (if needed).
    • The Default Moves
      This is a collection of all of the default Gen III animations (in the universal animation scripting language). These are useful because then you can see what Game Freak already did that you know works (or doesn't work, if you didn't like their animations much).
    • Animation Decompiler
      As a little bonus, I decided to include the tool I used to decompile the default Gen III animations with while doing research. It is written in Python (by me). It may have bugs, but it successfully decompiled all of the default Gen III Moves, so I can safely say that it's mostly functional.

      It was mostly used for research, as opposed to being developed for use as a real tool, so it isn't perfect, but somebody might find it useful.

    In conclusion, it is hoped that people will be able to create new and interesting Move Animations using the resources provided here. I've certainly found researching this to be rewarding. As mentioned earlier, experimentation is encouraged as there are near endless different ways that all of the Tasks and Templates can be strung together and customised!
     
    Last edited:
    70
    Posts
    10
    Years
    • Seen Nov 4, 2023
    You did a god's work, sir. Sadly i will take so long to download all the files at once (i dont have mediafire account lol)
    Finally its possible to copy Bug Master moves animation? Who knows...
     

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
    409
    Posts
    10
    Years
  • Thank you for your kind words! I would have attached the files to the post but I can never get that to work right and also some of the files were too big.

    Probably it is possible to make whatever animation you want. I've been experimenting with some ideas, although now I'm back in school so there's sadly not much time.

    Here's one I did a while ago that is kinda cool though.

    jhe9ueg.gif

    I called it "Diamond Storm" (I think that is a real Move, actually).

    Here's the script:
    Spoiler:


    Here's another one too, I also did this a while ago.
    XToRAKV.gif

    I called this one "Mega Whip", and here's the script for this one:
    Spoiler:


    Feel free to use these and credit "AkameTheBulbasaur" if you do. I think this should give everyone a small preview of some stuff you could do.
     
    70
    Posts
    10
    Years
    • Seen Nov 4, 2023
    That "Diamond Storm" is pretty cool.
    Its been very long time im looking to replicate these (do not care about stunning high-quality particles, i just talk about animation): https://www.youtube.com/watch?v=X_1m8p3BJaA
    Some of them can be a sort of new Task/Template? I wonder if its possible to make new ones...

    What i can see, Moonblast seem to have start anim of Flame Wheel (these little orbs rising around could be Dragon Claw flame anims, or Twister), then launch the big orb like Zap Cannon, but i cant recall the impact anim...
    Wing Attack seem to be Fury Cutter anim (both Left and Right) and a final wave like various healing anim such Leftovers.
     

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
    409
    Posts
    10
    Years
  • It is possible to easily create a "new" Template in the sense of having the behaviour of one Template but using a different Particle (I have a section in the tutorial on how to do that).

    As for creating something entirely new, that would involve actual THUMB Assembly and probably advanced knowledge of graphics and stuff.

    That being said, there are 326 Templates and 282 Particles, so that is 91,932 different possible combinations that you could make doing the copy-paste way. I would say that's plenty of options lol.
     
    70
    Posts
    10
    Years
    • Seen Nov 4, 2023
    Yeah, i start reading your long documentation today.
    Cant wait to experiment with some moves!
     

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
    409
    Posts
    10
    Years
  • I fixed a couple of mistakes that were in some of the documents. Also, I realised that for the sound effects and GIFs, it made you download them all one at a time. That would be really annoying, so I changed it so that everything with more than one file in it was a ZIP file (easily opened with most unarchiving software) so you only would need to download one file instead of 300 lol.
     
    70
    Posts
    10
    Years
    • Seen Nov 4, 2023
    Thanks a lot!
    By the way, there's no way to load a custom particle with some Templates?
     

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
    409
    Posts
    10
    Years
  • There is this thread which, albeit old, still provides a useful tutorial on how to add a new custom Particle. You could then, I imagine, use the process for creating a new Template from an existing one.
     
    70
    Posts
    10
    Years
    • Seen Nov 4, 2023
    hmm, if its really possible to just duplicate a template and then make it to load other particles, it would be really good.
     
    123
    Posts
    3
    Years
    • Seen yesterday
    Thank you so much for this work. This will allow me to create so many animations, as well as add tons of improvements to the Move Animation Creator tool I made. Amazing work!
     
    Last edited:
    123
    Posts
    3
    Years
    • Seen yesterday
    Can you further explain .equ ROM, 0x08AABBCC?

    I tried recreating your diamond attack and set it to equ ROM, 0x0800000 but the animation crashed in game right after the background loaded
     

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
    409
    Posts
    10
    Years
  • Can you further explain .equ ROM, 0x08AABBCC?

    I tried recreating your diamond attack and set it to equ ROM, 0x0800000 but the animation crashed in game right after the background loaded

    The AABBCC part is where you put the address where you inserted the animation. So, if you inserted it at the location 0xAABBCC in the ROM, that's what you would put. The AABBCC is just a placeholder.

    The 0x08 part is at the beginning because AABBCC is a ROM address.

    So, if your animation has a branch, you can put "+ROM" after it (ex: Call MyBranch+ROM) and the compiler will format the pointer correctly without you needing to know exactly where in the ROM that part of your script would be. It's kinda like using dynamic addresses in NPC scripting if you are familiar with that.

    As for your other question, I imagine that it would be possible to create custom Tasks if you knew enough about both graphics editing and THUMB Assembly. I'm okay with THUMB but I know next to nothing about graphics hacking.

    You might have an easier time making a Task that does something more behind-the-scenes, like checking if the Pokemon is in a contest or whatever. Those sorts of Tasks I think I could do if I wanted.
     
    123
    Posts
    3
    Years
    • Seen yesterday
    Hello. Do you know if its possible to move both the user and the target to the background with the MoveSpriteToBG command in the same animation? For example, I'm trying to add MoveSpriteToBG User (as well as MoveSpriteFromBG ) to the Aerial Ace animation which already has MoveSpriteToBG Target, but this causes the game to freeze at the end of the battle.
     

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
    409
    Posts
    10
    Years
  • Hello. Do you know if its possible to move both the user and the target to the background with the MoveSpriteToBG command in the same animation? For example, I'm trying to add MoveSpriteToBG User (as well as MoveSpriteFromBG ) to the Aerial Ace animation which already has MoveSpriteToBG Target, but this causes the game to freeze at the end of the battle.

    If you move a sprite to the background, you always need to move them back again. So if you have MoveSpriteToBG User at the beginning, you need to put MoveSpriteFromBG User at the end. Otherwise, it crashes.
     
    123
    Posts
    3
    Years
    • Seen yesterday
    If you move a sprite to the background, you always need to move them back again. So if you have MoveSpriteToBG User at the beginning, you need to put MoveSpriteFromBG User at the end. Otherwise, it crashes.

    Yes, I made sure to add MoveSpriteFromBG at the end of the script. The problem I'm referencing is that I'm trying to move both the User and the Target to the background in the same script.
    For example:

    MoveSpriteToBG User
    MoveSpriteToBG Target
    ...code...
    MoveSpriteFromBG User
    MoveSpriteFromBG Target
    End

    Do you know if it's possible to do this, because whenever I try creating an animation that moves both the user and target to the background, it crashes
     

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
    409
    Posts
    10
    Years
  • Yes, I made sure to add MoveSpriteFromBG at the end of the script. The problem I'm referencing is that I'm trying to move both the User and the Target to the background in the same script.
    For example:

    MoveSpriteToBG User
    MoveSpriteToBG Target
    ...code...
    MoveSpriteFromBG User
    MoveSpriteFromBG Target
    End

    Do you know if it's possible to do this, because whenever I try creating an animation that moves both the user and target to the background, it crashes

    So I made the following test script:

    Spoiler:


    And it worked just fine.

    So, I can conclude that probably there was something else in your script or there was some other issue.

    Do you have a Discord or something? You can PM me if you do, cause that might be easier than doing it all on here since I check Discord more often.
     
    123
    Posts
    3
    Years
    • Seen yesterday
    So I made the following test script:

    Spoiler:


    And it worked just fine.

    So, I can conclude that probably there was something else in your script or there was some other issue.

    Do you have a Discord or something? You can PM me if you do, cause that might be easier than doing it all on here since I check Discord more often.

    Did your pokemon level up? That's when the crash occurs. It generally works in regular battles, but if the monster level up the game gets stuck

    Also, yes I'm on Discord. My username is Matteo #3412

    Edit: I ran the script you provided and this was the result: https://www.youtube.com/watch?v=t_8I0bZBdnU&feature=youtu.be
    WHen the enemy uses the same attack, our monster becomes glitched with the moveset box overlapping it. Then, if we try levelling up the game freezes
     
    Last edited:

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
    409
    Posts
    10
    Years
  • I corrected two mistakes I found.

    1. In the Emerald macro, ColourParticle has the wrong address. It is listed at 08116665 when it should be 08116849. The FireRed macro is fine.

    2. There is a GIF in the Task GIFs that is named SpringLoad which does not appear anywhere in the documentation. The reason for that is that I renamed the Task to BackUpAndShake, which is in the documentation. I simply forgot to delete/rename the GIF. I have since deleted it from the Task GIFs folder since BackUpAndShake is already in there.

    If I find any more, I will update this post and the "Last Updated" date in the original thread will change.
     
    Back
    Top