• 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: Adding New Moves to Gen 3

10
Posts
12
Years
    • Seen Nov 19, 2013
    i think in this script it also need something to do when the opponent use "protect"
     

    DoesntKnowHowToPlay

    Tiny Umbrella with Lots and Lots of Good
    265
    Posts
    12
    Years
    • Seen Feb 24, 2024
    In FR, the battle script pointer table is at 0x1D6926. If you want to add a new move effect, you'll need to repoint one of the pointers there to your new battle script, and make sure your new moves are using that effect. There are a number of "holes" in the table, such as at #12 (which would be, going by the pattern, an effect that gives +1 to the user's speed), but if you use those the AI probably won't interpret them correctly (or at all).

    Also, thank you very much for that very helpful post Jambo. I wouldn't have been able to find the table at all without your attack script.
     

    redriders180

    Mastermind of Pokemon Glazed
    314
    Posts
    13
    Years
  • In FR, the battle script pointer table is at 0x1D6926. If you want to add a new move effect, you'll need to repoint one of the pointers there to your new battle script, and make sure your new moves are using that effect. There are a number of "holes" in the table, such as at #12 (which would be, going by the pattern, an effect that gives +1 to the user's speed), but if you use those the AI probably won't interpret them correctly (or at all).

    Also, thank you very much for that very helpful post Jambo. I wouldn't have been able to find the table at all without your attack script.

    But is it possible to expand the battle script pointer table as well? For instance, it only goes up to 213 right now, surely it can go to 255?
     

    Jambo51

    Glory To Arstotzka
    736
    Posts
    14
    Years
    • Seen Jan 28, 2018
    i think in this script it also need something to do when the opponent use "protect"

    No, we don't. It's all handled by the damage part of the script. Quite clever, isn't it?

    Also, thank you very much for that very helpful post Jambo. I wouldn't have been able to find the table at all without your attack script.

    You're welcome, although the pointer you posted isn't the pointer table to the battle scripts, it's the actual basic damage script itself, lol!

    I actually gave the location in my post, so use that instead. The great thing is that all text and delays and such are ALL handled by the script, so it makes adding new attacks much easier! :)
     

    Jambo51

    Glory To Arstotzka
    736
    Posts
    14
    Years
    • Seen Jan 28, 2018
    Haha, this is amazing.

    It's like playing legos with attacks.

    Yes, it rather is. Nice analogy.

    But is it possible to expand the battle script pointer table as well? For instance, it only goes up to 213 right now, surely it can go to 255?

    I just updated the OP now. Yeah, it can support up to 255 effects without a rewrite.
     

    droomph

    weeb
    4,285
    Posts
    12
    Years
  • Where's a compilation of your findings? Just asking.

    But anyways, if I'm not mistaken, there's a lot of differences between the games, right?
    Spoiler:
    I'm sorry if I'm so stupid sometimes.

    Many apologies, I'm only 15.
     

    Jambo51

    Glory To Arstotzka
    736
    Posts
    14
    Years
    • Seen Jan 28, 2018
    Where's a compilation of your findings? Just asking.

    But anyways, if I'm not mistaken, there's a lot of differences between the games, right?
    Spoiler:
    I'm sorry if I'm so stupid sometimes.

    Many apologies, I'm only 15.

    No. The thing you quoted is an ANIMATION SCRIPT, while the thing I posted about is a BATTLE SCRIPT. One is used to execute the animation played when you use the move, while the other is used to actually execute the move and all its effects. Hope that helps.

    I somewhat suspect that the battle scripts and animations scripts will be identical (offsets aside, of course) between RSE and FRLG. I could be wrong, though.

    I don't really have a compilation of findings - I simply posted how you can go about creating any combination of effects by showing an example. Obviously, you can simply swap in different effects from the ones I showed (or add extra ones). Earlier in this thread, ChaosRush posted a very useful list of effect ID numbers and what they actually do, which I used to find the effects I needed.
     

    droomph

    weeb
    4,285
    Posts
    12
    Years
  • Yeah, it seemed too good to be true anyways.

    Thanks! Yeah, it was kinda weird.

    Although, when I ran something from one of the posts before, it called the animation script, e.g. it actually ran (the commands I just mentioned) for the move. I don't really know...

    Never mind. I was reading something wrong.
     
    Last edited:

    Jambo51

    Glory To Arstotzka
    736
    Posts
    14
    Years
    • Seen Jan 28, 2018
    Yeah, the Battle Scripts call the Animation Scripts as part of their procedure. It's not all that weird, really.
     

    redriders180

    Mastermind of Pokemon Glazed
    314
    Posts
    13
    Years
  • OK, I'm either crazy, or just not seeing it...there aren't any existing effect bytes that lower the users stats? That seems crazy...surely there was one move out of the 354 introduced that would lower the users something >.>

    If I can't lower my own stats, It seems like alot of Gen IV and Gen V moves are undoable!

    Edit: I'm trying to reproduce Hammer Arm, so it needs to do damage as well...It's this "lowering stats" bit that's making me hit a road block.
     

    droomph

    weeb
    4,285
    Posts
    12
    Years
  • OK, I'm either crazy, or just not seeing it...there aren't any existing effect bytes that lower the users stats? That seems crazy...surely there was one move out of the 354 introduced that would lower the users something >.>

    If I can't lower my own stats, It seems like alot of Gen IV and Gen V moves are undoable!

    Edit: I'm trying to reproduce Hammer Arm, so it needs to do damage as well...It's this "lowering stats" bit that's making me hit a road block.
    I believe Overheat lowers your Sp. Atk. by two levels, you could probably look over on that.
     
    10
    Posts
    12
    Years
    • Seen Nov 19, 2013
    2E 85 3E 02 02 E6 15
    about the "E6"
    i think the highest bit means whether the effect depends on the effect accuracy
    1 means the effect always occurs,
    0 means the effect only has x%(effect accuracy) chance to occur.

    so "E6" always causes recoil , while "66" dpends on the effect accuracy
     

    Rasen

    ASM is very cool!
    71
    Posts
    13
    Years
  • Is it possible to make new command for battle script? For example attack and lowering user's defense and special defense by one stage (like close combat)
     

    Jambo51

    Glory To Arstotzka
    736
    Posts
    14
    Years
    • Seen Jan 28, 2018
    2E 85 3E 02 02 E6 15
    about the "E6"
    i think the highest bit means whether the effect depends on the effect accuracy
    1 means the effect always occurs,
    0 means the effect only has x%(effect accuracy) chance to occur.

    so "E6" always causes recoil , while "66" dpends on the effect accuracy

    Hmm, that could be a really good shout. The game definitely does check this highest bit on reading it to execute effects.

    Is it possible to make new command for battle script? For example attack and lowering user's defense and special defense by one stage (like close combat)

    It's possible, but pointless. I explicitly explained how to use existing commands in a combination to produce effects like close combat. For creating NEW effects, I wrote a "callasm" command.
     

    redriders180

    Mastermind of Pokemon Glazed
    314
    Posts
    13
    Years
  • Hmm, that could be a really good shout. The game definitely does check this highest bit on reading it to execute effects.



    It's possible, but pointless. I explicitly explained how to use existing commands in a combination to produce effects like close combat. For creating NEW effects, I wrote a "callasm" command.

    I tried to make a close combat that works, but it kept freezing up after the animation for the defense drop. I guess it's just bad programming...but I have a small annoyance. I wrote the following script for Hammer Arm:

    Spoiler:


    And while the speed drop does occur, it doesn't say so. How do I make it say that _____s speed dropped?

    I know this seems like its turning into a question thread, but can someone maybe explain how to make multiple stats drop without freezing up?
     

    droomph

    weeb
    4,285
    Posts
    12
    Years
  • I tried to make a close combat that works, but it kept freezing up after the animation for the defense drop. I guess it's just bad programming...but I have a small annoyance. I wrote the following script for Hammer Arm:

    Spoiler:


    And while the speed drop does occur, it doesn't say so. How do I make it say that _____s speed dropped?

    I know this seems like its turning into a question thread, but can someone maybe explain how to make multiple stats drop without freezing up?
    Hm...Have you tried looking into the script for AincentPower? Although that raises your stats, not decrease it, I think it could be the same process for the opposite...
     
    10
    Posts
    12
    Years
    • Seen Nov 19, 2013
    For creating NEW effects, I wrote a "callasm" command.
    Could you share your code? and i'm curious what effects you did?

    2E 85 3E 02 02 E6 15
    also about "E6"
    the second bit means the objective of the effect
    0 : opponent
    1 : user

    the else 6 bits means what effect it does
    01: sleep
    02: poison
    03: burn
    04: freeze
    05: paralyze
    06: badly poison
    07: confusion
    08: flinch
    09: paralyze
    0a: uproar
    0b: get money
    0c: fight to death
    0d: sand tomb
    0e: recoil 1/4
    0f: Attack Raising One Level
    10: Defense
    11: Speed
    12: Special Attack
    13: Special Defense
    14: Accuracy
    15: Evasion
    16: Attack Lowering One Level
    17: Defense
    18: Speed
    19: Special Attack
    1a: Special Defense
    1b: Accuracy
    1c: Evasion
    1d: need recovery energy
    1e:
    1f: steal item
    20:
    21:
    22: ALL states Raising One Level
    23:
    24:
    25: Attack and Defense Lowering One Level
    26: recoil 1/3
    27: Attack Raising Two Levels
    28: Defense
    29: Speed
    2a: Special Attack
    2b: Special Defense
    2c: Accuracy
    2d: Evasion
    2e: Attack Lowering Two Levels
    2f: Defense
    30: Speed
    31: Special Attack
    32: Special Defense
    33: Accuracy
    34: Evasion
    35: similar as Outrage
    36: Knock Off
    37:
    38:
    39:
    3a:
    3b: Special Attack Lowering Two Levels
    3c:
    3d:
    3e:
    3f:

    over
     
    Last edited:
    Back
    Top