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

Evolution methods with 2 parameters

  • 4
    Posts
    10
    Years
    • Seen Feb 17, 2017
    Hi guys, I'm very new here so if this is in the wrong place please say.

    I'm trying to figure out how to combine holding an item and being over a certain level to evolve.
    For example I don't have trading in my little game but I want to be able to evolve Porygon and Porygon2 when I want.

    What I tried:
    Code:
      LevelItem      = 26
    "LevelItem","Custom2","Custom3","Custom4","Custom5","Custom6","Custom7"
         2,1,1,1,1,1,1 # Custom 1-7
    The class and evonames

    Code:
    elsif evonib==PBEvolution::TradeItem ||
                   evonib==PBEvolution::DayHoldItem ||
                   evonib==PBEvolution::NightHoldItem
                   evonib==PBEvolution::LevelItem 
               if poke==@newspecies
                 removeItem=true  # Item is now consumed
               end
    Looked like item things went there so i tried to add it
    Code:
    when PBEvolution::LevelItem
          # Add code for custom evolution type 1
          return poke if pokemon.level>=level  &&  pokemon.item==level
    the code for custom evolution

    Code:
    Evolutions=PORYGON2,LevelItem,20,UPGRADE
    How i tried to save it in pokemon.txt

    Basically I tried and failed, am I somewhere near the right track?
     
    This occurs because you can't define two parameters for evolution method (level and item). You can make a Custom evolution with a fixed item or a fixed level, but not both without changing the way that the compiler and evolution works.

    For design idea for Porygon/Porygon2 case, I suggest you an evolution stone that activates trade evolution (works with items like Upgrade).
     
    You can join the information in a single variable, but you have to calculate it in the script,

    I do not know the maximum range for numbers though. You may have to trick around with it.

    Example:
    Level 1-99
    Item Ids 1-999
    --> id in evolution 20204

    20204 % 1000 = 204 (id item Upgrade)
    20204 / 1000 = 20
     
    Back
    Top