Flags
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 <3 9>, 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.
Types
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 flag, 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 <0x3000009>, 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 | Event | Used only in DEP files, specifically for the 'event has (not) played' commands |
| 5 | Boolean | Used all over for true/false values, like story progress flags or battle win/lose results |
| 6 | Boolean | Whether the player currently has a particular key item |
| 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 |
| 10 | Boolean | Whether the player has a certain feature unlocked |
FF1 Flags
<58 0> | <shop dialogue result 0> |
|---|
<60 0> | <buy today's special or exchange DP dialogue result 0> |
|---|
<69 0> | <tool upgrade dialogue results 0> |
|---|
<80 0> | <give Nick Nack dropping fossils dialogue result 0> |
|---|
<256 0> | <Greenhorn Plains pay-to-dig dialogue result 0> |
|---|
<257 0> | <Rivet Ravine pay-to-dig dialogue result 0> |
|---|
<111 5> | <fossil chip is level 0> |
|---|
<112 5> | <fossil chip is level 1> |
|---|
<113 5> | <fossil chip is level 2> |
|---|
<1008 5> | <has given Nick Nack the sandal fossil> |
|---|
<4031 5> | <pay-to-dig area purchased> |
|---|
| This is used for both Greenhorn Plains and Rivet Ravine, and is reset whenever you leave the digsite |
<5503 5> | <talking to Greenhorn Plains pay-to-dig attendent> |
|---|
<8045 5> | <sonar monitor upgrade 1 unlocked> |
|---|
<8046 5> | <sonar monitor upgrade 2 unlocked> |
|---|
<8047 5> | <sonar fossil filter 1 unlocked> |
|---|
<8048 5> | <sonar fossil filter 2 unlocked> |
|---|
<8049 5> | <sonar fossil chip 1 unlocked> |
|---|
<8050 5> | <sonar fossil chip 2 unlocked> |
|---|
<8051 5> | <Super Drill unlocked 5> |
|---|
<8052 5> | <Hyper Hammer unlocked 5> |
|---|
<8058 5> | <asking which tool upgrade> |
|---|
<9037 5> | <talking to Rivet Ravine pay-to-dig attendent> |
|---|
<11006 5> | <shop has Dino Cakes> |
|---|
<11016 5> | <chose to sell items at shop> |
|---|
<11150 5> | <talking to Nick Nack> |
|---|
<11151 5> | <Nick Nack asking for dropping fossils> |
|---|
<11152 5> | <gave Nick Nack dropping fossils> |
|---|
<11153 5> | <getting a reward from Nick Nack> |
|---|
<11501 5> | <has Oasis Seed 1> |
|---|
<11502 5> | <has Oasis Seed 2> |
|---|
<11503 5> | <has Oasis Seed 3> |
|---|
<11504 5> | <has Oasis Seed 4> |
|---|
<11505 5> | <oasis 1 grown> |
|---|
<11506 5> | <oasis 2 grown> |
|---|
<11507 5> | <oasis 3 grown> |
|---|
<11508 5> | <oasis 4 grown> |
|---|
<11509 5> | <oasis quest complete> |
|---|
<11510 5> | <shop has an Oasis Seed> |
|---|
<11511 5> | <player is in Parchment Desert> |
|---|
<11711 5> | <shop has Snowberries> |
|---|
<56 8> | <chapter number> |
|---|
0 before chapter 1, and 9 is postgame |
<58 8> | <shop dialogue result> |
|---|
<60 8> | <buy today's special or exchange DP dialogue result> |
|---|
<62 8> | <sonar upgrade digitmask> |
|---|
The sum of <63 8>, <64 8>, and <65 8> |
<63 8> | <sonar monitor upgrade digitmask> |
|---|
Default is 100, upgrade 1 is 200, upgrade 2 is 0 |
<64 8> | <sonar fossil filter digitmask> |
|---|
Default is 10, filter 1 is 20, filter 2 is 0 |
<65 8> | <sonar fossil chip digitmask> |
|---|
Default is 1, chip 1 is 2, chip 2 is 0 |
<67 8> | <cleaning upgrades left bitmsk> |
|---|
<68 8> | <case upgrade level> |
|---|
1 is 8-slot, 2 is 16-slot, 3 is 24-slot, 4 is 32-slot, 5 is 48-slot, and strangely, 0 is 64-slot |
<69 8> | <tool upgrade dialogue results> |
|---|
<77 8> | <left over dropping fossils> |
|---|
<78 8> | <dropping fossils given to Nick Nack> |
|---|
<80 8> | <give Nick Nack dropping fossils dialogue result> |
|---|
<256 8> | <Greenhorn Plains pay-to-dig dialogue result> |
|---|
<257 8> | <Rivet Ravine pay-to-dig dialogue result> |
|---|
<342 8> | <sellable items> |
|---|
<2 9> | <case size in pages> |
|---|
1 is 8-slot, 2 is 16-slot, 3 is 24-slot, 4 is 32-slot, 6 is 48-slot, 8 is 64-slot |
<3 9> | <money> |
|---|
<4 9> | <current mask> |
|---|
<6 9> | <profile background> |
|---|
0 is red, 1 is blue, 2 is yellow |
<7 9> | <player variant> |
|---|
<8 9> | <fossil rocks> |
|---|
<9 9> | <colored fossil rocks> |
|---|
<11 9> | <jewels> |
|---|
| NOT jewel rocks |
<12 9> | <dropping fossils> |
|---|
| NOT rocks containing dropping fossils |
<14 9> | <fossils just integrated by KL-33N> |
|---|
<15 9> | <fossils just donated by KL-33N> |
|---|
<17 9> | <points on fossil just cleaned> |
|---|
<18 9> | <points of a previously-cleaned fossil> |
|---|
<19 9> | <donation points> |
|---|
<20 9> | <fossil rocks dropped off for cleaning> |
|---|
<21 9> | <KL-33N level> |
|---|
<22 9> | <KL-33N max cleaning score> |
|---|
<23 9> | <cleanings until KL-33N levels up> |
|---|
<24 9> | <fossils in storage> |
|---|
<25 9> | <successful cleanings> |
|---|
<26 9> | <oasis growth timer> |
|---|
This is set to 0 when an Oasis Seed is planted, and counts up by 1 every frame |
<28 9> | <gems cleaned by KL-33N> |
|---|
<29 9> | <value of gems just sold by KL-33N> |
|---|
<30 9> | <sonar monitor upgrade level> |
|---|
2 is 800 G, 3 is 3500 G |
<31 9> | <sonar fossil chip upgrade level> |
|---|
2 is 10000 G, 3 is 35000 G |
<32 9> | <sonar fossil filter upgrade level> |
|---|
2 is 5000 G, 3 is 8000 G |
<39 9> | <cleaning time bonus> |
|---|
<46 9> | <donation points just added> |
|---|
<4 10> | <case is full> |
|---|
<28 10> | <status menu unlocked> |
|---|
<30 10> | <multiplayer unlocked> |
|---|
<32 10> | <Dino Medal screen unlocked> |
|---|
<33 10> | <Super Drill unlocked> |
|---|
<34 10> | <Hyper Hammer unlocked> |
|---|
<41 10> | <shop is sold out> |
|---|