Results 1 to 7 of 7

Thread: What are "flags" in videogame? (May just RPGs I'm not sure).

  1. #1
    Friendship *is* magic. MJN SEIFER's Avatar
    Join Date
    Nov 2002
    Location
    Jasper's Park
    Posts
    3,556
    Blog Entries
    1

    Default What are "flags" in videogame? (May just RPGs I'm not sure).

    I've heard the term "flag" get used in Videogames, so far only in RPGs like the Final Fantasy games (actually on the FF games, but I assume it's on others, so I'm asking on General Gaming).

    I often see it in Debug Menus such as "Resset all Flags". Anyone know what they are?

  2. #2
    tech spirit
    Join Date
    Feb 2003
    Location
    Virgo supercluster
    Posts
    17,950
    Articles
    2
    Blog Entries
    2

    FFXIV Character

    Mirage Askai (Sargatanas)

    Default

    Maybe variables

    like "player done with x cutscene"
    everything is wrapped in gray
    i'm focusing on your image
    can you hear me in the void?

  3. #3
    Recognized Member Jessweeee♪'s Avatar
    Join Date
    Jul 2005
    Location
    i'm on a sandbar help
    Posts
    19,882
    Blog Entries
    12

    FFXIV Character

    Sarangerel Qha (Twintania)
    Contributions
    • Former Cid's Knight
    • Former Site Staff

    Default

    Uhhhh think of it as kind of like a checklist.

    Like say, when you view that first Jecht sphere in FFX. Before then you can't find any, but after Auron shows you the first one the game raises it's "okay Jecht spheres should be available" flag, and they're all in their respective locations.

    That's my own very basic understanding of it anyway.

  4. #4
    Will be banned again Roto13's Avatar
    Join Date
    Nov 2005
    Location
    On the INTARWEB
    Posts
    14,570

    Default

    ^^ Yeah, pretty much. Like a flag will tell the game whether the player has opened a specific chest or not.

  5. #5
    Memento Mori Site Contributor Wolf Kanno's Avatar
    Join Date
    Oct 2006
    Location
    Nowhere and Everywhere
    Posts
    19,731
    Articles
    60
    Blog Entries
    28
    Contributions
    • Former Cid's Knight

    Default

    What Jessweee said but it also does things like... say for example:

    You enter a village and a cutscene where the elder runs up to you and screams about the monster attacking, this a is a flag that is raised that tells the program that when you enter the village this cutscene has to play. There is another flag that goes up as well that tells the program not to play the scene again after it has played so that way, whenever you enter the village again the same cutscene doesn't play cause you've already beaten that scenario. This I learned the hard way with RPG Maker...

  6. #6
    tech spirit
    Join Date
    Feb 2003
    Location
    Virgo supercluster
    Posts
    17,950
    Articles
    2
    Blog Entries
    2

    FFXIV Character

    Mirage Askai (Sargatanas)

    Default

    also if you want to do a quest that has a prerequisite, flags will be used to keep track of whether or not you have the right prerequisites.

    key items are more or less flags that are visible to the player

    if you did a "reset all flags" in FF7 while on disc 3, and then walked back into the church in midgar where you met aeris, you might get the CSes from disc 1 and sort of restart the storyline from that point.
    everything is wrapped in gray
    i'm focusing on your image
    can you hear me in the void?

  7. #7
    Skyblade's Avatar
    Join Date
    Feb 2005
    Location
    Earth, approximately
    Posts
    10,443

    Default

    A flag is a simple switch in programming. The most basic are binary, either on or off, and they get flipped when the fitting bit of code is triggered by in-game progress. They can be used to mark or differentiate almost anything.

    An Event Flag marks an event in progress. For example, the pre-expansion events going on in World of Warcraft right now are being controlled by an event flag. To start the event, a simple toggle is activated in the server, which is why we don't need a patch for each new update.

    A Statistic Flag is used to keep track of most binary stats. For example, in Pokemon, there is a flag that determines whether a Pokemon is shiny or not (though, oddly, there is no flag for gender in that game, male/female is handled in a more complicated fashion). These can also be used as IFFs.

    A Completion Flag is used to determine when something has been done. Loot a chest, complete a quest, and it flips a flag, preventing you from doing it over and over and over again.

    These are the simplest forms. But not all are binary. Mass Effect's decisions, for example, are tracked with flags, but many have multiple possible solutions.


    Flags are a common tool because they are incredibly useful for programmers and debuggers. They can be used to isolate errors, and track a great deal of variables throughout the game. They are also extremely simple, allowing compact storage and access of complex data. Rather than keeping track of everything throughout the entire game, you can just keep track of a few flags.
    My friend Delzethin is currently running a GoFundMe account to pay for some extended medical troubles he's had. He's had chronic issues and lifetime troubles that have really crippled his career opportunities, and he's trying to get enough funding to get back to a stable medical situation. If you like his content, please support his GoFundMe, or even just contribute to his Patreon.

    He can really use a hand with this, and any support you can offer is appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •