• 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.
  • There is an important update regarding account security and 2FA. Please click here for more information.
  • 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.
  • Imgur has blocked certain regions from viewing any images uploaded to their site. If you use Imgur, please consider replacing any image links/embeds you may have on PokéCommunity so everyone can see your images. Click here to learn more.

[Pokeemerald] Increase the number of badges

  • 40
    Posts
    2
    Years
    • Online now
    Hello,
    I want to increase the number of badges. So I check in the flags.h file and saw that all the badges' flags are all one after the other.

    I'm guessing that if I want to increase the total number, I have to put a new flag (or an unused one) after the last one, like in this example with a 9th badge:
    #define FLAG_BADGE01_GET (SYSTEM_FLAGS + 0x7)
    #define FLAG_BADGE02_GET (SYSTEM_FLAGS + 0x8)
    #define FLAG_BADGE03_GET (SYSTEM_FLAGS + 0x9)
    #define FLAG_BADGE04_GET (SYSTEM_FLAGS + 0xA)
    #define FLAG_BADGE05_GET (SYSTEM_FLAGS + 0xB)
    #define FLAG_BADGE06_GET (SYSTEM_FLAGS + 0xC)
    #define FLAG_BADGE07_GET (SYSTEM_FLAGS + 0xD)
    #define FLAG_BADGE08_GET (SYSTEM_FLAGS + 0xE)
    #define FLAG_BADGE09_GET (SYSTEM_FLAGS + 0xF) // new one

    #define NUM_BADGES (1 + FLAG_BADGE09_GET - FLAG_BADGE01_GET) // Modified value
    Issue is that I will have to change the value of the other flags since I'm moving some of them.

    My question is, am I doom to swap the value of some flags to increase the number of badges or is there another way?
    Thanks !
     
    Hello,
    I want to increase the number of badges. So I check in the flags.h file and saw that all the badges' flags are all one after the other.

    I'm guessing that if I want to increase the total number, I have to put a new flag (or an unused one) after the last one, like in this example with a 9th badge:

    Issue is that I will have to change the value of the other flags since I'm moving some of them.

    My question is, am I doom to swap the value of some flags to increase the number of badges or is there another way?
    Thanks !
    You might be able to cook up something by looking at the functions inside src/trainer_card.c that make use of macros like NUM_BADGES.
    It looks like most of the fun happens inside SetDataFromTrainerCard and DrawStarsAndBadgesOnCard.
     
    Back
    Top