• 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!
  • 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] Evolution Based on Stat

  • 5
    Posts
    6
    Years
    • Seen Jun 14, 2023
    Hello,

    Looking to add a new evolution method based on specific stats. Im not 100% sure what Im looking at as far as the specific snippets go. The closest thing I can think of is to start with the Tyrogue evolutions.

    Code:
    GameData::Evolution.register({
      :id            => :AttackGreater,   # Hitmonlee
      :parameter     => Integer,
      :level_up_proc => proc { |pkmn, parameter|
        next pkmn.level >= parameter && pkmn.attack > pkmn.defense
      }
    })

    I want a simple stat check, no level included. Lets say for example evolve when ATTACK > 50

    Code:
    GameData::Evolution.register({
      :id            => :AttackStat,   
      :parameter     => Integer,
      :level_up_proc => proc { |pkmn, parameter|
        next pkmn.attack > parameter 
      }
    })

    I worked this out looking at the other examples right now. Its midnight or Id give it a test, but hoping that if it is obviously wrong or if someone already has something that will enable evolution based on stat (not based on one stat being <=> another) they can share.

    Additionally:
    If I were to have multiple evolution paths, it might look something like this right?
    Evolutions = PokeX,AttackStat,100,PokeY,AttackStat,90,PokeZ,AttackStat,75

    This would prioritize PokeX if attack was say 100, but would also allow for evolution if attack was only 75 if my understanding is correct?

    Thanks all!
     
    This should check for pokémon evolution just after the battle is over:
    Code:
    GameData::Evolution.register({
      :id            => :highATK,   # call this however you wish
      :parameter     => Integer,
      :on_battle_proc => proc { |pkmn, parameter|
        next pkmn.attack > parameter
      }
    })
     
    Back
    Top