Skip to content

Requirements

Gur Ladizhinsky edited this page Jun 27, 2022 · 1 revision

Requirements

Requirements determine whether a conversation/mid-battle event can trigger. They’re also used in the if and wait command (more detail about these commands in the command documentations). All requirements return true or false.

For more information about eventing, see the event system or the relevant tutorials.

Format: requirement:[args]


Save file requirements

Has knowledge
Name: hasKnowledge
Args: name (string)

Example: hasKnowledge:InclinationFrogman

Checks whether the player has bought the given knowledge upgrade.

Found knowledge
Name: foundKnowledge
Args: name (string)

Example: foundKnowledge:InclinationFrogman

Checks whether the player has found the given knowledge upgrade (aka they can buy it).

Has flag
Name: hasFlag
Args: name (string)

Example: hasFlag:MetKresla

Checks whether the given flag was marked by the setFlag command in this save file.

Compare counter
Name: compareCounter
Args: name (string), amount (int comparison)

Example: compareCounter:TimesBetrayedXeplogi:>2

Compares the given counter with the given comparison (more info about comparison arguments in TBA, more info about counters in the setCounter and addCounter commands).

Num runs
Name: numRuns
Args: amount (int comparison)

Example: numRuns:>2

Compares the amount of runs in this save file with the given comparison. More info about comparison arguments in TBA.

Furthest level
Name: furthestLevel
Args: amount (int comparison)

Example: furthestLevel:>2

Compares the highest level number reached in this save file with the given comparison. More info about comparison arguments in TBA.

First time
Name: firstTime
Args: none

Example: firstTime

Checks whether this is the first time the conversation was ever selected.

Finished conversation
Name: finishedConversation
Args: none

Example: finishedConversation

Checks whether the entire conversation was already viewed (only useful in non-unique conversations).

Current run requirements

Has character
Name: hasCharacter
Args: name (string)

Example: hasCharacter:Firbell

Checks whether the player has a character with the given name (not to be confused with unitAlive, which checks units from all teams, and only in the current map).

Had character
Name: hadCharacter
Args: name (string)

Example: hadCharacter:Firbell

Checks whether the player had a character with the given name, but they died.

Characters alive
Name: charactersAlive
Args: amount (int comparison)

Example: charactersAlive:>2

Compares the amount of living player characters to the given amount. More info about comparison arguments in TBA.

Room number
Name: roomNumber
Args: number (int)

Example: roomNumber:3

Contrary to its name, checks whether the current level number equals the given number.

Mid-battle requirements

Turn
Name: turn
Args: amount (int comparison)

Example: turn:>2

Compares the current turn with the given amount.

Unit alive
Name: unitAlive
Args: name (string)

Example: unitAlive:Fashima

Checks whether the given unit is still alive in the current map.

Team units alive
Name: teamUnitsAlive
Args: team (team), amount (int comparison)

Example: teamUnitsAlive:monster:>2

Compares the amount of living units in the given team to the given amount.

Chose
Name: chose
Args: id (int)

Example: chose:0

Solely for the choice command.

Has temp flag
Name: hasTempFlag
Args: name (string)

Example: hasFlag:MetKresla

Checks whether the given flag was marked by the setTempFlag command in this save file. Unlike flags, temp flags reset each run.

Team max pos
Name: teamMaxPos
Args: axis (x/y), team (team), amount (int comparison)

Example: teamMaxPos:x:player:<3

Finds the unit from the given team with the max x/y position, and compares that position with the given amount.

Team min pos
Name: teamMinPos
Args: axis (x/y), team (team), amount (int comparison)

Example: teamMinPos:x:player:<3

Finds the unit from the given team with the min x/y position, and compares that position with the given amount.

Misc

String equals
Name: stringEquals
Args: string 1 (string), string 2 (string)

Example: stringEquals:[Name]:Frogman

Compares the two given strings. Only useful with [Name] or [Name:X].

Clone this wiki locally