• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Scottie, Todd, Serena, Kris - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Scripting Question] Manually triggering evolution

  • 752
    Posts
    14
    Years
    • UK
    • Seen Dec 29, 2024
    I've added a couple of new evolution methods but I don't want them to be triggered automatically at the end of a battle, rather I'd like them to trigger them from the menu, similar to the way legends Arceus does.

    Can anyone advise how I would go about triggering the evolution screen manually. The script so far shows you all available evolution options (though it doesn't check check if you can evolve) and allows you to select which you want to evolve to. I want to trigger where the p @evos[index] currently is.

    The p @evos[index] currently shows then Pokémon to evolve to, its evolution method and any parameters.

    code for the selecting
    Code:
    def pbEvoChoice
        loop do
          Graphics.update
          Input.update
          pbUpdate
          if Input.trigger?(Input::C)
              index = @sprites["mapList"].index
              p @evos[index]
              break
          end
          if Input.trigger?(Input::B)
            break
          end
        end
      end
     
    I'm not sure if this is enough, but to manually evolve a Pokémon with the sufficient data (that is, the Pokémon + the species to evolve into), it seems that it's handled by this code:

    Code:
          evo = PokemonEvolutionScene.new
          evo.pbStartScreen(thepokemon, newspecies)
          evo.pbEvolution(false)
          evo.pbEndScreen

    EDIT: I know only v18 but this seems to work also for v19.
     
    This is because the class doesn't separate between the visual menu and the evolution process...

    I think you should find the definition of:
    Code:
      def pbStartScreen(pokemon,newspecies)
    and rework it a bit.
     
    Last edited:
    Back
    Top