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

[PBS Question] Evolution problem

163
Posts
5
Years
  • Okay so I have a Pokemon that will evolve if a second one of the same species is in your party.

    The Pokemon's name is Rubbucky (https://www.deviantart.com/clawort-animations/art/Rubbucky-Pokemon-OC-797175086), and it evolves into Squanger (https://www.deviantart.com/clawort-animations/art/Squanger-Pokemon-OC-797429967) if a second Rubbucky is in your party, but not when only the one Rubbucky is in your party.

    Can someone help with that?

    Here's the code for the evo BTW:
    Evolutions=SQUANGER,HasInParty,RUBBUCKY

    What am I doing wrong?
     

    Poq

    144
    Posts
    6
    Years
    • Seen Aug 28, 2021
    You're going to have to define a new evolution method. Fortunately, you can use HasInParty as a starting point. The wiki page on evolutions has a section in creating your own methods. Check it out!
     
    163
    Posts
    5
    Years
  • You're going to have to define a new evolution method. Fortunately, you can use HasInParty as a starting point. The wiki page on evolutions has a section in creating your own methods. Check it out!

    So lemme get this straight...

    I have to modify the HasInParty evolution method since the HasInParty method doesn't work and confuses Essentials, and make it so that only if two Pokemon of the same species is in your party, one will evolve?
     

    Poq

    144
    Posts
    6
    Years
    • Seen Aug 28, 2021
    Well, first you would copy HasInParty to a NEW evolution method, then modify it as you described, yes.
     
    Last edited:
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    How do I modify it so that if only two Pokemon of the same species is required?

    Essentials has 5 placeholder evolution methods for you to easily add new types of evolution - it goes from Custom 1-5. So you can simply find the code below (in the Pokemon_Evolution section) and copy this:
    Code:
    when PBEvolution::Custom1 # Find this line, add the rest below
      count = 0
      for i in $Trainer.pokemonParty
        count += 1 if i.species == pokemon.species
      end
      return poke if count == 2

    Also under the same script section, find this line:
    Code:
         1,1,1,1,1    # Custom 1-5
    and replace the first "1" in the sequence with a 0.

    Now use "Custom1" as your evolution method for Rubbucky and you're set!
     
    Last edited:
    163
    Posts
    5
    Years
  • Well, first you would copy HasInParty to a NEW evolution method, then modify it as you described, yes.

    Essentials has 5 placeholder evolution methods for you to easily add new types of evolution - it goes from Custom 1-5. So you can simply find the code below (in the Pokemon_Evolution section) and copy this:
    Code:
    when PBEvolution::Custom1 # Find this line, add the rest below
      count = 0
      for i in $Trainer.pokemonParty
        count += 1 if i.species == pokemon.species
      end
      return count

    Also under the same script section, find this line:
    Code:
         1,1,1,1,1    # Custom 1-5
    and replace the first "1" in the sequence with a 0.

    Now use "Custom1" as your evolution method for Rubbucky and you're set!

    But will this crash my game or no?

    Have you tested this method out?
     
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    Woops, made a small mistake in the code and fixed it. I can't test it right now, but there's no reason for it to crash if you put it in the right place.
     
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    The small mistake is something I fixed in the edited code, so if you haven't done anything with it yet then it's not important. And by right place, I said in my original post where the "right place" in the script sections is.
     
    163
    Posts
    5
    Years
  • The small mistake is something I fixed in the edited code, so if you haven't done anything with it yet then it's not important. And by right place, I said in my original post where the "right place" in the script sections is.

    Okay! :D

    Now, have you tested it yet?
     

    Poq

    144
    Posts
    6
    Years
    • Seen Aug 28, 2021
    I would recommend a very slight change IF you want this to work if the player has MORE THAN 2 of the required pokémon as well:

    Code:
    when PBEvolution::Custom1 # Find this line, add the rest below
      count = 0
      for i in $Trainer.pokemonParty
        count += 1 if i.species == pokemon.species
      end
      return poke if [COLOR="black"][COLOR="red"]count >= 2[/COLOR]

    But either way it should work fine.
    You can always test it yourself. If you're worried about messing up your game just back it up first. But as long as you've don't that, you don't have to be afraid to play around with the scripts. Get your hands dirty - it's how you learn. And it's fun!
     
    163
    Posts
    5
    Years
  • I would recommend a very slight change IF you want this to work if the player has MORE THAN 2 of the required pokémon as well:

    Code:
    when PBEvolution::Custom1 # Find this line, add the rest below
      count = 0
      for i in $Trainer.pokemonParty
        count += 1 if i.species == pokemon.species
      end
      return poke if [COLOR="black"][COLOR="red"]count >= 2[/COLOR]

    But either way it should work fine.
    You can always test it yourself. If you're worried about messing up your game just back it up first. But as long as you've don't that, you don't have to be afraid to play around with the scripts. Get your hands dirty - it's how you learn. And it's fun!

    Oh, but the script I got works.
     
    163
    Posts
    5
    Years
  • The small mistake is something I fixed in the edited code, so if you haven't done anything with it yet then it's not important. And by right place, I said in my original post where the "right place" in the script sections is.

    Nevermind! It works! Thank you! :D
     

    Poq

    144
    Posts
    6
    Years
    • Seen Aug 28, 2021
    Oh, but the script I got works.

    That's great!
    And the change I recommended was only a minor modification. NettoHikari's method will only work if you have exactly two of the specified pokémon. My edit makes it work if you have two or more in your party. It's up to you how you want it to work.
     
    163
    Posts
    5
    Years
  • That's great!
    And the change I recommended was only a minor modification. NettoHikari's method will only work if you have exactly two of the specified pokémon. My edit makes it work if you have two or more in your party. It's up to you how you want it to work.

    Okay!
     
    Back
    Top