HEyo, ever wondered how to make a patch of grass generate a random wild pokemon?
Look here!
It's really simple, actually. Unfortunately you will have to define a new terrain tag and a new encounter for this to work (unless you want *all* of your grass or all of caves to generate any pokemon you have installed). If you're curious on how to work around this take a look at my old tutorial on making different types of grass here!
Anywho, open your PBEncounter_Modifiers script
and past that block! You may want to edit PBTerrain.isGlitchverse? and replace it with any method defined in PBTerrain and all encounters that generate on that terrain tag will be randomized! You'll still have to define the encounters as normal in your encounters.txt but it won't matter what you write; you can write Rattata,100, Palkia 100, Reshiram,100, Mewtwo_2,100 and it won't generate, but it will whine otherwise.
Look here!
It's really simple, actually. Unfortunately you will have to define a new terrain tag and a new encounter for this to work (unless you want *all* of your grass or all of caves to generate any pokemon you have installed). If you're curious on how to work around this take a look at my old tutorial on making different types of grass here!
Anywho, open your PBEncounter_Modifiers script
Code:
Events.onWildPokemonCreate+=proc {|sender,e|
pokemon=e[0]
if PBTerrain.isGlitchverse?(pbGetTerrainTag($game_player))
pokemon.species=rand(821)
pokemon.name=PBSpecies.getName(pokemon.species)
newlevel=pbBalancedLevel($Trainer.party) - 4 + rand(5) # For variety
newlevel=1 if newlevel<1
newlevel=PBExperience::MAXLEVEL if newlevel>PBExperience::MAXLEVEL
pokemon.level=newlevel
pokemon.calcStats
pokemon.resetMoves
end
}
and past that block! You may want to edit PBTerrain.isGlitchverse? and replace it with any method defined in PBTerrain and all encounters that generate on that terrain tag will be randomized! You'll still have to define the encounters as normal in your encounters.txt but it won't matter what you write; you can write Rattata,100, Palkia 100, Reshiram,100, Mewtwo_2,100 and it won't generate, but it will whine otherwise.
Last edited: