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

Create a pokemon with custom moves

4
Posts
6
Years
    • Seen Jul 12, 2017
    how would i use the script Kernel.pbAddPokemon in an event to add a level 13 honedge that knows tackle, swords dance, fury cutter, and shadow sneak.
     
    971
    Posts
    7
    Years
    • Age 21
    • Seen Nov 28, 2022
    how would i use the script Kernel.pbAddPokemon in an event to add a level 13 honedge that knows tackle, swords dance, fury cutter, and shadow sneak.

    I think this should work:
    Code:
    poke = PokeBattle_Pokemon.new(:AEGISLASH, 13)
    poke.moves = [
      PBMove.new(getConst(PBMoves,:TACKLE)),
      PBMove.new(getConst(PBMoves,:SWORDSDANCE)),
      PBMove.new(getConst(PBMoves,:FURYCUTTER)),
      PBMove.new(getConst(PBMoves,:SHADOWSNEAK))
    ]
    Kernel.pbAddPokemon(poke)
     

    sonicfan7895

    Just a dude, I guess
    122
    Posts
    13
    Years
  • Where do I put this code?

    You use this code when you add an event on the map. For example, an NPC could give it to you if you write out some text, then follow it up with the code. Then the Kernel itself will handle everything else after that.

    The best example is in the Pokemon Lab, assuming you still have most, if not all, of the vanilla maps.

    Page 2 of each Pokeball event shows the script quite clearly.

    Or, another method is to find out how to execute the code. This excerpt was taken directly from the Pokemon Essentials Wiki, whereto a link can be found below the quote.

    "Alternatively, you can define a Pokémon beforehand, and then add it using the same methods above, like so:

    Code:
    poke=PokeBattle_Pokemon.new(:MAGIKARP,10,$Trainer)
    pbAddPokemon(poke)

    This allows you to modify the Pokémon before giving it to the player. See the article Editing a Pokémon for how it can be modified."
    - Manipulating Pokemon, Pokemon Essentials Wiki, pokemonessentials.wikia.com/wiki/Manipulating_Pokemon

    For the quote above, you may need to use extendtext.exe when a Script dialog box appears, because scripts are handled weird without it.
     
    Last edited:
    4
    Posts
    6
    Years
    • Seen Jul 12, 2017
    Read the error message and see if making sure the lines don't start with a ( or [ fixes it.

    When I do this it says the OT is RENTAL and the ID No. is ?????

    How would I make it so that the pokemon is owned by you so that it doesnt gain double exp and not listen to your commands when it is overleveled.
     
    1,682
    Posts
    8
    Years
    • Seen yesterday
    Make sure that when you set the pokemon it's
    Code:
    poke=PokeBattle_Pokemon.new(:AEGISLASH, 13,$Trainer)
    This makes it so that the Original Trainer information is that of the player's.
     
    Back
    Top