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

Pokeruby unused flags?

I need some global flags in my Pokemon Ruby rom hack which I can use that my scripts execute only once.
Does anyone know which of the existing flags I can use? (https://github.com/pret/pokeruby/blob/master/include/constants/flags.h)
Or how I can add custom flags?

I would appreciate if someone could give me an advice.
If you look at the flags.h file, you can see that there are some empty lines between the definitions. Those signify gaps in the flag numbers. You can define new flags for those unused numbers and use them in your scripts.
 
If you look at the flags.h file, you can see that there are some empty lines between the definitions. Those signify gaps in the flag numbers. You can define new flags for those unused numbers and use them in your scripts.
I see! Thank you so much!!!
So for example beginning from line 612 which looks like this:
Code:
#define FLAG_HIDE_KECLEON_ROUTE119_2        0x3DE
#define FLAG_HIDE_BOY_ROUTE101              0x3DF

#define FLAG_ITEM_ROUTE102_1                0x3E8
#define FLAG_ITEM_ROUTE116_1                0x3E9

I could do something like this:

Code:
#define FLAG_HIDE_KECLEON_ROUTE119_2        0x3DE
#define FLAG_HIDE_BOY_ROUTE101              0x3DF

#define CUSTOM_FLAG_01                      0x3E1
#define CUSTOM_FLAG_02                      0x3E2
#define CUSTOM_FLAG_03                      0x3E3
#define CUSTOM_FLAG_04                      0x3E4
#define CUSTOM_FLAG_05                      0x3E5
#define CUSTOM_FLAG_06                      0x3E6
#define CUSTOM_FLAG_07                      0x3E7

#define FLAG_ITEM_ROUTE102_1                0x3E8
#define FLAG_ITEM_ROUTE116_1                0x3E9

So these are just unused segments of the allocated storage and I won't break anything doing this? :)
 
Back
Top