Difference between revisions of "Event Reference Action"

From Tuxepedia
Jump to navigation Jump to search
 
(57 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Here is a list of currently supported actions. New event actions can be created by creating a new page under the '''tuxemon/event/actions''':
Here is a list of currently supported actions. New event actions can be created by creating a new page under the '''tuxemon/event/actions''':
== access_pc ==
Change to PCState. This action transitions to the PCState, typically used for viewing player character details or an NPC as if it were a PC.
'''Parameters'''
* <code>character_slug</code>: The name or identifier of the obstacle.
'''Examples'''
* <code>access_pc player</code>


== add_collision ==  
== add_collision ==  
Adds a collision defined by a specific label. With numbers, it blocks a specific tile.
Handles the addition of a collision zone associated with a specific label. Optionally, with coordinates provided, it can block a specific tile within the map.


'''Parameters'''
'''Parameters'''
* <code>label</code>: Name of the obstacle.
* <code>label</code>: The name or identifier of the obstacle.
* <code>coord</code>: Coordinates map (single coordinate). (optional)
* <code>x</code>: (Optional) X-coordinate of the specific tile to block.
* <code>y</code>: (Optional) Y-coordinate of the specific tile to block.


'''Examples'''
'''Examples'''
* <code>add_collision obstacle,6,8</code>
* <code>add_collision obstacle,6,8</code>
* <code>add_collision wall</code> (in this case must exist a collision zone in the .tmx file)
* <code>add_collision wall</code> (in this case must exist a collision zone in the .tmx file)
== add_combo ==
Registers a new combo sequence with the ComboDetector.
'''Parameters'''
* <code>combo_name</code>: Required. A name or ID for the combo.
* <code>buttons</code>: Required. A colon-separated list of button names (e.g. LEFT:RIGHT:A).
* <code>max_delay_ms</code>: Optional. Max delay between presses (default: 1000).
* <code>event_name</code>: The name of the event whose actions will be executed (optional)
'''Examples'''
* <code>add_combo name_combo,LEFT:RIGHT:A</code>


== add_contacts ==  
== add_contacts ==  
Line 63: Line 85:
* <code>add_monster fruitera,10</code>
* <code>add_monster fruitera,10</code>
* <code>add_monster fruitera,10,npc_maple,10,27</code>
* <code>add_monster fruitera,10,npc_maple,10,27</code>
== add_step_tracker ==
Adds a step tracker to a specific character.
'''Parameters'''
* <code>character</code>: Either "player" or an NPC slug name (e.g., "npc_maple").
* <code>tracker_id</code>: Unique name for identifying the step tracker.
* <code>countdown</code>: Number of steps before the tracker reaches zero.
* <code>milestones</code>: (optional) Step milestones, separated by : (e.g., "500:250:100").
'''Examples'''
* <code>add_step_tracker npc_maple,tracker_id,500</code>
* <code>add_step_tracker npc_maple,tracker_id,500,500:250:100</code>


== add_tech ==
== add_tech ==
Line 68: Line 103:


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>variable</code>: Name of the variable where the monster UUID is stored.
* <code>technique</code>: Slug of the technique (e.g. "bullet").
* <code>technique</code>: Slug of the technique to add (e.g. "bullet").
* <code>power</code>: Power between 0.0 and 3.0. (optional)
* <code>power</code>: Optional float (0.0-3.0). Overrides default power.
* <code>potency</code>: Potency between 0.0 and 1.0. (optional)
* <code>potency</code>: Optional float (0.0-1.0). Overrides default potency.
* <code>accuracy</code>: Accuracy between 0.0 and 1.0. (optional)
* <code>accuracy</code>: Optional float (0.0-1.0). Overrides default accuracy.


'''Examples'''
'''Examples'''
Line 89: Line 124:
* <code>add_tracker player,paper_town</code>
* <code>add_tracker player,paper_town</code>


== breeding ==
== adjust_bill_penalty ==
Select a monster in the player party filtered by gender and store its id in a variables (breeding_father or breeding_mother)
Applies a penalty to a bill for a character — either interest or late fee.


'''Parameters'''
'''Parameters'''
* <code>gender</code>: Gender (male or female).
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>bill_slug</code>: Slug of the bill to modify.
* <code>method</code>: Either "interest" or "fee".


'''Examples'''
'''Examples'''
* <code>breeding male</code>
* <code>adjust_bill_penalty player,electric_bill,interest</code>
* <code>breeding female</code>
* <code>adjust_bill_penalty npc_maple,rent,fee</code>


== call_event ==
== boundary_move ==
Executes the actions from another event, ignoring its conditions. This can be especially useful for scenarios where you might need multiple sets of conditions that could be true, such as executing an action when the player is at a certain position OR has a certain item in their inventory.
Moves the current active boundary by the given delta values.


'''Parameters'''
'''Parameters'''
* <code>event_name</code>: The name of the event whose actions should be executed.
* <code>boundary_name</code>: Required. The name to assign to the boundary
* <code>dx</code>: The change in the x-coordinate.
* <code>dy</code>: The change in the y-coordinate.


'''Examples'''
'''Examples'''
* <code>call_event name_event</code>
* <code>boundary_move safe_zone,5,5</code>


== camera_follow ==
== boundary_resize ==
Centers the camera on a specified NPC or the original entity.
Resizes the current active boundary.


'''Parameters'''
'''Parameters'''
* <code>npc_slug</code>: The slug of the character to center the camera on. Defaults to None, which centers the camera on the original entity.
* <code>boundary_name</code>: Required. The name to assign to the boundary (e.g., "safe_zone", "event").
* <code>values</code>: A colon-separated string of integers: - For rectangle: dx:dy - For circle: delta


'''Examples'''
'''Examples'''
* <code>camera_follow npc_slug</code>
* <code>boundary_resize safe_zone,5:5</code>
* <code>camera_follow</code>


== camera_mode ==
== boundary_set ==
Change camera mode: freeroaming or fixed.
Replaces the current boundary with a new one, or resets to default if no parameters are given.


'''Parameters'''
'''Parameters'''
* <code>mode</code>: the camera mode, either "fixed" or "free_roaming".
* <code>boundary_name</code>: Required. The name to assign to the boundary (e.g., "safe_zone", "event").
* <code>shape</code>: Optional. Either "rectangle" or "circle".
* <code>values</code>: Optional. A colon-separated string of integers: for "rectangle": <code>x0:x1:y0:y1</code> and for "circle": <code>cx:cy:radius</code>


'''Examples'''
'''Examples'''
* <code>camera_mode freeroaming</code>
* <code>boundary_set safe_zone,circle,5:5:5</code>
* <code>boundary_set safe_zone</code>


== camera_move ==
== breeding ==
Smoothly move the camera to a specific coordinate or reset it to its original position.
Select a monster in the player party filtered by gender and store its id in a variables (breeding_father or breeding_mother)


'''Parameters'''
'''Parameters'''
* <code>time</code>: the duration (in seconds) required for the camera to transition to the target position.
* <code>gender</code>: Gender (male or female).
* <code>x,y</code>: the coordinates where the camera needs to be centered. (optional)


'''Examples'''
'''Examples'''
* <code>camera_move 2.0,32,6</code>
* <code>breeding male</code>
* <code>breeding female</code>


== camera_position ==
== call_event ==
Move the camera on a coordinate.
Executes the actions from another event, ignoring its conditions. This can be especially useful for scenarios where you might need multiple sets of conditions that could be true, such as executing an action when the player is at a certain position OR has a certain item in their inventory.


'''Parameters'''
'''Parameters'''
* <code>x,y</code>: the coordinates where the camera needs to be centered. (optional)
* <code>event_name</code>: The name of the event whose actions should be executed.


'''Examples'''
'''Examples'''
* <code>camera_position 6,9</code>
* <code>call_event name_event</code>
* <code>camera_position</code>


== camera_shake ==
== camera_follow ==
Shake the camera with a precise intensity and duration.
Centers the camera on a specified NPC or the original entity.


'''Parameters'''
'''Parameters'''
* <code>intensity</code>: the magnitude of the shake effect. A higher value results in a more pronounced shake, while a lower value produces a subtler effect (min 0.0, max 3.0).
* <code>npc_slug</code>: The slug of the character to center the camera on. Defaults to None, which centers the camera on the original entity.
* <code>duration</code>: the length of time (in seconds) that the shake effect should last. The method calculates the number of frames to shake based on an assumed frame rate.


'''Examples'''
'''Examples'''
* <code>camera_shake 3.0,2.0</code>
* <code>camera_follow npc_slug</code>
* <code>camera_follow</code>


== change_bg ==
== camera_mode ==
Change the background.
Change camera mode: freeroaming or fixed.


'''Parameters'''
'''Parameters'''
* <code>background</code>:
* <code>mode</code>: the camera mode, either "fixed" or "free_roaming".
* it can be the name of the file (see below note)
* it can be a RGB color separated by ":" (eg 255:0:0)
* <code>image</code>: monster_slug or template_slug or path
* if path, then "gfx/ui/background/"
* if template (eg. ceo) in "gfx/sprites/player"
* note: the background or image (if not monster or template) must be inside the folder (gfx/ui/background/)
* background size: 240x160
 


'''Examples'''
'''Examples'''
* <code>change_bg gradient_blue,rockitten</code>
* <code>camera_mode freeroaming</code>
* <code>change_bg gradient_blue,ceo</code>
* <code>change_bg gradient_blue</code>
* <code>change_bg</code> (stop)


== change_taste ==
== camera_move ==
hanges tastes monster.
Smoothly move the camera to a specific coordinate or reset it to its original position.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>time</code>: the duration (in seconds) required for the camera to transition to the target position.
* <code>taste</code>: Warm or cold.
* <code>x,y</code>: the coordinates where the camera needs to be centered. (optional)


'''Examples'''
'''Examples'''
* <code>change_taste name_variable,warm</code>
* <code>camera_move 2.0,32,6</code>


== change_state ==
== camera_position ==
Change to the specified state.
Move the camera on a coordinate.


'''Parameters'''
'''Parameters'''
* <code>state_name</code>: The state name to switch to (e.g. PCState).
* <code>x,y</code>: the coordinates where the camera needs to be centered. (optional)
* <code>optional</code>: Variable related to specific states (e.g. variable with monster_id for '''MonsterInfo''', monster slug for '''JournalInfoState''' and character slug for '''CharacterState'''). (Optional)


'''Examples'''
'''Examples'''
* <code>change_state PCState</code>
* <code>camera_position 6,9</code>
* <code>change_state JournalInfoState,rockitten</code>
* <code>camera_position</code>


== char_face ==
== camera_shake ==
Make the character face a certain direction.
Shake the camera with a precise intensity and duration.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>intensity</code>: the magnitude of the shake effect. A higher value results in a more pronounced shake, while a lower value produces a subtler effect (min 0.0, max 3.0).
* <code>direction</code>: Direction to make the character's face. Can be set to: <code>left</code>, <code>right</code>, <code>up</code>, or <code>down</code>.
* <code>duration</code>: the length of time (in seconds) that the shake effect should last. The method calculates the number of frames to shake based on an assumed frame rate.


'''Examples'''
'''Examples'''
* <code>char_face player,down</code>
* <code>camera_shake 3.0,2.0</code>
* <code>char_face npc_maple,right</code>


== char_look ==
== change_bg ==
Make a character look around.
Change the background.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>background</code>:
* <code>frequency</code>: Frequency of movements. 0 to stop looking. If set to a different value it will be clipped to the range [0.5, 5]. If not passed the default value is 1.   
* it can be the name of the file (see below note)
* <code>directions</code>: the direction the npc is going to look, by default all. (optional)
* it can be a RGB color separated by ":" (eg 255:0:0)
* <code>image</code>: monster_slug or template_slug or path
* if path, then "gfx/ui/background/"
* if template (eg. ceo) in "gfx/sprites/player"
* note: the background or image (if not monster or template) must be inside the folder (gfx/ui/background/)
* background size: 240x160
 


'''Examples'''
'''Examples'''
* <code>char_look character</code>
* <code>change_bg gradient_blue,rockitten</code>
* <code>char_look character,,right:left</code>
* <code>change_bg gradient_blue,ceo</code>
 
* <code>change_bg gradient_blue</code>
== char_move ==
* <code>change_bg</code> (stop)
Relative tile movement for characters. It interprets movement instructions, updates character positions accordingly, and blocks execution until the destination is reached.
 
== change_faction_membership ==
Makes an NPC (or player) join or leave a specific faction.  


'''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>move</code>: A sequence of movement instructions in the format: "<direction> [amount_of_tiles]" where:
* <code>faction_slug</code>: The slug identifier of the faction whose membership will be changed.
- direction: One of "up", "down", "left", "right".
* <code>status</code>: Must be either "join" or "leave", indicating the membership action.
- amount_of_tiles (optional): Number of tiles to move (default is 1).
- Multiple moves can be provided, e.g., "up 10, down 5, left 5".


'''Examples'''
'''Examples'''
* <code>char_move spyder_homemakerpapertown, down 1, right 1, up 1, left 1</code>
* <code>change_faction_membership npc_maple,faction_slug,join</code>
* <code>change_faction_membership npc_maple,faction_slug,leave</code>


== char_patrol ==
== change_taste ==
Enables a character to patrol a predefined route in a continuous loop.
Changes the specified taste (warm or cold) of a monster.  


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>variable</code>: Name of the game variable containing the monster's UUID.
* <code>move</code>: A sequence of movement instructions in the format: "<direction> [amount_of_tiles]" where:
* <code>type_taste</code>: Either "warm" or "cold" to indicate which taste to change.
- direction: One of "up", "down", "left", "right".
* <code>new_taste</code>: Slug of the new taste to assign, or "random" to select a new one at random (excluding "tasteless" and the current taste).
- amount_of_tiles (optional): Number of tiles to move (default is 1).
- Multiple moves can be provided, e.g., "up 10, down 5, left 5".


'''Examples'''
'''Examples'''
* <code>char_patrol spyder_homemakerpapertown,up 4,down 4</code>
* <code>change_taste name_variable,type_taste,new_taste</code>


== char_plague ==
== change_state ==
Set the entire party as infected or inoculated or healthy.
Change to the specified state (generic). This action handles state transitions that do not require specific additional parameters beyond the state name itself.


'''Parameters'''
'''Parameters'''
* <code>plague_slug</code>: The slug of the plague to target.
* <code>state_name</code>: The state name to switch to.
* <code>condition</code>: Infected, inoculated, or None (removes the plague from the character, indicating a healthy state). (optional)
 
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple"). (optional)
     
'''Examples'''
'''Examples'''
* <code>char_plague plague_slug,infected,npc_maple</code>
* <code>change_state state_name</code>


== char_position ==
== char_face ==
Set the position of a character.
Make the character face a certain direction.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>tile_pos_x</code>: X position to set the character to.
* <code>direction</code>: Direction to make the character's face. Can be set to: <code>left</code>, <code>right</code>, <code>up</code>, <code>down</code>, <code>player</code> or a character slug.
* <code>tile_pos_y</code>: Y position to set the character to.


'''Examples'''
'''Examples'''
* <code>char_position npc_maple,6,9</code>
* <code>char_face player,down</code>
* <code>char_face npc_maple,right</code>
* <code>char_face npc_maple,player</code> (Maple faces the player)


== char_run ==
== char_look ==
Set the character movement speed to the global run speed.
Make a character look around.


'''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>frequency</code>: Frequency of movements. 0 to stop looking. If set to a different value it will be clipped to the range [0.5, 5]. If not passed the default value is 1.   
* <code>directions</code>: the direction the npc is going to look, by default all. (optional)


'''Examples'''
'''Examples'''
* <code>char_run npc_mom</code>
* <code>char_look character</code> 
* <code>char_look character,,right:left</code>


== char_speed ==
== char_move ==
Set the character movement speed to a custom value.
Relative tile movement for characters. It interprets movement instructions, updates character positions accordingly, and blocks execution until the destination is reached.


'''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>speed</code>: Speed amount.
* <code>move</code>: A sequence of movement instructions in the format: "<direction> [amount_of_tiles]" where:
* direction: One of "up", "down", "left", "right".
* amount_of_tiles (optional): Number of tiles to move (default is 1). Multiple moves can be provided, e.g., "up 10, down 5, left 5".


'''Examples'''
'''Examples'''
* <code>char_speed npc_mom,0.2</code>
* <code>char_move spyder_homemakerpapertown,down 1,right 1,up 1,left 1</code>


== char_stop ==
== char_patrol ==
Make the character stop moving.
Enables a character to patrol a predefined route in a continuous loop.


'''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>move</code>: A sequence of movement instructions in the format: "<direction> [amount_of_tiles]" where:
* direction: One of "up", "down", "left", "right".
* amount_of_tiles (optional): Number of tiles to move (default is 1). Multiple moves can be provided, e.g., "up 10, down 5, left 5".


'''Examples'''
'''Examples'''
* <code>char_stop npc_mom</code>
* <code>char_patrol spyder_homemakerpapertown,up 4,down 4</code>


== char_walk ==
== char_plague ==
Set the character movement speed to the global walk speed.
Set the entire party as infected or inoculated or healthy.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>plague_slug</code>: The slug of the plague to target.
 
* <code>condition</code>: Infected, inoculated, or None (removes the plague from the character, indicating a healthy state). (optional)
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple"). (optional)
* <code>enforced_check</code>: Optional string flag to enforce eligibility rules. Accepts "true", "1", or "yes" (case-insensitive). Default is False (eligibility is bypassed).       
           
'''Examples'''
'''Examples'''
* <code>char_walk npc_mom</code>
* <code>char_plague plague_slug,infected,npc_maple</code>


== char_wander ==
== char_position ==
Make a character wander around the map.
Set the position of a character.


'''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>frequency</code>: Frequency of movements. 0 to stop wandering. If set to a different value it will be clipped to the range [0.5, 5]. If not passed the default value is 1.
* <code>tile_pos_x</code>: X position to set the character to.
* <code>t_bound</code>: Coordinates top_bound vertex (e.g. 5,7)
* <code>tile_pos_y</code>: Y position to set the character to.
* <code>b_bound</code>: Coordinates bottom_bound vertex (e.g. 7,9)


'''Examples'''
'''Examples'''
* <code>char_wander npc_maple</code>
* <code>char_position npc_maple,6,9</code>
* <code>char_wander npc_maple,,5,7,7,9</code>


== choice_item ==
== char_run ==
Ask the player to make a choice among items.
Set the character movement speed to the global run speed.


'''Parameters'''
'''Parameters'''
* <code>choices</code>: List of possible choices (item slugs eg: potion:tea), separated by a colon ":".
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>variable</code>: Variable to store the result of the choice.


'''Examples'''
'''Examples'''
* <code>choice_monster potion:tea,name_variable</code>
* <code>char_run npc_mom</code>


== choice_monster ==
== char_speed ==
Ask the player to make a choice among monsters.
Set the character movement speed to a custom value.


'''Parameters'''
'''Parameters'''
* <code>choices</code>: List of possible choices (monster slugs eg: rockitten:apeoro), separated by a colon ":".
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>variable</code>: Variable to store the result of the choice.
* <code>speed</code>: Speed amount.


'''Examples'''
'''Examples'''
* <code>choice_monster apeoro:rockitten,name_variable</code>
* <code>char_speed npc_mom,0.2</code>


== choice_npc ==
== char_stop ==
Ask the player to make a choice among NPCs.
Make the character stop moving.


'''Parameters'''
'''Parameters'''
* <code>choices</code>: List of possible choices (npc slugs eg: maple:billie), separated by a colon ":".
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>variable</code>: Variable to store the result of the choice.


'''Examples'''
'''Examples'''
* <code>choice_monster billie:maple,name_variable</code>
* <code>char_stop npc_mom</code>


== clear_kennel ==
== char_talk ==
Clear a kennel. It advisable to save the game and check twice. Remember the main kennel is "Kennel" and without destination (transfer) the monster will be deleted as well as the kennel.
Displays dialogue for a character based on context and location. This action retrieves dialogue from the character's dialogue profile, optionally using a location-specific override. The dialogue field determines which type of line to display (e.g. greeting, pre_battle, farewell).


'''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>kennel</code>: The kennel to clear.
* <code>field</code>: The dialogue type to display. Must be one of: greeting, idle, farewell, pre_battle, post_battle_win, post_battle_lose and post_battle_draw
* <code>transfer</code>: The kennel to transfer the monsters. (optional)
* <code>location</code>: Optional map identifier (e.g. "map.tmx") used to override default dialogue.


'''Examples'''
'''Examples'''
* <code>clear_kennel npc_maple,name_kennel,new_kennel</code>
* <code>char_talk npc_mom,farewell</code>


== clear_tuxepedia ==
== char_walk ==
Clear the key and value in the Tuxepedia dictionary.
Set the character movement speed to the global walk speed.


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


'''Examples'''
'''Examples'''
* <code>clear_tuxepedia rockitten</code>
* <code>char_walk npc_mom</code>


== clear_variable ==
== char_wander ==
Clear the value of a variable from the game.
Make a character wander around the map.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: The variable to clear.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>frequency</code>: Frequency of movements. 0 to stop wandering. If set to a different value it will be clipped to the range [0.5, 5]. If not passed the default value is 1.
* <code>t_bound</code>: Coordinates top_bound vertex (e.g. 5,7)
* <code>b_bound</code>: Coordinates bottom_bound vertex (e.g. 7,9)


'''Examples'''
'''Examples'''
* <code>clear_variable name_variable</code>
* <code>char_wander npc_maple</code>
* <code>char_wander npc_maple,,5,7,7,9</code>


== copy_variable ==
== choice_item ==
Copy the value of var2 into var1 (e.g. var1 = var 2).
Ask the player to make a choice among items.


'''Parameters'''
'''Parameters'''
* <code>var1</code>: The variable to copy to.
* <code>choices</code>: List of possible choices (item slugs eg: potion:tea), separated by a colon ":".
* <code>var2</code>: The variable to copy from.
* <code>variable</code>: Variable to store the result of the choice.


'''Examples'''
'''Examples'''
* <code>copy_variable new_variable,old_variable</code>
* <code>choice_monster potion:tea,name_variable</code>


== create_kennel ==
== choice_monster ==
Creates a new kennel. It's advisable to create a msgid in the en_US PO file.
Ask the player to make a choice among monsters.
 
msgid "kennel_name"
msgstr "Kennel Name"


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>choices</code>: List of possible choices (monster slugs eg: rockitten:apeoro), separated by a colon ":".
* <code>kennel</code>: Name of the kennel.
* <code>variable</code>: Variable to store the result of the choice.


'''Examples'''
'''Examples'''
* <code>create_kennel npc_maple,new_kennel</code>
* <code>choice_monster apeoro:rockitten,name_variable</code>


== create_npc ==
== choice_npc ==
Creates an NPC and places them on the current map.
Ask the player to make a choice among NPCs.


'''Parameters'''
'''Parameters'''
* <code>name</code>: The name of the NPC to create. This NPC should exist in <code>resources/db/npc</code> in JSON format.
* <code>choices</code>: List of possible choices (npc slugs eg: maple:billie), separated by a colon ":".
* <code>tile_pos_x</code>: The X-tile coordinate to place the NPC. 
* <code>variable</code>: Variable to store the result of the choice.
* <code>tile_pos_y</code>: The Y-tile coordinate to place the NPC. 
* <code>behavior</code>: The NPC's movement behavior. Currently not implemented.


'''Examples'''
'''Examples'''
* <code>create_npc Maple,2,3</code> 
* <code>choice_monster billie:maple,name_variable</code>
* <code>create_npc Pine,1,6,stand</code>


== delayed_teleport ==
== cipher_dialog ==
Set teleport information. Teleport will be triggered during screen transition. Only use this if followed by a transition.
Displays a dialog window with text that may be ciphered based on the character's unlocked letters and the active CipherProcessor. The dialog text is optionally translated, styled, and formatted based on script parameters. Any unlocked letters will remain visible, while the remaining content may be obfuscated depending on the cipher configuration.


'''Parameters'''
'''Parameters'''
* <code>map_name</code>: Name of the map to teleport to.
* <code>text</code>: Text of the dialog.
* <code>position_x</code>: X position to teleport to.
* <code>avatar</code>: Monster avatar. If it is a number, the monster is the corresponding monster slot in the player's party. If it is a string, we're referring to a monster by name.
* <code>position_y</code>: Y position to teleport to.
* <code>position</code>: Position of the dialog box. Can be 'top', 'bottom', 'center', 'topleft', 'topright', 'bottomleft', 'bottomright', 'right', 'left'. Default 'bottom'.
* <code>h_alignment</code>: Alignment of text in the dialog box, it can be 'left', 'center' or 'right'. Default 'left'.
* <code>v_alignment</code>: Alignment of text in the dialog box, it can be 'bottom', 'center' or 'top'. Default 'top'.
* <code>style</code>: a predefined style in db/dialogue/dialogue.json


'''Examples'''
'''Examples'''
* <code>delayed_teleport cotton_town,10,10</code>
* <code>cipher_dialog msgid</code>


== evolution ==
== clear_kennel ==
Checks, asks and evolves. It's the action responsible for evolving monster when one or more conditions are met. It's advisable to use it with the condition <code>is/not check_evolution player</code>
Clear a kennel. It advisable to save the game and check twice. Remember the main kennel is "Kennel" and without destination (transfer) the monster will be deleted as well as the kennel.


'''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>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters get experience.
* <code>kennel</code>: The kennel to clear.
* <code>evolution</code>: Slug of the evolution.
* <code>transfer</code>: The kennel to transfer the monsters. (optional)


'''Examples'''
'''Examples'''
* <code>evolution player</code>
* <code>clear_kennel npc_maple,name_kennel,new_kennel</code>
* <code>evolution player,name_variable,rockat</code>


== fade_in ==
== clear_tuxepedia ==
Fade in.
Clear the key and value in the Tuxepedia dictionary.


'''Parameters'''
'''Parameters'''
* <code>trans_time</code>: Transition time in seconds - default 0.3
* <code>monster_slug</code>: Monster slug name (e.g. "rockitten").
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(0,0,0)


'''Examples'''
'''Examples'''
* <code>fade_in 2.0</code>
* <code>clear_tuxepedia rockitten</code>


== fade_out ==
== clear_variable ==
Fade out.
Removes specified variables from the player's stored variables.


'''Parameters'''
'''Parameters'''
* <code>trans_time</code>: Transition time in seconds - default 0.3
* <code>variable</code>: One or more variables to be removed.
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(0,0,0)


'''Examples'''
'''Examples'''
* <code>fade_out 2.0</code>
* <code>clear_variable name_variable</code>


== fadeout_music ==
== copy_variable ==
Fades out music over <code>x</code> milliseconds.
Copy the value of var2 into var1 (e.g. var1 = var 2).


'''Parameters'''
'''Parameters'''
* <code>time_seconds</code>: Time in milliseconds to fade out the currently playing music. (optional)
* <code>var1</code>: The variable to copy to.
* <code>var2</code>: The variable to copy from.


'''Examples'''
'''Examples'''
* <code>fadeout_music 2</code>
* <code>copy_variable new_variable,old_variable</code>


== format_variable ==
== crafting_station ==
Format the value of a variable from the game (eg. float or int).
Change to the specified state.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: The variable to format.
* <code>character_slug</code>: The slug of the character (NPC).
* <code>type_format</code>: Kind of format (float or int).
* <code>method</code>: Suggests how the recipe is executed, e.g., cooking, forging.
* <code>file_yaml</code>: The YAML file (like `recipe.yaml`) that contains the recipe definitions to load into the system (mods folder).


'''Examples'''
'''Examples'''
* <code>format_variable name_variable,int</code>
* <code>crafting_station player,cooking</code>
* <code>format_variable name_variable,float</code>
 
== create_kennel ==
Creates a new kennel. It's advisable to create a msgid in the en_US PO file.


== get_monster_tech ==
msgid "kennel_name"
Select a tech among the monster's moves. It allows filtering: slug, element, range.
msgstr "Kennel Name"


'''Parameters'''
'''Parameters'''
* <code>variable_name</code>: Variable where to store the technique id.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>monster_id</code>: Variable where is stored the monster id.
* <code>kennel</code>: Name of the kennel.
* <code>filter_name</code>: the name of the first filter (optional)
* <code>value_name</code>: the actual value to filter (optional)
* <code>extra</code>: used to filter more (optional)


'''Examples'''
'''Examples'''
* <code>get_monster_tech name_variable,monster_id</code>
* <code>create_kennel npc_maple,new_kennel</code>
* <code>get_monster_tech name_variable,monster_id,element,water</code>
* <code>get_monster_tech name_variable,monster_id,power,less_than,1.6</code>


== get_party_monster ==
== create_npc ==
Saves all the iids (party) in variables. Names are saved in game variables: <code>iid_slot_{index}</code>. Where index is the position in the party (the 1st one is 0, 2nd one is 1, etc.)
Creates an NPC and places them on the current map.


'''Parameters'''
'''Parameters'''
* <code>npc_slug</code>: npc slug name (e.g. "npc_maple") - if absent default "player" (optional)
* <code>name</code>: The name of the NPC to create. This NPC should exist in <code>resources/db/npc</code> in JSON format.
* <code>tile_pos_x</code>: The X-tile coordinate to place the NPC. 
* <code>tile_pos_y</code>: The Y-tile coordinate to place the NPC. 
* <code>behavior</code>: The NPC's movement behavior. Currently not implemented. 


'''Examples'''
'''Examples'''
* <code>get_party_monster</code>
* <code>create_npc Maple,2,3</code>
* <code>get_party_monster npc_maple</code>
* <code>create_npc Pine,1,6,stand</code>
 
== dojo_method ==
Represents an event action for the monks in the Dojo (Spyder).


== get_player_monster ==
'''Parameters'''
Select a monster in the player party and store its id in a variable.
* <code>variable_name</code>: The name of the variable where the monster ID will be stored.
* <code>option</code>: The action to perform. Can be either: "technique" learn any move the monster hasn't acquired from its base moveset, without restrictions based on level or evolution stage OR "monster" devolve the monster.


It allows filtering: slug, gender, evolution_stage, element, shape, taste_warm, taste_cold, level, weight, height, max_hp, current_hp, armour, dodge, melee, ranged and speed.
'''Examples'''
* <code>dojo_method variable_name,monster</code>
* <code>dojo_method variable_name,technique</code>


For the definition: level, weight, height, max_hp, current_hp, armour, dodge, melee, ranged and speed (all numeric values) is necessary to use a numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
== evolution ==
 
Checks, asks and evolves. It's the action responsible for evolving monster when one or more conditions are met. It's advisable to use it with the condition <code>is/not check_evolution player</code>
Note:
* let's say a player doesn't has no options, then the variable will result as: name_variable:no_option
* let's say a player has options, but clicks return, then the variable will result as: name_variable:no_choice


'''Parameters'''
'''Parameters'''
* <code>variable_name</code>: Name of the variable where to store the monster id.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>filter_name</code>: the name of the first filter (optional)
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters get experience.
* <code>value_name</code>: the actual value to filter (optional)
* <code>evolution</code>: Slug of the evolution.
* <code>extra</code>: used to filter more (optional)


'''Examples'''
'''Examples'''
* <code>get_player_monster name_variable</code>
* <code>evolution player</code>
* <code>get_player_monster name_variable,speed,more_than,50</code>
* <code>evolution player,name_variable,rockat</code>
* <code>get_player_monster name_variable,level,less_than,15</code>
* <code>get_player_monster name_variable,shape,serpent</code>
* <code>get_player_monster name_variable,shape,serpent</code>


== give_experience ==
== fade_in ==
Gives experience points to the monster.
Fade in.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>trans_time</code>: Transition time in seconds - default 0.3
* <code>exp</code>: Name of the variable where to store the experience points or directly the number of points. Negative value will result in 0.
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(0,0,0)


'''Examples'''
'''Examples'''
* <code>give_experience name_variable,steps_variable"</code>
* <code>fade_in 2.0</code>
* <code>give_experience name_variable,420</code>


== info ==
== fade_out ==
Records monster's attribute values inside a game variable. It allows to record the monster's owner attribute values too.
Fade out.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>trans_time</code>: Transition time in seconds - default 0.3
* <code>attribute</code>: The attribute to check (level, speed, etc.).
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(0,0,0)


'''Examples'''
'''Examples'''
* <code>info name_variable,level</code> -> if the monster is lv 4, then it'll create a variable called: "info_level:4"
* <code>fade_out 2.0</code>
* <code>info name_variable,owner_steps</code> -> if the owner walked 69 steps, then it'll create a variable called: "info_owner_steps:69"


== input_variable ==
== fadeout_music ==
Set a code and checks if it's correct or not. The player's output will be by default lowercase.
Fades out music over <code>x</code> milliseconds.


'''Parameters'''
'''Parameters'''
* <code>question</code>: The question the player needs to reply. (eg. "access_code") then you create the msgid "access_code" inside the English PO file, as follows: msgid "access_code" and msgstr "Here the actual question?"
* <code>time_seconds</code>: Time in milliseconds to fade out the currently playing music. (optional)
* <code>variable</code>: Name of the variable where to store the output.
* <code>escape</code>: Whether the input can be closed or not. Default False.


'''Examples'''
'''Examples'''
* <code>input_variable access_code,response_question</code>
* <code>fadeout_music 2</code>
* <code>input_variable access_code,response_question,escape</code>


== load_game ==
== format_variable ==
Loads the game. If the index parameter is absent, then it'll load slot4.save (index = 0 > slot 1, index = 1 > slot 2, index = 2 > slot 3)
Format the value of a variable from the game (eg. float or int).


'''Parameters'''
'''Parameters'''
* <code>index</code>: Selected index. (optional)
* <code>variable</code>: The variable to format.
* <code>type_format</code>: Kind of format (float or int).


'''Examples'''
'''Examples'''
* <code>load_game</code> (it's going to load slot4.save)
* <code>format_variable name_variable,int</code>
* <code>load_game 0</code> (it's going to load slot1.save)
* <code>format_variable name_variable,float</code>


== lock_controls ==
== get_party_monster ==
Lock player controls.
Saves all the iids (party) in variables. Names are saved in game variables: <code>iid_slot_{index}</code>. Where index is the position in the party (the 1st one is 0, 2nd one is 1, etc.)


'''Parameters'''
'''Parameters'''
* <code>None</code>
* <code>npc_slug</code>: npc slug name (e.g. "npc_maple") - if absent default "player" (optional)


'''Examples'''
'''Examples'''
* <code>lock_controls</code>
* <code>get_party_monster</code>
* <code>get_party_monster npc_maple</code>


== menu ==
== get_player_monster ==
Enable/disable one or more menu.
Select a monster in the player party and store its id in a variable.


'''Parameters'''
It allows filtering: slug, gender, evolution_stage, element, shape, taste_warm, taste_cold, level, weight, height, max_hp, current_hp, armour, dodge, melee, ranged and speed.
* <code>act</code>: enable or disable
* <code>menu</code>: specific menu (menu_monster, menu_bag, menu_player, exit, menu_options, menu_save, menu_load, menu_missions) without specification, everything disabled


'''Examples'''
For the definition: level, weight, height, max_hp, current_hp, armour, dodge, melee, ranged and speed (all numeric values) is necessary to use a numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
* <code>menu disable,menu_bag</code>


== modify_bill ==
Note:
Add or remove an amount of money from a bill (slug).
* let's say a player doesn't has no options, then the variable will result as: name_variable:no_option
* let's say a player has options, but clicks return, then the variable will result as: name_variable:no_choice


'''Parameters'''
'''Parameters'''
* <code>slug</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>variable_name</code>: Name of the variable where to store the monster id.
* <code>bill_slug</code>: Slug of the bill.
* <code>filter_name</code>: the name of the first filter (optional)
* <code>amount</code>: Amount of money to add/remove (-/+)
* <code>value_name</code>: the actual value to filter (optional)
* <code>variable</code>: Name of the variable where is stored the amount.
* <code>extra</code>: used to filter more (optional)


'''Examples'''
'''Examples'''
* <code>modify_bill player,bill_slug,100</code>
* <code>get_player_monster name_variable</code>
* <code>modify_bill player,bill_slug,,name_variable</code>
* <code>get_player_monster name_variable,speed,more_than,50</code>
* <code>get_player_monster name_variable,level,less_than,15</code>
* <code>get_player_monster name_variable,shape,serpent</code>
* <code>get_player_monster name_variable,shape,serpent</code>


== modify_char_attribute ==
== give_experience ==
Modify the given attribute of the character by modifier. By default this is achieved via addition, but prepending a '%' will cause it to be multiplied by the attribute.
Gives experience points to the monster.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>attribute</code>: Name of the attribute to modify.
* <code>exp</code>: Name of the variable where to store the experience points or directly the number of points. Negative value will result in 0.
* <code>value</code>: Value of the attribute modifier.


'''Examples'''
'''Examples'''
* <code>modify_char_attribute character,attribute,value</code>
* <code>give_experience name_variable,steps_variable"</code>
* <code>give_experience name_variable,420</code>


== modify_contacts ==
== info ==
Modify contact relationship.
Records monster's attribute values inside a game variable. It allows to record the monster's owner attribute values too.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>npc_slug</code>: slug name (e.g. "npc_maple").
* <code>attribute</code>: The attribute to check (level, speed, etc.).
* <code>attribute</code>: it can be 'strength', 'decay_rate' or 'decay_threshold'
* <code>value</code>: the new value


'''Examples'''
'''Examples'''
* <code>modify_contacts player,npc_maple,strength,100</code>
* <code>info name_variable,level</code> -> if the monster is lv 4, then it'll create a variable called: "info_level:4"
* <code>info name_variable,owner_steps</code> -> if the owner walked 69 steps, then it'll create a variable called: "info_owner_steps:69"


== modify_money ==
== input_variable ==
Add or remove an amount of money for a wallet (slug).
Set a code and checks if it's correct or not. The player's output will be by default lowercase.


'''Parameters'''
'''Parameters'''
* <code>slug</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>question</code>: The question the player needs to reply. (eg. "access_code") then you create the msgid "access_code" inside the English PO file, as follows: msgid "access_code" and msgstr "Here the actual question?"
* <code>amount</code>: Amount of money to add/remove (-/+)
* <code>variable</code>: Name of the variable where to store the output.
* <code>variable</code>: Name of the variable where to store the amount.
* <code>escape</code>: Whether the input can be closed or not. Default False.


'''Examples'''
'''Examples'''
* <code>modify_money npc_maple,100</code>
* <code>input_variable access_code,response_question</code>
* <code>modify_money npc_maple,-50</code>
* <code>input_variable access_code,response_question,escape</code>
* <code>modify_money player,,name_variable</code>


== modify_monster_bond ==
== learn_tech_by_method ==
Add or remove an amount of money for a wallet (slug).
Teaches a technique to a specific monster using a specific learning method.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are touched.
* <code>monster_var</code>: Game variable name containing the monster UUID.
* <code>amount</code>: An int or float value, if no amount, then default 1 (int).
* <code>technique</code>: Slug of the technique to learn.
* <code>method</code>: Learning method enum name (e.g. "EVENT", "TM")


'''Examples'''
'''Examples'''
* <code>modify_monster_bond</code>
* <code>learn_tech_by_method monster_id,flamethrower,EVENT</code>
* <code>modify_monster_bond name_variable,25</code>
* <code>learn_tech_by_method monster_id,fireblast,TM</code>
* <code>modify_monster_bond name_variable,-0.5</code>


== modify_monster_health ==
== load_game ==
Modify the hp of a monster in the current player's party.
Loads the game. If the index parameter is absent, then it'll load slot4.save (index = 0 > slot 1, index = 1 > slot 2, index = 2 > slot 3)


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are healed.
* <code>index</code>: Selected index. (optional)
* <code>health</code>: A float value between 0 and 1, which is the percent of max hp to be restored to. A int value, which is the number of HP to be restored to. If no health is specified, the hp is maxed out.


'''Examples'''
'''Examples'''
* <code>modify_monster_health</code>
* <code>load_game</code> (it's going to load slot4.save)
* <code>modify_monster_health ,0.25</code>
* <code>load_game 0</code> (it's going to load slot1.save)


 
== lock_controls ==
== modify_monster_stats ==
Lock player controls.
Change the stats of a monster in the current player's party.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are touched. (Optional)
* <code>None</code>
* <code>stat</code>: A stat among armour, dodge, hp, melee, speed and ranged. If no stat, then all the stats. (Optional)
* <code>amount</code>: A/an float/int value, if no amount, then default 1 (+). (Optional)


'''Examples'''
'''Examples'''
* <code>modify_monster_stats</code>
* <code>lock_controls</code>
* <code>modify_monster_stats ,,0.25</code>
* <code>modify_monster_stats name_variable,speed,25</code>
* <code>modify_monster_stats name_variable,dodge,-12</code>
* <code>modify_monster_stats name_variable,dodge,-0.4</code>


== open_shop ==
== manage_map_cache ==
Open the shop menu for a NPC.
Adds or removes a map from the cache.


'''Parameters'''
'''Parameters'''
* <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>action</code>: "add" or "remove"
* <code>menu</code>: Either "buy", "sell" or "both". Default is "both". (optional)
* <code>map_name</code>: Name of the map (map.tmx)


'''Examples'''
'''Examples'''
* <code>open_shop npc_maple</code>  
* <code>manage_map_cache add,map.tmx</code>
* <code>manage_map_cache remove,map.tmx</code>


== overwrite_tech ==
== menu ==
Overwrite / replace a technique with another.
Toggle visibility of one or more world menu entries, or apply a preset.


'''Parameters'''
'''Parameters'''
* <code>removed</code>: Name of the variable where to store the tech id.
* <code>flag</code>: "enable" or "disable", applied to specified menus (or all)
* <code>added</code>: Slug technique.
* <code>preset</code>: one of defined presets ("minimal", etc.)


'''Examples'''
'''Examples'''
* <code>overwrite_tech name_variable,peck</code>  
* <code>menu reset</code>                        > clears all menu flags
* <code>menu enable</code>                        > enables all menus
* <code>menu disable,menu_bag:menu_player</code>  > disables specified menus
* <code>menu enable,all</code>                   > enables all menus
* <code>menu minimal</code>                      > applies "minimal" preset


== pathfind ==
== modify_bill ==
Moves an NPC to a certain tile on the map.
Add or remove an amount of money from a bill (slug).


'''Parameters'''
'''Parameters'''
* <code>name</code>: The name of the NPC to be moved.
* <code>slug</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>tile_pos_x</code>: The X-tile coordinate to have the NPC to walk to. 
* <code>bill_slug</code>: Slug of the bill.
* <code>tile_pos_y</code>: The Y-tile coordinate to have the NPC to walk to.    
* <code>amount</code>: Amount of money to add/remove (-/+)
* <code>variable</code>: Name of the variable where is stored the amount.


'''Examples'''
'''Examples'''
* <code>pathfind Maple,2,3</code>  
* <code>modify_bill player,bill_slug,100</code>
* <code>pathfind Pine,1,6</code>
* <code>modify_bill player,bill_slug,,name_variable</code>


== pathfind_to_player ==
== modify_char_attribute ==
Pathfind NPC close the player.
Modify the given attribute of the character by modifier. By default this is achieved via addition, but prepending a '%' will cause it to be multiplied by the attribute.


'''Parameters'''
'''Parameters'''
* <code>npc_slug</code>: Npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>direction</code>: Approaches the player from up, down, left or right.
* <code>attribute</code>: Name of the attribute to modify.
* <code>distance</code>: How many tiles (2, 3, 4, etc.)
* <code>value</code>: Value of the attribute modifier.


'''Examples'''
'''Examples'''
* <code>pathfind_to_player spyder_route2_roddick</code>
* <code>modify_char_attribute character,attribute,value</code>
* <code>translated_dialog spyder_route2_roddick1</code>
* <code>start_battle player,spyder_route2_roddick</code>  


== pause_music ==
== modify_contacts ==
Pauses the currently playing music.
Modify contact relationship.


'''Parameters'''
'''Parameters'''
* <code>None</code>
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>npc_slug</code>: slug name (e.g. "npc_maple").
* <code>attribute</code>: it can be 'strength', 'decay_rate' or 'decay_threshold'
* <code>value</code>: the new value


'''Examples'''
'''Examples'''
* <code>pause_music</code>
* <code>modify_contacts player,npc_maple,strength,100</code>


== play_map_animation ==
== modify_faction_reputation ==
Trigger a map animation at a specified position based on the character's coordinates within the world map.
Modifies an NPC's (or player's) reputation with a specific faction.


'''Parameters'''
'''Parameters'''
* <code>animation_name</code>: The name of the animation stored in the resources/animations/tileset directory. For example, an animation named "grass" will load frames named "grass_xx.png".  
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>frame_duration</code>: Duration (in seconds) for each frame of the animation.
* <code>faction_slug</code>: The slug identifier of the faction to modify reputation for.
* <code>loop_mode</code>: Indicates whether the animation should loop. Options: "loop" or "noloop". 
* <code>amount</code>: A string representation of an integer. Positive or negative values (e.g. "25", "-50") that change the reputation score accordingly.
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").


'''Examples'''
'''Examples'''
* <code>play_map_animation grass,0.1,noloop,player</code>
* <code>modify_faction_reputation npc_maple,faction_slug,25</code>
* <code>modify_faction_reputation npc_maple,faction_slug,-50</code>


== play_music ==
== modify_money ==
Plays an audio file.
Add or remove an amount of money for a wallet (slug).


'''Parameters'''
'''Parameters'''
* <code>filename</code>: The name of the music file to play.
* <code>slug</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>volume</code>: A value between 0.0 and 1.0 that adjusts the music volume. (optional)
* <code>amount</code>: Amount of money to add/remove (-/+)
* <code>loop</code>: The number of times to loop the music. Default is to loop forever. (optional)
* <code>variable</code>: Name of the variable where to store the amount.
* <code>fade_ms</code>: The time in milliseconds to fade in the music before reaching maximum volume. (optional)


'''Examples'''
'''Examples'''
* <code>play_music music_mystic_island</code>  
* <code>modify_money npc_maple,100</code>
* <code>modify_money npc_maple,-50</code>
* <code>modify_money player,,name_variable</code>


== play_sound ==
== modify_monster_bond ==
Plays a sound file.
Add or remove an amount of money for a wallet (slug).


'''Parameters'''
'''Parameters'''
* <code>filename</code>: Sound file to load (slug inside the JSON in db/sound)
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are touched.
* <code>volume</code>: Number between 0.0 and 1.0. (optional)
* <code>amount</code>: An int or float value, if no amount, then default 1 (int).


'''Examples'''
'''Examples'''
* <code>play_sound sound_confirm</code>
* <code>modify_monster_bond</code>
* <code>modify_monster_bond name_variable,25</code>
* <code>modify_monster_bond name_variable,-0.5</code>


== play_tile_animation ==
== modify_monster_health ==
Trigger a map animation at a specified tile position on the world map.
Modify the hp of a monster in the current player's party.


'''Parameters'''
'''Parameters'''
* <code>tile_pos_x, tile_pos_y</code>: Coordinates (x, y) specifying the tile position where the animation will be drawn on the map.
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are healed.
* <code>animation_name</code>: The name of the animation stored in the resources/animations/tileset directory. For example, an animation named "grass" will load frames named "grass_xx.png".
* <code>health</code>: A float value between 0 and 1, which is the percent of max hp to be restored to. A int value, which is the number of HP to be restored to. If no health is specified, the hp is maxed out.
* <code>frame_duration</code>: Duration (in seconds) for each frame of the animation.
* <code>loop_mode</code>: Indicates whether the animation should loop. Options: "loop" or "noloop".


'''Examples'''
'''Examples'''
* <code>play_tile_animation 33,10,sign01,0.4,loop</code>
* <code>modify_monster_health</code>
* <code>modify_monster_health ,0.25</code>
 


== print ==
== modify_monster_stats ==
Print the current value of a game variable to the console. If no variable is specified, print out values of all game variables.
Change the stats of a monster in the current player's party.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Prints out the value of this variable (optional)
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are touched. (Optional)
* <code>stat</code>: A stat among armour, dodge, hp, melee, speed and ranged. If no stat, then all the stats. (Optional)
* <code>amount</code>: A/an float/int value, if no amount, then default 1 (+). (Optional)


'''Examples'''
'''Examples'''
* <code>print</code>
* <code>modify_monster_stats</code>
* <code>print name_variable</code>
* <code>modify_monster_stats ,,0.25</code>
* <code>modify_monster_stats name_variable,speed,25</code>
* <code>modify_monster_stats name_variable,dodge,-12</code>
* <code>modify_monster_stats name_variable,dodge,-0.4</code>


== quarantine ==
== open_journal ==  
Quarantine or release monsters infected with a specific plague.
Change to JournalInfoState. This action transitions to the JournalInfoState, displaying information about a specific monster in the player's journal.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>monster_slug</code>: The slug of the monster to display in the journal.
* <code>plague_slug</code>: The slug of the plague to target.
 
* <code>value</code>: "in" to quarantine infected monsters, "out" to release them.
'''Examples'''
* <code>amount</code>: (Optional, only for "out") The number of monsters to release randomly.
* <code>open_journal player</code>
 
== open_shop ==
Opens a shop interface between the player and a target NPC.
 
'''Parameters'''
* <code>npc_slug</code>: Either "player" or the NPC slug identifier (e.g. "npc_maple").
* <code>menu</code>: Type of shop interaction to open. Must be one of: "buy_item", "sell_item", "both_item", "buy_monster", "sell_monster", "both_monster", "train_monster" or "heal_monster"
* <code>model</code>: (optional) A configuration profile name used to load custom shop behavior.
 
Notes:
* The target NPC must have an economy assigned.
* If menu is "both_*", a choice dialog is shown for selection.


'''Examples'''
'''Examples'''
* <code>quarantine npc_maple,plague_slug,out</code> everything out (player's party -> if full, then box)
* <code>open_shop npc_maple,both_item</code>  
* <code>quarantine npc_maple,plague_slug,out,5</code> eg. box contains 30 monsters <code>quarantine out,5</code>, it means 5 monsters by random


== quit ==
== overwrite_tech ==
Completely quit the game.
Replaces a known technique with another for a specific monster. This action is typically used when a monster chooses to forget a move and learn a new one.


'''Parameters'''
'''Parameters'''
* <code>None</code>
* <code>removed</code>: Name of the game variable that stores the UUID of the technique to be replaced.
* <code>added</code>: Slug of the technique to be added (e.g., "peck", "fireball")


'''Examples'''
'''Examples'''
* <code>quit</code>
* <code>overwrite_tech name_variable,peck</code>


== random_battle ==
== park_experience ==
Start random battle with a random npc with a determined number of monster in a certain range of levels.
Shows the results of the Park session.


'''Parameters'''
'''Parameters'''
* <code>nr_txmns</code>: Number of tuxemon (1 to 6).
* <code>option</code>: Either 'start' or 'stop'
* <code>min_level</code>: Minimum level of the party.
* <code>max_level</code>: Maximum level of the party.


'''Examples'''
'''Examples'''
* <code>random_battle 6,1,99</code>
* <code>park_experience start</code>
* <code>park_experience stop</code>


== random_encounter ==
== pathfind ==
Randomly start a battle based on the encounter group looked up via the <code>encounter_id</code>. Encounter groups contain a list of monsters that can be encountered as well as their level and encounter rate. In most circumstances you will pair this action with the <code>char_at</code> and <code>char_moved</code> conditions.
Moves an NPC to a certain tile on the map.
 
Here is an example encounter file: ''resources/db/encounter/route1.json'' 
 
  "slug": "route1",
  "monsters": [
    {
      "monster": "pairagrin",
      "encounter_rate": 3.5,
      "variable": "daytime:true",
      "exp_req_mod": 1,
      "level_range": [
        2,
        4
      ]
    },


'''Parameters'''
'''Parameters'''
* <code>encounter_slug</code>: Slug of the encounter list.
* <code>name</code>: The name of the NPC to be moved.
* <code>total_prob</code>: Total sum of the probabilities. (optional)
* <code>tile_pos_x</code>: The X-tile coordinate to have the NPC to walk to.
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)
* <code>tile_pos_y</code>: The Y-tile coordinate to have the NPC to walk to.   


'''Examples'''
'''Examples'''
* <code>random_encounter route1</code>
* <code>pathfind Maple,2,3</code>  
* <code>random_encounter route1,20</code>
* <code>pathfind Pine,1,6</code>


== random_integer ==
== pathfind_to_player ==
Randomly choose an integer between 2 numbers (inclusive), and set the key in the player.game_variables dictionary to be this value. For example, 'random_integer xyz,1,6' will set the value of the game variable 'xyz' to be either 1, 2, 3, 4, 5, or 6.
Pathfind NPC close the player.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable.
* <code>npc_slug</code>: Npc slug name (e.g. "npc_maple").
* <code>lower_bound</code>: Lower bound of range to return an integer between (inclusive)
* <code>direction</code>: Approaches the player from up, down, left or right.
* <code>upper_bound</code>: Upper bound of range to return an integer between (inclusive)
* <code>distance</code>: How many tiles (2, 3, 4, etc.)
 
 
'''Examples'''
'''Examples'''
* <code>random_integer name_variable,1,9</code>
* <code>pathfind_to_player spyder_route2_roddick</code>
* <code>translated_dialog spyder_route2_roddick1</code>
* <code>start_battle player,spyder_route2_roddick</code>  


== random_item ==
== pause_music ==
Pick a random item from a list and add it to the trainer's inventory.
Pauses the currently playing music.


'''Parameters'''
'''Parameters'''
* <code>item_slug</code>: Item name to look up in the item database (multiple items separated by ":").
* <code>None</code>
* <code>quantity</code>: Quantity of the item to add or to reduce. By default it is 1. (optional)
* <code>trainer_slug</code>: Slug of the trainer that will receive the item. It defaults to the current player. (optional)


'''Examples'''
'''Examples'''
* <code>random_item potion:tea:revive</code> (adds 1 potion or tea or revive to the trainer's inventory).
* <code>pause_music</code>
* <code>random_item potion:tea:revive,2</code> (adds 2 potions or teas or revives to the trainer's inventory).
* <code>random_item potion:tea:revive,2,npc_maple</code> (adds 2 potions or teas or revives to the maple's inventory).
* <code>random_item potion:tea:revive,,npc_maple</code> (adds 1 potion or tea or revive to the maple's inventory).


== random_monster ==
== play_map_animation ==
Add a monster to the specified trainer's party if there is room.
Trigger a map animation at a specified position based on the character's coordinates within the world map.


'''Parameters'''
'''Parameters'''
* <code>monster_level</code>: Level of the added monster.
* <code>animation_name</code>: The name of the animation stored in the resources/animations/tileset directory. For example, an animation named "grass" will load frames named "grass_xx.png".  
* <code>trainer_slug</code>: Slug of the trainer that will receive the monster. It defaults to the current player. (optional)
* <code>frame_duration</code>: Duration (in seconds) for each frame of the animation.
* <code>exp_mod</code>: Experience modifier. (optional)
* <code>loop_mode</code>: Indicates whether the animation should loop. Options: "loop" or "noloop".
* <code>money_mod</code>: Money modifier. (optional)
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>shape</code>: Shape (eg. varmint, brute, etc.). (optional)
* <code>evo</code>: Stage (eg. basic, stage1, etc.). (optional)


'''Examples'''
'''Examples'''
* <code>random_monster 10</code>
* <code>play_map_animation grass,0.1,noloop,player</code>
* <code>random_monster 10,npc_maple</code>
* <code>random_monster 10,npc_maple,10,27</code>
* <code>random_monster 10,npc_maple,10,27,aquatic,basic</code>
* <code>random_monster 10,npc_maple,,,brute,basic</code>


== remove_collision ==
== play_music ==
Removes a collision defined by a specific label.
Plays an audio file.


'''Parameters'''
'''Parameters'''
* <code>label</code>: Name of the obstacle.
* <code>filename</code>: The name of the music file to play.
* <code>volume</code>: A value between 0.0 and 1.0 that adjusts the music volume. (optional)
* <code>loop</code>: The number of times to loop the music. Default is to loop forever. (optional)
* <code>fade_ms</code>: The time in milliseconds to fade in the music before reaching maximum volume. (optional)


'''Examples'''
'''Examples'''
* <code>remove_collision obstacle</code> (it can one added with add_collision or an existing zone in the .tmx file).
* <code>play_music music_mystic_island</code>  


== remove_contacts ==
== play_sound ==
Remove contact from the app (Nu Phone).
Plays a short sound effect from the "resources/sounds/" folder. This is intended for short non-looping sound effects (e.g., cues, UI feedback), not for ambient or background music.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>filename</code>: The sound file to load (must exist in the sounds database).
* <code>slug</code>: slug name (e.g. "npc_maple").
* <code>volume</code>: A float between 0.0 and 1.0 representing the relative volume level. This value is multiplied by the user's configured sound volume.


'''Examples'''
'''Examples'''
* <code>remove_contacts npc_maple</code>
If volume=0.5 and the player's sound setting is also 0.5, the resulting effective playback volume will be 0.25.
* <code>play_sound sound_confirm</code>


== remove_held_item ==
== play_tile_animation ==
Removes a held item from a specific monster.
Trigger a map animation at a specified tile position on the world map.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>tile_pos_x, tile_pos_y</code>: Coordinates (x, y) specifying the tile position where the animation will be drawn on the map.
* <code>animation_name</code>: The name of the animation stored in the resources/animations/tileset directory. For example, an animation named "grass" will load frames named "grass_xx.png".
* <code>frame_duration</code>: Duration (in seconds) for each frame of the animation.
* <code>loop_mode</code>: Indicates whether the animation should loop. Options: "loop" or "noloop".


'''Examples'''
'''Examples'''
* <code>remove_held_item variable</code>
* <code>play_tile_animation 33,10,sign01,0.4,loop</code>


== remove_monster ==
== print ==
Remove a monster from the party if the monster is there.
Print the current value of a game variable to the console. If no variable is specified, print out values of all game variables.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>variable</code>: Prints out the value of this variable (optional)


'''Examples'''
'''Examples'''
* <code>get_player_monster name_variable</code>
* <code>print</code>
* <code>remove_monster name_variable</code>
* <code>print name_variable</code>


== remove_npc ==
== quarantine ==
Removes an NPC from the current map.
Quarantine or release monsters infected with a specific plague.


'''Parameters'''
'''Parameters'''
* <code>name</code>: The name of the NPC to remove.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>plague_slug</code>: The slug of the plague to target.
* <code>action_type</code>: "in" to quarantine infected monsters, "out" to release them.
* <code>amount</code>: (Optional, only for "out") The number of monsters to release randomly.


'''Examples'''
'''Examples'''
* <code>remove_npc Maple</code>
* <code>quarantine npc_maple,plague_slug,out</code> everything out (player's party -> if full, then box)
* <code>remove_npc Pine</code>
* <code>quarantine npc_maple,plague_slug,out,5</code> eg. box contains 30 monsters <code>quarantine out,5</code>, it means 5 monsters by random


== remove_state ==
== quit ==
Change to the specified state.
Completely quit the game.


'''Parameters'''
'''Parameters'''
* <code>state_name</code>: The state name to switch to (e.g. PCState).
* <code>None</code>
* <code>optional</code>: Variable related to specific states (eg slug for JournalInfoState).


'''Examples'''
'''Examples'''
* <code>remove_state</code> (it removes everything, excluding the basic ones)
* <code>quit</code>
* <code>remove_state JournalInfoState</code> (it removes everything, excluding the basic ones)


== remove_tech ==
== random_battle ==
Remove a specific technique from a specific monster.
Starts a random battle with a randomly chosen NPC and a party of randomly generated monsters within a specified level range.


'''Parameters'''
'''Parameters'''
* <code>tech_id</code>: Name of the variable where to store the tech id.
* <code>nr_txmns</code>: The number of Tuxemon in the opponent's party (1 to 6).
* <code>min_level</code>: The minimum level for the opponent's monsters.
* <code>max_level</code>: The maximum level for the opponent's monsters.


'''Examples'''
'''Examples'''
* <code>remove_tech name_variable</code>
* <code>random_battle 6,1,99</code>


== remove_tracker ==
== random_encounter ==
Remove tracker.
Randomly start a battle based on the encounter group looked up via the <code>encounter_id</code>. Encounter groups contain a list of monsters that can be encountered as well as their level and encounter rate. In most circumstances you will pair this action with the <code>char_at</code> and <code>char_moved</code> conditions.


'''Parameters'''
Here is an example encounter file: ''resources/db/encounter/route1.json'' 
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>location</code>: location name (e.g. "paper_town").


'''Examples'''
  "slug": "route1",
* <code>remove_tracker player,paper_town</code>
  "monsters": [
 
    {
== rename_monster ==
      "monster": "pairagrin",
Open the text input screen to rename the monster.
      "encounter_rate": 3.5,
      "variable": "daytime:true",
      "exp_req_mod": 1,
      "level_range": [
        2,
        4
      ]
    },


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>encounter_slug</code>: Slug of the encounter list.
* <code>total_prob</code>: Total sum of the probabilities. (optional)
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)


'''Examples'''
'''Examples'''
* <code>rename_monster name_variable</code>
* <code>random_encounter route1</code>
* <code>random_encounter route1,20</code>


== rename_player ==
== random_horde ==
Open the text input screen to rename the player.
Randomly start an horde. Randomly starts a battle with a monster defined in the "encounter" table in the "monster.db" database. The chance that this will start a battle depends on the "encounter_rate" specified in the database. The "encounter_rate" number is the chance walking in to this tile will trigger a battle out of 100.


'''Parameters'''
'''Parameters'''
* <code>None</code>
* <code>encounter_slug</code>: Slug of the encounter list.
* <code>total_prob</code>: Total sum of the probabilities. (optional)
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)


'''Examples'''
'''Examples'''
* <code>rename_player</code>
* <code>random_horde route1</code>
* <code>random_horde route1,20</code>


== rumble ==
== random_integer ==
Rumble available controllers with rumble support.
Randomly chooses an integer between two numbers (inclusive) and sets a key in the player's game_variables dictionary to this value. For example, 'random_integer xyz,1,6' will set the value of the game variable 'xyz' to be a random integer from 1, 2, 3, 4, 5, or 6.


'''Parameters'''
'''Parameters'''
* <code>duration</code>: Time in seconds to rumble for.
* <code>variable</code>: Name of the variable to set.
* <code>power</code>: Percentage of power to rumble.
* <code>lower_bound</code>: The inclusive lower bound of the integer range.
* <code>upper_bound</code>: The inclusive upper bound of the integer range.


'''Examples'''
'''Examples'''
* <code>rumble duration,power</code>
* <code>random_integer name_variable,1,9</code>


== save_game ==
== random_item ==
Saves the game. If the index parameter is absent, then it'll create slot4.save (index = 0 > slot 1, index = 1 > slot 2, index = 2 > slot 3)
Picks a random item from a list and adds it to the trainer's inventory.


'''Parameters'''
'''Parameters'''
* <code>index</code>: Selected index. (optional)
* <code>item_slug</code>: A colon-separated string of item names to choose from. Example: 'potion:super-potion:hyper-potion'.
* <code>quantity</code>: The number of the item to add. Defaults to 1.
* <code>trainer_slug</code>: The slug of the trainer to receive the item. Defaults to the current player.


'''Examples'''
'''Examples'''
* <code>save_game</code> (it's going to save slot4.save)
* <code>random_item potion:tea:revive</code> (adds 1 potion or tea or revive to the trainer's inventory).
* <code>save_game 1</code> (it's going to save slot2.save)
* <code>random_item potion:tea:revive,2</code> (adds 2 potions or teas or revives to the trainer's inventory).
* <code>random_item potion:tea:revive,2,npc_maple</code> (adds 2 potions or teas or revives to the maple's inventory).
* <code>random_item potion:tea:revive,,npc_maple</code> (adds 1 potion or tea or revive to the maple's inventory).


== screen_transition ==
== random_monster ==
Fades the screen to black and back over <code>x</code> seconds.
Adds a random monster to the specified trainer's party, if there is room.


'''Parameters'''
'''Parameters'''
* <code>trans_time</code>: Time in seconds - default 0.3 (optional).
* <code>monster_level</code>: The level of the added monster.
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)
* <code>trainer_slug</code>: The slug of the trainer to receive the monster. Defaults to the current player.
* <code>exp_mod</code>: A modifier for the monster's experience.
* <code>money_mod</code>: A modifier for the monster's money yield.
* <code>shape</code>: The monster's shape (e.g., 'varmint', 'brute').
* <code>evo</code>: The monster's evolution stage (e.g., 'basic', 'stage1').


'''Examples'''
'''Examples'''
* <code>screen_transition 2</code>
* <code>random_monster 10</code>
 
* <code>random_monster 10,npc_maple</code>
== set_battle ==
* <code>random_monster 10,npc_maple,10,27</code>
Append a new element in player.battles.
* <code>random_monster 10,npc_maple,10,27,aquatic,basic</code>
* <code>random_monster 10,npc_maple,,,brute,basic</code>
 
== remove_collision ==
Removes a collision zone associated with a specific label from the world map.


'''Parameters'''
'''Parameters'''
* <code>fighter</code>: Npc slug name (e.g. "npc_maple").
* <code>label</code>: The name or identifier of the obstacle to be removed.
* <code>result</code>: One among "won", "lost" or "draw"
* <code>opponent</code>: Npc slug name (e.g. "npc_maple").


'''Examples'''
'''Examples'''
* <code>set_battle player,won,npc_maple</code> (player won against npc_maple)
* <code>remove_collision obstacle</code> (it can one added with add_collision or an existing zone in the .tmx file).


== set_bill ==
== remove_combo ==
Set a bill.
Removes a registered combo sequence from the ComboDetector.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>combo_name</code>: Required. A name or ID for the combo (used for logging).
* <code>bill_slug</code>: Slug of the bill.
* <code>buttons</code>: Required. A colon-separated list of button names (e.g. LEFT:RIGHT:A).
* <code>amount</code>: Amount of money (>= 0) (default 0)


'''Examples'''
'''Examples'''
* <code>set_bill player,bill_slug</code>
* <code>remove_combo name_combo,LEFT:RIGHT:A</code>
* <code>set_bill player,bill_slug,500</code>


== set_bubble ==
== remove_contacts ==
Put a bubble above player sprite.
Remove contact from the app (Nu Phone).


'''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>bubble</code>: dots, drop, exclamation, heart, note, question, sleep, angry, confused, fireworks
* <code>slug</code>: slug name (e.g. "npc_maple").


'''Examples'''
'''Examples'''
* <code>set_bubble spyder_shopassistant</code> (remove bubble NPC)
* <code>remove_contacts npc_maple</code>
* <code>set_bubble spyder_shopassistant,note</code> (set bubble NPC)
* <code>set_bubble player,note</code> (set bubble player)
* <code>set_bubble player</code> (remove bubble player)


== set_economy ==
== remove_flair ==
Set the economy (prices of items) of the npc or player.
Remove a flair from a monster.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>variable</code>: The name of the variable that holds the monster's UUID.
* <code>economy_slug</code>: Slug of an economy.
* <code>category</code>: The category of the flair to remove. If omitted, all flairs will be removed.


'''Examples'''
'''Examples'''
* <code>set_economy spyder_shopkeeper,spyder_candy_scoop</code>
* <code>remove_flair name_variable,category</code>


== set_kennel_visible ==
== remove_held_item ==
Set the kennel visible or hidden.
Removes a held item from a specific monster.
 
From hidden to visible: set_kennel_visible name_kennel,true
From visible to hidden: set_kennel_visible name_kennel,false


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>kennel</code>: Name of the kennel.
* <code>visible</code>: true/false.


'''Examples'''
'''Examples'''
* <code>set_kennel_visible npc_maple,name_kennel,true</code>
* <code>remove_held_item variable</code>
* <code>set_kennel_visible npc_maple,name_kennel,false</code>


== set_layer ==
== remove_monster ==
Allows to change the color of the transparent layer.
Remove a monster from the party if the monster is there.


'''Parameters'''
'''Parameters'''
* <code>rgb</code>: color (eg red > 255,0,0,128 > 255:0:0:128) - default transparent
* <code>variable</code>: Name of the variable where to store the monster id.


'''Examples'''
'''Examples'''
* <code>set_layer 255:0:0:128</code>
* <code>get_player_monster name_variable</code>
* <code>remove_monster name_variable</code>


== set_mission ==
== remove_npc ==
Set missions by updating it and by checking the prerequisites.
Removes an NPC from the current map.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>name</code>: The name of the NPC to remove.


'''Examples'''
'''Examples'''
* <code>set_mission player</code>
* <code>remove_npc Maple</code> 
* <code>remove_npc Pine</code>


== set_money ==
== remove_state ==
Set an amount of money for a specific slug.
Remove the specified state or the last active one. This action allows the removal of a specific state from the client's active state list. If no state name is provided, it removes the current state, except for certain protected states (e.g., "WorldState" and "BackgroundState").


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>state_name</code>: The name of the state to remove (e.g., "PCState"). If not provided, the last active state will be removed, unless it's a protected state.
* <code>amount</code>: Amount of money (>= 0) (default 0)


'''Examples'''
'''Examples'''
* <code>set_money player</code>
* <code>remove_state</code>
* <code>set_money player,500</code>
* <code>remove_state JournalInfoState</code>


== set_monster_attribute ==
== remove_step_tracker ==
Set the given attribute of the monster to the given value.
Removes an NPC from the current map.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>character</code>: Either "player" or an NPC slug name (e.g., "npc_maple").
* <code>attribute</code>: Name of the attribute.
* <code>tracker_id</code>: Unique name for identifying the step tracker.
* <code>value</code>: Value of the attribute.


'''Examples'''
'''Examples'''
* <code>set_monster_attribute name_variable,name,jimmy</code> (the monster will be named jimmy)
* <code>remove_step_tracker npc_maple,tracker_id</code>


== set_monster_flair ==
== remove_tech ==
Set a monster's flair to the given value.
Remove a specific technique from a specific monster.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are changed.
* <code>tech_id</code>: Name of the variable where the technique ID is stored.
* <code>category</code>: Category of the monster flair.
* <code>force_remove</code>: Optional string flag to override forget rules. Accepts "true", "1", or "yes" (case-insensitive).
* <code>flair</code>: Name of the monster flair.


'''Examples'''
'''Examples'''
* <code>get_player_monster name_variable</code>
* <code>remove_tech name_variable</code>
* <code>set_monster_flair name_variable,category,flair</code>
* <code>remove_tech name_variable,true</code>


== set_monster_health ==
== remove_tracker ==
Set the hp of a monster in the current player's party. The action parameters may contain a monster slot and the amount of health.  
Remove tracker.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are healed. (optional)
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>health</code>: A float value between 0 and 1, which is the percent of max hp to be restored to. A int value, which is the number of HP to be restored to. If no health is specified, the hp is maxed out. (optional)
* <code>location</code>: location name (e.g. "paper_town").


'''Examples'''
'''Examples'''
* <code>set_monster_health</code> (heals all the monsters in the party)
* <code>remove_tracker player,paper_town</code>
or
* <code>get_player_monster name_variable</code>
* <code>set_monster_health name_variable,1</code>


== set_monster_level ==
== rename_monster ==
Change the level of a monster in the current player's party.
Open the text input screen to rename the monster.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are changed. (optional)
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>levels_added</code>: Number of levels to add. Negative numbers are allowed. Default 1. (optional)


'''Examples'''
'''Examples'''
* <code>set_monster_level</code> (all the monsters in the party level up by 1)
* <code>rename_monster name_variable</code>
or
* <code>get_player_monster name_variable</code>
* <code>set_monster_level name_variable,1</code>


== set_monster_plague ==
== rename_player ==
Set a monster's plague to the given condition. '''To get the mechanics going, it's crucial to know that must be a technique called 'plague_slug' (eg. spyderbite)'''.
Open the text input screen to rename the player.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>None</code>
* <code>plague_slug</code>: The slug of the plague to target.
* <code>condition</code>: Infected, inoculated, or None (removes the plague from the character, indicating a healthy state). (optional)


'''Examples'''
'''Examples'''
* <code>get_player_monster name_variable</code>
* <code>rename_player</code>
* <code>set_monster_plague name_variable,spyderbite,infected</code>


== set_monster_status ==
== replace_party_from_yaml ==
Change the status of a monster in the current player's party.
Replaces a character's party with a predefined set of monsters from a YAML file. This action loads a named party configuration from a YAML file and assigns it to the specified character (either the player or an NPC). Each monster entry in the YAML can define attributes like slug, level, and weight for random selection.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters get/lose status.. (optional)
* <code>character</code>: Either "player" or an NPC slug (e.g. "npc_maple").
* <code>status</code>: Inoculated, healthy or infected, default healthy (optional)
* <code>yaml_file</code>: Name of the YAML file (without extension) located in the mods folder.
* <code>set_name</code>: The key of the party to use within the YAML file.


'''Examples'''
'''Examples'''
* <code>set_monster_status</code> (all the monsters in the party lose their status)
or
* <code>get_player_monster name_variable</code>
* <code>set_monster_status name_variable,status_blinded</code>


== set_char_attribute ==
* <code>replace_party_from_yaml player,yaml_file,name</code>
Set the given attribute of the character to the given value.
 
== replace_techs_from_yaml ==
Replaces a monster's moveset using a predefined set from a YAML file.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>variable</code>: Name of the variable where the monster UUID is stored.
* <code>attribute</code>: Name of the attribute.
* <code>yaml_file</code>: Path to the YAML file containing movesets.
* <code>value</code>: Value of the attribute.
* <code>set_name</code>: The key of the moveset to use within the YAML file.


'''Examples'''
'''Examples'''
* <code>set_char_attribute character,attribute,value</code>
* <code>replace_techs_from_yaml player,yaml_file,name</code>


== set_party_attribute ==
== rumble ==
Set the given attribute of party's monsters to the given value.
Rumble available controllers with rumble support.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>duration</code>: Time in seconds to rumble for.
* <code>attribute</code>: Name of the attribute.
* <code>power</code>: Percentage of power to rumble (0 to 100).
* <code>value</code>: Value of the attribute.
* <code>period</code>: Time period between vibrations in milliseconds. Default 25.
* <code>delay</code>: Time in seconds before the rumble starts. Default 0.
* <code>attack_length</code>: Time in milliseconds for the rumble to ramp up. Default 256.
* <code>attack_level</code>: Initial intensity level during ramp-up. Default 0.
* <code>fade_length</code>: Time in milliseconds for the rumble to fade out. Default 256.
* <code>fade_level</code>: Final intensity level during ramp-down. Default 0.
* <code>direction</code>: Direction of the rumble effect, for spatial control. Default 16384.


'''Examples'''
'''Examples'''
* <code>set_party_attribute player,name,jimmy</code> (all the monsters in the party will be named jimmy)
* <code>rumble duration,power</code>


== set_party_status ==
== save_game ==
Records important information about all monsters in the party (eg average level of the party, etc.)
Saves the game. If the index parameter is absent, then it'll create slot4.save (index = 0 > slot 1, index = 1 > slot 2, index = 2 > slot 3)


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


'''Examples'''
'''Examples'''
* <code>set_party_status player</code>
* <code>save_game</code> (it's going to save slot4.save)
 
* <code>save_game 1</code> (it's going to save slot2.save)
== set_player_name ==
 
Set player name without opening the input screen.
== save_timestamp ==
Saves the current Unix timestamp (in seconds) into a game variable.


'''Parameters'''
'''Parameters'''
* <code>choice</code>: Single name or multiple names separated by ":" (random choice). NB: the names must be in the en_US PO file.
* <code>variable</code>: The name of the game variable to store the timestamp in.


'''Examples'''
'''Examples'''
* <code>set_player_name jimmy</code>
* <code>save_timestamp variable</code>
* <code>set_player_name jimmy:richard:linus</code> (random choice among jimmy, richard and linus)


== set_random_variable ==
== screen_transition ==
Set the key in the player.game_variables dictionary with a random value.
Fades the screen to black and back over <code>x</code> seconds.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable.
* <code>trans_time</code>: Time in seconds - default 0.3 (optional).
* <code>values</code>: Multiple values of the variable separated with ":".
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)


'''Examples'''
'''Examples'''
* <code>set_random_variable alpha,one:two:three</code> (variable "alpha" can be "alpha:one" or "alpha:two" or "alpha:three").
* <code>screen_transition 2</code>


== set_teleport_faint ==
== set_battle ==
Set teleport faint data
Append a new element in player.battles.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>fighter</code>: Npc slug name (e.g. "npc_maple").
* <code>map_name</code>: The name of the map to validate against.
* <code>result</code>: One among "won", "lost" or "draw"
* <code>x</code>: The x-coordinate to validate against.
* <code>opponent</code>: Npc slug name (e.g. "npc_maple").
* <code>y</code>: The y-coordinate to validate against.


'''Examples'''
'''Examples'''
* <code>set_teleport_faint player,healing_center.tmx,6,7</code>
* <code>set_battle player,won,npc_maple</code> (player won against npc_maple)


== set_template ==
== set_bill ==
Switch template (sprite and combat_front).
Initializes or updates a bill for a character, including its amount, interest rate, late fee and share rate.
 
'''Parameters'''
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>bill_slug</code>: identifier for the bill (must be translated in en_US base.po).
* <code>amount</code>: initial amount of the bill (optional, defaults to 0).
* <code>interest_rate</code>: interest rate applied to the bill (optional, e.g. 0.1 for 10%).
* <code>late_fee</code>: flat fee added to the bill when triggered (optional, eg. 10).
* <code>share_rate</code>: percentage of battle earnings automatically applied to the bill (optional, e.g. 0.2 for 20%).   
       
Notes:
* Interest and late fee are stored but not automatically applied.
* Use separate actions to trigger interest or fee accumulation.
* Amount must be non-negative.


Please remember that if you change the combat_front, automatically will change the combat_back.
'''Examples'''
Eg if you set the sprite xxx, then it's going to add _back.png -> xxx_back.png
* <code>set_bill player,bill_cathedral,100,0.1,50,0.5</code>
* <code>set_bill npc_maple,bill_rent,,0.05,25,0.2</code>


By using default: <code>set_template player,default</code> it's going to reassign the default sprite
== set_bubble ==
Put a bubble above player sprite.


'''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>sprite</code>: must be inside mods/tuxemon/sprites, eg: adventurer_brown_back.png -> adventurer
* <code>bubble</code>: dots, drop, exclamation, heart, note, question, sleep, angry, confused, fireworks
* <code>combat_front</code>: must be inside mods/tuxemon/gfx/sprites/player, eg: adventurer.png -> adventurer (optional)


'''Examples'''
'''Examples'''
* <code>set_template player,adventurer,adventurer</code>
* <code>set_bubble spyder_shopassistant</code> (remove bubble NPC)
* <code>set_bubble spyder_shopassistant,note</code> (set bubble NPC)
* <code>set_bubble player,note</code> (set bubble player)
* <code>set_bubble player</code> (remove bubble player)
 
[[File:AH SpriteSheet Balloon.png]]


== set_tuxepedia ==
== set_cipher ==
Set the key and value in the Tuxepedia dictionary.
Toggles ciphering for dialogue by enabling or disabling the CipherProcessor.


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>option</code>: "enable": Activates ciphering using the provided cipher map (if any) OR "disable": Disables ciphering entirely.
* <code>monster_slug</code>: Monster slug name (e.g. "rockitten").  
* <code>cipher_map</code>: the filename (without extension) of a YAML file located in the mods folder. If omitted during "enable", the default cipher map is used. Ignored when option is "disable".
* <code>label</code>: seen / caught


'''Examples'''
'''Examples'''
* <code>set_tuxepedia player,rockitten,caught</code>
* <code>set_cipher enable</code>


== set_variable ==
== set_economy ==
Updates the player's game variables by setting key-value pairs.
Sets the economy (prices and initial stock of items/monsters) for a specific NPC. This action orchestrates loading the economy data and then applying it to the target character's shop/inventory, including handling initial quantities and variable-based availability.
 
Also used to set the [[:Category:Environment|environment]].


'''Parameters'''
'''Parameters'''
* <code>set_variable variable_name:value</code>:
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>variable_name</code>: The name of the variable.
* <code>economy_slug</code>: Slug of an economy.
* <code>value</code>: The assigned value for the variable.


This implementation supports multiple parameters, allowing multiple variable assignments in one call. 
'''Examples'''
* <code>set_economy spyder_shopkeeper,spyder_candy_scoop</code>


'''Examples'''
== set_kennel_visible ==
* <code>set_variable battle_won:yes</code>
Set the kennel visible or hidden.
* <code>set_variable environment:grass</code>
* <code>set_variable <variable>:<value>[,<variable>:<value>]</code>


== spawn_monster ==
From hidden to visible: set_kennel_visible name_kennel,true
Breed a new monster. Add a new monster, created by breeding the two given monsters (identified by instance_id, stored in a variable) and adds it to the given character's party (identified by slug). The parents must be in either the trainer's party, or a storage box owned by the trainer.
From visible to hidden: set_kennel_visible name_kennel,false


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple"). The one who is going to receive the new born.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
 
* <code>kennel</code>: Name of the kennel.
* <code>visible</code>: true/false.
 
'''Examples'''
'''Examples'''
* <code>spawn_monster</code>
* <code>set_kennel_visible npc_maple,name_kennel,true</code>
* <code>set_kennel_visible npc_maple,name_kennel,false</code>


== start_battle ==
== set_layer ==
Start a battle between two characters and switch to the combat module.
Allows to change the color of the transparent layer.


'''Parameters'''
'''Parameters'''
* <code>character1</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>rgb</code>: color (eg red > 255,0,0,128 > 255:0:0:128) - default transparent
* <code>character2</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>music</code>: The name of the music file to play. (optional)


'''Examples'''
'''Examples'''
* <code>start_battle player,npc_maple</code>
* <code>set_layer 255:0:0:128</code>
* <code>start_battle npc_maple,npc_apple</code>


== start_cinema_mode ==
== set_mission ==
Start cinema mode by animating black bars to narrow the aspect ratio.
Set missions by updating it and by checking the prerequisites.
For a cinematic experience, specify the width of the horizontal and vertical black bars as a ratio of the screen resolution. For example, to achieve a 2.39:1 aspect ratio on a 1920x1080 screen, you would set the horizontal ratio to 0.42 (1920 / 1080 * (16/9 - 2.39/1)) and the vertical ratio to 0 (no vertical bars). By default only bar up and down.


'''Parameters'''
'''Parameters'''
* <code>aspect_y_ratio</code>: The width of the horizontal black bars as a ratio of the screen resolution. Default standard cinema mode.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>aspect_x_ratio</code>: The width of the vertical black bars as a ratio of the screen resolution. Default None.


'''Examples'''
'''Examples'''
* <code>start_cinema_mode</code> default, bar up and down
* <code>set_mission player</code>
* <code>start_cinema_mode ,2.0</code> bar left and right
* <code>start_cinema_mode 2.0</code> bar up and down
* <code>start_cinema_mode 2.0,2.0</code> bar up, down, left and right


== start_double_battle ==
== set_money ==
Start a double battle between two characters and switch to the combat module. At least 3 monsters in total (eg 2 vs 1 or 1 vs 2).
Set an amount of money for a specific slug.


'''Parameters'''
'''Parameters'''
* <code>character1</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>character2</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>amount</code>: Amount of money (>= 0) (default 0)
* <code>music</code>: The name of the music file to play. (optional)


'''Examples'''
'''Examples'''
* <code>start_double_battle player,npc_maple</code>
* <code>set_money player</code>
* <code>start_double_battle npc_maple,npc_apple</code>
* <code>set_money player,500</code>


== stop_cinema_mode ==
== set_monster_attribute ==
Stop cinema mode by animating black bars back to the normal aspect ratio.
Set the given attribute of the monster to the given value.


'''Parameters'''
'''Parameters'''
* <code>None</code>
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>attribute</code>: Name of the attribute.
* <code>value</code>: Value of the attribute.


'''Examples'''
'''Examples'''
* <code>stop_cinema_mode</code>
* <code>set_monster_attribute name_variable,name,jimmy</code> (the monster will be named jimmy)


== store_monster ==
== set_monster_flair ==
Store a monster in a box. Save the player's monster with the given instance_id to the named storage box, removing it from the player party.
Set or replace a monster's flair in a given category.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>variable</code>: Name of the variable that holds the monster's UUID.
* <code>box</code>: An existing box where the monster will be stored. (optional)
* <code>category</code>: Category of the monster flair.
* <code>flair</code>: Name of the monster flair.
* <code>sprite_type</code>: Optional pipe-separated list of sprite types (e.g., front:menu01)


'''Behavior'''
* If the category already has a flair, it will be replaced.
* If the category is new, the flair will be added.
* If sprite types are provided, the flair will only apply to those views.
           
'''Examples'''
'''Examples'''
* <code>get_player_monster name_variable</code>
* <code>get_player_monster name_variable</code>
then:
* <code>set_monster_flair name_variable,category,flair</code>
* <code>store_monster name_variable</code>
or
* <code>store_monster name_variable,name_kennel</code>


== teleport_faint ==
== set_monster_health ==
Teleport the player to the point in the teleport_faint variable. Usually used to teleport to the last visited Tuxcenter, as when all monsters in the party faint.
Set the hp of a monster in the current player's party. The action parameters may contain a monster slot and the amount of health.  


'''Parameters'''
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are healed. (optional)
* <code>trans_time</code>: Transition time in seconds - default 0.3.
* <code>health</code>: A float value between 0 and 1, which is the percent of max hp to be restored to. A int value, which is the number of HP to be restored to. If no health is specified, the hp is maxed out. (optional)
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(0,0,0)


'''Examples'''
'''Examples'''
* <code>teleport_faint player</code>
* <code>set_monster_health</code> (heals all the monsters in the party)
* <code>teleport_faint player,6.9</code>
or
* <code>teleport_faint player,3,255:0:0:50</code> (red)
* <code>get_player_monster name_variable</code>
* <code>set_monster_health name_variable,1</code>


== teleport ==
== set_monster_level ==
Teleports the player to a given position on a map. This teleport is immediate and does not have any transition animation.
Change the level of a monster in the current player's party.


'''Parameters'''
'''Parameters'''
* <code>map_name</code>: The map file to teleport the player to.
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are changed. (optional)
* <code>x</code>: The X-tile coordinate to teleport the player to.
* <code>levels_added</code>: Number of levels to add. Negative numbers are allowed. Default 1. (optional)
* <code>y</code>: The Y-tile coordinate to teleport the player to.


'''Examples'''
'''Examples'''
* <code>teleport map1.tmx,3,4</code>
* <code>set_monster_level</code> (all the monsters in the party level up by 1)
* <code>teleport room1.tmx,8,1</code>
or
* <code>get_player_monster name_variable</code>
* <code>set_monster_level name_variable,1</code>


== trading ==
== set_monster_plague ==
Select a monster in the player party and trade. It's advisable to use it with the condition <code>not has_monster monster_slug</code>.
Set a monster's plague to the given condition. '''To get the mechanics going, it's crucial to know that must be a technique called 'plague_slug' (eg. spyderbite)'''.


'''Parameters'''
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id (removed).
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>added</code>: Slug monster or Name of the variable where to store the monster id (added).
* <code>plague_slug</code>: The slug of the plague to target.
* <code>condition</code>: Infected, inoculated, or None (removes the plague from the character, indicating a healthy state). (optional)
* <code>enforced_check</code>: Optional string flag to enforce eligibility rules. Accepts "true", "1", or "yes" (case-insensitive). Default is False (eligibility is bypassed).  


'''Examples'''
'''Examples'''
* <code>get_player_monster name_variable</code>
* <code>get_player_monster name_variable</code>
then
* <code>set_monster_plague name_variable,spyderbite,infected</code>
* <code>trading name_variable,nut</code>


== transfer_money ==
== set_monster_status ==
Transfer money between entities. Both entities needs to have a wallet.
Change the status of a monster in the current player's party.


'''Parameters'''
'''Parameters'''
* <code>slug1</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters get/lose status.. (optional)
* <code>amount</code>: Amount of money.
* <code>status</code>: Inoculated, healthy or infected, default healthy (optional)
* <code>slug2</code>: Either "player" or character slug name (e.g. "npc_maple").


'''Examples'''
'''Examples'''
* <code>transfer_money player,100,npc_mom</code> (player transfers 100 to mom)
* <code>set_monster_status</code> (all the monsters in the party lose their status)
or
* <code>get_player_monster name_variable</code>
* <code>set_monster_status name_variable,status_blinded</code>


== transition_teleport ==
== set_char_attribute ==
Teleports the player to a given position on a map with a screen transition over <code>x</code> seconds.
Set the given attribute of the character to the given value.


'''Parameters'''
'''Parameters'''
* <code>map_name</code>: The map file to teleport the player to.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>x</code>: The X-tile coordinate to teleport the player to.
* <code>attribute</code>: Name of the attribute.
* <code>y</code>: The Y-tile coordinate to teleport the player to. 
* <code>value</code>: Value of the attribute.
* <code>trans_time</code>: The time in seconds - default 2. (optional)
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)


'''Examples'''
'''Examples'''
* <code>teleport map2.tmx,1,6,1.5</code> 
* <code>set_char_attribute character,attribute,value</code>
* <code>teleport room1.tmx,8,1,4</code>


== translated_dialog_choice ==
== set_party_attribute ==
Asks the player to select a choice. The translations for the text are looked up based on a given key.
Set the given attribute of party's monsters to the given value.


'''Parameters'''
'''Parameters'''
* <code>choice_keys</code>: Keys to reference translated text choices separated by colons.
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>variable</code>: The variable to store the answer which will be the key for the translated text.
* <code>attribute</code>: Name of the attribute.
* <code>value</code>: Value of the attribute.


'''Examples'''
'''Examples'''
* <code>translated_dialog_choice yes:no,myvariable</code>
* <code>set_party_attribute player,name,jimmy</code> (all the monsters in the party will be named jimmy)


== translated_dialog ==
== set_party_status ==
Open a dialog window with translated text according to the passed translation key. Parameters passed to the translation string will also be checked if a translation key exists.  
Records important information about all monsters in the party (eg average level of the party, etc.)


'''Parameters'''
'''Parameters'''
* <code>text</code>: The msgid in the PO file.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>avatar</code>: If it is a number, the monster is the corresponding monster slot in the player's party. If it is a string, we're referring to a monster by name.
* <code>position</code>: Position of the dialog box. Can be 'top', 'bottom', 'center', 'topleft', 'topright', 'bottomleft', 'bottomright', 'right', 'left'. Default 'bottom'.
* <code>alignment</code>: Alignment of text in the dialog box, it can be 'left', 'center' or 'right'. Default 'left'.
* <code>vertical_alignment</code>: Alignment of text in the dialog box, it can be 'bottom', 'middle' or 'top'. Default 'top'.
* <code>style</code>: a predefined style in db/dialogue/dialogue.json


'''Examples'''
'''Examples'''
* <code>translated_dialog msgid</code>
* <code>set_party_status player</code>


== unlock_controls ==
== set_player_name ==
Unlock player controls
Set player name without opening the input screen.


'''Parameters'''
'''Parameters'''
* <code>None</code>
* <code>choice</code>: A single name or multiple names separated by ":". If multiple, one will be randomly selected.


'''Examples'''
'''Examples'''
* <code>unlock_controls</code>  
* <code>set_player_name jimmy</code>
* <code>set_player_name jimmy:richard:linus</code> (random choice among jimmy, richard and linus)
 
== set_price_policy ==
Sets the PricePolicy for a specific NPC's economy.
 
'''Parameters'''
* <code>npc_slug</code>: Either "player" or NPC slug (e.g. "npc_maple").
* <code>policy_slug</code>: Slug of a price policy (e.g. "black_market") (YAML).
 
'''Examples'''
* <code>set_price_policy npc_maple,black_market</code>
 
== set_random_variable ==
Sets a key in the player's `game_variables` dictionary to a randomly selected value from a specified list. Values can be repeated or weighted to influence selection probability.
 
'''Parameters'''
* <code>variable</code>: The name of the game variable to set.
* <code>values</code>: A colon-separated string of values to choose from. Repeated values increase their selection chance. Alternatively, use `value=weight` to assign explicit weights.
 
'''Examples'''
* <code>set_random_variable alpha,one:two:three</code> (variable "alpha" can be "alpha:one" or "alpha:two" or "alpha:three").
* <code>set_random_variable variable,apple=1:banana=3:cherry=2</code>


== unpause_music ==
== set_routing_policy ==
Unpause the current (paused) music playback.
Sets or resets the routing policy for future monster additions. This does not add a monster — it modifies how PartyHandler.add_monster behaves.


'''Parameters'''
'''Parameters'''
* <code>None</code>
* <code>npc_slug</code>: NPC slug to apply the policy to.
* <code>policy_name</code>: Name of the routing policy defined in routing_policies.yaml.
 
'''Examples'''
* <code>set_routing_policy player,starter_policy</code>
* <code>set_routing_policy player,event_policy</code>
* <code>set_routing_policy player</code>  # resets to 'default'
 
== set_teleport_faint ==
Set teleport faint data
 
'''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.
 
'''Examples'''
* <code>set_teleport_faint player,healing_center.tmx,6,7</code>
 
== set_template ==
Switch template (sprite and combat_front).
 
Please remember that if you change the combat_front, automatically will change the combat_back.
Eg if you set the sprite xxx, then it's going to add _back.png -> xxx_back.png
 
By using default: <code>set_template player,default</code> it's going to reassign the default sprite
 
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>sprite</code>: must be inside mods/tuxemon/sprites, eg: adventurer_brown_back.png -> adventurer
* <code>combat_front</code>: must be inside mods/tuxemon/gfx/sprites/player, eg: adventurer.png -> adventurer (optional)
 
'''Examples'''
* <code>set_template player,adventurer,adventurer</code>
 
== set_tuxepedia ==
Set the key and value in the Tuxepedia dictionary.
 
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>monster_slug</code>: Monster slug name (e.g. "rockitten").
* <code>label</code>: seen / caught
 
'''Examples'''
* <code>set_tuxepedia player,rockitten,caught</code>
 
== set_variable ==
Updates the player's game variables by setting key-value pairs.
 
Also used to set the [[:Category:Environment|environment]].
 
'''Parameters'''
* <code>set_variable variable_name:value</code>:
* <code>variable_name</code>: The name of the variable.
* <code>value</code>: The assigned value for the variable.
 
This implementation supports multiple parameters, allowing multiple variable assignments in one call. 
 
'''Examples'''
* <code>set_variable battle_won:yes</code>
* <code>set_variable environment:grass</code>
* <code>set_variable <variable>:<value>[,<variable>:<value>]</code>
 
== show_monster ==
Change to MonsterInfoState. This action transitions to the MonsterInfoState, displaying detailed information about a specific monster.
 
'''Parameters'''
* <code>monster_variable</code>: The name of the game variable holding the monster's UUID.
 
'''Examples'''
* <code>show_monster player</code>
 
== spawn_monster ==
Breed a new monster. Add a new monster, created by breeding the two given monsters (identified by instance_id, stored in a variable) and adds it to the given character's party (identified by slug). The parents must be in either the trainer's party, or a storage box owned by the trainer.
 
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple"). The one who is going to receive the new born.
 
'''Examples'''
* <code>spawn_monster</code>
 
== start_battle ==
Start a battle between two characters and switch to the combat module.
 
'''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").
* <code>music</code>: The name of the music file to play. (optional)
 
'''Examples'''
* <code>start_battle player,npc_maple</code>
* <code>start_battle npc_maple,npc_apple</code>
 
== start_cinema_mode ==
Start cinema mode by animating black bars to narrow the aspect ratio.
For a cinematic experience, specify the width of the horizontal and vertical black bars as a ratio of the screen resolution. For example, to achieve a 2.39:1 aspect ratio on a 1920x1080 screen, you would set the horizontal ratio to 0.42 (1920 / 1080 * (16/9 - 2.39/1)) and the vertical ratio to 0 (no vertical bars). By default only bar up and down.
 
'''Parameters'''
* <code>aspect_y_ratio</code>: The width of the horizontal black bars as a ratio of the screen resolution. Default standard cinema mode.
* <code>aspect_x_ratio</code>: The width of the vertical black bars as a ratio of the screen resolution. Default None.
 
'''Examples'''
* <code>start_cinema_mode</code> default, bar up and down
* <code>start_cinema_mode ,2.0</code> bar left and right
* <code>start_cinema_mode 2.0</code> bar up and down
* <code>start_cinema_mode 2.0,2.0</code> bar up, down, left and right
 
== start_double_battle ==
Start a double battle between two characters and switch to the combat module. At least 3 monsters in total (eg 2 vs 1 or 1 vs 2).
 
'''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").
* <code>music</code>: The name of the music file to play. (optional)
 
'''Examples'''
* <code>start_double_battle player,npc_maple</code>
* <code>start_double_battle npc_maple,npc_apple</code>
 
== stop_cinema_mode ==
Stop cinema mode by animating black bars back to the normal aspect ratio.
 
'''Parameters'''
* <code>None</code>
 
'''Examples'''
* <code>stop_cinema_mode</code>
 
== store_monster ==
Store a monster in a box. Save the player's monster with the given instance_id to the named storage box, removing it from the player party.
 
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>box</code>: An existing box where the monster will be stored. (optional)
 
'''Examples'''
* <code>get_player_monster name_variable</code>
then:
* <code>store_monster name_variable</code>
or
* <code>store_monster name_variable,name_kennel</code>
 
== store_party ==
Store the entire party in a box. Save all monsters from the character's party into the named storage box, removing them from the party if successful.
 
'''Parameters'''
* <code>character</code>: Either "player" or an NPC slug (e.g. "npc_maple").
* <code>box</code>: An existing box where the monsters will be stored. If omitted, defaults to KENNEL.           
 
'''Examples'''
* <code>store_party player</code>
* <code>store_party player,name_kennel</code>
 
== teleport_faint ==
Teleport the player to the point in the teleport_faint variable. Usually used to teleport to the last visited Tuxcenter, as when all monsters in the party faint.
 
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>healing</code>: Trigger healing string flag ("true", "1", "yes" for True),
* <code>trans_time</code>: Transition time in seconds - default 0.3.
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(0,0,0)
 
'''Examples'''
* <code>teleport_faint player,true</code>
* <code>teleport_faint player,true,6.9</code>
* <code>teleport_faint player,true,3,255:0:0:50</code> (red)
 
== teleport ==
Teleport a character to a specific map and tile coordinates. If a screen transition is in progress, the teleport will be queued and executed at the apex of the transition.
 
'''Parameters'''
* <code>character</code>: Slug of the character to teleport.
* <code>map_name</code>: The map file to teleport the player to. 
* <code>x</code>: The X-tile coordinate to teleport the player to. 
* <code>y</code>: The Y-tile coordinate to teleport the player to.
 
'''Examples'''
* <code>teleport npc_maple,map1.tmx,3,4</code> 
* <code>teleport npc_maple,troom1.tmx,8,1</code>
 
== toggle_evolution_block ==
Blocks or unblocks a specific evolution for a monster.
 
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>monster_variable</code>: Name of the variable storing the monster's instance ID.
* <code>evolution_slug</code>: The slug of the evolution to block/unblock.
* <code>action</code>: "block" to permanently block, "unblock" to unblock.
 
'''Examples'''
* <code>toggle_evolution_block player,variable_name,rockat,block</code> 
* <code>toggle_evolution_block player,variable_name,rockat,unblock</code>
 
== trading ==
Select a monster in the player party and trade. It's advisable to use it with the condition <code>not has_monster monster_slug</code>.
 
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id (removed).
* <code>added</code>: Slug monster or Name of the variable where to store the monster id (added).
 
'''Examples'''
* <code>get_player_monster name_variable</code>
then
* <code>trading name_variable,nut</code>
 
== transfer_money ==
Transfer money between entities. Both entities needs to have a wallet.
 
'''Parameters'''
* <code>slug1</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>amount</code>: Amount of money.
* <code>slug2</code>: Either "player" or character slug name (e.g. "npc_maple").
 
'''Examples'''
* <code>transfer_money player,100,npc_mom</code> (player transfers 100 to mom)
 
== transition_teleport ==
Teleports the player to a given position on a map with a screen transition over <code>x</code> seconds.
 
'''Parameters'''
* <code>map_name</code>: The map file to teleport the player to. 
* <code>x</code>: The X-tile coordinate to teleport the player to. 
* <code>y</code>: The Y-tile coordinate to teleport the player to. 
* <code>trans_time</code>: The time in seconds - default 2. (optional)
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)
 
'''Examples'''
* <code>transition_teleport map2.tmx,1,6,1.5</code> 
* <code>transition_teleport room1.tmx,8,1,4</code>
 
== transition_teleport_return ==
Teleport a character back to their previously recorded location, using a screen transition. This action retrieves the last executed teleport request and sends the character back to its source map and coordinates. It must be used after a teleport that stored return data (e.g. source_map, source_x, source_y).
 
'''Requirements'''
* A previous teleport must have been executed and stored in <code>teleporter.last_teleport_request</code>.
* The previous request must include valid source map and coordinates.
 
'''Parameters'''
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>facing</code>: One of "up", "down", "left", "right". Case-insensitive.
* <code>trans_time</code>: (Optional) Transition time in seconds. Default is 0.3.
* <code>rgb</code>: (Optional) Transition color in RGB format (e.g. "255:0:0" for red). Default is black (0,0,0).           
 
'''Examples'''
* <code>transition_teleport_return player,up</code> 
 
== translated_dialog_choice ==
Asks the player to select a choice. The translations for the text are looked up based on a given key.
 
'''Parameters'''
* <code>choice_keys</code>: Keys to reference translated text choices separated by colons.
* <code>variable</code>: The variable to store the answer which will be the key for the translated text.
 
'''Examples'''
* <code>translated_dialog_choice yes:no,myvariable</code>
 
== translated_dialog ==
Open a dialog window with translated text according to the passed translation key. Parameters passed to the translation string will also be checked if a translation key exists.
 
'''Parameters'''
* <code>text</code>: The msgid in the PO file.
* <code>avatar</code>: If it is a number, the monster is the corresponding monster slot in the player's party. If it is a string, we're referring to a monster by name.
* <code>position</code>: Position of the dialog box. Can be 'top', 'bottom', 'center', 'topleft', 'topright', 'bottomleft', 'bottomright', 'right', 'left'. Default 'bottom'.
* <code>h_alignment</code>: Alignment of text in the dialog box, it can be 'left', 'center' or 'right'. Default 'left'.
* <code>v_alignment</code>: Alignment of text in the dialog box, it can be 'bottom', 'center' or 'top'. Default 'top'.
* <code>style</code>: a predefined style in db/dialogue/dialogue.json
 
'''Examples'''
* <code>translated_dialog msgid</code>
 
== trigger_status ==
Triggers the current status effect of a monster (e.g., poison, burn, sleep).
 
'''Parameters'''
* <code>variable</code>: Name of the variable containing the monster ID. If not specified, all monsters in the party will be affected.
* <code>status_name</code>: Optional. If provided, only triggers the status effect if it matches the monster's current status slug.
 
'''Examples'''
* <code>trigger_status variable</code>
* <code>trigger_status variable,poison</code>
 
== tune_radio ==
Launches the NuPhoneRadio interface for a given character, optionally tuned to a specific frequency. This action transitions the game into a radio interface state, allowing the player to access broadcasts associated with a specific NPC. It can launch either the standard radio menu or the tuner interface, depending on whether a frequency is provided. This is typically used in scripted events to simulate tuning into a radio station from a character's perspective or location, enabling dynamic storytelling and immersive audio experiences.
 
'''Parameters'''
* <code>character_slug</code>: The slug of the character (NPC) whose context will be used to determine available radio stations and broadcasts.
* <code>frequency</code>: If provided, launches the tuner interface and attempts to tune directly to the specified frequency (in MHz). If omitted, the standard radio menu is shown instead.
 
'''Examples'''
* <code>tune_radio player</code>
* <code>tune_radio player,88.9</code>
 
== unload_sound ==
Unload a specific sound from memory cache, or all sounds if no filename is given.
 
'''Parameters'''
* <code>filename</code>: Name of the sound file to unload. If omitted, all cached sounds will be removed from memory.
 
'''Examples'''
* <code>unload_sound</code>
* <code>unload_sound filename</code>
 
== unlock_controls ==
Unlock player controls
 
'''Parameters'''
* <code>None</code>
 
'''Examples'''
* <code>unlock_controls</code>
 
== unpause_music ==
Unpause the current (paused) music playback.
 
'''Parameters'''
* <code>None</code>


'''Examples'''
'''Examples'''
* <code>pause_music</code>
* <code>pause_music</code>
== update_cipher ==
Updates the list of unlocked letters for a character used by the CipherProcessor.
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>letter</code>: A single uppercase letter (or multiple separated by ':') to add to the character's unlocked set. If omitted, no new letters will be added, but the CipherProcessor will be updated with the current unlocked state.
'''Examples'''
* <code>update_cipher player,a:b:c:d</code> 


== update_tile_properties ==
== update_tile_properties ==
Update tile properties. Enable movement and/or the moverate. '''moverate 0 = not accessible'''. The surface keys supported are: '''surfable''', '''walkable''' and '''climbable'''.
Update tile properties by modifying movement settings or accessibility.


'''Parameters'''
'''Parameters'''
* <code>label</code>: Name of the property
* <code>label</code>: The name of the property to update (e.g., surfable, walkable).
* <code>moverate</code>: Value of the moverate (eg 1 equal moverate, default 1)
* <code>moverate</code>: The value of the movement rate (e.g., 1 for normal movement, 0 for inaccessible).


'''Examples'''
'''Examples'''

Latest revision as of 08:08, 1 November 2025

Here is a list of currently supported actions. New event actions can be created by creating a new page under the tuxemon/event/actions:

access_pc[edit | edit source]

Change to PCState. This action transitions to the PCState, typically used for viewing player character details or an NPC as if it were a PC.

Parameters

  • character_slug: The name or identifier of the obstacle.

Examples

  • access_pc player

add_collision[edit | edit source]

Handles the addition of a collision zone associated with a specific label. Optionally, with coordinates provided, it can block a specific tile within the map.

Parameters

  • label: The name or identifier of the obstacle.
  • x: (Optional) X-coordinate of the specific tile to block.
  • y: (Optional) Y-coordinate of the specific tile to block.

Examples

  • add_collision obstacle,6,8
  • add_collision wall (in this case must exist a collision zone in the .tmx file)

add_combo[edit | edit source]

Registers a new combo sequence with the ComboDetector.

Parameters

  • combo_name: Required. A name or ID for the combo.
  • buttons: Required. A colon-separated list of button names (e.g. LEFT:RIGHT:A).
  • max_delay_ms: Optional. Max delay between presses (default: 1000).
  • event_name: The name of the event whose actions will be executed (optional)

Examples

  • add_combo name_combo,LEFT:RIGHT:A

add_contacts[edit | edit source]

Add contact to the app (Nu Phone). npc_slug must have the msgid inside the PO.

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple").
  • npc_slug: slug name (e.g. "npc_maple").
  • relation: type of relation
  • strength: amount of strength (higher, better), default 50, capped 100
  • steps: amount of steps, default character steps
  • decay_rate: decay rate of the relationship, default 0.01, capped 1.0
  • decay_threshold: threshold of steps after which the decay triggers, default 500

Examples

  • add_contacts player,npc_maple

add_held_item[edit | edit source]

Adds a held item to a specific monster.

Parameters

  • variable: Name of the variable where to store the monster id.
  • item: Slug of the item (e.g. "potion").

Examples

  • add_held_item variable,item

add_item[edit | edit source]

Add the specified item to the player's inventory.

Parameters

  • item_name: Monster slug to look up in the monster database or name variable where it's stored the mon_slug.
  • quantity: Quantity of the item to add or to reduce. By default it is 1. (optional)
  • trainer_slug: Slug of the trainer that will receive the item. It defaults to the current player. (optional)

Examples

  • add_item hatchet
  • add_item hatchet,2
  • add_item hatchet,2,npc_maple

add_monster[edit | edit source]

Add the specified monster to the player's party.

Parameters

  • monster_slug: Monster slug to look up in the monster database.
  • monster_level: Level of the added monster.
  • trainer_slug: Slug of the trainer that will receive the monster. It defaults to the current player. (optional)
  • exp_mod: Experience modifier. (optional)
  • money_mod: Money modifier. (optional)

Examples

  • add_monster fruitera,10
  • add_monster fruitera,10,npc_maple,10,27

add_step_tracker[edit | edit source]

Adds a step tracker to a specific character.

Parameters

  • character: Either "player" or an NPC slug name (e.g., "npc_maple").
  • tracker_id: Unique name for identifying the step tracker.
  • countdown: Number of steps before the tracker reaches zero.
  • milestones: (optional) Step milestones, separated by : (e.g., "500:250:100").

Examples

  • add_step_tracker npc_maple,tracker_id,500
  • add_step_tracker npc_maple,tracker_id,500,500:250:100

add_tech[edit | edit source]

Adds a tech to a specific monster.

Parameters

  • variable: Name of the variable where the monster UUID is stored.
  • technique: Slug of the technique to add (e.g. "bullet").
  • power: Optional float (0.0-3.0). Overrides default power.
  • potency: Optional float (0.0-1.0). Overrides default potency.
  • accuracy: Optional float (0.0-1.0). Overrides default accuracy.

Examples

  • get_player_monster name_variable
  • add_tech name_variable,bullet

add_tracker[edit | edit source]

Add tracker.

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple").
  • location: location name (e.g. "paper_town").
  • visited: if it has been visited or not (true or false), default True

Examples

  • add_tracker player,paper_town

adjust_bill_penalty[edit | edit source]

Applies a penalty to a bill for a character — either interest or late fee.

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple").
  • bill_slug: Slug of the bill to modify.
  • method: Either "interest" or "fee".

Examples

  • adjust_bill_penalty player,electric_bill,interest
  • adjust_bill_penalty npc_maple,rent,fee

boundary_move[edit | edit source]

Moves the current active boundary by the given delta values.

Parameters

  • boundary_name: Required. The name to assign to the boundary
  • dx: The change in the x-coordinate.
  • dy: The change in the y-coordinate.

Examples

  • boundary_move safe_zone,5,5

boundary_resize[edit | edit source]

Resizes the current active boundary.

Parameters

  • boundary_name: Required. The name to assign to the boundary (e.g., "safe_zone", "event").
  • values: A colon-separated string of integers: - For rectangle: dx:dy - For circle: delta

Examples

  • boundary_resize safe_zone,5:5

boundary_set[edit | edit source]

Replaces the current boundary with a new one, or resets to default if no parameters are given.

Parameters

  • boundary_name: Required. The name to assign to the boundary (e.g., "safe_zone", "event").
  • shape: Optional. Either "rectangle" or "circle".
  • values: Optional. A colon-separated string of integers: for "rectangle": x0:x1:y0:y1 and for "circle": cx:cy:radius

Examples

  • boundary_set safe_zone,circle,5:5:5
  • boundary_set safe_zone

breeding[edit | edit source]

Select a monster in the player party filtered by gender and store its id in a variables (breeding_father or breeding_mother)

Parameters

  • gender: Gender (male or female).

Examples

  • breeding male
  • breeding female

call_event[edit | edit source]

Executes the actions from another event, ignoring its conditions. This can be especially useful for scenarios where you might need multiple sets of conditions that could be true, such as executing an action when the player is at a certain position OR has a certain item in their inventory.

Parameters

  • event_name: The name of the event whose actions should be executed.

Examples

  • call_event name_event

camera_follow[edit | edit source]

Centers the camera on a specified NPC or the original entity.

Parameters

  • npc_slug: The slug of the character to center the camera on. Defaults to None, which centers the camera on the original entity.

Examples

  • camera_follow npc_slug
  • camera_follow

camera_mode[edit | edit source]

Change camera mode: freeroaming or fixed.

Parameters

  • mode: the camera mode, either "fixed" or "free_roaming".

Examples

  • camera_mode freeroaming

camera_move[edit | edit source]

Smoothly move the camera to a specific coordinate or reset it to its original position.

Parameters

  • time: the duration (in seconds) required for the camera to transition to the target position.
  • x,y: the coordinates where the camera needs to be centered. (optional)

Examples

  • camera_move 2.0,32,6

camera_position[edit | edit source]

Move the camera on a coordinate.

Parameters

  • x,y: the coordinates where the camera needs to be centered. (optional)

Examples

  • camera_position 6,9
  • camera_position

camera_shake[edit | edit source]

Shake the camera with a precise intensity and duration.

Parameters

  • intensity: the magnitude of the shake effect. A higher value results in a more pronounced shake, while a lower value produces a subtler effect (min 0.0, max 3.0).
  • duration: the length of time (in seconds) that the shake effect should last. The method calculates the number of frames to shake based on an assumed frame rate.

Examples

  • camera_shake 3.0,2.0

change_bg[edit | edit source]

Change the background.

Parameters

  • background:
  • it can be the name of the file (see below note)
  • it can be a RGB color separated by ":" (eg 255:0:0)
  • image: monster_slug or template_slug or path
  • if path, then "gfx/ui/background/"
  • if template (eg. ceo) in "gfx/sprites/player"
  • note: the background or image (if not monster or template) must be inside the folder (gfx/ui/background/)
  • background size: 240x160


Examples

  • change_bg gradient_blue,rockitten
  • change_bg gradient_blue,ceo
  • change_bg gradient_blue
  • change_bg (stop)

change_faction_membership[edit | edit source]

Makes an NPC (or player) join or leave a specific faction.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • faction_slug: The slug identifier of the faction whose membership will be changed.
  • status: Must be either "join" or "leave", indicating the membership action.

Examples

  • change_faction_membership npc_maple,faction_slug,join
  • change_faction_membership npc_maple,faction_slug,leave

change_taste[edit | edit source]

Changes the specified taste (warm or cold) of a monster.

Parameters

  • variable: Name of the game variable containing the monster's UUID.
  • type_taste: Either "warm" or "cold" to indicate which taste to change.
  • new_taste: Slug of the new taste to assign, or "random" to select a new one at random (excluding "tasteless" and the current taste).

Examples

  • change_taste name_variable,type_taste,new_taste

change_state[edit | edit source]

Change to the specified state (generic). This action handles state transitions that do not require specific additional parameters beyond the state name itself.

Parameters

  • state_name: The state name to switch to.

Examples

  • change_state state_name

char_face[edit | edit source]

Make the character face a certain direction.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • direction: Direction to make the character's face. Can be set to: left, right, up, down, player or a character slug.

Examples

  • char_face player,down
  • char_face npc_maple,right
  • char_face npc_maple,player (Maple faces the player)

char_look[edit | edit source]

Make a character look around.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • frequency: Frequency of movements. 0 to stop looking. If set to a different value it will be clipped to the range [0.5, 5]. If not passed the default value is 1.
  • directions: the direction the npc is going to look, by default all. (optional)

Examples

  • char_look character
  • char_look character,,right:left

char_move[edit | edit source]

Relative tile movement for characters. It interprets movement instructions, updates character positions accordingly, and blocks execution until the destination is reached.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • move: A sequence of movement instructions in the format: "<direction> [amount_of_tiles]" where:
  • direction: One of "up", "down", "left", "right".
  • amount_of_tiles (optional): Number of tiles to move (default is 1). Multiple moves can be provided, e.g., "up 10, down 5, left 5".

Examples

  • char_move spyder_homemakerpapertown,down 1,right 1,up 1,left 1

char_patrol[edit | edit source]

Enables a character to patrol a predefined route in a continuous loop.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • move: A sequence of movement instructions in the format: "<direction> [amount_of_tiles]" where:
  • direction: One of "up", "down", "left", "right".
  • amount_of_tiles (optional): Number of tiles to move (default is 1). Multiple moves can be provided, e.g., "up 10, down 5, left 5".

Examples

  • char_patrol spyder_homemakerpapertown,up 4,down 4

char_plague[edit | edit source]

Set the entire party as infected or inoculated or healthy.

Parameters

  • plague_slug: The slug of the plague to target.
  • condition: Infected, inoculated, or None (removes the plague from the character, indicating a healthy state). (optional)
  • character: Either "player" or npc slug name (e.g. "npc_maple"). (optional)
  • enforced_check: Optional string flag to enforce eligibility rules. Accepts "true", "1", or "yes" (case-insensitive). Default is False (eligibility is bypassed).

Examples

  • char_plague plague_slug,infected,npc_maple

char_position[edit | edit source]

Set the position of a character.

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.

Examples

  • char_position npc_maple,6,9

char_run[edit | edit source]

Set the character movement speed to the global run speed.

Parameters

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

Examples

  • char_run npc_mom

char_speed[edit | edit source]

Set the character movement speed to a custom value.

Parameters

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

Examples

  • char_speed npc_mom,0.2

char_stop[edit | edit source]

Make the character stop moving.

Parameters

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

Examples

  • char_stop npc_mom

char_talk[edit | edit source]

Displays dialogue for a character based on context and location. This action retrieves dialogue from the character's dialogue profile, optionally using a location-specific override. The dialogue field determines which type of line to display (e.g. greeting, pre_battle, farewell).

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • field: The dialogue type to display. Must be one of: greeting, idle, farewell, pre_battle, post_battle_win, post_battle_lose and post_battle_draw
  • location: Optional map identifier (e.g. "map.tmx") used to override default dialogue.

Examples

  • char_talk npc_mom,farewell

char_walk[edit | edit source]

Set the character movement speed to the global walk speed.

Parameters

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

Examples

  • char_walk npc_mom

char_wander[edit | edit source]

Make a character wander around the map.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • frequency: Frequency of movements. 0 to stop wandering. If set to a different value it will be clipped to the range [0.5, 5]. If not passed the default value is 1.
  • t_bound: Coordinates top_bound vertex (e.g. 5,7)
  • b_bound: Coordinates bottom_bound vertex (e.g. 7,9)

Examples

  • char_wander npc_maple
  • char_wander npc_maple,,5,7,7,9

choice_item[edit | edit source]

Ask the player to make a choice among items.

Parameters

  • choices: List of possible choices (item slugs eg: potion:tea), separated by a colon ":".
  • variable: Variable to store the result of the choice.

Examples

  • choice_monster potion:tea,name_variable

choice_monster[edit | edit source]

Ask the player to make a choice among monsters.

Parameters

  • choices: List of possible choices (monster slugs eg: rockitten:apeoro), separated by a colon ":".
  • variable: Variable to store the result of the choice.

Examples

  • choice_monster apeoro:rockitten,name_variable

choice_npc[edit | edit source]

Ask the player to make a choice among NPCs.

Parameters

  • choices: List of possible choices (npc slugs eg: maple:billie), separated by a colon ":".
  • variable: Variable to store the result of the choice.

Examples

  • choice_monster billie:maple,name_variable

cipher_dialog[edit | edit source]

Displays a dialog window with text that may be ciphered based on the character's unlocked letters and the active CipherProcessor. The dialog text is optionally translated, styled, and formatted based on script parameters. Any unlocked letters will remain visible, while the remaining content may be obfuscated depending on the cipher configuration.

Parameters

  • text: Text of the dialog.
  • avatar: Monster avatar. If it is a number, the monster is the corresponding monster slot in the player's party. If it is a string, we're referring to a monster by name.
  • position: Position of the dialog box. Can be 'top', 'bottom', 'center', 'topleft', 'topright', 'bottomleft', 'bottomright', 'right', 'left'. Default 'bottom'.
  • h_alignment: Alignment of text in the dialog box, it can be 'left', 'center' or 'right'. Default 'left'.
  • v_alignment: Alignment of text in the dialog box, it can be 'bottom', 'center' or 'top'. Default 'top'.
  • style: a predefined style in db/dialogue/dialogue.json

Examples

  • cipher_dialog msgid

clear_kennel[edit | edit source]

Clear a kennel. It advisable to save the game and check twice. Remember the main kennel is "Kennel" and without destination (transfer) the monster will be deleted as well as the kennel.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • kennel: The kennel to clear.
  • transfer: The kennel to transfer the monsters. (optional)

Examples

  • clear_kennel npc_maple,name_kennel,new_kennel

clear_tuxepedia[edit | edit source]

Clear the key and value in the Tuxepedia dictionary.

Parameters

  • monster_slug: Monster slug name (e.g. "rockitten").

Examples

  • clear_tuxepedia rockitten

clear_variable[edit | edit source]

Removes specified variables from the player's stored variables.

Parameters

  • variable: One or more variables to be removed.

Examples

  • clear_variable name_variable

copy_variable[edit | edit source]

Copy the value of var2 into var1 (e.g. var1 = var 2).

Parameters

  • var1: The variable to copy to.
  • var2: The variable to copy from.

Examples

  • copy_variable new_variable,old_variable

crafting_station[edit | edit source]

Change to the specified state.

Parameters

  • character_slug: The slug of the character (NPC).
  • method: Suggests how the recipe is executed, e.g., cooking, forging.
  • file_yaml: The YAML file (like `recipe.yaml`) that contains the recipe definitions to load into the system (mods folder).

Examples

  • crafting_station player,cooking

create_kennel[edit | edit source]

Creates a new kennel. It's advisable to create a msgid in the en_US PO file.

msgid "kennel_name" msgstr "Kennel Name"

Parameters

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

Examples

  • create_kennel npc_maple,new_kennel

create_npc[edit | edit source]

Creates an NPC and places them on the current map.

Parameters

  • name: The name of the NPC to create. This NPC should exist in resources/db/npc in JSON format.
  • tile_pos_x: The X-tile coordinate to place the NPC.
  • tile_pos_y: The Y-tile coordinate to place the NPC.
  • behavior: The NPC's movement behavior. Currently not implemented.

Examples

  • create_npc Maple,2,3
  • create_npc Pine,1,6,stand

dojo_method[edit | edit source]

Represents an event action for the monks in the Dojo (Spyder).

Parameters

  • variable_name: The name of the variable where the monster ID will be stored.
  • option: The action to perform. Can be either: "technique" learn any move the monster hasn't acquired from its base moveset, without restrictions based on level or evolution stage OR "monster" devolve the monster.

Examples

  • dojo_method variable_name,monster
  • dojo_method variable_name,technique

evolution[edit | edit source]

Checks, asks and evolves. It's the action responsible for evolving monster when one or more conditions are met. It's advisable to use it with the condition is/not check_evolution player

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • variable: Name of the variable where to store the monster id. If no variable is specified, all monsters get experience.
  • evolution: Slug of the evolution.

Examples

  • evolution player
  • evolution player,name_variable,rockat

fade_in[edit | edit source]

Fade in.

Parameters

  • trans_time: Transition time in seconds - default 0.3
  • rgb: color (eg red > 255,0,0 > 255:0:0) - default rgb(0,0,0)

Examples

  • fade_in 2.0

fade_out[edit | edit source]

Fade out.

Parameters

  • trans_time: Transition time in seconds - default 0.3
  • rgb: color (eg red > 255,0,0 > 255:0:0) - default rgb(0,0,0)

Examples

  • fade_out 2.0

fadeout_music[edit | edit source]

Fades out music over x milliseconds.

Parameters

  • time_seconds: Time in milliseconds to fade out the currently playing music. (optional)

Examples

  • fadeout_music 2

format_variable[edit | edit source]

Format the value of a variable from the game (eg. float or int).

Parameters

  • variable: The variable to format.
  • type_format: Kind of format (float or int).

Examples

  • format_variable name_variable,int
  • format_variable name_variable,float

get_party_monster[edit | edit source]

Saves all the iids (party) in variables. Names are saved in game variables: iid_slot_{index}. Where index is the position in the party (the 1st one is 0, 2nd one is 1, etc.)

Parameters

  • npc_slug: npc slug name (e.g. "npc_maple") - if absent default "player" (optional)

Examples

  • get_party_monster
  • get_party_monster npc_maple

get_player_monster[edit | edit source]

Select a monster in the player party and store its id in a variable.

It allows filtering: slug, gender, evolution_stage, element, shape, taste_warm, taste_cold, level, weight, height, max_hp, current_hp, armour, dodge, melee, ranged and speed.

For the definition: level, weight, height, max_hp, current_hp, armour, dodge, melee, ranged and speed (all numeric values) is necessary to use a numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".

Note:

  • let's say a player doesn't has no options, then the variable will result as: name_variable:no_option
  • let's say a player has options, but clicks return, then the variable will result as: name_variable:no_choice

Parameters

  • variable_name: Name of the variable where to store the monster id.
  • filter_name: the name of the first filter (optional)
  • value_name: the actual value to filter (optional)
  • extra: used to filter more (optional)

Examples

  • get_player_monster name_variable
  • get_player_monster name_variable,speed,more_than,50
  • get_player_monster name_variable,level,less_than,15
  • get_player_monster name_variable,shape,serpent
  • get_player_monster name_variable,shape,serpent

give_experience[edit | edit source]

Gives experience points to the monster.

Parameters

  • variable: Name of the variable where to store the monster id.
  • exp: Name of the variable where to store the experience points or directly the number of points. Negative value will result in 0.

Examples

  • give_experience name_variable,steps_variable"
  • give_experience name_variable,420

info[edit | edit source]

Records monster's attribute values inside a game variable. It allows to record the monster's owner attribute values too.

Parameters

  • variable: Name of the variable where to store the monster id.
  • attribute: The attribute to check (level, speed, etc.).

Examples

  • info name_variable,level -> if the monster is lv 4, then it'll create a variable called: "info_level:4"
  • info name_variable,owner_steps -> if the owner walked 69 steps, then it'll create a variable called: "info_owner_steps:69"

input_variable[edit | edit source]

Set a code and checks if it's correct or not. The player's output will be by default lowercase.

Parameters

  • question: The question the player needs to reply. (eg. "access_code") then you create the msgid "access_code" inside the English PO file, as follows: msgid "access_code" and msgstr "Here the actual question?"
  • variable: Name of the variable where to store the output.
  • escape: Whether the input can be closed or not. Default False.

Examples

  • input_variable access_code,response_question
  • input_variable access_code,response_question,escape

learn_tech_by_method[edit | edit source]

Teaches a technique to a specific monster using a specific learning method.

Parameters

  • monster_var: Game variable name containing the monster UUID.
  • technique: Slug of the technique to learn.
  • method: Learning method enum name (e.g. "EVENT", "TM")

Examples

  • learn_tech_by_method monster_id,flamethrower,EVENT
  • learn_tech_by_method monster_id,fireblast,TM

load_game[edit | edit source]

Loads the game. If the index parameter is absent, then it'll load slot4.save (index = 0 > slot 1, index = 1 > slot 2, index = 2 > slot 3)

Parameters

  • index: Selected index. (optional)

Examples

  • load_game (it's going to load slot4.save)
  • load_game 0 (it's going to load slot1.save)

lock_controls[edit | edit source]

Lock player controls.

Parameters

  • None

Examples

  • lock_controls

manage_map_cache[edit | edit source]

Adds or removes a map from the cache.

Parameters

  • action: "add" or "remove"
  • map_name: Name of the map (map.tmx)

Examples

  • manage_map_cache add,map.tmx
  • manage_map_cache remove,map.tmx

menu[edit | edit source]

Toggle visibility of one or more world menu entries, or apply a preset.

Parameters

  • flag: "enable" or "disable", applied to specified menus (or all)
  • preset: one of defined presets ("minimal", etc.)

Examples

  • menu reset > clears all menu flags
  • menu enable > enables all menus
  • menu disable,menu_bag:menu_player > disables specified menus
  • menu enable,all > enables all menus
  • menu minimal > applies "minimal" preset

modify_bill[edit | edit source]

Add or remove an amount of money from a bill (slug).

Parameters

  • slug: Either "player" or character slug name (e.g. "npc_maple").
  • bill_slug: Slug of the bill.
  • amount: Amount of money to add/remove (-/+)
  • variable: Name of the variable where is stored the amount.

Examples

  • modify_bill player,bill_slug,100
  • modify_bill player,bill_slug,,name_variable

modify_char_attribute[edit | edit source]

Modify the given attribute of the character by modifier. By default this is achieved via addition, but prepending a '%' will cause it to be multiplied by the attribute.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • attribute: Name of the attribute to modify.
  • value: Value of the attribute modifier.

Examples

  • modify_char_attribute character,attribute,value

modify_contacts[edit | edit source]

Modify contact relationship.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • npc_slug: slug name (e.g. "npc_maple").
  • attribute: it can be 'strength', 'decay_rate' or 'decay_threshold'
  • value: the new value

Examples

  • modify_contacts player,npc_maple,strength,100

modify_faction_reputation[edit | edit source]

Modifies an NPC's (or player's) reputation with a specific faction.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • faction_slug: The slug identifier of the faction to modify reputation for.
  • amount: A string representation of an integer. Positive or negative values (e.g. "25", "-50") that change the reputation score accordingly.

Examples

  • modify_faction_reputation npc_maple,faction_slug,25
  • modify_faction_reputation npc_maple,faction_slug,-50

modify_money[edit | edit source]

Add or remove an amount of money for a wallet (slug).

Parameters

  • slug: Either "player" or character slug name (e.g. "npc_maple").
  • amount: Amount of money to add/remove (-/+)
  • variable: Name of the variable where to store the amount.

Examples

  • modify_money npc_maple,100
  • modify_money npc_maple,-50
  • modify_money player,,name_variable

modify_monster_bond[edit | edit source]

Add or remove an amount of money for a wallet (slug).

Parameters

  • variable: Name of the variable where to store the monster id. If no variable is specified, all monsters are touched.
  • amount: An int or float value, if no amount, then default 1 (int).

Examples

  • modify_monster_bond
  • modify_monster_bond name_variable,25
  • modify_monster_bond name_variable,-0.5

modify_monster_health[edit | edit source]

Modify the hp of a monster in the current player's party.

Parameters

  • variable: Name of the variable where to store the monster id. If no variable is specified, all monsters are healed.
  • health: A float value between 0 and 1, which is the percent of max hp to be restored to. A int value, which is the number of HP to be restored to. If no health is specified, the hp is maxed out.

Examples

  • modify_monster_health
  • modify_monster_health ,0.25


modify_monster_stats[edit | edit source]

Change the stats of a monster in the current player's party.

Parameters

  • variable: Name of the variable where to store the monster id. If no variable is specified, all monsters are touched. (Optional)
  • stat: A stat among armour, dodge, hp, melee, speed and ranged. If no stat, then all the stats. (Optional)
  • amount: A/an float/int value, if no amount, then default 1 (+). (Optional)

Examples

  • modify_monster_stats
  • modify_monster_stats ,,0.25
  • modify_monster_stats name_variable,speed,25
  • modify_monster_stats name_variable,dodge,-12
  • modify_monster_stats name_variable,dodge,-0.4

open_journal[edit | edit source]

Change to JournalInfoState. This action transitions to the JournalInfoState, displaying information about a specific monster in the player's journal.

Parameters

  • monster_slug: The slug of the monster to display in the journal.

Examples

  • open_journal player

open_shop[edit | edit source]

Opens a shop interface between the player and a target NPC.

Parameters

  • npc_slug: Either "player" or the NPC slug identifier (e.g. "npc_maple").
  • menu: Type of shop interaction to open. Must be one of: "buy_item", "sell_item", "both_item", "buy_monster", "sell_monster", "both_monster", "train_monster" or "heal_monster"
  • model: (optional) A configuration profile name used to load custom shop behavior.

Notes:

  • The target NPC must have an economy assigned.
  • If menu is "both_*", a choice dialog is shown for selection.

Examples

  • open_shop npc_maple,both_item

overwrite_tech[edit | edit source]

Replaces a known technique with another for a specific monster. This action is typically used when a monster chooses to forget a move and learn a new one.

Parameters

  • removed: Name of the game variable that stores the UUID of the technique to be replaced.
  • added: Slug of the technique to be added (e.g., "peck", "fireball")

Examples

  • overwrite_tech name_variable,peck

park_experience[edit | edit source]

Shows the results of the Park session.

Parameters

  • option: Either 'start' or 'stop'

Examples

  • park_experience start
  • park_experience stop

pathfind[edit | edit source]

Moves an NPC to a certain tile on the map.

Parameters

  • name: The name of the NPC to be moved.
  • tile_pos_x: The X-tile coordinate to have the NPC to walk to.
  • tile_pos_y: The Y-tile coordinate to have the NPC to walk to.

Examples

  • pathfind Maple,2,3
  • pathfind Pine,1,6

pathfind_to_player[edit | edit source]

Pathfind NPC close the player.

Parameters

  • npc_slug: Npc slug name (e.g. "npc_maple").
  • direction: Approaches the player from up, down, left or right.
  • distance: How many tiles (2, 3, 4, etc.)

Examples

  • pathfind_to_player spyder_route2_roddick
  • translated_dialog spyder_route2_roddick1
  • start_battle player,spyder_route2_roddick

pause_music[edit | edit source]

Pauses the currently playing music.

Parameters

  • None

Examples

  • pause_music

play_map_animation[edit | edit source]

Trigger a map animation at a specified position based on the character's coordinates within the world map.

Parameters

  • animation_name: The name of the animation stored in the resources/animations/tileset directory. For example, an animation named "grass" will load frames named "grass_xx.png".
  • frame_duration: Duration (in seconds) for each frame of the animation.
  • loop_mode: Indicates whether the animation should loop. Options: "loop" or "noloop".
  • character: Either "player" or character slug name (e.g. "npc_maple").

Examples

  • play_map_animation grass,0.1,noloop,player

play_music[edit | edit source]

Plays an audio file.

Parameters

  • filename: The name of the music file to play.
  • volume: A value between 0.0 and 1.0 that adjusts the music volume. (optional)
  • loop: The number of times to loop the music. Default is to loop forever. (optional)
  • fade_ms: The time in milliseconds to fade in the music before reaching maximum volume. (optional)

Examples

  • play_music music_mystic_island

play_sound[edit | edit source]

Plays a short sound effect from the "resources/sounds/" folder. This is intended for short non-looping sound effects (e.g., cues, UI feedback), not for ambient or background music.

Parameters

  • filename: The sound file to load (must exist in the sounds database).
  • volume: A float between 0.0 and 1.0 representing the relative volume level. This value is multiplied by the user's configured sound volume.

Examples If volume=0.5 and the player's sound setting is also 0.5, the resulting effective playback volume will be 0.25.

  • play_sound sound_confirm

play_tile_animation[edit | edit source]

Trigger a map animation at a specified tile position on the world map.

Parameters

  • tile_pos_x, tile_pos_y: Coordinates (x, y) specifying the tile position where the animation will be drawn on the map.
  • animation_name: The name of the animation stored in the resources/animations/tileset directory. For example, an animation named "grass" will load frames named "grass_xx.png".
  • frame_duration: Duration (in seconds) for each frame of the animation.
  • loop_mode: Indicates whether the animation should loop. Options: "loop" or "noloop".

Examples

  • play_tile_animation 33,10,sign01,0.4,loop

print[edit | edit source]

Print the current value of a game variable to the console. If no variable is specified, print out values of all game variables.

Parameters

  • variable: Prints out the value of this variable (optional)

Examples

  • print
  • print name_variable

quarantine[edit | edit source]

Quarantine or release monsters infected with a specific plague.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • plague_slug: The slug of the plague to target.
  • action_type: "in" to quarantine infected monsters, "out" to release them.
  • amount: (Optional, only for "out") The number of monsters to release randomly.

Examples

  • quarantine npc_maple,plague_slug,out everything out (player's party -> if full, then box)
  • quarantine npc_maple,plague_slug,out,5 eg. box contains 30 monsters quarantine out,5, it means 5 monsters by random

quit[edit | edit source]

Completely quit the game.

Parameters

  • None

Examples

  • quit

random_battle[edit | edit source]

Starts a random battle with a randomly chosen NPC and a party of randomly generated monsters within a specified level range.

Parameters

  • nr_txmns: The number of Tuxemon in the opponent's party (1 to 6).
  • min_level: The minimum level for the opponent's monsters.
  • max_level: The maximum level for the opponent's monsters.

Examples

  • random_battle 6,1,99

random_encounter[edit | edit source]

Randomly start a battle based on the encounter group looked up via the encounter_id. Encounter groups contain a list of monsters that can be encountered as well as their level and encounter rate. In most circumstances you will pair this action with the char_at and char_moved conditions.

Here is an example encounter file: resources/db/encounter/route1.json

 "slug": "route1",
 "monsters": [
   {
     "monster": "pairagrin",
     "encounter_rate": 3.5,
     "variable": "daytime:true",
     "exp_req_mod": 1,
     "level_range": [
       2,
       4
     ]
   },

Parameters

  • encounter_slug: Slug of the encounter list.
  • total_prob: Total sum of the probabilities. (optional)
  • rgb: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)

Examples

  • random_encounter route1
  • random_encounter route1,20

random_horde[edit | edit source]

Randomly start an horde. Randomly starts a battle with a monster defined in the "encounter" table in the "monster.db" database. The chance that this will start a battle depends on the "encounter_rate" specified in the database. The "encounter_rate" number is the chance walking in to this tile will trigger a battle out of 100.

Parameters

  • encounter_slug: Slug of the encounter list.
  • total_prob: Total sum of the probabilities. (optional)
  • rgb: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)

Examples

  • random_horde route1
  • random_horde route1,20

random_integer[edit | edit source]

Randomly chooses an integer between two numbers (inclusive) and sets a key in the player's game_variables dictionary to this value. For example, 'random_integer xyz,1,6' will set the value of the game variable 'xyz' to be a random integer from 1, 2, 3, 4, 5, or 6.

Parameters

  • variable: Name of the variable to set.
  • lower_bound: The inclusive lower bound of the integer range.
  • upper_bound: The inclusive upper bound of the integer range.

Examples

  • random_integer name_variable,1,9

random_item[edit | edit source]

Picks a random item from a list and adds it to the trainer's inventory.

Parameters

  • item_slug: A colon-separated string of item names to choose from. Example: 'potion:super-potion:hyper-potion'.
  • quantity: The number of the item to add. Defaults to 1.
  • trainer_slug: The slug of the trainer to receive the item. Defaults to the current player.

Examples

  • random_item potion:tea:revive (adds 1 potion or tea or revive to the trainer's inventory).
  • random_item potion:tea:revive,2 (adds 2 potions or teas or revives to the trainer's inventory).
  • random_item potion:tea:revive,2,npc_maple (adds 2 potions or teas or revives to the maple's inventory).
  • random_item potion:tea:revive,,npc_maple (adds 1 potion or tea or revive to the maple's inventory).

random_monster[edit | edit source]

Adds a random monster to the specified trainer's party, if there is room.

Parameters

  • monster_level: The level of the added monster.
  • trainer_slug: The slug of the trainer to receive the monster. Defaults to the current player.
  • exp_mod: A modifier for the monster's experience.
  • money_mod: A modifier for the monster's money yield.
  • shape: The monster's shape (e.g., 'varmint', 'brute').
  • evo: The monster's evolution stage (e.g., 'basic', 'stage1').

Examples

  • random_monster 10
  • random_monster 10,npc_maple
  • random_monster 10,npc_maple,10,27
  • random_monster 10,npc_maple,10,27,aquatic,basic
  • random_monster 10,npc_maple,,,brute,basic

remove_collision[edit | edit source]

Removes a collision zone associated with a specific label from the world map.

Parameters

  • label: The name or identifier of the obstacle to be removed.

Examples

  • remove_collision obstacle (it can one added with add_collision or an existing zone in the .tmx file).

remove_combo[edit | edit source]

Removes a registered combo sequence from the ComboDetector.

Parameters

  • combo_name: Required. A name or ID for the combo (used for logging).
  • buttons: Required. A colon-separated list of button names (e.g. LEFT:RIGHT:A).

Examples

  • remove_combo name_combo,LEFT:RIGHT:A

remove_contacts[edit | edit source]

Remove contact from the app (Nu Phone).

Parameters

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

Examples

  • remove_contacts npc_maple

remove_flair[edit | edit source]

Remove a flair from a monster.

Parameters

  • variable: The name of the variable that holds the monster's UUID.
  • category: The category of the flair to remove. If omitted, all flairs will be removed.

Examples

  • remove_flair name_variable,category

remove_held_item[edit | edit source]

Removes a held item from a specific monster.

Parameters

  • variable: Name of the variable where to store the monster id.

Examples

  • remove_held_item variable

remove_monster[edit | edit source]

Remove a monster from the party if the monster is there.

Parameters

  • variable: Name of the variable where to store the monster id.

Examples

  • get_player_monster name_variable
  • remove_monster name_variable

remove_npc[edit | edit source]

Removes an NPC from the current map.

Parameters

  • name: The name of the NPC to remove.

Examples

  • remove_npc Maple
  • remove_npc Pine

remove_state[edit | edit source]

Remove the specified state or the last active one. This action allows the removal of a specific state from the client's active state list. If no state name is provided, it removes the current state, except for certain protected states (e.g., "WorldState" and "BackgroundState").

Parameters

  • state_name: The name of the state to remove (e.g., "PCState"). If not provided, the last active state will be removed, unless it's a protected state.

Examples

  • remove_state
  • remove_state JournalInfoState

remove_step_tracker[edit | edit source]

Removes an NPC from the current map.

Parameters

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

Examples

  • remove_step_tracker npc_maple,tracker_id

remove_tech[edit | edit source]

Remove a specific technique from a specific monster.

Parameters

  • tech_id: Name of the variable where the technique ID is stored.
  • force_remove: Optional string flag to override forget rules. Accepts "true", "1", or "yes" (case-insensitive).

Examples

  • remove_tech name_variable
  • remove_tech name_variable,true

remove_tracker[edit | edit source]

Remove tracker.

Parameters

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

Examples

  • remove_tracker player,paper_town

rename_monster[edit | edit source]

Open the text input screen to rename the monster.

Parameters

  • variable: Name of the variable where to store the monster id.

Examples

  • rename_monster name_variable

rename_player[edit | edit source]

Open the text input screen to rename the player.

Parameters

  • None

Examples

  • rename_player

replace_party_from_yaml[edit | edit source]

Replaces a character's party with a predefined set of monsters from a YAML file. This action loads a named party configuration from a YAML file and assigns it to the specified character (either the player or an NPC). Each monster entry in the YAML can define attributes like slug, level, and weight for random selection.

Parameters

  • character: Either "player" or an NPC slug (e.g. "npc_maple").
  • yaml_file: Name of the YAML file (without extension) located in the mods folder.
  • set_name: The key of the party to use within the YAML file.

Examples

  • replace_party_from_yaml player,yaml_file,name

replace_techs_from_yaml[edit | edit source]

Replaces a monster's moveset using a predefined set from a YAML file.

Parameters

  • variable: Name of the variable where the monster UUID is stored.
  • yaml_file: Path to the YAML file containing movesets.
  • set_name: The key of the moveset to use within the YAML file.

Examples

  • replace_techs_from_yaml player,yaml_file,name

rumble[edit | edit source]

Rumble available controllers with rumble support.

Parameters

  • duration: Time in seconds to rumble for.
  • power: Percentage of power to rumble (0 to 100).
  • period: Time period between vibrations in milliseconds. Default 25.
  • delay: Time in seconds before the rumble starts. Default 0.
  • attack_length: Time in milliseconds for the rumble to ramp up. Default 256.
  • attack_level: Initial intensity level during ramp-up. Default 0.
  • fade_length: Time in milliseconds for the rumble to fade out. Default 256.
  • fade_level: Final intensity level during ramp-down. Default 0.
  • direction: Direction of the rumble effect, for spatial control. Default 16384.

Examples

  • rumble duration,power

save_game[edit | edit source]

Saves the game. If the index parameter is absent, then it'll create slot4.save (index = 0 > slot 1, index = 1 > slot 2, index = 2 > slot 3)

Parameters

  • index: Selected index. (optional)

Examples

  • save_game (it's going to save slot4.save)
  • save_game 1 (it's going to save slot2.save)

save_timestamp[edit | edit source]

Saves the current Unix timestamp (in seconds) into a game variable.

Parameters

  • variable: The name of the game variable to store the timestamp in.

Examples

  • save_timestamp variable

screen_transition[edit | edit source]

Fades the screen to black and back over x seconds.

Parameters

  • trans_time: Time in seconds - default 0.3 (optional).
  • rgb: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)

Examples

  • screen_transition 2

set_battle[edit | edit source]

Append a new element in player.battles.

Parameters

  • fighter: Npc slug name (e.g. "npc_maple").
  • result: One among "won", "lost" or "draw"
  • opponent: Npc slug name (e.g. "npc_maple").

Examples

  • set_battle player,won,npc_maple (player won against npc_maple)

set_bill[edit | edit source]

Initializes or updates a bill for a character, including its amount, interest rate, late fee and share rate.

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple").
  • bill_slug: identifier for the bill (must be translated in en_US base.po).
  • amount: initial amount of the bill (optional, defaults to 0).
  • interest_rate: interest rate applied to the bill (optional, e.g. 0.1 for 10%).
  • late_fee: flat fee added to the bill when triggered (optional, eg. 10).
  • share_rate: percentage of battle earnings automatically applied to the bill (optional, e.g. 0.2 for 20%).

Notes:

  • Interest and late fee are stored but not automatically applied.
  • Use separate actions to trigger interest or fee accumulation.
  • Amount must be non-negative.

Examples

  • set_bill player,bill_cathedral,100,0.1,50,0.5
  • set_bill npc_maple,bill_rent,,0.05,25,0.2

set_bubble[edit | edit source]

Put a bubble above player sprite.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • bubble: dots, drop, exclamation, heart, note, question, sleep, angry, confused, fireworks

Examples

  • set_bubble spyder_shopassistant (remove bubble NPC)
  • set_bubble spyder_shopassistant,note (set bubble NPC)
  • set_bubble player,note (set bubble player)
  • set_bubble player (remove bubble player)

AH SpriteSheet Balloon.png

set_cipher[edit | edit source]

Toggles ciphering for dialogue by enabling or disabling the CipherProcessor.

Parameters

  • option: "enable": Activates ciphering using the provided cipher map (if any) OR "disable": Disables ciphering entirely.
  • cipher_map: the filename (without extension) of a YAML file located in the mods folder. If omitted during "enable", the default cipher map is used. Ignored when option is "disable".

Examples

  • set_cipher enable

set_economy[edit | edit source]

Sets the economy (prices and initial stock of items/monsters) for a specific NPC. This action orchestrates loading the economy data and then applying it to the target character's shop/inventory, including handling initial quantities and variable-based availability.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • economy_slug: Slug of an economy.

Examples

  • set_economy spyder_shopkeeper,spyder_candy_scoop

set_kennel_visible[edit | edit source]

Set the kennel visible or hidden.

From hidden to visible: set_kennel_visible name_kennel,true From visible to hidden: set_kennel_visible name_kennel,false

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • kennel: Name of the kennel.
  • visible: true/false.

Examples

  • set_kennel_visible npc_maple,name_kennel,true
  • set_kennel_visible npc_maple,name_kennel,false

set_layer[edit | edit source]

Allows to change the color of the transparent layer.

Parameters

  • rgb: color (eg red > 255,0,0,128 > 255:0:0:128) - default transparent

Examples

  • set_layer 255:0:0:128

set_mission[edit | edit source]

Set missions by updating it and by checking the prerequisites.

Parameters

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

Examples

  • set_mission player

set_money[edit | edit source]

Set an amount of money for a specific slug.

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple").
  • amount: Amount of money (>= 0) (default 0)

Examples

  • set_money player
  • set_money player,500

set_monster_attribute[edit | edit source]

Set the given attribute of the monster to the given value.

Parameters

  • variable: Name of the variable where to store the monster id.
  • attribute: Name of the attribute.
  • value: Value of the attribute.

Examples

  • set_monster_attribute name_variable,name,jimmy (the monster will be named jimmy)

set_monster_flair[edit | edit source]

Set or replace a monster's flair in a given category.

Parameters

  • variable: Name of the variable that holds the monster's UUID.
  • category: Category of the monster flair.
  • flair: Name of the monster flair.
  • sprite_type: Optional pipe-separated list of sprite types (e.g., front:menu01)

Behavior

  • If the category already has a flair, it will be replaced.
  • If the category is new, the flair will be added.
  • If sprite types are provided, the flair will only apply to those views.

Examples

  • get_player_monster name_variable
  • set_monster_flair name_variable,category,flair

set_monster_health[edit | edit source]

Set the hp of a monster in the current player's party. The action parameters may contain a monster slot and the amount of health.

Parameters

  • variable: Name of the variable where to store the monster id. If no variable is specified, all monsters are healed. (optional)
  • health: A float value between 0 and 1, which is the percent of max hp to be restored to. A int value, which is the number of HP to be restored to. If no health is specified, the hp is maxed out. (optional)

Examples

  • set_monster_health (heals all the monsters in the party)

or

  • get_player_monster name_variable
  • set_monster_health name_variable,1

set_monster_level[edit | edit source]

Change the level of a monster in the current player's party.

Parameters

  • variable: Name of the variable where to store the monster id. If no variable is specified, all monsters are changed. (optional)
  • levels_added: Number of levels to add. Negative numbers are allowed. Default 1. (optional)

Examples

  • set_monster_level (all the monsters in the party level up by 1)

or

  • get_player_monster name_variable
  • set_monster_level name_variable,1

set_monster_plague[edit | edit source]

Set a monster's plague to the given condition. To get the mechanics going, it's crucial to know that must be a technique called 'plague_slug' (eg. spyderbite).

Parameters

  • variable: Name of the variable where to store the monster id.
  • plague_slug: The slug of the plague to target.
  • condition: Infected, inoculated, or None (removes the plague from the character, indicating a healthy state). (optional)
  • enforced_check: Optional string flag to enforce eligibility rules. Accepts "true", "1", or "yes" (case-insensitive). Default is False (eligibility is bypassed).

Examples

  • get_player_monster name_variable
  • set_monster_plague name_variable,spyderbite,infected

set_monster_status[edit | edit source]

Change the status of a monster in the current player's party.

Parameters

  • variable: Name of the variable where to store the monster id. If no variable is specified, all monsters get/lose status.. (optional)
  • status: Inoculated, healthy or infected, default healthy (optional)

Examples

  • set_monster_status (all the monsters in the party lose their status)

or

  • get_player_monster name_variable
  • set_monster_status name_variable,status_blinded

set_char_attribute[edit | edit source]

Set the given attribute of the character to the given value.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • attribute: Name of the attribute.
  • value: Value of the attribute.

Examples

  • set_char_attribute character,attribute,value

set_party_attribute[edit | edit source]

Set the given attribute of party's monsters to the given value.

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple").
  • attribute: Name of the attribute.
  • value: Value of the attribute.

Examples

  • set_party_attribute player,name,jimmy (all the monsters in the party will be named jimmy)

set_party_status[edit | edit source]

Records important information about all monsters in the party (eg average level of the party, etc.)

Parameters

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

Examples

  • set_party_status player

set_player_name[edit | edit source]

Set player name without opening the input screen.

Parameters

  • choice: A single name or multiple names separated by ":". If multiple, one will be randomly selected.

Examples

  • set_player_name jimmy
  • set_player_name jimmy:richard:linus (random choice among jimmy, richard and linus)

set_price_policy[edit | edit source]

Sets the PricePolicy for a specific NPC's economy.

Parameters

  • npc_slug: Either "player" or NPC slug (e.g. "npc_maple").
  • policy_slug: Slug of a price policy (e.g. "black_market") (YAML).

Examples

  • set_price_policy npc_maple,black_market

set_random_variable[edit | edit source]

Sets a key in the player's `game_variables` dictionary to a randomly selected value from a specified list. Values can be repeated or weighted to influence selection probability.

Parameters

  • variable: The name of the game variable to set.
  • values: A colon-separated string of values to choose from. Repeated values increase their selection chance. Alternatively, use `value=weight` to assign explicit weights.

Examples

  • set_random_variable alpha,one:two:three (variable "alpha" can be "alpha:one" or "alpha:two" or "alpha:three").
  • set_random_variable variable,apple=1:banana=3:cherry=2

set_routing_policy[edit | edit source]

Sets or resets the routing policy for future monster additions. This does not add a monster — it modifies how PartyHandler.add_monster behaves.

Parameters

  • npc_slug: NPC slug to apply the policy to.
  • policy_name: Name of the routing policy defined in routing_policies.yaml.

Examples

  • set_routing_policy player,starter_policy
  • set_routing_policy player,event_policy
  • set_routing_policy player # resets to 'default'

set_teleport_faint[edit | edit source]

Set teleport faint data

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.

Examples

  • set_teleport_faint player,healing_center.tmx,6,7

set_template[edit | edit source]

Switch template (sprite and combat_front).

Please remember that if you change the combat_front, automatically will change the combat_back. Eg if you set the sprite xxx, then it's going to add _back.png -> xxx_back.png

By using default: set_template player,default it's going to reassign the default sprite

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • sprite: must be inside mods/tuxemon/sprites, eg: adventurer_brown_back.png -> adventurer
  • combat_front: must be inside mods/tuxemon/gfx/sprites/player, eg: adventurer.png -> adventurer (optional)

Examples

  • set_template player,adventurer,adventurer

set_tuxepedia[edit | edit source]

Set the key and value in the Tuxepedia dictionary.

Parameters

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

Examples

  • set_tuxepedia player,rockitten,caught

set_variable[edit | edit source]

Updates the player's game variables by setting key-value pairs.

Also used to set the environment.

Parameters

  • set_variable variable_name:value:
  • variable_name: The name of the variable.
  • value: The assigned value for the variable.

This implementation supports multiple parameters, allowing multiple variable assignments in one call.

Examples

  • set_variable battle_won:yes
  • set_variable environment:grass
  • set_variable <variable>:<value>[,<variable>:<value>]

show_monster[edit | edit source]

Change to MonsterInfoState. This action transitions to the MonsterInfoState, displaying detailed information about a specific monster.

Parameters

  • monster_variable: The name of the game variable holding the monster's UUID.

Examples

  • show_monster player

spawn_monster[edit | edit source]

Breed a new monster. Add a new monster, created by breeding the two given monsters (identified by instance_id, stored in a variable) and adds it to the given character's party (identified by slug). The parents must be in either the trainer's party, or a storage box owned by the trainer.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple"). The one who is going to receive the new born.

Examples

  • spawn_monster

start_battle[edit | edit source]

Start a battle between two characters and switch to the combat module.

Parameters

  • character1: Either "player" or character slug name (e.g. "npc_maple").
  • character2: Either "player" or character slug name (e.g. "npc_maple").
  • music: The name of the music file to play. (optional)

Examples

  • start_battle player,npc_maple
  • start_battle npc_maple,npc_apple

start_cinema_mode[edit | edit source]

Start cinema mode by animating black bars to narrow the aspect ratio. For a cinematic experience, specify the width of the horizontal and vertical black bars as a ratio of the screen resolution. For example, to achieve a 2.39:1 aspect ratio on a 1920x1080 screen, you would set the horizontal ratio to 0.42 (1920 / 1080 * (16/9 - 2.39/1)) and the vertical ratio to 0 (no vertical bars). By default only bar up and down.

Parameters

  • aspect_y_ratio: The width of the horizontal black bars as a ratio of the screen resolution. Default standard cinema mode.
  • aspect_x_ratio: The width of the vertical black bars as a ratio of the screen resolution. Default None.

Examples

  • start_cinema_mode default, bar up and down
  • start_cinema_mode ,2.0 bar left and right
  • start_cinema_mode 2.0 bar up and down
  • start_cinema_mode 2.0,2.0 bar up, down, left and right

start_double_battle[edit | edit source]

Start a double battle between two characters and switch to the combat module. At least 3 monsters in total (eg 2 vs 1 or 1 vs 2).

Parameters

  • character1: Either "player" or character slug name (e.g. "npc_maple").
  • character2: Either "player" or character slug name (e.g. "npc_maple").
  • music: The name of the music file to play. (optional)

Examples

  • start_double_battle player,npc_maple
  • start_double_battle npc_maple,npc_apple

stop_cinema_mode[edit | edit source]

Stop cinema mode by animating black bars back to the normal aspect ratio.

Parameters

  • None

Examples

  • stop_cinema_mode

store_monster[edit | edit source]

Store a monster in a box. Save the player's monster with the given instance_id to the named storage box, removing it from the player party.

Parameters

  • variable: Name of the variable where to store the monster id.
  • box: An existing box where the monster will be stored. (optional)

Examples

  • get_player_monster name_variable

then:

  • store_monster name_variable

or

  • store_monster name_variable,name_kennel

store_party[edit | edit source]

Store the entire party in a box. Save all monsters from the character's party into the named storage box, removing them from the party if successful.

Parameters

  • character: Either "player" or an NPC slug (e.g. "npc_maple").
  • box: An existing box where the monsters will be stored. If omitted, defaults to KENNEL.

Examples

  • store_party player
  • store_party player,name_kennel

teleport_faint[edit | edit source]

Teleport the player to the point in the teleport_faint variable. Usually used to teleport to the last visited Tuxcenter, as when all monsters in the party faint.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • healing: Trigger healing string flag ("true", "1", "yes" for True),
  • trans_time: Transition time in seconds - default 0.3.
  • rgb: color (eg red > 255,0,0 > 255:0:0) - default rgb(0,0,0)

Examples

  • teleport_faint player,true
  • teleport_faint player,true,6.9
  • teleport_faint player,true,3,255:0:0:50 (red)

teleport[edit | edit source]

Teleport a character to a specific map and tile coordinates. If a screen transition is in progress, the teleport will be queued and executed at the apex of the transition.

Parameters

  • character: Slug of the character to teleport.
  • map_name: The map file to teleport the player to.
  • x: The X-tile coordinate to teleport the player to.
  • y: The Y-tile coordinate to teleport the player to.

Examples

  • teleport npc_maple,map1.tmx,3,4
  • teleport npc_maple,troom1.tmx,8,1

toggle_evolution_block[edit | edit source]

Blocks or unblocks a specific evolution for a monster.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • monster_variable: Name of the variable storing the monster's instance ID.
  • evolution_slug: The slug of the evolution to block/unblock.
  • action: "block" to permanently block, "unblock" to unblock.

Examples

  • toggle_evolution_block player,variable_name,rockat,block
  • toggle_evolution_block player,variable_name,rockat,unblock

trading[edit | edit source]

Select a monster in the player party and trade. It's advisable to use it with the condition not has_monster monster_slug.

Parameters

  • variable: Name of the variable where to store the monster id (removed).
  • added: Slug monster or Name of the variable where to store the monster id (added).

Examples

  • get_player_monster name_variable

then

  • trading name_variable,nut

transfer_money[edit | edit source]

Transfer money between entities. Both entities needs to have a wallet.

Parameters

  • slug1: Either "player" or character slug name (e.g. "npc_maple").
  • amount: Amount of money.
  • slug2: Either "player" or character slug name (e.g. "npc_maple").

Examples

  • transfer_money player,100,npc_mom (player transfers 100 to mom)

transition_teleport[edit | edit source]

Teleports the player to a given position on a map with a screen transition over x seconds.

Parameters

  • map_name: The map file to teleport the player to.
  • x: The X-tile coordinate to teleport the player to.
  • y: The Y-tile coordinate to teleport the player to.
  • trans_time: The time in seconds - default 2. (optional)
  • rgb: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)

Examples

  • transition_teleport map2.tmx,1,6,1.5
  • transition_teleport room1.tmx,8,1,4

transition_teleport_return[edit | edit source]

Teleport a character back to their previously recorded location, using a screen transition. This action retrieves the last executed teleport request and sends the character back to its source map and coordinates. It must be used after a teleport that stored return data (e.g. source_map, source_x, source_y).

Requirements

  • A previous teleport must have been executed and stored in teleporter.last_teleport_request.
  • The previous request must include valid source map and coordinates.

Parameters

  • character: Either "player" or character slug name (e.g. "npc_maple").
  • facing: One of "up", "down", "left", "right". Case-insensitive.
  • trans_time: (Optional) Transition time in seconds. Default is 0.3.
  • rgb: (Optional) Transition color in RGB format (e.g. "255:0:0" for red). Default is black (0,0,0).

Examples

  • transition_teleport_return player,up

translated_dialog_choice[edit | edit source]

Asks the player to select a choice. The translations for the text are looked up based on a given key.

Parameters

  • choice_keys: Keys to reference translated text choices separated by colons.
  • variable: The variable to store the answer which will be the key for the translated text.

Examples

  • translated_dialog_choice yes:no,myvariable

translated_dialog[edit | edit source]

Open a dialog window with translated text according to the passed translation key. Parameters passed to the translation string will also be checked if a translation key exists.

Parameters

  • text: The msgid in the PO file.
  • avatar: If it is a number, the monster is the corresponding monster slot in the player's party. If it is a string, we're referring to a monster by name.
  • position: Position of the dialog box. Can be 'top', 'bottom', 'center', 'topleft', 'topright', 'bottomleft', 'bottomright', 'right', 'left'. Default 'bottom'.
  • h_alignment: Alignment of text in the dialog box, it can be 'left', 'center' or 'right'. Default 'left'.
  • v_alignment: Alignment of text in the dialog box, it can be 'bottom', 'center' or 'top'. Default 'top'.
  • style: a predefined style in db/dialogue/dialogue.json

Examples

  • translated_dialog msgid

trigger_status[edit | edit source]

Triggers the current status effect of a monster (e.g., poison, burn, sleep).

Parameters

  • variable: Name of the variable containing the monster ID. If not specified, all monsters in the party will be affected.
  • status_name: Optional. If provided, only triggers the status effect if it matches the monster's current status slug.

Examples

  • trigger_status variable
  • trigger_status variable,poison

tune_radio[edit | edit source]

Launches the NuPhoneRadio interface for a given character, optionally tuned to a specific frequency. This action transitions the game into a radio interface state, allowing the player to access broadcasts associated with a specific NPC. It can launch either the standard radio menu or the tuner interface, depending on whether a frequency is provided. This is typically used in scripted events to simulate tuning into a radio station from a character's perspective or location, enabling dynamic storytelling and immersive audio experiences.

Parameters

  • character_slug: The slug of the character (NPC) whose context will be used to determine available radio stations and broadcasts.
  • frequency: If provided, launches the tuner interface and attempts to tune directly to the specified frequency (in MHz). If omitted, the standard radio menu is shown instead.

Examples

  • tune_radio player
  • tune_radio player,88.9

unload_sound[edit | edit source]

Unload a specific sound from memory cache, or all sounds if no filename is given.

Parameters

  • filename: Name of the sound file to unload. If omitted, all cached sounds will be removed from memory.

Examples

  • unload_sound
  • unload_sound filename

unlock_controls[edit | edit source]

Unlock player controls

Parameters

  • None

Examples

  • unlock_controls

unpause_music[edit | edit source]

Unpause the current (paused) music playback.

Parameters

  • None

Examples

  • pause_music

update_cipher[edit | edit source]

Updates the list of unlocked letters for a character used by the CipherProcessor.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • letter: A single uppercase letter (or multiple separated by ':') to add to the character's unlocked set. If omitted, no new letters will be added, but the CipherProcessor will be updated with the current unlocked state.

Examples

  • update_cipher player,a:b:c:d

update_tile_properties[edit | edit source]

Update tile properties by modifying movement settings or accessibility.

Parameters

  • label: The name of the property to update (e.g., surfable, walkable).
  • moverate: The value of the movement rate (e.g., 1 for normal movement, 0 for inaccessible).

Examples

  • update_tile_properties surfable,0.5

variable_math[edit | edit source]

Performs a mathematical operation on the key in the player.game_variables dictionary.

Parameters

  • variable_name
  • operation: +, -, * or /
  • value

Examples

  • variable_math badge_count,+,1

wait[edit | edit source]

Pauses execution of all events for the given amount of time in seconds.

Parameters

  • seconds: The amount of time in seconds to wait for.

Examples

  • wait 2.0
  • wait 5.2

wild_encounter[edit | edit source]

Start an encounter with a single wild monster.

Parameters

  • monster_slug: Monster slug.
  • monster_level: Level of monster.
  • exp_mod: Experience modifier. (optional)
  • mon_mod: Money modifier. (optional)
  • env: Environment (grass default) -> Battle Terrain (optional)
  • rgb: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)
  • held_item: item held by the monster (optional)


Examples

  • wild_encounter rockitten,5
  • wild_encounter rockitten,5,2,2,desert

withdraw_monster[edit | edit source]

Pull a monster from the given trainer's storage and puts it in their party.

Parameters

  • variable: Name of the variable where to store the monster id.
  • character: Either "player" or npc slug name (e.g. "npc_maple"). The one who is going to receive the monster.

Examples

  • get_player_monster name_variable

then

  • withdraw_monster name_variable

or

  • withdraw_monster name_variable,npc_maple