Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of an article from Glitch City Laboratories wiki.

A live version of this article is available at the Glitch City Wiki here.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of the wiki in .tar.gz or .xml.gz formats.

Flag

Wikipedia also has an article about .


A flag or switch is basically any value or set of values that activates an event. For example, a certain flag needs to be checked in Pokémon Emerald to be able to ride the ferry in Slateport City to Birth Island and simply having the AuroraTicket won't work.

Another example of flags in action is how the registered 'seen' and 'own' Pokémon in the Pokédex works. Here, binary switches are used for a total of 19 'seen' bytes [D30A-D31C] (the bytes are offset by -1 in Yellow) and a total of 19 'own' bytes [D2F7-D309]. Bulbasaur's seen flag is a value of bin:01 in D30A (2^0), while Ivysaur's own flag is bin:10 (2^1) in D2F7.

Let's say you have seen only Bulbasaur, Charmander and Squirtle. The hexadecimal value for this would be 2^0 + 2^3 + 2^6 in D30A (note that the powers indicate the bits), which equals 49 in hexadecimal (or 73 in decimal).

See also



  • Glitch Pokédex flags

    Categories