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

Associating Moves with animations

31
Posts
3
Years
    • Seen Oct 7, 2023
    So I am working on a simple hack of Pokemon Emerald so I can get more experience for the pokeemerald-expansion decomp that I also plan to work on, and I want to know how I can change which animation belongs to a certain move. I replaced Double team because I wanted to have X-Scissor in it's place as a TM, and I am not really a fan of double team so I thought I could replace it instead of creating a new move, but now I don't know how to replace the animation. For now it could simply be something like the fury cutter animation; something that gets the job done, but I've been looking through the decompilation and I can't seem to find somewhere than links a move to its animation.
     
    247
    Posts
    6
    Years
    • Seen May 12, 2024
    data/battle_anim_scripts.s should be what you're looking for. If you move the label Move_DOUBLE_TEAM: to be immediately above or below where the label Move_FURY_CUTTER: is, you can have Double Team use the Fury Cutter animation. It would look something like this:
    Code:
    Move_FURY_CUTTER:
    Move_DOUBLE_TEAM:
    	loadspritegfx ANIM_TAG_CUT
    	monbg ANIM_TARGET
    .....................................
     
    31
    Posts
    3
    Years
    • Seen Oct 7, 2023
    data/battle_anim_scripts.s should be what you're looking for. If you move the label Move_DOUBLE_TEAM: to be immediately above or below where the label Move_FURY_CUTTER: is, you can have Double Team use the Fury Cutter animation. It would look something like this:
    Code:
    Move_FURY_CUTTER:
    Move_DOUBLE_TEAM:
    	loadspritegfx ANIM_TAG_CUT
    	monbg ANIM_TARGET
    .....................................

    Sort of related: if I wanted to make it have a physical special split like the expanded emerald decomp, would I go to include/battle.h and change " #define IS_TYPE_PHYSICAL(moveType)(moveType < TYPE_MYSTERY) " and " #define IS_TYPE_SPECIAL(moveType)(moveType > TYPE_MYSTERY) " to how it is in the same file for the expanded emerald (" #define IS_MOVE_PHYSICAL(move)(GetBattleMoveSplit(move) == SPLIT_PHYSICAL) ", pretty much the same for special and status)? I'm not sure if or where I have to define " .split " if it is right though. I was able to find a section in the expanded version in src/battle_util.c that said what is below but I feel like there is more I'd need to do.

    " u8 GetBattleMoveSplit(u32 moveId)
    {
    if (IS_MOVE_STATUS(moveId) || B_PHYSICAL_SPECIAL_SPLIT >= GEN_4)
    return gBattleMoves[moveId].split;
    else if (gBattleMoves[moveId].type < TYPE_MYSTERY)
    return SPLIT_PHYSICAL;
    else
    return SPLIT_SPECIAL;
    } "
     
    247
    Posts
    6
    Years
    • Seen May 12, 2024
    Sort of related: if I wanted to make it have a physical special split like the expanded emerald decomp, would I go to include/battle.h and change " #define IS_TYPE_PHYSICAL(moveType)(moveType < TYPE_MYSTERY) " and " #define IS_TYPE_SPECIAL(moveType)(moveType > TYPE_MYSTERY) " to how it is in the same file for the expanded emerald (" #define IS_MOVE_PHYSICAL(move)(GetBattleMoveSplit(move) == SPLIT_PHYSICAL) ", pretty much the same for special and status)? I'm not sure if or where I have to define " .split " if it is right though. I was able to find a section in the expanded version in src/battle_util.c that said what is below but I feel like there is more I'd need to do.

    " u8 GetBattleMoveSplit(u32 moveId)
    {
    if (IS_MOVE_STATUS(moveId) || B_PHYSICAL_SPECIAL_SPLIT >= GEN_4)
    return gBattleMoves[moveId].split;
    else if (gBattleMoves[moveId].type < TYPE_MYSTERY)
    return SPLIT_PHYSICAL;
    else
    return SPLIT_SPECIAL;
    } "

    You should probably make a separate post for this question, as it has very little to nothing to do with the thread's title.

    What little I do know about the physical/special split, though, tells me that you should make that change, and you will also need go into include/pokemon.h and change the "BattleMove" struct to also have a u8 split property. I would not be surprised if there was a great deal more to do, though, as you said yourself.
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 31
    Posts
    3
    Years
    • Seen Oct 7, 2023
    Back
    Top