Flags are used to keep track of tons of different state throughout the game. This includes temporary state, like a dialogue choice or who won a battle, as well as long-lived state, like cleaning upgrades or story progress.
Flags are written like
, where the first number identifies the flag, and the second is a kind of 'type' (most likely). The main places they're used are in cutscene (DEX) and cutscene trigger (DEP) files.
Though we call them "types", it's not entirely clear what they're actually used for. The same ID with two different types seems to refer to the same flag1, but then why have the type at all? Meanwhile the DEX and DEP commands that deal with flags usually take the same 1 or 2 types every time, so clearly there's some significance.
It's entirely possible that they aren't actually types at all. In their raw form, a flag looks like
, so it's not completely certain that these are two separate values. It's possible the 'type' is actually more of a 'category', and the usage patterns we see are for organizational reasons, not technical.
Type | Short name | Notes |
---|---|---|
0 | Used only in DEX files, usually for the results of dialogue choices. DEP files react to these flags, but never use type 0 (they might use 8? or maybe 9?) | |
2, 3 | Block | Used only in DEP files, specifically for the 'block has (not) played' commands |
5, 6, 10 | Boolean | Used all over for / values, like story progress flags or battle win/lose results |
7 | Boolean | Whether the player has a particular mask unlocked |
8 | Integer | Used with number-style commands, like addition, subtraction, less-than, and others |
9 | Integer | Same as 8, but seems to be used for player data, like money or current mask |
ID | Notes |
---|---|
|
Dropping Mask unlocked |
|
Hip-Shaker Mask unlocked |
|
Stone Mask unlocked |
|
Gold Mask unlocked |
|
Samurai Mask unlocked |
|
Completist Mask unlocked |
|
Green Hero Mask unlocked |
|
Purple Hero Mask unlocked |
|
Master Mask unlocked |
|
Saur Mask unlocked |
|
Diving Mask unlocked |
|
Oonga Oonga Mask unlocked |
|
Officer Mask unlocked |
|
Mole Mask unlocked |
|
Digadig Mask unlocked |
|
Chieftain Mask unlocked |
|
BB Boy Mask unlocked |
|
BB Girl Mask unlocked |
|
Dinaurian Mask unlocked |
|
Possibly chapter number? |
|
Something to do with the mask shop |
|
Number of sonar upgrades left |
|
Number of cleaning upgrades left |
|
Number of case upgrades unlocked (1: 8, 2: 16, 3: 24, 4: 32, 5: 48, presumably 6: 64) |
|
Money (G) |
|
Current mask |
|
Player variant? |
|
Possibly number of fossil rocks? |
|
Donation points |
|
Sonar monitor upgrade level |
|
Sonar fossil chip upgrade level |
|
Sonar fossil filter upgrade level |