• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

Checking current Pokemon level with specific level in emerald

  • 2
    Posts
    1
    Years
    • He/Him
    • US
    • Seen Aug 15, 2024
    So in the file `src/pokemon.c` I'm trying to make the part that levels pokemon up with rare candy not work if the pokemon is at the soft level cap. Here's what I have:
    Spoiler:

    spaghetti code, I know. I think what may be wrong is that I'm using actual numbers for levels and not variables (i.e., MAX_LEVEL). How would I check a pokemon's level with a specific one?

    Or what else could fix it if I'm completely off the mark? Thanks!
     
    So in the file `src/pokemon.c` I'm trying to make the part that levels pokemon up with rare candy not work if the pokemon is at the soft level cap. Here's what I have:
    Spoiler:

    spaghetti code, I know. I think what may be wrong is that I'm using actual numbers for levels and not variables (i.e., MAX_LEVEL). How would I check a pokemon's level with a specific one?

    Or what else could fix it if I'm completely off the mark? Thanks!
    The FLAG_ definitions are just numbers. You need to use the FlagGet function to actually get the value of the flag.
    Also, pokeemerald-expansion already has level caps, so if you happen to be using that, you can just edit include/config/level_caps.h and src/level_caps.c.
     
    Back
    Top