<p><em>This is purely conjecture.</em></p>

<p>I suspect that flags are effectively the same as <em>booleans</em> in computer programming which can have values of either <em>true</em> or <em>false</em>. In vexillological terminology, flags would either be <em>raised</em> or <em>lowered</em>. This makes things easier to understand and visualise when used in dating sim software. Furthermore, the existence of a number of dating sim <em>software engines</em> which abstract a lot of the code into a more accessible format also probably helped make such terminology mainstream.</p>

<p>I can imagine that walkthroughs and the like which were created by people in the business regularly used phrases such as <em>trigger the flag</em> which hastened matters.</p>

<p>Excellent question.</p>

CC BY-SA 3.0
2013-03-01T18:21:33.507Z
2013-03-01T18:21:33.507Z
coleopterist
<p>In the visual novel/RPG <em>Megadimension Neptunia VII</em>, the in-game codex, <em>Nepedia</em> has the following entries:</p>

<p>1</p>

<blockquote>
  <p><strong>Flag (Programming Term)</strong></p>
  
  <p>The term "Flags," from their use as landmarks, is used in programming to mean a requirement to process an action. If the requirement's cleared, one says "the flag is true" or "the flag's been raised." When it's not met, one says "a false flag falls."</p>
</blockquote>

<p>2</p>

<blockquote>
  <p><strong>Flag (Derivative) 1</strong></p>
  
  <p>Originally a programming term, it's come to be used to mean "progress in a relationship," "omen of disaster," and other divergent meanings. A famous flag is "speaking optimistically and holding onto hope when things are dire." Since most die after this, it's known as a "death flag."</p>
</blockquote>

<p>3</p>

<blockquote>
  <p><strong>Flag (Derivative) 2</strong></p>
  
  <p>When a flag doesn't go as expected, or when a person stops the outcome themselves or ignores it, it's known as "breaking the flag." Those who do this excesivelly are called "Flag Crushers." The usage has diverged from the meaning, and programmers in nations outside Japan say using the word <em>breaking</em> isn't right.</p>
</blockquote>

<p>4</p>

<blockquote>
  <p><strong>Flag Item</strong></p>
  
  <p>In Gamindustri, once in a great while, the usually intangible concept of "flag" materializes into an item. The item is categorized as a "Flag Item", and one receives beneficial functions by obtaining one. Previously, adventurers and scouts raised and lowered it within dungeons to their benefit. However, as it's much more convenient as an item, most people pull it out and carry it away now, so you rarely see one in the wild.</p>
</blockquote>

<p>I think the last entry refers only to this game specifically, but the first three entries are more generally. Still, it is a <em>in-game</em> encyclopedia, and in a game that's overflowing with satire so take it with a grain of salt.</p>

CC BY-SA 3.0
2016-09-25T19:14:34.927Z
2016-09-25T19:14:34.927Z
Petr Hudeček
<p>The terminology probably comes from <a href="http://en.wikipedia.org/wiki/Flag_word">programming</a>. With most visual novel games the terminology "flag" and "counter" go hand-in-hand.</p>

<p>In the background of a game, there are various variables, the most notable ones are the "global" and "local" variables. These variables usually what counters and flags consists of. </p>

<p>Local variables are usually a point counter that resets every time you start a new game. So let's say you have this character, Y. If you give Y a present, Y's  "affection" counter will increase with 2 points. By the end of the game, if this counter totals 12 points or more point, you will get that character's "good" end.</p>

<p>Global variable are typically flags created by the game to remember certain things. So if in a game if you chose to leave your house without checking the stove, you active the "unchecked stove" flag. Later in the game, the flag is checked and if has been activated, if will trigger the event where your house has burns down and you have to move in with a friend.</p>

<p>A global variable flags are persistent, so when you start a new game they are not reset like local variables. They typically are used as bookmarks to mark progress and be used as save points, so you don't have to replay though everything again. </p>

<p>Let's say that there is this other character named Z. If you get one of Y's good end, you'll active the Y's good end global variable flag. During your next playthrough at some point dring the game, the game checks for this flag has been activated and if has, you get a new choice that allows you to access Z's route. This is typically done to control player progress in the game as Z's route might spoil story elements in Y's route. </p>

CC BY-SA 3.0
2013-03-02T17:39:23.280Z
The example for "global" var (burned house) sounds more like a "local" var instead (element of story, rather than persistent across different replays). There are also (many) instances where global var is a counter - the player keeps all the stats from previous play and bring over to the new replay.
nhahtdh
CC BY-SA 3.0
2013-03-04T09:42:35.590Z
I support this. As a VN-developer, I can say that the answer is correct :).
looper
CC BY-SA 3.0
2013-03-01T17:01:54.327Z
2013-03-01T17:07:39.857Z
2013-03-01T17:07:39.857Z
кяαzєя
<p>Anyone familiar with dating sims and romance visual novels will recognize the term "flag" in that context. In these games, when you are presented with choices which affect how the other characters view you and potentially change which route you go on, it's called a flag. "Raising a character's flags" essentially means that you make choices that improve your standing with that character and which are more likely to put you on his/her route.</p>

<p>This terminology is quite common even outside of visual novels in anime. For instance, the manga The World God Only Knows (a parody of the dating sim genre of games) uses the term frequently, and the manga chapters are numbered as flags (e.g "flag 53"). I've seen it in many other anime and manga as well, both in Japanese and translated into English. I was not able to find any reference for the term used in this way in either English or Japanese.</p>

<p>The term "flag" doesn't seem particularly romantic or descriptive in this context. There are other terms, like "affection points" (a slightly different system) which are easy to understand, but "flags" is at least as common as any of those. What is the reasoning behind the terminology "flag" in this context and where does it originate?</p>

CC BY-SA 3.0
2013-03-02T17:47:02.000Z
Aside from romantic event, another common reference of flag is "death flag".
nhahtdh
CC BY-SA 3.0
2013-03-04T09:43:51.843Z
Actually a flag can be used for every event. They just mark whether the event happened or not. (See the answers, both are correct.)
looper
CC BY-SA 3.0
2013-03-04T17:00:09.300Z
@looper you're correct, but I've heard it used far more often with regard to romantic events than other events. I agree that both answers are probably correct and I'll accept one in the near future, but I'm leaving this open in case someone can find an official source for the claim. Being a VN developer, if you know of such a source feel free to add your own answer to that effect.
Logan M
CC BY-SA 3.0
2013-03-04T17:05:00.050Z
@LoganM: I can't give you an official source. It's like something you just learn by the way ^^'.
looper
CC BY-SA 3.0
2016-09-26T00:13:40.093Z
Since Kami nomi zo shiru sekai parodies dating sims so explicitly, it doesn't make sense to use any other term considering *flag* is already a common usage.
Jan
CC BY-SA 3.0
2016-09-27T03:37:05.747Z
it's like if elseif else in programming language. . . .
Tanya von Degurechaff
<terminology>
Why are romantic events sometimes called "flags"?
# Why are romantic events sometimes called "flags"?
Posted by: username_0 on 2013-03-01
Anyone familiar with dating sims and romance visual novels will recognize the term "flag" in that context. In these games, when you are presented with choices which affect how the other characters view you and potentially change which route you go on, it's called a flag. "Raising a character's flags" essentially means that you make choices that improve your standing with that character and which are more likely to put you on his/her route.

This terminology is quite common even outside of visual novels in anime. For instance, the manga The World God Only Knows (a parody of the dating sim genre of games) uses the term frequently, and the manga chapters are numbered as flags (e.g "flag 53"). I've seen it in many other anime and manga as well, both in Japanese and translated into English. I was not able to find any reference for the term used in this way in either English or Japanese.

The term "flag" doesn't seem particularly romantic or descriptive in this context. There are other terms, like "affection points" (a slightly different system) which are easy to understand, but "flags" is at least as common as any of those. What is the reasoning behind the terminology "flag" in this context and where does it originate?
**Tags:** terminology
> **Comments:**
> **username_1**: Aside from romantic event, another common reference of flag is "death flag".  
> **username_2**: Actually a flag can be used for every event. They just mark whether the event happened or not. (See the answers, both are correct.)  
> **username_0**: @looper you're correct, but I've heard it used far more often with regard to romantic events than other events. I agree that both answers are probably correct and I'll accept one in the near future, but I'm leaving this open in case someone can find an official source for the claim. Being a VN developer, if you know of such a source feel free to add your own answer to that effect.  
> **username_2**: @LoganM: I can't give you an official source. It's like something you just learn by the way ^^'.  
> **username_3**: Since Kami nomi zo shiru sekai parodies dating sims so explicitly, it doesn't make sense to use any other term considering *flag* is already a common usage.  
> **username_4**: it's like if elseif else in programming language. . . .  
---
## 3 answers
### Answer by username_7 on 2013-03-01. Score: 18 | Accepted answer
The terminology probably comes from [programming](http://en.wikipedia.org/wiki/Flag_word). With most visual novel games the terminology "flag" and "counter" go hand-in-hand.

In the background of a game, there are various variables, the most notable ones are the "global" and "local" variables. These variables usually what counters and flags consists of.

Local variables are usually a point counter that resets every time you start a new game. So let's say you have this character, Y. If you give Y a present, Y's "affection" counter will increase with 2 points. By the end of the game, if this counter totals 12 points or more point, you will get that character's "good" end.

Global variable are typically flags created by the game to remember certain things. So if in a game if you chose to leave your house without checking the stove, you active the "unchecked stove" flag. Later in the game, the flag is checked and if has been activated, if will trigger the event where your house has burns down and you have to move in with a friend.

A global variable flags are persistent, so when you start a new game they are not reset like local variables. They typically are used as bookmarks to mark progress and be used as save points, so you don't have to replay though everything again.

Let's say that there is this other character named Z. If you get one of Y's good end, you'll active the Y's good end global variable flag. During your next playthrough at some point dring the game, the game checks for this flag has been activated and if has, you get a new choice that allows you to access Z's route. This is typically done to control player progress in the game as Z's route might spoil story elements in Y's route.
> **Comments:**
> **username_1** (2013-03-02): The example for "global" var (burned house) sounds more like a "local" var instead (element of story, rather than persistent across different replays). There are also (many) instances where global var is a counter - the player keeps all the stats from previous play and bring over to the new replay.  
> **username_2** (2013-03-04): I support this. As a VN-developer, I can say that the answer is correct :).  
---
### Answer by username_5 on 2013-03-01. Score: 13
*This is purely conjecture.*

I suspect that flags are effectively the same as *booleans* in computer programming which can have values of either *true* or *false*. In vexillological terminology, flags would either be *raised* or *lowered*. This makes things easier to understand and visualise when used in dating sim software. Furthermore, the existence of a number of dating sim *software engines* which abstract a lot of the code into a more accessible format also probably helped make such terminology mainstream.

I can imagine that walkthroughs and the like which were created by people in the business regularly used phrases such as *trigger the flag* which hastened matters.

Excellent question.
---
### Answer by username_6 on 2016-09-25. Score: 3
In the visual novel/RPG *Megadimension Neptunia VII*, the in-game codex, *Nepedia* has the following entries:

1

> **Flag (Programming Term)**
>
> The term "Flags," from their use as landmarks, is used in programming to mean a requirement to process an action. If the requirement's cleared, one says "the flag is true" or "the flag's been raised." When it's not met, one says "a false flag falls."

2

> **Flag (Derivative) 1**
>
> Originally a programming term, it's come to be used to mean "progress in a relationship," "omen of disaster," and other divergent meanings. A famous flag is "speaking optimistically and holding onto hope when things are dire." Since most die after this, it's known as a "death flag."

3

> **Flag (Derivative) 2**
>
> When a flag doesn't go as expected, or when a person stops the outcome themselves or ignores it, it's known as "breaking the flag." Those who do this excesivelly are called "Flag Crushers." The usage has diverged from the meaning, and programmers in nations outside Japan say using the word *breaking* isn't right.

4

> **Flag Item**
>
> In Gamindustri, once in a great while, the usually intangible concept of "flag" materializes into an item. The item is categorized as a "Flag Item", and one receives beneficial functions by obtaining one. Previously, adventurers and scouts raised and lowered it within dungeons to their benefit. However, as it's much more convenient as an item, most people pull it out and carry it away now, so you rarely see one in the wild.

I think the last entry refers only to this game specifically, but the first three entries are more generally. Still, it is a *in-game* encyclopedia, and in a game that's overflowing with satire so take it with a grain of salt.
---
