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

[Scripting Question] How do I change the IVs of wild Pokemon encountered?

  • 1
    Posts
    2
    Years
    • Seen Jul 30, 2022
    Pretty much the title. I am on v20 and I want to change the IVs of all wild Pokemon to be 31 (as a test). How do I do it?
     
  • 21
    Posts
    6
    Years
    Go to the "Overworld_EncounterModifiers" script, and add this just before the "random dungeon map" line.
    Code:
    EventHandlers.add(:on_wild_pokemon_created, :max_full_iv,
      proc { |pkmn|
      if $game_switches[XX]
        pkmn.iv[:HP] = 31
        pkmn.iv[:ATTACK] = 31
        pkmn.iv[:DEFENSE] = 31
        pkmn.iv[:SPECIAL_ATTACK] = 31
        pkmn.iv[:SPECIAL_DEFENSE] = 31
        pkmn.iv[:SPEED] = 31
      end
    }
    )
    In the line "if $game_switches[XX]", replace XX by the number of the game switch you want to active before you fight the wilf Pokémon. Turn this switch off after the battle, or in case of defeat, turn it off in an event like the nurse in Pokémon Centers.
     
    Back
    Top