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

[Custom Feature Question] Editing movesets on wild pokemon event battles

172
Posts
7
Years
    • Seen Sep 6, 2022
    I was reading the essentials docs on editing event pokemon and it says you can edit their moveset but it doesn't say how.
    it mentions a global switch to be able to edit things like if its shiny, which I understand. something like that is a simple on and off to make it shiny, but something like that cant apply to a moveset because each one is different and specific to that pokemon. Does anyone know how I would og about editing a moveset for an event pokemon battle?
    it doesn't seem to be anywhere on editing pokemon either other than how to give movesets to party pokemon, but that doesn't apply here.
    any help is appreciated thank you.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • I was reading the essentials docs on editing event pokemon and it says you can edit their moveset but it doesn't say how.
    it mentions a global switch to be able to edit things like if its shiny, which I understand. something like that is a simple on and off to make it shiny, but something like that cant apply to a moveset because each one is different and specific to that pokemon. Does anyone know how I would og about editing a moveset for an event pokemon battle?
    it doesn't seem to be anywhere on editing pokemon either other than how to give movesets to party pokemon, but that doesn't apply here.
    any help is appreciated thank you.

    in 'PField_EncounterModifiers' add:

    Code:
    Events.onWildPokemonCreate+=proc {|sender,e|
       pokemon=e[0]
      [B] if $game_switches[[COLOR="Red"]276[/COLOR]]  #change the number if you want.[/B]
         if isConst?(pokemon.species,PBSpecies,:CHARIZARD)
           pokemon.form=1
           pokemon.item=getConst(PBItems,:CHARIZARDITEX)
         elsif isConst?(pokemon.species,PBSpecies,:KYOGRE)
           pokemon.form=1
           pokemon.item=getConst(PBItems,:BLUEORB)
         elsif isConst?(pokemon.species,PBSpecies,:GROUDON)
           pokemon.form=1
           pokemon.item=getConst(PBItems,:REDORB)
         elsif isConst?(pokemon.species,PBSpecies,:LUCARIO)
           pokemon.item=getConst(PBItems,:LUCARIONITE)
         elsif isConst?(pokemon.species,PBSpecies,:RAYQUAZA)
           pokemon.level=70
           pokemon.form=1
           pokemon.pbLearnMove(:DRAGONASCENT)
           pokemon.pbLearnMove(:EXTREMESPEED)
           pokemon.pbLearnMove(:REST)
           pokemon.pbLearnMove(:FLY)
           pokemon.iv=[31,31,31,31,31,31]
           pokemon.calcStats
         end
       end
    }

    See,
    every event than i put switch 276, IF i will battle to charizard, he will be a MEGA X; IF i will battle to a KYOGRE or GROUDON, will be a PRIMAL (cuz 'pokemon.form=1');
    IF i will battle to a RAYQUAZA, he will haves 4 moves AND IV 31.
    put always 'pokemon.calcStats' in last line.

    So if you want to create just a event inside to your game, make a script like this:

    Code:
    p.pbLearnMove(:VOLTTACKLE)
    p.pbLearnMove(:HELPINGHAND)
    p.pbLearnMove(:SWAGGER)
    p.pbLearnMove(:PAINSPLIT)
    p.calcStats

    example:
    Code:
    p=PokeBattle_Pokemon.new(:PICHU,30, $Trainer)
    p.pbLearnMove(:VOLTTACKLE)
    p.pbLearnMove(:HELPINGHAND)
    p.pbLearnMove(:SWAGGER)
    p.pbLearnMove(:PAINSPLIT)
    p.calcStats
    Kernel.pbAddPokemon(p)
    
    [B][COLOR="Red"]This example gives to you a pokemon (Pichu). Is not a wild battle.[/COLOR][/B]

    just trade to a 'pbWildBattle'.
     
    Last edited:
    172
    Posts
    7
    Years
    • Seen Sep 6, 2022
    in 'PField_EncounterModifiers' add:

    Code:
    Events.onWildPokemonCreate+=proc {|sender,e|
       pokemon=e[0]
      [B] if $game_switches[[COLOR="Red"]276[/COLOR]]  #change the number if you want.[/B]
         if isConst?(pokemon.species,PBSpecies,:CHARIZARD)
           pokemon.form=1
           pokemon.item=getConst(PBItems,:CHARIZARDITEX)
         elsif isConst?(pokemon.species,PBSpecies,:KYOGRE)
           pokemon.form=1
           pokemon.item=getConst(PBItems,:BLUEORB)
         elsif isConst?(pokemon.species,PBSpecies,:GROUDON)
           pokemon.form=1
           pokemon.item=getConst(PBItems,:REDORB)
         elsif isConst?(pokemon.species,PBSpecies,:LUCARIO)
           pokemon.item=getConst(PBItems,:LUCARIONITE)
         elsif isConst?(pokemon.species,PBSpecies,:RAYQUAZA)
           pokemon.level=70
           pokemon.form=1
           pokemon.pbLearnMove(:DRAGONASCENT)
           pokemon.pbLearnMove(:EXTREMESPEED)
           pokemon.pbLearnMove(:REST)
           pokemon.pbLearnMove(:FLY)
           pokemon.iv=[31,31,31,31,31,31]
           pokemon.calcStats
         end
       end
    }

    See,
    every event than i put switch 276, IF i will battle to charizard, he will be a MEGA X; IF i will battle to a KYOGRE or GROUDON, will be a PRIMAL (cuz 'pokemon.form=1');
    IF i will battle to a RAYQUAZA, he will haves 4 moves AND IV 31.
    put always 'pokemon.calcStats' in last line.

    So if you want to create just a event inside to your game, make a script like this:

    Code:
    p.pbLearnMove(:VOLTTACKLE)
    p.pbLearnMove(:HELPINGHAND)
    p.pbLearnMove(:SWAGGER)
    p.pbLearnMove(:PAINSPLIT)
    p.calcStats

    example:
    Code:
    p=PokeBattle_Pokemon.new(:PICHU,30, $Trainer)
    p.pbLearnMove(:VOLTTACKLE)
    p.pbLearnMove(:HELPINGHAND)
    p.pbLearnMove(:SWAGGER)
    p.pbLearnMove(:PAINSPLIT)
    p.calcStats
    Kernel.pbAddPokemon(p)
    
    [B][COLOR="Red"]This example gives to you a pokemon (Pichu). Is not a wild battle.[/COLOR][/B]

    just trade to a 'pbWildBattle'.
    So basically what your saying is its like switches in the game. every I have to make a script dedicated to that single pokemon and its moveset and use a switch to turn on that entire pokemon? I guess that makes sense. I thought it would be a bit easier than that, but I guess its not bad, haha. Thank you! Ill post again if something didn't turn out right.
     
    172
    Posts
    7
    Years
    • Seen Sep 6, 2022
    Works perfectly :) even works with double battles, which is what I needed it for, so even better! thanks!
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Works perfectly :) even works with double battles, which is what I needed it for, so even better! thanks!

    Check every NPC from the game. Maruno & cia put comments and script explainin how to work some 'pb' etc.
     
    Last edited:
    Back
    Top