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

Evolution via sp.attack (like hitmon split)

22
Posts
8
Years
Hey everyone, question here, I'm currently making a game and one of the Pok?mon in said game evolves depending if its attack, sp.attack are higher or they're equal, I'm not entirely sure how to go about this, any tips/pointers? You'll definitely have credit in the game for the help.
 
24
Posts
6
Years
I am no code guy, but here what I got in mind... If in doubt, get here http://pokemonessentials.wikia.com/wiki/Evolution and look under the "adding new methods".

REMEMBER TO BACKUP YOUR WORK BEFORE STARTING DOING THIS KIND OF TASK
REMEMBER THE FIFTH OF NOVEMBER TO BACKUP YOUR WORK

As I understood, you want to compare special attack and attack stats, and choose one of the evolutions. Ok. The bad thing is, you are going to take three custom methods out of available five, but if you are not planning to add any more, you should be ok.

Well, first of all, what you are gonna work with:
1) pokemon.txt in PBS folder;
2) script in project called Pokemon_Evolution.

In pokemon.txt just add the pokemon data as usual, but when it comes to the evolutions, just write EVOLUTIONS=*internal name of next in evo branch*, SpAttackGreater,*lvl when you want this guy to evolve* - basically, the pretty same crap. Look for Tyrogue for any tips. You are going to write several things in a row for the evolutions (one for if spattack is greater, other if attack is greater, and third one if they are equal).

In script change the entry in Module itself (where the variables are) and EVONAMES related to the very first free custom method (should be custom1 if you didn't add any) to SpAttackGreater. Just for the sake of convenience.

Spoiler:

Do the same with Custom 2 and Custom 3, but they will be AttackGreaterSpAtk, AttackSpAtkEqual.

Then in the same script, go to the pbMiniCheckEvolution section. Look for the ones that with Hitmontop/Hitmonlee/Hitmontop comments, they stand out. Copy one of them and replace the

when PBEvolution::Custom1
# Add code for custom evolution type 1

with

when PBEvolution::AttackGreater # Hitmonlee
return poke if pokemon.level>=level && pokemon.attack>pokemon.defense

And then change it to the

when PBEvolution::SpAttackGreater
return poke if pokemon.level>=level && pokemon.spattack>pokemon.attack

Spoiler:


You gonna do the same with Custom 2 (now AttackGreaterSpAtk) and Custom 3 (now AttackSpAtkEqual).

And I think it beats that.

REMEMBER TO BACKUP YOUR WORK

Let me know if it worked.
 
Last edited:
Back
Top