• 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.
  • 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!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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] Had one quick question about forms again.

  • 59
    Posts
    7
    Years
    • Seen May 12, 2022
    I was looking at event encounters - and saw that there was a "make shiny" switch and I was wondering if there's something that lets you do something similar, but lets you toggle forms instead.

    I plan to work with that stuff a lot for the game and it would really help with testing purposes so I can just make test events to see what the form looks like in game.
     
    Last edited by a moderator:
    In PField_EncounterModifiers right under
    Code:
    # Make all wild Pokémon shiny while a certain Switch is ON (see Settings).
    Events.onWildPokemonCreate+=proc {|sender,e|
       pokemon=e[0]
       if $game_switches[SHINY_WILD_POKEMON_SWITCH]
         pokemon.makeShiny
       end
    }

    add

    Code:
    #Make all wild Pokémon have form 1
     Events.onWildPokemonCreate+=proc {|sender,e|
     pokemon=e[0]
     if $game_switches[81] #to be replaced with the game switch number you want
       pokemon.form=1
    
     end
     }
     
    In PField_EncounterModifiers right under
    Code:
    # Make all wild Pokémon shiny while a certain Switch is ON (see Settings).
    Events.onWildPokemonCreate+=proc {|sender,e|
       pokemon=e[0]
       if $game_switches[SHINY_WILD_POKEMON_SWITCH]
         pokemon.makeShiny
       end
    }

    add

    Code:
    #Make all wild Pokémon have form 1
     Events.onWildPokemonCreate+=proc {|sender,e|
     pokemon=e[0]
     if $game_switches[81] #to be replaced with the game switch number you want
       pokemon.form=1
    
     end
     }

    It worked perfectly. Thanks!
     
    Back
    Top