• 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!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • 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] Call Base Stats

  • 1
    Posts
    1
    Years
    • Seen Mar 21, 2024
    I have an NPC who wants to see a Pokemon with a specific Base Stat threshold (e.g. >=100 Attack). In theory this should be similar to an IV Checker NPC, but I'm struggling to get them to acknowledge the base stat.

    What I need is the script that will look at the Pokemon you've selected from your team (this is already working), check if it's base stat is greater than or equal to <x>.

    Any help would be much appreciated!
     
    If you have a pokemon object, you can do pokemon.baseStats[:ATTACK] def baseStats returns a hash of the base stats for the species/form combo, and you just need to use the ID of the desired stat to pull it out.
    The rest is just like the IV checker, now that you have a stat's value, you can see if it's greater than a threshold.
     
    Back
    Top