• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

Randomized Pokemon Script

Is this working for v20? I turned the switch on and it still doesn't randomize. I don't get any errors though. Except the whitelist didn't need 'PBSpecies:'
 
Just as the title states, it randomizes any and all pokemon you encounter. Whether it's a gift, a wild pokemon, or a trainer battle it'll all be random.

Although, you must activate a switch (see the comments on how to edit the switch number) for it to become active.

Code:
################################################################################
# Randomized Pokemon Script
# By Umbreon
################################################################################
# Used for a randomized pokemon challenge mainly.
# 
# By randomized, I mean EVERY pokemon will be random, even interacted pokemon
#   like legendaries. (You may easily disable the randomizer for certain
#    situations like legendary battles and starter selecting.)
#
# To use: simply activate Switch Number X
#  (X = the number listed After "Switch = ", default is switch number 36.)
#
# If you want certain pokemon to NEVER appear, add them inside the black list.
#  (This does not take into effect if the switch stated above is off.)
#
# If you want ONLY certain pokemon to appear, add them to the whitelist. This
#   is only recommended when the amount of random pokemon available is around
#   32 or less.(This does not take into effect if the switch stated above is off.)
#
################################################################################

########################## You may edit any settings below this freely.
module RandomizedChallenge
  Switch = 36 # switch ID to randomize a pokemon, if it's on then ALL
              # pokemon will be randomized. No exceptions.
                        
  BlackListedPokemon = [PBSpecies::MEW, PBSpecies::ARCEUS]
  # Pokemon to Black List. Any pokemon in here will NEVER appear.
  
  WhiteListedPokemon = []
  # Leave this empty if all pokemon are allowed, otherwise only pokemon listed
  # above will be selected.
end

######################### Do not edit anything below here.
class PokeBattle_Pokemon
  
  alias randomized_init initialize
  
  def initialize(species,level,player=nil,withMoves=true)

    species = RandomizedChallenge::WhiteListedPokemon.shuffle[0]
    
    if $game_switches && $game_switches[RandomizedChallenge::Switch]
      if RandomizedChallenge::WhiteListedPokemon.length == 0
        species = rand(PBSpecies.maxValue - 1) + 1
        while RandomizedChallenge::BlackListedPokemon.include?(species)
          species = rand(PBSpecies.maxValue - 1) + 1
        end
      end
    end
    
    randomized_init(species, level, player, withMoves)
  end
end

where to i put the code?
 
Hello,

The randomization script seems to be working perfectly. However I'm running into a weird bug where wild pokemon's moves are perfectly fine, but trainers seem to have random moves (for example, there was a dialga that had spider web and u-turn). I have the code in place that's supposed to reset the moves if the switch for randomization is on, but it doesn't seem to be working.
 
Back
Top