• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our 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] GetDefaultRegion?

  • 21
    Posts
    4
    Years
    • Seen Sep 19, 2022
    Does anyone know how to change the method in PScreen_TrainerCard that gets the current region the player's in <region = pbGetCurrentRegion(0)> to always getting the default region instead?

    I've tried changing the line to:
    <region = pbGetdefaultRegion(0)>
    <region = pbGetDefaultRegion(-1)>
    <region = pbGetCurrentRegion(defaultRegion=-1)>
    and
    <region = pbGetCurrentRegion(-1)>
    but none of them worked.
    I'm new to coding, so I'm maybe making big beginner mistakes. Any help would be greatly appreciated!
     
    Does anyone know how to change the method in PScreen_TrainerCard that gets the current region the player's in <region = pbGetCurrentRegion(0)> to always getting the default region instead?

    I've tried changing the line to:
    <region = pbGetdefaultRegion(0)>
    <region = pbGetDefaultRegion(-1)>
    <region = pbGetCurrentRegion(defaultRegion=-1)>
    and
    <region = pbGetCurrentRegion(-1)>
    but none of them worked.
    I'm new to coding, so I'm maybe making big beginner mistakes. Any help would be greatly appreciated!

    What are you trying to achieve? Are you trying to make the trainer card always show badges from a particular region rather than the current region?
     
    What are you trying to achieve? Are you trying to make the trainer card always show badges from a particular region rather than the current region?

    Yes, that's exactly right! I want the badges obtained in the first region to show up on the trainer card even when in other regions.
     
    Yes, that's exactly right! I want the badges obtained in the first region to show up on the trainer card even when in other regions.

    In that case, you can probably do away with the whole pbGetCurrentRegion thing and just hard code the region you want in the trainer card script.
     
    Yes, that's exactly right! I want the badges obtained in the first region to show up on the trainer card even when in other regions.
    Then just make the region = -1
    There's no need for pbGetCurrentRegion if you're not interested in getting the current region lol.
     
    Back
    Top