Universal Flags Resource [UFR] (chuzzle threak)

cameron-

fka jingle
unknown.png


Hi team,

As you may know @Ender put together this cracking LUA addon recently which reads out universal flag data such as MA4 tickets, Phantasmal World-series lucky coins, etc. It rolls out with a number of default flags but the game has many more and I'll do my best to keep this post updated with the latest of universal flag technology and research.

If you have any tested flags & bitmasks for content that is not currently represented please share!
Please let me know if there are any mistakes.
There's a list of items I'm planning to add/look into at the bottom. Feel free to volunteer the most esoteric/random flags you can think of.

Flag: 11
Bitmask: 508

Flag: 15
Bitmask: 255

Flag: 14
Bitmask: 2147483647

Flag: 3
Bitmask: 2147483647

Flag: 4
Bitmask: 2147483647

Flag: 8
Bitmask: 2147483647

Flag: 9
Bitmask: 16383

Flag: 3
Bitmask: 255

Flag: 9
Bitmask: 268419072

Flag: 10
Bitmask: 2143289344

Flag: 9
Bitmask: 268435456

Flag: 10
Bitmasks:

HUmar: 1
HUnewearl: 2
HUcast: 4
HUcaseal: 8

RAmar: 16
RAmarl: 32
RAcast: 64
RAcaseal: 128

FOmar: 256
FOmarl: 512
FOnewm: 1024
FOnewearl: 2048

Flag: 10
Bitmasks:

Viridia: 4096
Greenill: 8192
Skyly: 16384
Bluefull: 32768
Purplenum: 65536
Pinkal: 131072
Redria: 262144
Oran: 524288
Yellowboze: 1048576
Whitill: 2097152




Thank you to ender and matt and everyone in the qedit discord except jake and everyone who still plays this game
 
Last edited:
I've recorded a little global flag data over the years, but more recently I decided to bite the bullet and just document everything. Here's the list of mostly GC stuff:

Code:
bit #    # bits    Purpose                                                Read andi      Write andi

flag 0:            Garon's Shop

01-10    10        Garon Points                                           000003FF       FFFFFC00
11-18    8         Button-mashing Game score                              0003FC00       FFFC03FF
19-26    8         Timing Game score                                      03FC0000       FC03FFFF
27       1         Tier 1 (10 cards) of Guild Card counter                04000000       FBFFFFFF
28       1         Tier 2 (30 cards) of Guild Card counter                08000000       F7FFFFFF
29       1         Tier 3 (50 cards) of Guild Card counter                10000000       EFFFFFFF
30       1         Tier 4 (100 cards) of Guild Card counter               20000000       DFFFFFFF
31       1         Timing Game score init flag                            40000000       BFFFFFFF

flag 1:            GBA Minigames & Seat of the Heart

01       1         Dream Messenger: NiGHTS                                00000001       FFFFFFFE
02       1         Pioneer Warehouse: ???                                 00000002       FFFFFFFD
03       1         Garon's Shop: Puyo Pop                                 00000004       FFFFFFFB
04       1         Pioneer Warehouse: Chu Chu Challenge                   00000008       FFFFFFF7
05       1         Reach for the Dream: Chu Chu Puzzle                    00000010       FFFFFFEF
06-29    24        Seat of the Heart                                      1FFFFFE0       E000001F
06       1         Seat of the Heart: Checkpoint (Normal)                 00000020       FFFFFFDF
07       1         Seat of the Heart: Checkpoint (Sue path)               00000040       FFFFFFBF
08       1         Seat of the Heart: Checkpoint (Elly is mad)            00000080       FFFFFF7F
09       1         Seat of the Heart: Quest complete (no Sue path)        00000100       FFFFFEFF
10       1         Seat of the Heart: Quest complete (Sue path)           00000200       FFFFFDFF
11       1         Seat of the Heart: Got Ragol Ring (Normal)             00000400       FFFFFBFF
12       1         Seat of the Heart: Checkpoint (Hard)                   00000800       FFFFF7FF
13       1         Seat of the Heart: Checkpoint (Sue path)               00001000       FFFFEFFF
14       1         Seat of the Heart: Checkpoint (Elly is mad)            00002000       FFFFDFFF
15       1         Seat of the Heart: Quest complete (no Sue path)        00004000       FFFFBFFF
16       1         Seat of the Heart: Quest complete (Sue path)           00008000       FFFF7FFF
17       1         Seat of the Heart: Got Ragol Ring (Hard)               00010000       FFFEFFFF
18       1         Seat of the Heart: Checkpoint (Very Hard)              00020000       FFFDFFFF
19       1         Seat of the Heart: Checkpoint (Sue path)               00040000       FFFBFFFF
20       1         Seat of the Heart: Checkpoint (Elly is mad)            00080000       FFF7FFFF
21       1         Seat of the Heart: Quest complete (no Sue path)        00100000       FFEFFFFF
22       1         Seat of the Heart: Quest complete (Sue path)           00200000       FFDFFFFF
23       1         Seat of the Heart: Got Ragol Ring (Very Hard)          00400000       FFBFFFFF
24       1         Seat of the Heart: Checkpoint (Ultimate)               00800000       FF7FFFFF
25       1         Seat of the Heart: Checkpoint (Sue path)               01000000       FEFFFFFF
26       1         Seat of the Heart: Checkpoint (Elly is mad)            02000000       FDFFFFFF
27       1         Seat of the Heart: Quest complete (no Sue path)        04000000       FBFFFFFF
28       1         Seat of the Heart: Quest complete (Sue path)           08000000       F7FFFFFF
29       1         Seat of the Heart: Got Ragol Ring (Ultimate)           10000000       EFFFFFFF
**       *         Sega created global flag conflicts?
12       1         White Day: ???                                         00000800       FFFFF7FF
13       1         Blue Star Memories: Future Forecast                    00001000       FFFFEFFF
14       1         Blue Star Memories: Future Bullet                      00002000       FFFFDFFF
16-22    7         Beta Lucky Coins                                       003F8000       FFC07FFF

flag 2:            Miscellaneous

01       1         Pioneer Halloween: Got Jack-O'-Lantern                 00000001       FFFFFFFE
02       1         Pioneer Halloween: Got cake                            00000002       FFFFFFFD
03-05    3         ???
06       1         The East Tower: Paganini side quest                    00000020       FFFFFFDF
07       1         The West Tower: Paganini side quest                    00000040       FFFFFFBF
08       1         Labyrinthine Trial: White Ring                         00000080       FFFFFF7F
09       1         Garon's Treachery: Rakonia Stone                       00000100       FFFFFEFF
10       1         Garon's Treachery: Fragment of Friendship              00000200       FFFFFDFF
11       1         Towards the Future: Purple Ring                        00000400       FFFFFBFF
12       1         Towards the Future: Flower Bouquet                     00000800       FFFFF7FF
13       1         ???
14       1         Rappy's Holiday: Heart of Poumn                        00002000       FFFFDFFF
15-22    8         Rappy's Holiday points                                 003FC000       FFC03FFF
23-24    2         ???
25-27    3         Respective Tomorrow: WIS                               07000000       F8FFFFFF
28       1         Respective Tomorrow: S/SS Rank                         08000000       F7FFFFFF
29       1         Towards the Future: Black Ring                         10000000       EFFFFFFF

flag 3:            Maximum Attack 2

01-08    8         Lucky Tickets                                          000000FF       FFFFFF00
09-22    14        Kill count                                             003FFF00       FFC000FF
23-27    5         Song count                                             07C00000       F83FFFFF
28       1         Couple flag                                            08000000       F7FFFFFF
29-32    4         Singing by the Beach?

flag 5:            Miscellaneous

01-15    15        Principal's Gift: Random Candy ID                      00007FFF       FFFF8000
16       1         Candy ID init flag                                     00008000       FFFF7FFF
17-22    6         ???
23       1         Lost Hell Pallasch: Gush Raygun                        04000000       FFBFFFFF

flag 7:            Government quests

01       1         Government 4-5: Normal cleared                         00000001       FFFFFFFE
02       1         Government 4-5: Hard cleared                           00000002       FFFFFFFD
03       1         Government 4-5: Very Hard cleared                      00000004       FFFFFFFB
04       1         Government 4-5: Ultimate cleared                       00000008       FFFFFFF7
05       1         Government 8-3: Normal cleared                         00000010       FFFFFFEF
06       1         Government 8-3: Hard cleared                           00000020       FFFFFFDF
07       1         Government 8-3: Very Hard cleared                      00000040       FFFFFFBF
08       1         Government 8-3: Ultimate cleared                       00000080       FFFFFF7F

flag 9:            Maximum Attack 1 & 2 Ver.2

01-14    14        Maximum Attack 1 Ver.2: points                         00003FFF       FFFFC000
15-28    14        Maximum Attack 2 Ver.2: points                         0FFFC000       F0003FFF
29       1         Maximum Attack 1 Ver.2: Class Master flag              10000000       EFFFFFFF
30       1         Maximum Attack 2 Ver.2: ID Master flag                 20000000       DFFFFFFF
31       1         Beach Laughter: Got 5 Photon Spheres & Black Ring      40000000       BFFFFFFF

flag A:            Maximum Attack 1 & 2 Ver.2

01-22    22        All Hearts                                             003FFFFF       FFC00000
01       1         Heart of HUmar                                         00000001       FFFFFFFE
02       1         Heart of HUnewearl                                     00000002       FFFFFFFD
03       1         Heart of HUcast                                        00000004       FFFFFFFB
04       1         Heart of HUcaseal                                      00000008       FFFFFFF7
05       1         Heart of RAmar                                         00000010       FFFFFFEF
06       1         Heart of RAmarl                                        00000020       FFFFFFDF
07       1         Heart of RAcast                                        00000040       FFFFFFBF
08       1         Heart of RAcaseal                                      00000080       FFFFFF7F
09       1         Heart of FOmar                                         00000100       FFFFFEFF
10       1         Heart of FOmarl                                        00000200       FFFFFDFF
11       1         Heart of FOnewm                                        00000400       FFFFFBFF
12       1         Heart of FOnewearl                                     00000800       FFFFF7FF
13       1         Heart of Viridia                                       00001000       FFFFEFFF
14       1         Heart of Greennill                                     00002000       FFFFDFFF
15       1         Heart of Skyly                                         00004000       FFFFBFFF
16       1         Heart of Bluefull                                      00008000       FFFF7FFF
17       1         Heart of Purplenum                                     00010000       FFFEFFFF
18       1         Heart of Pinkal                                        00020000       FFFDFFFF
19       1         Heart of Redria                                        00040000       FFFBFFFF
20       1         Heart of Oran                                          00080000       FFF7FFFF
21       1         Heart of Yellowboze                                    00100000       FFEFFFFF
22       1         Heart of Whitill                                       00200000       FFDFFFFF
23-31    9         Lucky Tickets                                          7FC00000       803FFFFF

flag B:            Lucky Coins & Wrapping Papers

01       1         Garon's Shop: Black Gear                               00000001       FFFFFFFE
02       1         Beta -> Final Lucky Coins init flag                    00000002       FFFFFFFD
03-09    7         Lucky Coins                                            000001FC       FFFFFE03
10       1         ???
11-19    9         Pioneer Christmas ???                                  0007FC00       FFF803FF
20       1         Cleared 4th Pioneer Christmas tier?                    00080000       FFF7FFFF
21-29    9         Wrapping Papers                                        1FF00000       E00FFFFF
30       1         Pioneer Christmas Present                              20000000       DFFFFFFF
31       1         White Day: Flower Bouquet or Heart Key                 40000000       BFFFFFFF
Note that BB doesn't use global flags for Seat of the Heart. It uses pflags, instead.
 
You forgot to update global flag 2 for Paganini. ;)

Code:
06       1         The East Tower: Paganini side quest                    00000020       FFFFFFDF
07       1         The West Tower: Paganini side quest                    00000040       FFFFFFBF
Note that Challenge mode does not use global flags. They have nothing to do with your rank or which prizes you've gotten.
 
You forgot to update global flag 2 for Paganini. ;)

Code:
06       1         The East Tower: Paganini side quest                    00000020       FFFFFFDF
07       1         The West Tower: Paganini side quest                    00000040       FFFFFFBF
Note that Challenge mode does not use global flags. They have nothing to do with your rank or which prizes you've gotten.
Ives, do you know if gallon's pag rewards (god's shields) and DSR "1st place" rewards (girasole/friend ring) are identified by universal flags? I'm assuming not?
 
Ives, do you know if gallon's pag rewards (god's shields) and DSR "1st place" rewards (girasole/friend ring) are identified by universal flags? I'm assuming not?
Code:
        {
            enable = true,
            flagMask = 0x00000001,
            flagNum = 0x0000000B,
            hexdisplay = false,
            description = "Roulette (SEIRYU)",
        },
        {
            enable = true,
            flagMask = 0x00000002,
            flagNum = 0x0000000B,
            hexdisplay = false,
            description = "Roulette (GENBU)",
        },
        {
            enable = true,
            flagMask = 0x00000800,
            flagNum = 0x0000000F,
            hexdisplay = false,
            description = "MA4 (SAMURAI ARMOR)",
        },
        {
            enable = true,
            flagMask = 0x00000200,
            flagNum = 0x0000000F,
            hexdisplay = false,
            description = "MA4 (GIRASOLE)",
        },
        {
            enable = true,
            flagMask = 0x00000400,
            flagNum = 0x0000000F,
            hexdisplay = false,
            description = "MA4 (FRIEND RING)",
        },
        {
            enable = true,
            flagMask = 0x00000100,
            flagNum = 0x0000000F,
            hexdisplay = false,
            description = "MA4 (PHOTON CRYSTAL)",
        },

Should be correct. Didn't test, just looked at the quest scripts. You could just copy and paste this into the options.lua in the globalFlags table and should be good.
 
I vastly enjoy this addon, mostly because being able to know how many points/tickets you have without having to note them down meticulously is so nice. Used it in the past for the above hearts etc and it's great for checking flags you may have/not have on a character.

After some instructions/help from @Ender & @Esther and looking at this thread (post from Ives) I managed to add quite a few flags today:
Code:
        {
            enable = true,
            flagMask = 0x000003FF,
            flagNum = 0x00000000,
            hexdisplay = false,
            description = "Gallon's Points",
        },
        {
            enable = true,
            flagMask = 0x003FC000,
            flagNum = 0x00000002,
            hexdisplay = false,
            description = "RH Points",
        },

        {
            enable = true,
            flagMask = 0x0FF00000,
            flagNum = 0x00000006,
            hexdisplay = false,
            description = "Lucky Tickets",
        },
        {
            enable = false,
            flagMask = 0x10000000,
            flagNum = 0x00000002,
            hexdisplay = false,
            description = "Black Ring",
        },
        {
            enable = false,
            flagMask = 0x00000400,
            flagNum = 0x00000002,
            hexdisplay = false,
            description = "Purple Ring",
        },
        {
            enable = false,
            flagMask = 0x00000080,
            flagNum = 0x00000002,
            hexdisplay = false,
            description = "White Ring",
        },
        {
            enable = false,
            flagMask = 0x20000000,
            flagNum = 0x00000002,
            hexdisplay = false,
            description = "Green Ring",
        },
   
        {
            enable = true,
            flagMask = 0x40000000,
            flagNum = 0x00000009,
            hexdisplay = false,
            description = "Blue Ring",
        },
        {
            enable = false,
            flagMask = 0x00002000,
            flagNum = 0x00000002,
            hexdisplay = false,
            description = "Heart Of Poumn",
        },
        {
            enable = true,
            flagMask = 0x40000000,
            flagNum = 0x0000000B,
            hexdisplay = false,
            description = "Wall",
        },
        {
            enable = false,
            flagMask = 0x00000020,
            flagNum = 0x00000002,
            hexdisplay = false,
            description = "East Tower",
        },
        {
            enable = false,
            flagMask = 0x00000040,
            flagNum = 0x00000002,
            hexdisplay = false,
            description = "West Tower",
        },
        {
            enable = false,
            flagMask = 0x00200000,
            flagNum = 0x00000005,
            hexdisplay = false,
            description = "Racket",
        },
        {
            enable = false,
            flagMask = 0x00400000,
            flagNum = 0x00000005,
            hexdisplay = false,
            description = "Tree Clippers",
        },
        {
            enable = false,
            flagMask = 0x00800000,
            flagNum = 0x00000005,
            hexdisplay = false,
            description = "Synthesizer",
        },
        {
            enable = false,
            flagMask = 0x01000000,
            flagNum = 0x00000005,
            hexdisplay = false,
            description = "Shichishito",
        },
        {
            enable = false,
            flagMask = 0x02000000,
            flagNum = 0x00000005,
            hexdisplay = false,
            description = "Dirty Life Jacket",
        },

However, there are still a few I am struggling to work out; in the quest files there is no read_global_flag or write_global_flag, for example- Soul Eater in From The Depths, does this mean it has no flag to be readable?

Flags I am trying to get currently:
Soul Eater
Akiko's Frying Pan
Orotiagito
Anti-Dark Ring
Ragol Ring
A/B Rank prizes for cmode in each episode.
Enemy Parts Conversion
Enemy Parts Adding hit

Other items/flags I have not looked at that I might consider later-
Black Gear
Type Weapons
Government Reward Prizes (40h Vjaya)
Gov Quests Cleared

Note that Challenge mode does not use global flags. They have nothing to do with your rank or which prizes you've gotten.

I am guessing that's a no on the cmode items :mad:
 
Last edited:
However, there are still a few I am struggling to work out; in the quest files there is no read_global_flag or write_global_flag, for example- Soul Eater in From The Depths, does this mean it has no flag to be readable?

Flags I am trying to get currently:
Soul Eater
Akiko's Frying Pan
Orotiagito
Anti-Dark Ring
A/B Rank prizes for cmode in each episode.
Enemy Parts Conversion
Enemy Parts Adding hit

Other items/flags I have not looked at that I might consider later-
Black Gear
Type Weapons
Government Reward Prizes (40h Vjaya)
Gov Quests Cleared



I am guessing that's a no on the cmode items :mad:
All of these are technically 'readable' in the client but the flags reader addon is only for global flags. Most of the ones in your post are quest flags (sometimes called pflags, set and cleared by the confusingly named gset and gclear quest opcodes). The quest flags are per difficulty and then there's logic required for some of them, such as side story progression and govt quests. The design is a problem because 4 difficulties for most of these.

The cmode prizes are not global or quest flags, but somewhere else entirely in the character data.

ADR used to be only on the server but now it's in the client memory and My Career uses it, meaning someone could make an addon for all of the data in that quest but I'm not doing that.

tl;dr - All of those could be read but none of them would work with the flags reader as it is today. Excluding the TypeM flags which I thought were global flags, but can't check now.
 
Last edited:
Back
Top