- 148
- Posts
- 12
- Years
- Upstate New York
- Seen Oct 31, 2024
Hello, it's been a while since I've toyed with Essentials so I was hoping for some help on figuring this out. There's a section in "PokemonEncounterModifiers" that changes the level of wild encounters based on your Pokemon's levels.
How could I go about getting this effect on trainer Pokemon, like a gym leader? Thanks for any help.
Spoiler:
Code:
# Used in the random dungeon map. The levels of all wild Pokémon in that map
# depend on the levels of Pokémon in the player's party.
# This is a simple method, and can/should be modified to account for evolutions
# and other such details. Of course, you don't HAVE to use this code.
Events.onWildPokemonCreate+=proc {|sender,e|
pokemon=e[0]
if $game_map.map_id==51
pokemon.level=pbBalancedLevel($Trainer.party) - 4 + rand(5) # For variety
pokemon.calcStats
pokemon.resetMoves
end
}
How could I go about getting this effect on trainer Pokemon, like a gym leader? Thanks for any help.