Event Reference Condition

From Tuxepedia
Revision as of 15:48, 2 February 2026 by Jaskrendix (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Conditions[edit | edit source]

AFKStateCondition[edit | edit source]

Check if one or more AFK states (thresholds) have been met.

Usage

is afk_state <level>

Examples

  • is afk_state example
  • is afk_state warn: kick

BattleOutcomeCondition[edit | edit source]

Checks if a character has achieved a specific battle outcome against an opponent.

Usage

is battle_outcome <fighter>,<outcome>,<opponent>

Parameters

  • fighter_slug: The slug of the battle participant (e.g., "player").
  • outcome: The desired battle outcome ("won", "lost", or "draw").
  • opponent_slug: The slug of the opponent (e.g., "npc_maple").
  • Example:

`is battle_outcome player,won,npc_maple` Checks if the 'player' has won against 'npc_maple'.

BattleOutcomeCountCondition[edit | edit source]

Checks if a character has achieved a specific battle outcome a minimum number of times against a specific opponent.

Usage

is battle_outcome_count <fighter>,<outcome>,<opponent>,<count>

Parameters

  • fighter_slug:

The slug of the battle participant (e.g., "player").

  • outcome:

The desired battle outcome ("won", "lost", or "draw").

  • opponent_slug:

The slug of the opponent (e.g., "npc_maple").

  • count:

Minimum number of times the outcome must have occurred.

  • Example:

is battle_outcome_count player,won,npc_maple,2

Checks if the 'player' has won at least 2 times against 'npc_maple'.

BillExistsCondition[edit | edit source]

Check to see if a bill exists.

Usage

is bill_exists <character>,<bill_slug>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • bill_slug: The slug of the bill

eg. "is bill_exists player,my_bill"

BillIsCondition[edit | edit source]

Check to see if a bill exists and has a certain amount.

Usage

is bill_is <character>,<operator>,<bill_slug>,<amount>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • bill_slug: The slug of the bill
  • operator: Numeric comparison operator. Accepted values are "less_than",

"less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".

  • amount: Amount of money or value stored in variable

eg. "is bill_is player,bill_slug,equals,50"

  • eg. "is bill_is player,bill_slug,equals,name_variable" (name_variable: 75)

ButtonComboCondition[edit | edit source]

Check to see if a particular sequence of buttons was pressed.

Usage

is button_combo <buttons>

Parameters

  • buttons: A sequence of button/intention keys (E.g. "up:down:interact").

ButtonCountCondition[edit | edit source]

Check to see how many time a particular button was pressed.

Usage

is button_count <button>,<operator>,<amount>

Parameters

  • button: A button/intention key (E.g. "up").
  • operator: Numeric comparison operator. Accepted values are "less_than",

"less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".

  • amount: The number of times the button was pressed.

ButtonHeldCondition[edit | edit source]

Check to see if a particular key was held for a certain number of frames.

Usage

is button_held <button>,<frames>

Parameters

  • button: A button/intention key (E.g. "up").
  • frames: The number of frames the button must be held.

ButtonPressedCondition[edit | edit source]

Check to see if a particular key was pressed.

Usage

is button_pressed <button>

Parameters

  • button: A button/intention key (E.g. "INTERACT").

CameraAtCondition[edit | edit source]

Check to see if the camera is at the position on the map.

Usage

is camera_at <tile_pos_x>,<tile_pos_y>

Parameters

  • pos_x: X position of the camera.
  • pos_y: Y position of the camera.

CelestialIsCondition[edit | edit source]

Evaluates a comparison against the current phase of a celestial body (e.g., moon, sun) as provided by the session's CelestialManager.

This allows scripts to react to fictional astronomical cycles defined in `celestial_cycles.yaml`, such as checking whether the moon is full, waxing, waning, etc.

Usage

is celestial_is <body>,<operation>,<phase>

Parameters

  • body:

The name of the celestial body to evaluate. This must match one of the cycle names defined in `celestial_cycles.yaml`, such as "moon" or "sun".

  • operation:

A comparison operator. Only string-based comparisons are valid

  • for celestial phases:
  • "equals" or "=="
  • "not_equals" or "!="
  • phase:

The expected phase name to compare against. This must match one of the phase labels defined for the celestial body in the YAML configuration.

Examples

is celestial_is moon,equals,full is celestial_is moon,not_equals,new is celestial_is sun,equals,high

CharAtCondition[edit | edit source]

Check to see if the character is at the condition position on the map.

Usage

is char_at [character]

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple").

CharAtPositionCondition[edit | edit source]

Check to see if the character is at the position on the map.

Usage

is char_at_position <character>,<tile_pos_x>,<tile_pos_y>

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple").
  • tile_pos_x: X position to set the character to.
  • tile_pos_y: Y position to set the character to.

CharDefeatedCondition[edit | edit source]

Check to see the character has at least one tuxemon, and all tuxemon in their party are defeated.

Usage

is char_defeated <character>

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple")

CharExistsCondition[edit | edit source]

Check to see if a character object exists in the current list of NPCs.

Usage

is char_exists <character>

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple").

CharFacingCondition[edit | edit source]

Check to see where a character is facing.

Usage

is char_facing <character>,<direction>

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple").
  • direction: One of "up", "down", "left" or "right".

CharFacingCharCondition[edit | edit source]

Check to see the character is next to and facing a particular character.

Usage

is char_facing_char <character1>,<character2>

Parameters

  • character1: Either "player" or character slug name (e.g. "npc_maple").
  • character2: Either "player" or character slug name (e.g. "npc_maple").

CharFacingTileCondition[edit | edit source]

Check to see if a character is facing a tile position.

This is checked against all the tiles included in the condition object.

Usage

is char_facing_tile <character>[,value]

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple").
  • value: value (eg surfable) inside the tileset.

CharGenderCondition[edit | edit source]

Check whether a character's gender matches the expected value.

Usage

is char_gender <character> <gender>

Parameters

  • character: Either "player" or an NPC slug (e.g. "npc_maple")
  • gender: Expected gender string to compare against the character's gender

CharHealedCondition[edit | edit source]

Check whether all monsters in the character's party are healed.

Usage

is char_healed <character>

Parameters

  • character: Either "player" or NPC slug name (e.g. "npc_maple")

CharInCondition[edit | edit source]

Check to see if the character is on a specific set of tiles.

Usage

is char_in <character>,<value>

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple")
  • value: value (eg surfable) inside the tileset.

CharInBoundaryCondition[edit | edit source]

Checks if a character is within a specific named boundary.

Usage

is char_in_boundary <character_name>,<boundary_name>

Parameters

  • character_name: "player" or an NPC slug.
  • boundary_name: The name of the boundary to check (e.g., "safe_zone").

CharMovedCondition[edit | edit source]

Check to see the player has just moved into this tile.

Using this condition will prevent a condition like "char_at" from constantly being true every single frame.

  • Check if player destination collides with event
  • If it collides, wait until destination changes
  • Become True after collides and destination has changed

These rules ensure that the event is true once player in the tile and is only true once. Could possibly be better, IDK.

Usage

is char_moved <character>

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple")

CharSpriteCondition[edit | edit source]

Check the character's sprite

Usage

is char_sprite <character>,<sprite>

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple")
  • sprite: NPC's sprite (eg maniac, florist, etc.)

CheckCharParameterCondition[edit | edit source]

Check the parameter's value of the character against a given value.

Usage

check_char_parameter <character>,<parameter>,<value>

Parameters

  • character: Either "player" or npc slug name (eg. "npc_maple").
  • parameter: Name of the parameter to check (eg. "name", "steps", etc.).
  • value: Given value to check.

eg. "player,name,alpha" -> is the player named alpha? true/false

CheckEvolutionCondition[edit | edit source]

Check to see the player has at least one tuxemon evolving. If yes, it'll save the monster and the evolution inside a list. The list will be used by the event action "evolution".

Usage

is check_evolution <character>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").

eg. "is check_evolution player"

CheckMaxTechCondition[edit | edit source]

Condition to check whether a character (player or NPC) has at least one Tuxemon with more techniques than a specified threshold.

This condition is used in event scripting to trigger actions based on the number of techniques a Tuxemon possesses. If the condition is met, the matching monsters are stored in the session's `event_data` dictionary under the key `"check_max_tech"`.

Usage

is check_max_tech <character>[,nr]

Parameters

  • character: Either "player" or NPC slug name (e.g. "npc_maple").
  • nr: Optional integer specifying the minimum number of techniques.

Defaults to the config_monster.max_moves.

Examples

  • "is check_max_tech player"
  • "is check_max_tech npc_maple,2"

CheckMissionCondition[edit | edit source]

Check mission status for one or more missions.

Usage

is check_mission <character>,<method>,<status>[,<mode>]

  • Parameters:
  • character: Either "player" or NPC slug (e.g. "npc_maple")
  • method: Mission slug(s), colon-separated (e.g. "mission1:mission2") or "all"
  • status: One of ["pending", "completed", "failed"]
  • mode (optional): "any" (default) or "all"

"any" returns True if at least one mission matches status "all" returns True only if all listed missions match status

Examples

  • "is check_mission player,mission1,completed"
  • "is check_mission player,mission1:mission2,completed,all"
  • "is check_mission player,all,pending"
  • "is check_mission npc_maple,missionA:missionB,failed,any"

CheckPartyParameterCondition[edit | edit source]

Check the given attribute of the party.

Usage

check_party_parameter <character>,<attribute>,<value>,<operator>,<times>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • attribute: Name of the monster attribute to check (e.g. level).
  • value: Value to check (related to the attribute) (e.g. 5 - level).
  • operator: Numeric comparison operator. Accepted values are "less_than",

"less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".

  • times: Value to check with operator (how many times in the party?).

eg. "check_party_parameter player,level,5,equals,1"

  • translated: "is there 1 monster in the party at level 5? True/False"

CheckTeleportFaintCondition[edit | edit source]

Check to see if check_teleport_faint exists and has a particular value.

If the teleport_faint does not exist it will return ``False``.

Usage

is check_teleport_faint character,[map_name],[x],[y]

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • map_name: The name of the map to validate against.
  • x: The x-coordinate to validate against.
  • y: The y-coordinate to validate against.

CheckWorldCondition[edit | edit source]

Evaluates specific world conditions against expected values.

This condition can check various parameters of the game world, such as overlay colors (layer) and speech bubbles (bubble).

Usage

check_world <parameter>,<value>

Parameters

  • parameter: The name of the world attribute to check.
  • value: The expected value to compare against.

Examples

  • "check_world layer"
  • Ensures the overlay color is empty.
  • "check_world bubble,npc_maple"
  • Checks if NPC "npc_maple" currently has a speech bubble.

CooldownDaysCondition[edit | edit source]

Checks if a specified number of days has passed since the event last ran.

Usage

is cooldown_days <timeframe>,<variable>

Parameters

  • timeframe: The number of days the event should be on cooldown.
  • variable: The game variable where the cooldown date is stored.

CurrentStateCondition[edit | edit source]

Check to see if one or multiple state/states has/have been started or not.

Usage

is current_state <state>

Parameters

  • state: Either "CombatState", "DialogState", etc
  • eg: "is current_state CombatState"
  • eg: "is current_state CombatState:DialogState"

EnvironmentIsCondition[edit | edit source]

Check that the currently active environment slug corresponds to the expected value.

Usage

is environment_is <slug>

Parameters

  • slug: The environment slug to check against the active environment.

Examples

  • is environment_is grass
  • is environment_is cave

FactionReputationCondition[edit | edit source]

Checks if an NPC's reputation meets a threshold.

Usage

is faction_reputation <character>,<faction_slug>,<operator>,<threshold>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • operator: Numeric comparison operator. Accepted values are "less_than",

"less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".

  • threshold: A string representation of an integer (e.g. "30", "-100").

Will be parsed and used as a numeric threshold in comparison.

HasBagCondition[edit | edit source]

Check to see how many items are in the character's bag.

Usage

is has_bag <character>,<operator>,<value>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • operator: Numeric comparison operator. Accepted values are "less_than",

"less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".

  • value: The value to compare the bag with.

HasItemCondition[edit | edit source]

Check to see if a character inventory contains something.

Usage

is has_item <character>,<item>[,operator][,quantity]

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • item: The item slug name (e.g. "item_cherry").
  • operator: Numeric comparison operator. Accepted values are "less_than",

"less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".

  • quantity: Quantity to compare with.

HasKennelCondition[edit | edit source]

Check to see how many monsters are in the character's kennel.

Usage

is has_kennel <character>,<kennel>,<operator>,<value>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • kennel: The kennel name.
  • operator: Numeric comparison operator. Accepted values are "less_than",

"less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".

  • value: The value to compare the party with.

HasMonsterCondition[edit | edit source]

Check to see if a character has a monster in its party.

Usage

is has_monster <character>,<monster>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • monster: Monster slug name (e.g. "rockitten").

HasPartyBreederCondition[edit | edit source]

Check to see if the character has a male and female monsters not basic (first evolution stage) in the party.

Usage

is has_party_breeder <character>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").

HasTechCondition[edit | edit source]

Check to see if the player has a technique in his party.

Usage

is has_tech <technique>

Parameters

  • technique: Technique slug name (e.g. "bullet").

HasTuxepediaCondition[edit | edit source]

Check if a monster is registered in Tuxepedia.

Usage

is has_tuxepedia <character>,<monster>,<label>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • monster: Monster slug name (e.g. "rockitten").
  • label: Either "seen" or "caught".

KennelCondition[edit | edit source]

Check if a kennel is hidden, visible, or exists.

Usage

is kennel <character>,<kennel>,<option>

Parameters

  • character: The character to check (either "player" or an NPC slug

name, e.g. "npc_maple").

  • kennel: The name of the kennel to check.
  • option: The expected visibility of the kennel ("hidden" or

"visible") or existence of it ("exist").

LocationInsideCondition[edit | edit source]

Check to see if the player is in a certain location type.

Usage

is location_inside

eg. "is location_inside"

LocationNameCondition[edit | edit source]

Check to see if the player is in a certain location name.

Usage

is location_name <slug>

Parameters

  • slug: Slug name. It's the name inside the maps.

eg. "<property name="slug" value="routeb"/>" slug = routeb

eg. "is location_name routeb"

  • eg. "is location_name routeb: routea"

LocationTypeCondition[edit | edit source]

Determines whether the player is currently in a specified location type.

Usage

is location_type <slug>

Parameters

  • slug: A string identifier for the location type.
  • Acceptable values: "all" (matches any location)
  • Example usages:
  • "is location_type clinic" -> Checks if the player is in a clinic.
  • "is location_type town:shop" -> Checks if the player is in either

a town or a shop.

The condition evaluates whether the player's current map type matches any of the specified location types.

MoneyIsCondition[edit | edit source]

Check to see if the character has a certain amount of money (pocket).

Usage

is money_is <character>,<operator>,<amount>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • operator: Numeric comparison operator. Accepted values are "less_than",

"less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".

  • amount: Amount of money or value stored in variable

eg. "is money_is player,equals,50"

  • eg. "is money_is player,equals,name_variable" (name_variable: 75)

MonsterFlairCondition[edit | edit source]

Check if any monster in the character's party has a flair matching the given category and name.

Usage

is monster_flair <character>,<category>,<name>

Parameters

  • character: Either "player" or an NPC slug name (e.g. "npc_maple").
  • category: Category of the flair to check.
  • name: Name of the flair to match.
  • Behavior:
  • Returns True if any monster in the character's party has a flair

in the given category with the specified name.

  • Returns False if no match is found or the character is invalid.

MusicPlayingCondition[edit | edit source]

Check to see if a particular piece of music is playing or not.

Usage

is music_playing <music_filename>

Parameters

  • music_filename: Name of the music.

OneOfCondition[edit | edit source]

Check to see if at least 1 among multiple values in a variable is True.

If the variable does not exist it will return ``False``.

Usage

is one_of <variable>[,values]

Parameters

  • variable: The variable to check.
  • values: Value to check for (multiple values separated by ":").
  • eg. "is one_of name_variable,option1: option2:option3"

PartyInfectedCondition[edit | edit source]

Check to see how many monster are infected in the character's party.

Usage

is party_infected <character>,<plague_slug>,<value>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • plague_slug: The slug of the plague to target.
  • value: all, some or none.

PartySizeCondition[edit | edit source]

Check the character's party size.

Usage

is party_size <character>,<operator>,<value>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • operator: Numeric comparison operator. Accepted values are "less_than",

"less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".

  • value: The value to compare the party size with.

PartyStatusCondition[edit | edit source]

Check how many monsters in a character's party have a specific status.

Usage

is party_status <character>,<operator>,<value>,<status_name>

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • operator: Numeric comparison operator. Accepted values are "less_than",

"less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".

  • value: Integer to compare against.
  • status_name: Slug of the status to check (e.g. "poison").

StepTrackerCondition[edit | edit source]

Evaluates whether a step tracker exists for a character and if a milestone has been triggered and not yet marked as shown.

Usage

is step_tracker character,tracker_id,milestone

Parameters

  • character: Either "player" or an NPC slug name (e.g., "npc_maple").
  • tracker_id: Unique name for identifying the step tracker.
  • milestone: Step milestone to check.

TilePropertyUpdatedCondition[edit | edit source]

Checks whether all relevant tiles in the world have been modified with a specific property.

Usage

is tile_property_updated <label>,<moverate>

Parameters

  • label: The property name to check (e.g., terrain type).
  • moverate: The expected movement rate value.

TimeIsCondition[edit | edit source]

Evaluates a comparison against a real-time property provided by the session's TimeHandler. This allows scripts to react to the current hour, season, weekday, stage of day, and other time-based values.

Usage

is time_is <property>,<operation>,<value>

Parameters

  • property:
  • The name of a time property to evaluate. Valid options include:

"date", "hour", "day_of_year", "year", "weekday", "leap_year", "daytime", "month", "day", "stage_of_day", and "season".

  • operation:

A comparison operator supported by the `compare` helper (e.g., "equals", "not_equals", "greater_than", "less_than").

  • value:

A literal value to compare against. Numeric values are compared numerically (e.g., hour > 17), while non-numeric values are compared as strings (e.g., season equals winter).

  • Example:

is time_is hour,greater_than,17 is time_is season,equals,winter is time_is stage_of_day,equals,dusk is time_is date,equals,4-30

TimestampCooldownCondition[edit | edit source]

Checks if a specified number of seconds has passed since the event last ran.

This allows for more precise cooldowns than the "once per day" check.

Usage

is timestamp_cooldown <timeframe>,<variable>

Parameters

  • timeframe: The number of seconds the event should be on cooldown.
  • variable: The game variable where the cooldown timestamp is stored.

ToUseTileCondition[edit | edit source]

Check if we are attempting to interact with a map condition tile.

Usage

is to_use_tile

TrackerCondition[edit | edit source]

Check to see if tracker exists.

Usage

is tracker character,map_name

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • map_name: The name of the map to validate against.

TrueCondition[edit | edit source]

This condition always returns true.

Usage

is true

TuxepediaCondition[edit | edit source]

Check Tuxepedia's progress.

Usage

is tuxepedia <operator>,<percentage>[,total]

Parameters

  • operator: Numeric comparison operator. Accepted values are "less_than",

"less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".

  • percentage: Number between 0.1 and 1.0
  • total: Total, by default the tot number of tuxemon.

VariableHighestCondition[edit | edit source]

Check if a specific variable is the highest among the others.

Usage

is variable_highest <key_to_check>,<keys_to_check>

Parameters

  • key_to_check: Key to check.
  • keys_to_check: List of the keys among to check separated by ':'
  • Example:
  • is variable_highest jimmy,arthur: jimmy:clara

VariableIsCondition[edit | edit source]

Check an operation over a variable.

Usage

is variable_is <value1>,<operation>,<value2>

Parameters

  • value1: Either a variable or a number.
  • operation: Numeric comparison operator. Accepted values are "less_than",

"less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".

  • value2: Either a variable or a number.

VariableLowestCondition[edit | edit source]

Check if a specific variable is the lowest among the others.

Usage

is variable_lowest <key_to_check>,<keys_to_check>

Parameters

  • key_to_check: Key to check.
  • keys_to_check: List of the keys among to check separated by ':'
  • Example:
  • is variable_lowest jimmy,arthur: jimmy:clara

VariableSetCondition[edit | edit source]

Checks if one or more player game variables exist and optionally match specified values.

If a variable does not exist, the condition returns `False`.

Usage

is variable_set <variable>[:value],[<variable>[:value] ...]

Parameters

  • variable: The variable to check.
  • value: Optional value to check against. If omitted, the condition

only checks for the variable's existence.

The condition returns `True` if all specified variables exist and match their given values (if provided). Otherwise, it returns `False`.