• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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

772
Posts
13
Years
    • UK
    • Seen May 7, 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
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    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.
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    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