Difference between revisions of "Event Reference Condition"

From Tuxepedia
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
Here is a list of currently implemented conditions. New event conditions can be created by creating a new page under the '''tuxemon/event/conditions''':
== Conditions ==


== battle_outcome ==
=== AFKStateCondition ===
Check to see if a character has fought against another one and won, lost or draw.
Check if one or more AFK states (thresholds) have been met.


'''Usage'''
<code>
is afk_state <level>
</code>
'''Examples'''
* is afk_state example
* <code>is afk_state warn</code>: kick
=== BattleOutcomeCondition ===
Checks if a character has achieved a specific battle outcome
against an opponent.
'''Usage'''
<code>
is battle_outcome <fighter>,<outcome>,<opponent>
</code>
'''Parameters'''
'''Parameters'''
* <code>fighter</code>: Npc slug name (e.g. "npc_maple").
* <code>fighter_slug</code>: The slug of the battle participant (e.g., "player").
* <code>outcome</code>: One among "won", "lost" or "draw".
* <code>outcome</code>: The desired battle outcome ("won", "lost", or "draw").
* <code>opponent</code>: Npc slug name (e.g. "npc_maple").
* <code>opponent_slug</code>: The slug of the opponent (e.g., "npc_maple").
 
* <code>Example</code>:
`is battle_outcome player,won,npc_maple`
Checks if the 'player' has won against 'npc_maple'.


'''Examples'''
=== BattleOutcomeCountCondition ===
* <code>is battle_outcome player,won,npc_maple</code> (has player won against npc_maple in the last fight?)
Checks if a character has achieved a specific battle outcome a minimum number of times
against a specific opponent.
 
'''Usage'''
 
<code>
 
is battle_outcome_count <fighter>,<outcome>,<opponent>,<count>
 
</code>
'''Parameters'''
 
* <code>fighter_slug</code>:
The slug of the battle participant (e.g., "player").
 
* <code>outcome</code>:
The desired battle outcome ("won", "lost", or "draw").
 
* <code>opponent_slug</code>:
The slug of the opponent (e.g., "npc_maple").
 
* <code>count</code>:
Minimum number of times the outcome must have occurred.
 
* <code>Example</code>:
 
<code>
 
is battle_outcome_count player,won,npc_maple,2
 
Checks if the 'player' has won at least 2 times against 'npc_maple'.
</code>


== bill_exist ==
=== BillExistsCondition ===
Check to see if a bill exists.
Check to see if a bill exists.


'''Usage'''
<code>
is bill_exists <character>,<bill_slug>
</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>bill_slug</code>: The slug of the bill
* <code>bill_slug</code>: The slug of the bill


'''Examples'''
eg. "is bill_exists player,my_bill"
* <code>is bill_exist player,bill_slug</code>


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


'''Usage'''
<code>
is bill_is <character>,<operator>,<bill_slug>,<amount>
</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>bill_slug</code>: The slug of the bill
* <code>bill_slug</code>: The slug of the bill
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than",
* <code>amount</code>: Amount of money or value stored in variable.
"less_or_equal", "greater_than", "greater_or_equal", "equals"
and "not_equals".
* <code>amount</code>: Amount of money or value stored in variable


'''Examples'''
eg. "is bill_is player,bill_slug,equals,50"
* <code>is bill_is player,bill_slug,>=,500</code>
* <code>eg. "is bill_is player,bill_slug,equals,name_variable" (name_variable</code>: 75)
* <code>is bill_is player,bill_slug,equals,name_variable</code> (name_variable:75)


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


'''Usage'''
<code>
is button_combo <buttons>
</code>
'''Parameters'''
'''Parameters'''
* <code>buttons</code>: A sequence of button/intention keys (E.g. "up:down:interact").
* <code>buttons</code>: A sequence of button/intention keys (E.g. "up:down:interact").


'''Examples'''
=== ButtonCountCondition ===
* <code>is bill_is up:down:interact</code>
Check to see how many time a particular button was pressed.
 
'''Usage'''
<code>


== button_count ==
is button_count <button>,<operator>,<amount>
Check to see how many time a particular button was pressed.


</code>
'''Parameters'''
'''Parameters'''
* <code>button</code>: A button/intention key (E.g. "up").
* <code>button</code>: A button/intention key (E.g. "up").
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than",
"less_or_equal", "greater_than", "greater_or_equal", "equals"
and "not_equals".
* <code>amount</code>: The number of times the button was pressed.
* <code>amount</code>: The number of times the button was pressed.


'''Examples'''
=== ButtonHeldCondition ===
* <code>is button_count up,70</code>
Check to see if a particular key was held for a certain number of frames.
 
'''Usage'''
<code>


== button_held ==
is button_held <button>,<frames>
Check to see if a particular key was held for a certain number of frames.


</code>
'''Parameters'''
'''Parameters'''
* <code>button</code>: A button/intention key (E.g. "up").
* <code>button</code>: A button/intention key (E.g. "up").
* <code>frames</code>: The number of frames the button must be held.
* <code>frames</code>: The number of frames the button must be held.


'''Examples'''
=== ButtonPressedCondition ===
* <code>is button_held up,500</code>
Check to see if a particular key was pressed.
 
'''Usage'''
<code>


== button_pressed ==
is button_pressed <button>
Check to see if a particular key has been pressed. E.g. <code>K_RETURN</code>.


</code>
'''Parameters'''
'''Parameters'''
* <code>key</code>: A pygame key constant such as <code>K_RETURN</code>. For a list of all possible keys, refer to the [https://www.pygame.org/docs/ref/key.html Pygame Key Page] or at the constants in tuxemon/platform/const/intentions.py
* <code>button</code>: A button/intention key (E.g. "INTERACT").
 
=== CameraAtCondition ===
Check to see if the camera is at the position on the map.


'''Examples'''
'''Usage'''
* <code>is button_pressed K_RETURN</code>
<code>
* <code>is button_pressed INTERACT</code>
* <code>not button_pressed DOWN</code>


== camera_at ==
is camera_at <tile_pos_x>,<tile_pos_y>
Check to see if the camera is at the position on the map.


</code>
'''Parameters'''
'''Parameters'''
* <code>pos_x</code>: X position of the camera.
* <code>pos_x</code>: X position of the camera.
* <code>pos_y</code>: Y position of the camera.
* <code>pos_y</code>: Y position of the camera.


'''Examples'''
=== CelestialIsCondition ===
* <code>is camera_at 15,15</code>
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'''
<code>


== char_at_position ==
is celestial_is <body>,<operation>,<phase>
Check to see if the character is at the position on the map.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>body</code>:  
* <code>character</code>: X position to set the character to.
The name of the celestial body to evaluate. This must match one
* <code>tile_pos_x</code>: Y position to set the character to.
of the cycle names defined in `celestial_cycles.yaml`, such as
"moon" or "sun".
 
* <code>operation</code>:  
A comparison operator. Only string-based comparisons are valid
* <code>for celestial phases</code>:
* "equals" or "=="
* "not_equals" or "!="
 
* <code>phase</code>:  
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'''
'''Examples'''
* <code>is char_at_position player,6,9</code>
<code>
 
is celestial_is moon,equals,full
is celestial_is moon,not_equals,new
is celestial_is sun,equals,high
</code>


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


'''Usage'''
<code>
is char_at [character]
</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
 
=== CharAtPositionCondition ===
Check to see if the character is at the position on the map.


'''Examples'''
'''Usage'''
* <code>is char_at Maple</code>
<code>


== char_defeated ==
is char_at_position <character>,<tile_pos_x>,<tile_pos_y>
Check to see the character has at least one tuxemon, and all tuxemon in their party are defeated.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>tile_pos_x</code>: X position to set the character to.
* <code>tile_pos_y</code>: Y position to set the character to.
 
=== CharDefeatedCondition ===
Check to see the character has at least one tuxemon, and all tuxemon in their
party are defeated.
 
'''Usage'''
<code>
 
is char_defeated <character>


'''Examples'''
</code>
* <code>is char_defeated player</code>
'''Parameters'''
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple")


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


'''Usage'''
<code>
is char_exists <character>
</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
 
=== CharFacingCondition ===
Check to see where a character is facing.


'''Examples'''
'''Usage'''
* <code>not char_exists npc_maple</code>
<code>


== char_facing ==
is char_facing <character>,<direction>
Check to see where a character is facing.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>direction</code>: One of "up", "down", "left" or "right".
* <code>direction</code>: One of "up", "down", "left" or "right".


'''Examples'''
=== CharFacingCharCondition ===
* <code>is char_facing npc_maple,up</code>
Check to see the character is next to and facing a particular character.
* <code>not char_facing npc_maple,down</code>
 
'''Usage'''
<code>
 
is char_facing_char <character1>,<character2>
 
</code>
'''Parameters'''
* <code>character1</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>character2</code>: Either "player" or character slug name (e.g. "npc_maple").
 
=== CharFacingTileCondition ===
Check to see if a character is facing a tile position.
 
This is checked against all the tiles included in the condition object.
 
'''Usage'''
<code>
 
is char_facing_tile <character>[,value]
 
</code>
'''Parameters'''
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>value</code>: value (eg surfable) inside the tileset.
 
=== CharGenderCondition ===
Check whether a character's gender matches the expected value.
 
'''Usage'''
<code>


== char_facing_char ==
is char_gender <character> <gender>
Check to see the character is next to and facing a particular character.


</code>
'''Parameters'''
'''Parameters'''
* <code>character1</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or an NPC slug (e.g. "npc_maple")
* <code>character2</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>gender</code>: Expected gender string to compare against the character's gender
 
=== CharHealedCondition ===
Check whether all monsters in the character's party are healed.


'''Examples'''
'''Usage'''
* <code>is char_facing_char npc_maple,player</code>
<code>


== char_facing_tile ==
is char_healed <character>
Check to see if a character is facing a tile position.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").  
* <code>character</code>: Either "player" or NPC slug name (e.g. "npc_maple")
 
=== CharInCondition ===
Check to see if the character is on a specific set of tiles.


'''Examples'''
'''Usage'''
* <code>is char_facing_tile npc_maple</code>
<code>


== char_in ==
is char_in <character>,<value>
Check to see if the character is at the condition position on a specific set of tiles.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple")
* <code>value</code>: value (eg surfable) inside the tileset.
* <code>value</code>: value (eg surfable) inside the tileset.


'''Examples'''
=== CharInBoundaryCondition ===
* <code>is char_in npc_maple,surfable</code>
Checks if a character is within a specific named boundary.
 
'''Usage'''
<code>


== char_moved ==
is char_in_boundary <character_name>,<boundary_name>
Check to see the character has just moved into this tile. Using this condition will prevent a condition like "char_at" from constantly being true every single frame.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character_name</code>: "player" or an NPC slug.
* <code>boundary_name</code>: The name of the boundary to check (e.g., "safe_zone").
 
=== CharMovedCondition ===
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'''
<code>
 
is char_moved <character>


'''Examples'''
</code>
* <code>is char_moved player</code>
'''Parameters'''
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple")


== char_sprite ==
=== CharSpriteCondition ===
Check the character's sprite
Check the character's sprite


'''Usage'''
<code>
is char_sprite <character>,<sprite>
</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple")
* <code>sprite</code>: NPC's sprite (eg maniac, florist, etc.)
* <code>sprite</code>: NPC's sprite (eg maniac, florist, etc.)


'''Examples'''
=== CheckCharParameterCondition ===
* <code>is char_sprite player,adventurer</code>
Check the parameter's value of the character against a given value.
 
'''Usage'''
<code>


== check_char_parameter ==
check_char_parameter <character>,<parameter>,<value>
Check the parameter's value of the character against a given value.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (eg. "npc_maple").
* <code>parameter</code>: Name of the parameter to check (eg. "name", "steps", etc.).
* <code>parameter</code>: Name of the parameter to check (eg. "name", "steps", etc.).
* <code>value</code>: Given value to check.
* <code>value</code>: Given value to check.


'''Examples'''
eg. "player,name,alpha" -> is the player named alpha? true/false
* <code>is check_char_parameter player,name,alpha</code>
 
=== CheckEvolutionCondition ===
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'''
<code>


== check_evolution ==
is check_evolution <character>
Check to see the character 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 <code>evolution</code>.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").


'''Examples'''
eg. "is check_evolution player"
* <code>is check_evolution player</code>
 
=== CheckMaxTechCondition ===
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'''
<code>


== check_max_tech ==
is check_max_tech <character>[,nr]
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"`.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or NPC slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or NPC slug name (e.g. "npc_maple").
* <code>nr</code>: Optional integer specifying the minimum number of techniques. Defaults to the constant MAX_MOVES.
* <code>nr</code>: Optional integer specifying the minimum number of techniques.
Defaults to the config_monster.max_moves.


'''Examples'''
'''Examples'''
* <code>is check_max_tech player</code>
* "is check_max_tech player"
* <code>is check_max_tech npc_maple,2</code>
* "is check_max_tech npc_maple,2"


== check_mission ==
=== CheckMissionCondition ===
Check mission status for one or more missions.
Check mission status for one or more missions.


'''Parameters'''
'''Usage'''
<code>
 
is check_mission <character>,<method>,<status>[,<mode>]
 
</code>
* <code>Parameters</code>:
* <code>character</code>: Either "player" or NPC slug (e.g. "npc_maple")
* <code>character</code>: Either "player" or NPC slug (e.g. "npc_maple")
* <code>method</code>: Mission slug(s), colon-separated (e.g. "mission1:mission2") or "all"
* <code>method</code>: Mission slug(s), colon-separated (e.g. "mission1:mission2") or "all"
* <code>status</code>: One of ["pending", "completed", "failed"]
* <code>status</code>: One of ["pending", "completed", "failed"]
* <code>mode</code>: "any" (default) or "all": "any" returns True if at least one mission matches status OR "all" returns True only if all listed missions match status
* <code>mode (optional)</code>: "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'''
'''Examples'''
* <code>is check_mission player,mission1,completed</code>
* "is check_mission player,mission1,completed"
* <code>is check_mission player,mission1:mission2,completed,all</code>
* "is check_mission player,mission1:mission2,completed,all"
* <code>is check_mission player,all,pending</code>
* "is check_mission player,all,pending"
* <code>is check_mission npc_maple,missionA:missionB,failed,any</code>
* "is check_mission npc_maple,missionA:missionB,failed,any"
 
=== CheckPartyParameterCondition ===
Check the given attribute of the party.
 
'''Usage'''
<code>


== check_party_parameter ==
check_party_parameter <character>,<attribute>,<value>,<operator>,<times>
Check to see the player has failed or completed a mission. Check to see if a mission is still pending.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>attribute</code>: Name of the monster attribute to check (e.g. level).  
* <code>attribute</code>: Name of the monster attribute to check (e.g. level).
* <code>value</code>: Value to check (related to the attribute) (e.g. 5 - level).
* <code>value</code>: Value to check (related to the attribute) (e.g. 5 - level).
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than",
* <code>times</code>: Value to check with operator (how many times in the party?).  
"less_or_equal", "greater_than", "greater_or_equal", "equals"
and "not_equals".
* <code>times</code>: Value to check with operator (how many times in the party?).
 
eg. "check_party_parameter player,level,5,equals,1"
* <code>translated</code>: "is there 1 monster in the party at level 5? True/False"
 
=== CheckTeleportFaintCondition ===
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'''
<code>
 
is check_teleport_faint character,[map_name],[x],[y]
 
</code>
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>map_name</code>: The name of the map to validate against.
* <code>x</code>: The x-coordinate to validate against.
* <code>y</code>: The y-coordinate to validate against.
 
=== CheckWorldCondition ===
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'''
<code>
 
check_world <parameter>,<value>
 
</code>
'''Parameters'''
* <code>parameter</code>: The name of the world attribute to check.
* <code>value</code>: The expected value to compare against.


'''Examples'''
'''Examples'''
* <code>check_party_parameter player,level,5,equals,1</code> (is there 1 monster in the party at level 5? True/False)
* "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 ===
Checks if a specified number of days has passed since the event last ran.
 
'''Usage'''
<code>


== check_world ==
is cooldown_days <timeframe>,<variable>
Check some world's parameter against a given value.


</code>
'''Parameters'''
'''Parameters'''
* <code>parameter</code>: Name of the parameter to check (eg. "layer", etc.).
* <code>timeframe</code>: The number of days the event should be on cooldown.
* <code>value</code>: Given value to check.
* <code>variable</code>: The game variable where the cooldown date is stored.


'''Supported parameters'''
=== CurrentStateCondition ===
* '''layer''': color value which is used to overlay the world
Check to see if one or multiple state/states has/have
* '''bubble''': speech bubble of an npc
been started or not.


'''Examples'''
'''Usage'''
* <code>is check_world</code>
<code>
* <code>is check_world layer,255:255:255:0</code>


== current_state ==
is current_state <state>
Check to see if one or multiple state/states has/have been started or not.


</code>
'''Parameters'''
'''Parameters'''
* <code>state</code>: Either "CombatState", "DialogState", etc
* <code>state</code>: Either "CombatState", "DialogState", etc
* <code>eg</code>: "is current_state CombatState"
* <code>eg</code>: "is current_state CombatState:DialogState"
=== EnvironmentIsCondition ===
Check that the currently active environment slug corresponds to the expected value.
'''Usage'''
<code>
is environment_is <slug>
</code>
'''Parameters'''
* <code>slug</code>: The environment slug to check against the active environment.


'''Examples'''
'''Examples'''
* <code>is current_state DialogState</code>
* is environment_is grass
* <code>is current_state CombatState:DialogState</code>
* is environment_is cave


== faction_reputation ==
=== FactionReputationCondition ===
Checks if an NPC's reputation meets a threshold.
Checks if an NPC's reputation meets a threshold.


'''Usage'''
<code>
is faction_reputation <character>,<faction_slug>,<operator>,<threshold>
</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than",
* <code>threshold</code>: A string representation of an integer (e.g. "30", "-100"). Will be parsed and used as a numeric threshold in comparison.
"less_or_equal", "greater_than", "greater_or_equal", "equals"
and "not_equals".
* <code>threshold</code>: A string representation of an integer (e.g. "30", "-100").
Will be parsed and used as a numeric threshold in comparison.
 
=== HasBagCondition ===
Check to see how many items are in the character's bag.


'''Examples'''
'''Usage'''
* <code>is faction_reputation npc_maple,less_than,30</code>
<code>
* <code>is faction_reputation npc_maple,less_or_equal,60</code>


== has_bag ==
is has_bag <character>,<operator>,<value>
Check to see how many items are in the character's bag. It doesn't count invisible items.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>operator</code>: Numeric comparison operator. Accepted values are <code>less_than</code>, <code>less_or_equal</code>, <code>greater_than</code>, <code>greater_or_equal</code>, <code>equals</code> and <code>not_equals</code>.
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than",
"less_or_equal", "greater_than", "greater_or_equal", "equals"
and "not_equals".
* <code>value</code>: The value to compare the bag with.
* <code>value</code>: The value to compare the bag with.


'''Examples'''
=== HasItemCondition ===
* <code>is has_bag player,equals,5</code> (player's bag: 5 potions and 2 tuxeball (5 items), in this case is true because 5 = 5)
Check to see if a character inventory contains something.
* <code>is has_bag player,equals,9</code> (player's bag: 5 potions and 2 tuxeball (5 items), in this case is false because 9 != 5)
 
'''Usage'''
<code>


== has_item ==
is has_item <character>,<item>[,operator][,quantity]
Check to see if a NPC inventory contains something.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>item</code>: The item slug name (e.g. "item_cherry").
* <code>item</code>: The item slug name (e.g. "item_cherry").
* <code>operator</code>: Numeric comparison operator. Accepted values are <code>less_than</code>, <code>less_or_equal</code>, <code>greater_than</code>, <code>greater_or_equal</code>, <code>equals</code> and <code>not_equals</code>.
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than",
* <code>quantity</code>: Quantity to compare with. (optional)
"less_or_equal", "greater_than", "greater_or_equal", "equals"
and "not_equals".
* <code>quantity</code>: Quantity to compare with.
 
=== HasKennelCondition ===
Check to see how many monsters are in the character's kennel.


'''Examples'''
'''Usage'''
* <code>is has_item player,potion</code>
<code>
* <code>is has_item player,potion,greater_than,2</code>


== has_kennel ==
is has_kennel <character>,<kennel>,<operator>,<value>
Check to see how many monsters are in the character's box.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>operator</code>: Numeric comparison operator. Accepted values are <code>less_than</code>, <code>less_or_equal</code>, <code>greater_than</code>, <code>greater_or_equal</code>, <code>equals</code> and <code>not_equals</code>.
* <code>kennel</code>: The kennel name.
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than",
"less_or_equal", "greater_than", "greater_or_equal", "equals"
and "not_equals".
* <code>value</code>: The value to compare the party with.
* <code>value</code>: The value to compare the party with.
* <code>box</code>: The box name.


'''Examples'''
=== HasMonsterCondition ===
* <code>is has_kennel player,Kennel,less_than,1</code>
Check to see if a character has a monster in its party.
 
'''Usage'''
<code>


== has_monster ==
is has_monster <character>,<monster>
Check to see if a character has a monster in its party.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>monster_slug</code>: Monster slug name (e.g. "rockitten").
* <code>monster</code>: Monster slug name (e.g. "rockitten").
 
=== HasPartyBreederCondition ===
Check to see if the character has a male and female
monsters not basic (first evolution stage) in the party.


'''Examples'''
'''Usage'''
* <code>is has_monster player,rockitten</code>
<code>


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


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").


'''Examples'''
=== HasTechCondition ===
* <code>is has_party_breeder player</code>
Check to see if the player has a technique in his party.
 
'''Usage'''
<code>


== has_tech ==
is has_tech <technique>
Check to see if the player has a technique in his party (one of the monsters).


</code>
'''Parameters'''
'''Parameters'''
* <code>technique</code>: Technique slug name (e.g. "bullet").
* <code>technique</code>: Technique slug name (e.g. "bullet").


'''Examples'''
=== HasTuxepediaCondition ===
* <code>is has_tech bullet</code>
Check if a monster is registered in Tuxepedia.
 
'''Usage'''
<code>


== has_tuxepedia ==
is has_tuxepedia <character>,<monster>,<label>
Check if a monster is registered in Tuxepedia.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
Line 352: Line 689:
* <code>label</code>: Either "seen" or "caught".
* <code>label</code>: Either "seen" or "caught".


'''Examples'''
=== KennelCondition ===
* <code>is has_tuxepedia player,rockitten,caught</code>
Check if a kennel is hidden, visible, or exists.


== kennel ==
'''Usage'''
Check if a kennel is hidden or visible.
<code>


Note: This condition checks if the kennel is in the HIDDEN_LIST. If the kennel is in the list, it is considered hidden; otherwise, it is considered visible.
is kennel <character>,<kennel>,<option>


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: The character to check (either "player" or an NPC slug
name, e.g. "npc_maple").
* <code>kennel</code>: The name of the kennel to check.
* <code>kennel</code>: The name of the kennel to check.
* <code>option</code>: The expected visibility of the kennel ("hidden" or "visible") or existence of it ("exist").
* <code>option</code>: The expected visibility of the kennel ("hidden" or
"visible") or existence of it ("exist").
 
=== LocationInsideCondition ===
Check to see if the player is in a certain location type.


'''Examples'''
'''Usage'''
* <code>is kennel player,Kennel,hidden</code>
<code>
* <code>is kennel player,Kennel,visible</code>
* <code>is kennel player,Kennel,exist</code>


== location_inside ==
is location_inside
Check to see if the player is inside.


'''Examples'''
</code>
* <code>is location_inside</code>
eg. "is location_inside"


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


'''Usage'''
<code>
is location_name <slug>
</code>
'''Parameters'''
'''Parameters'''
* <code>technique</code>: Slug name. It's the name inside the maps. eg. <code><property name="slug" value="routeb"/></code>, so slug = routeb
* <code>slug</code>: Slug name. It's the name inside the maps.
eg. "<property name="slug" value="routeb"/>"
slug = routeb


'''Examples'''
eg. "is location_name routeb"
* <code>is location_name routeb</code>
* <code>eg. "is location_name routeb</code>: routea"
* <code>is location_name routea:routeb</code>


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


'''Usage'''
<code>
is location_type <slug>
</code>
'''Parameters'''
'''Parameters'''
* <code>slug</code>: A string identifier for the location type. Acceptable values: "all" (matches any location)
* <code>slug</code>: A string identifier for the location type.
* <code>Acceptable values</code>: "all" (matches any location)
 
* <code>Example usages</code>:
* "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 ===
Check to see if the character has a certain amount of money (pocket).


'''Examples'''
'''Usage'''
* <code>is location_type town</code>
<code>
* <code>is location_type town:shop:clinic</code>


== money_is ==
is money_is <character>,<operator>,<amount>
Check to see if the player has a certain amount of money (pocket).


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than",
* <code>amount</code>: Amount of money or value stored in variable.
"less_or_equal", "greater_than", "greater_or_equal", "equals"
and "not_equals".
* <code>amount</code>: Amount of money or value stored in variable
 
eg. "is money_is player,equals,50"
* <code>eg. "is money_is player,equals,name_variable" (name_variable</code>: 75)
 
=== MonsterFlairCondition ===
Check if any monster in the character's party has a flair matching the
given category and name.


'''Examples'''
'''Usage'''
* <code>is money_is player,>=,500</code>
<code>
* <code>is money_is player,equals,name_variable</code> (name_variable:75)


== monster_flair ==
is monster_flair <character>,<category>,<name>
Check to see if the given monster flair matches the expected value.


</code>
'''Parameters'''
'''Parameters'''
* <code>slot</code>: Position of the monster in the player monster list.
* <code>character</code>: Either "player" or an NPC slug name (e.g. "npc_maple").
* <code>property</code>: Category of the flair.
* <code>category</code>: Category of the flair to check.
* <code>name</code>: Name of the flair.
* <code>name</code>: Name of the flair to match.
 
* <code>Behavior</code>:
* 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 ===
Check to see if a particular piece of music is playing or not.


'''Examples'''
'''Usage'''
* <code>to be defined</code>
<code>


== music_playing ==
is music_playing <music_filename>
Check to see if the specified music file is currently playing.


</code>
'''Parameters'''
'''Parameters'''
* <code>music_file</code>: The music file to check.
* <code>music_filename</code>: Name of the music.


'''Examples'''
=== OneOfCondition ===
* <code>is music_playing 472452_8-Bit-Ambient.ogg</code>
Check to see if at least 1 among multiple values in a variable
is True.


== once ==
If the variable does not exist it will return ``False``.
Checks the date saved in the variables with today's date.


'''Parameters'''
'''Usage'''
* <code>timeframe</code>: nr of days the event stays "blocked" (eg. 1, 7, etc.)
<code>
* <code>variable</code>: Variable where the date is stored.
 
'''Examples'''
* <code>set_variable variable_name:today</code>
* <code>is once 1,variable_name</code> (it blocks the event for 1 day)
or
* <code>is once 7,variable_name</code> (it blocks the event for 7 days - 1 week)


== one_of ==
is one_of <variable>[,values]
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``.


</code>
'''Parameters'''
'''Parameters'''
* <code>variable</code>: The variable to check.
* <code>variable</code>: The variable to check.
* <code>values</code>: Value to check for (multiple values separated by ":").
* <code>values</code>: Value to check for (multiple values separated by ":").


'''Examples'''
* <code>eg. "is one_of name_variable,option1</code>: option2:option3"
* <code>is one_of stage_of_day,afternoon:dusk:morning</code>


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


'''Usage'''
<code>
is party_infected <character>,<plague_slug>,<value>
</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
Line 459: Line 837:
* <code>value</code>: all, some or none.
* <code>value</code>: all, some or none.


'''Examples'''
=== PartySizeCondition ===
* <code>is party_infected plague_slug,some</code>
Check the character's party size.
 
'''Usage'''
<code>
 
is party_size <character>,<operator>,<value>
 
</code>
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than",
"less_or_equal", "greater_than", "greater_or_equal", "equals"
and "not_equals".
* <code>value</code>: The value to compare the party size with.
 
=== PartyStatusCondition ===
Check how many monsters in a character's party have a specific status.
 
'''Usage'''
<code>


== party_size ==
is party_status <character>,<operator>,<value>,<status_name>
Check the character's party size. The <code>check</code> parameter can be: <code>equals</code>, <code>less_than</code>, or <code>greater_than</code>.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>operator</code>: Numeric comparison operator. Accepted values are <code>less_than</code>, <code>less_or_equal</code>, <code>greater_than</code>, <code>greater_or_equal</code>, <code>equals</code> and <code>not_equals</code>.
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than",
* <code>party_size</code>: The size of the party to check against.
"less_or_equal", "greater_than", "greater_or_equal", "equals"
and "not_equals".
* <code>value</code>: Integer to compare against.
* <code>status_name</code>: Slug of the status to check (e.g. "poison").
 
=== StepTrackerCondition ===
Evaluates whether a step tracker exists for a character
and if a milestone has been triggered and not yet marked as shown.


'''Examples'''
'''Usage'''
* <code>is party_size less_than,1</code>
<code>
* <code>not party_size equals,0</code>
* <code>is party_size greater_than,4</code>


== step_tracker ==
is step_tracker character,tracker_id,milestone
Evaluates whether a step tracker exists for a character or if a milestone has been reached.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or an NPC slug name (e.g., "npc_maple").
* <code>character</code>: Either "player" or an NPC slug name (e.g., "npc_maple").
Line 483: Line 885:
* <code>milestone</code>: Step milestone to check.
* <code>milestone</code>: Step milestone to check.


'''Examples'''
=== TilePropertyUpdatedCondition ===
* <code>is step_tracker npc_maple,tracker_id,50</code>
Checks whether all relevant tiles in the world have been
* <code>not step_tracker npc_maple,tracker_id,100</code>
modified with a specific property.
 
'''Usage'''
<code>


== teleport_faint ==
is tile_property_updated <label>,<moverate>
Check to see if teleport_faint exists and has a particular value. If the teleport_faint does not exist it will return ``False``.


</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>label</code>: The property name to check (e.g., terrain type).
* <code>map_name</code>: The name of the map to validate against.
* <code>moverate</code>: The expected movement rate value.
* <code>x</code>: The x-coordinate to validate against.
 
* <code>y</code>: The y-coordinate to validate against.
=== TimeIsCondition ===
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.


'''Examples'''
'''Usage'''
* <code>is teleport_faint player,map_name.tmx,1,10</code>
<code>


== tile_property_updated ==
is time_is <property>,<operation>,<value>
Checks whether all relevant tiles in the world have been modified with a specific property.


</code>
'''Parameters'''
'''Parameters'''
* <code>label</code>: The property name to check (e.g., terrain type).
* <code>property</code>:  
* <code>moverate</code>: The expected movement rate value.
* <code>The name of a time property to evaluate. Valid options include</code>:
"date", "hour", "day_of_year", "year", "weekday", "leap_year",
"daytime", "month", "day", "stage_of_day", and "season".
 
* <code>operation</code>:
A comparison operator supported by the `compare` helper
(e.g., "equals", "not_equals", "greater_than", "less_than").
 
* <code>value</code>:  
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).
 
* <code>Example</code>:
<code>
 
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
</code>
 
=== TimestampCooldownCondition ===
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.


'''Examples'''
'''Usage'''
* <code>is tile_property_updated surfable,1.0</code>
<code>


== to_use_tile ==
is timestamp_cooldown <timeframe>,<variable>
Check if we are attempting interact with a map condition tile.


</code>
'''Parameters'''
'''Parameters'''
* <code>None</code>
* <code>timeframe</code>: The number of seconds the event should be on cooldown.
* <code>variable</code>: The game variable where the cooldown timestamp is stored.
 
=== ToUseTileCondition ===
Check if we are attempting to interact with a map condition tile.
 
'''Usage'''
<code>


'''Examples'''
is to_use_tile
* <code>is to_use_tile</code>
</code>


== tracker ==
=== TrackerCondition ===
Check to see if tracker exists.
Check to see if tracker exists.


'''Usage'''
<code>
is tracker character,map_name
</code>
'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>map_name</code>: The name of the map to validate against.
* <code>map_name</code>: The name of the map to validate against.


'''Examples'''
=== TrueCondition ===
* <code>is tracker player,paper_town</code>
This condition always returns true.
 
'''Usage'''
<code>


== true ==
is true
The <code>true</code> condition will always evaluate to *True* (unless the "not" operator is used)
</code>


'''Parameters'''
=== TuxepediaCondition ===
* <code>None</code>
Check Tuxepedia's progress.


'''Examples'''
'''Usage'''
* <code>is true</code>
<code>
* <code>not true</code>


== tuxepedia ==
is tuxepedia <operator>,<percentage>[,total]
Check Tuxepedia's progress.


</code>
'''Parameters'''
'''Parameters'''
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than",
"less_or_equal", "greater_than", "greater_or_equal", "equals"
and "not_equals".
* <code>percentage</code>: Number between 0.1 and 1.0
* <code>percentage</code>: Number between 0.1 and 1.0
* <code>total</code>: Total, by default the total number of tuxemon.
* <code>total</code>: Total, by default the tot number of tuxemon.
 
=== VariableHighestCondition ===
Check if a specific variable is the highest among the others.


'''Examples'''
'''Usage'''
* <code>is tuxepedia less_than,0.2</code>
<code>
* <code>is tuxepedia less_than,0.2,10</code>


== variable_highest ==
is variable_highest <key_to_check>,<keys_to_check>
Check if a specific variable is the highest among the others.


</code>
'''Parameters'''
'''Parameters'''
* <code>key_to_check</code>: Key to check.
* <code>key_to_check</code>: Key to check.
* <code>keys_to_check</code>: List of the keys among to check separated by ':'
* <code>keys_to_check</code>: List of the keys among to check separated by ':'


'''Examples'''
* <code>Example</code>:
* <code>is variable_highest jimmy,arthur:jimmy:clara</code>
* <code>is variable_highest jimmy,arthur</code>: jimmy:clara


== variable_is ==
=== VariableIsCondition ===
Check an operation over a variable.
Check an operation over a variable.


'''Usage'''
<code>
is variable_is <value1>,<operation>,<value2>
</code>
'''Parameters'''
'''Parameters'''
* <code>value1</code>: Either a variable or a number.
* <code>value1</code>: Either a variable or a number.
* <code>operation</code>: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
* <code>operation</code>: Numeric comparison operator. Accepted values are "less_than",
"less_or_equal", "greater_than", "greater_or_equal", "equals"
and "not_equals".
* <code>value2</code>: Either a variable or a number.
* <code>value2</code>: Either a variable or a number.


'''Examples'''
=== VariableLowestCondition ===
* <code>is variable_is [value1],operator,[value2]</code>
Check if a specific variable is the lowest among the others.
 
'''Usage'''
<code>


== variable_lowest ==
is variable_lowest <key_to_check>,<keys_to_check>
Check if a specific variable is the lowest among the others.


</code>
'''Parameters'''
'''Parameters'''
* <code>key_to_check</code>: Key to check.
* <code>key_to_check</code>: Key to check.
* <code>keys_to_check</code>: List of the keys among to check separated by ':'
* <code>keys_to_check</code>: List of the keys among to check separated by ':'


'''Examples'''
* <code>Example</code>:
* <code>is variable_lowest jimmy,arthur:jimmy:clara</code>
* <code>is variable_lowest jimmy,arthur</code>: jimmy:clara
 
=== VariableSetCondition ===
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'''
<code>


== variable_set ==
is variable_set <variable>[:value],[<variable>[:value] ...]
Checks if one or more player game variables exist and optionally match specified values. If a variable does not exist, the condition returns `False`.


</code>
'''Parameters'''
'''Parameters'''
* <code>variable_name:value</code>:
* <code>variable</code>: The variable to check.
* <code>variable_name</code>: The variable to check.
* <code>value</code>: Optional value to check against. If omitted, the condition
* <code>value</code>: Optional value to check against. If omitted, the condition only checks for the variable's existence.
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`.


'''Examples'''
The condition returns `True` if all specified variables exist and
* <code>is variable_set battle_won:yes</code>
match their given values (if provided). Otherwise, it returns `False`.
* <code>not variable_set current_badges:4</code>
* <code>is variable_set <variable>[:value],[<variable>[:value] ...]</code>

Latest revision as of 15:48, 2 February 2026

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`.