• 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.

Stopping evolution if pokemon is a specific species and form

772
Posts
13
Years
    • UK
    • Seen May 7, 2024
    In my game pikachu has multiple forms, what i'd like is for all except for its normal form (form 0) to not be able to evolve. How would i go about it?
     

    Telemetius

    Tele*
    267
    Posts
    9
    Years
  • In the script section Pokémon_Evolution there's this piece of code:

    Code:
    def pbCheckEvolutionEx(pokemon)
      return -1 if pokemon.species<=0 || pokemon.isEgg?
      [COLOR="Red"]return -1 if isConst?(pokemon.species,PBSpecies,:PICHU) && pokemon.form==1[/COLOR]
      return -1 if isConst?(pokemon.item,PBItems,:EVERSTONE) &&
                   !isConst?(pokemon.species,PBSpecies,:KADABRA)
      ret=-1
      for form in pbGetEvolvedFormData(pokemon.species)
        ret=yield pokemon,form[0],form[1],form[2]
        break if ret>0
      end
      return ret
    end

    Now you could add a new rule similar to the red line like:

    Code:
    return -1 if isConst?(pokemon.species,PBSpecies,:PIKACHU) && pokemon.form != 0
     
    Last edited:
    824
    Posts
    8
    Years
  • In the script section Pokémon_Evolution there's this piece of code:

    Code:
    def pbCheckEvolutionEx(pokemon)
      return -1 if pokemon.species<=0 || pokemon.isEgg?
      [COLOR="Red"]return -1 if isConst?(pokemon.species,PBSpecies,:PICHU) && pokemon.form==1[/COLOR]
      return -1 if isConst?(pokemon.item,PBItems,:EVERSTONE) &&
                   !isConst?(pokemon.species,PBSpecies,:KADABRA)
      ret=-1
      for form in pbGetEvolvedFormData(pokemon.species)
        ret=yield pokemon,form[0],form[1],form[2]
        break if ret>0
      end
      return ret
    end

    Now you could add a new rule similar to the red line like:

    Code:
    return -1 if isConst?(pokemon.species,PBSpecies,:PIKACHU) && pokemon.form != 0

    Telemetius, your original code was If the species is Pikachu and the statement "the form is form number 1" is false. While that is technically right (other than the wrong form number), it'd just be easier to say If the species is Pikachu and the form is not form number zero.
     

    Telemetius

    Tele*
    267
    Posts
    9
    Years
  • Telemetius, your original code was If the species is Pikachu and the statement "the form is form number 1" is false. While that is technically right (other than the wrong form number), it'd just be easier to say If the species is Pikachu and the form is not form number zero.

    You're right, I should have double checked it! Editing it now.
     
    Back
    Top