# Used in the random dungeon map. Makes 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
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
}
Events.onWildPokemonCreate+=proc {|sender,e|
pokemon=e[0]
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
}
Ok one more question. Can I make it so they have different teams depending on the amount of gym badges? Like if I challenge Brock and I have one badge he'll use geodude and onix. But if I challenge him with 4 badges he'll have gravaler, rhyhorn, and onix or Would I have to make a new script for that?
Awesome thank you guys so much! Would this work for trainers?
So if the player can challenge any gym in any order do i have to change the badges or their variables in anyway?
honestly you shouldn't not do something just so you dont have to "worry about it". I mean you can edit the badge assignments to their proper switches anyways, and if youre trying to add them as key items to use them as checks for things later, then the gym badge switches already do that without you having to make an item for it. Also if its open world where you can get the badges in any order I would expect them to be out of order regardless. because each gym leader would have their own badge. It would also make sense if youre using old gym leaders like kanto or something that people know what badge belongs to who. so if you fought blaine people would expect his badge to be 7th and be the volcano badge. But at the same time I could see if you want people to have the badges in the order they got them. but either way that just comes down to changing the assigning of the icons to their switches.I was going to make so you don't see badges on your trainer card. Instead you receive them as key items for special side quests and events. That way the badges are in the order you got them and I won't have to worry about the trainer card.