• 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!
  • Akari, Red, Kris, May - which Pokémon protagonist is your favorite? Let us know by voting in our semifinal 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.

change poke mart offerings globally

  • 12
    Posts
    42
    Days
    • Seen Jun 7, 2025
    In my rom I plan to change what's offered at marts depending how many badges you have.
    To check badge amount I test for the flags for "received_badge_0x" or whatever they are (I have it working elsewhere) and increment a variable for each set flag.
    My question is, where in the code could I access the poke center offerings to change them?
     
    My question is, where in the code could I access the poke center offerings to change them?
    Nurse Joy's scripts are in data/scripts/pkmn_center_nurse.inc, assuming that you're working with one of the GBA decomps.
     
    Using poryscripts, I implemented something like that in my rom.
    It's not the most optimized code ever (did it a long time ago) but it works
    script MauvilleBigMart_Text_NewVendor3 {
    lock
    faceplayer
    msgbox(format("Welcome!\nLet me check your BADGES\pHow may I serve you?"))
    if(flag(FLAG_BADGE08_GET) == TRUE){
    pokemart(Bagde8Vendor)

    }elif(flag(FLAG_BADGE07_GET) == TRUE){
    pokemart(Bagde7Vendor)

    }elif(flag(FLAG_BADGE06_GET) == TRUE){
    pokemart(Bagde6Vendor)

    }elif(flag(FLAG_BADGE05_GET) == TRUE){
    pokemart(Bagde5Vendor)

    }elif(flag(FLAG_BADGE04_GET) == TRUE){
    pokemart(Bagde4Vendor)

    }elif(flag(FLAG_BADGE03_GET) == TRUE){
    pokemart(Bagde3Vendor)

    }else{
    pokemart(Badge2Vendor)
    }
    msgbox(format("Please come again!"))
    release
    end
    }
    You start by checking if you have the last badge, if yes you have the whole list of items available. If no, you enter in the 7th badge condition etc.
    I don't know if that's exactly what you are looking for, mentioning the flag "received_badge_0x"
     
    With my hack you can face the gyms out of order, they dynamically update levels depending which order they're in, so just checking for a specific badge won't work, I run down the list of each badge flag and for each one that's true I increment an int called "totalbadgecount"
     
    With my hack you can face the gyms out of order, they dynamically update levels depending which order they're in, so just checking for a specific badge won't work, I run down the list of each badge flag and for each one that's true I increment an int called "totalbadgecount"
    You can save the value of that int variable into an overworld scripting-compatible variable using VarSet and the rest is your average overworld scripting experience like Narflo showed.
    You'd use compare and branch off your script based on the value of the variable that you decided to store your badge count in instead of checking for individual badges.
     
    Back
    Top