• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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
    8
    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.
     
    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:
    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.
     
    Works perfectly :) even works with double battles, which is what I needed it for, so even better! thanks!
     
    Back
    Top