EVENT_FLAG Element


EVENT_FLAG (a child element of STEP) allows you to change the "event flag" of any event in the game.

What's Event Flag?

"Event flag" is a variable to determine the state of an event in response to the player's action. Let's take a look at the following example.

Suppose that there is an event to occur in the inn of a town, in which when the party enters the inn for the first time, the innkeeper will fight against the party, and then when the party enters again, the innkeeper will provide renting of rooms at a lower price. So how does the system determine which way the innkeeper should response? This is where "event flag" comes into play. Every event in RPGD has its corresponding event flag, with an initial value as 0. An event in RPGD is usually composed of different sets of actions in which the event flag determines which set of action to use. In this case when the party enters the inn for the first time, the system will read the value of the event flag of the event (0 in this case), and correspondingly load the first set of action (ie. innkeeper fights against the party). The game designer should use an EVENT_FLAG element in this set of action to change the value of the event flag from 0 to 1, so that when the party enters the inn again, the system will get the new value of the event flag (1 in this case), and correspondingly load the second set of action (ie. innkeeper provides renting of rooms at a lower price).

Supported Values

EVENT_FLAG supports the use of its own child elements as values. For a list of supported child elements please refer to the tree menu on the left.

Examples

  • <STEP>
    • ......
    • <EVENT_FLAG>
      • <MAP_NUMBER>22</MAP_NUMBER>
      • <EVENT_NUMBER>0</EVENT_NUMBER>
      • <VALUE>1</VALUE>
    • </EVENT_FLAG>
    • ......
  • </STEP>