• 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.

[Other] Flags, variables and offsets

  • 5
    Posts
    9
    Years
    • Seen Aug 1, 2015
    I have a question regarding the limit to the amount of scripts we can make.

    For all my scripts, I start with
    #dynamic 0x800000
    which when the script is compiled gives me script offset that is after 0x800000.

    I'm just wondering if there is an offset limit. Or can we just create an infinite amount of scripts?

    Also, I saw that when you're using flags, you should only use the ones between 0x200 ~ 0x2FF. But if I were to just leave the core features intact (gym badges, etc.) and delete all other events, wouldn't that free up some flags that I can use?

    I also want to know the range of safe variables to use.

    Thank you for your answers.
     
    There is a limit for free space. It's not only used for scripts, but say if you insert new sprites, music, expand maps, etc. The limit for the GBA games is 0xFFFFFF, it can be expanded but it's unlikely you'd need to.

    The flags between 0x200-0x2FF are the ones for the ingame events. You can use them of course if you remove the events they are associated with (list is here). The others are for things like trainer flags, hidden items, or temporary flags and should not be used. Safe variables are between 0x4011-0x40FF, but most of these are also used for ingame events. I'd recommend reading the link above, it has a lot of details on flags and vars.
     
    Back
    Top