• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll 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.

Pokemon essential

  • 2
    Posts
    1
    Years
    • Seen Sep 24, 2023
    Hi, in new so in probably asking on the wronk place, feel free to say me where to go.
    I wanted to ask if it was possible on rpg maker to make a trainer have the same pokemons you have in team but with higher levels.
    Thanks you all, have a nice evening!
     
    Hi @simcro2002
    Yes, it is absolutely possible, but quite complicated

    You'll have to put this script somewhere between the GameData section and above Main, or in a plugin, and turn the relevant switch on when you want to do the battle. Otherwise, do a fight against any trainer, and they will have your team, but 10 Levels higher.

    Code:
    GO_FIGHT_YOURSELF = 69 # Change this!
    
    module GameData
      class Trainer
        alias old_to_trainer to_trainer
        def to_trainer
          return to_trainer_mirror if $game_switches[GO_FIGHT_YOURSELF]
          return old_to_trainer
        end
        
        def to_trainer_mirror
          # Determine trainer's name
          tr_name = self.name
          Settings::RIVAL_NAMES.each do |rival|
            next if rival[0] != @trainer_type || !$game_variables[rival[1]].is_a?(String)
            tr_name = $game_variables[rival[1]]
            break
          end
          # Create trainer object
          trainer = NPCTrainer.new(tr_name, @trainer_type, @version)
          trainer.id        = $player.make_foreign_ID
          trainer.items     = @items.clone
          trainer.lose_text = self.lose_text
          for p in $player.party
            level = p.level + 10
            pkmn = Pokemon.new(p.species, level, trainer, false)
            pkmn.form_simple = p.form_simple
            pkmn.item    = pkmn.item
            pkmn.moves   = p.moves.clone
            pkmn.ability = p.ability
            pkmn.gender  = p.gender
            pkmn.shiny   = p.shiny?
            pkmn.super_shiny = p.super_shiny?
            pkmn.nature    = p.nature
            pkmn.iv        = p.iv.clone
            pkmn.ev        = p.ev.clone
            pkmn.happiness = p.happiness
            pkmn.name      = p.name
            # NOTE: Not included shadow here!
            pkmn.poke_ball = p.poke_ball
            pkmn.calc_stats
          end
          return trainer
        end
      end
    end

    Hope this helps! If you wish to change the level, it's around line 16
    Swdfm
     
    Back
    Top