Difference between revisions of "Event Reference"

From Tuxepedia
Jump to navigation Jump to search
 
(48 intermediate revisions by the same user not shown)
Line 8: Line 8:


=== battle_is ===
=== battle_is ===
Check to see if the player has fought against NPC and won, lost or draw.
Check to see if a character has fought against another one and won, lost or draw.


'''Parameters'''  
'''Parameters'''  
* <code>character</code>: Npc slug name (e.g. "npc_maple").
* <code>fighter</code>: Npc slug name (e.g. "npc_maple").
* <code>result</code>: One among "won", "lost" or "draw".
* <code>outcome</code>: One among "won", "lost" or "draw".
* <code>opponent</code>: Npc slug name (e.g. "npc_maple").


'''Examples'''  
'''Examples'''  
* <code>is battle_is npc_maple,won</code>
* <code>is battle_is player,won,npc_maple</code> (has player won against npc_maple in the last fight?)


=== button_pressed ===
=== button_pressed ===
Line 28: Line 29:
* <code>not button_pressed K_SPACE</code>  
* <code>not button_pressed K_SPACE</code>  


=== check_evolution ===
=== char_at ===
Check to see the character has at least one tuxemon evolving. If yes, it'll save the monster and the evolution inside a list. The list will be used by the event action <code>evolution</code>.
Check to see if the character is at the condition position on the map.


'''Parameters'''  
'''Parameters'''  
Line 35: Line 36:


'''Examples'''  
'''Examples'''  
* <code>is check_evolution player</code>
* <code>is char_at Maple</code>


=== check_mission ===
=== char_defeated ===
Check to see the player has failed or completed a mission. Check to see if a mission is still pending.
Check to see the character has at least one tuxemon, and all tuxemon in their party are defeated.


'''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>method</code>: Mission or missions, "all" means all the existing missions. 
* <code>staths</code>: pending, completed or failed   


'''Examples'''  
'''Examples'''  
* <code>is check_mission player,mission1,completed</code>
* <code>is char_defeated player</code>
* <code>is check_mission player,mission1,pending</code>
* <code>is check_mission player,mission1:mission2,completed</code>
* <code>is check_mission player,all,completed</code>


=== current_state ===
=== char_exists ===
Check to see if one or multiple state/states has/have been started or not.
Check to see if a character object exists in the current list of NPCs.


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


'''Examples'''  
'''Examples'''  
* <code>is current_state DialogState</code>
* <code>not char_exists npc_maple</code>
* <code>is current_state CombatState:DialogState</code>


=== has_bag ===
=== char_facing ===
Check to see how many items are in the character's bag. It doesn't count invisible items.
Check to see where a character is facing.


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


'''Examples'''  
'''Examples'''  
* <code>is has_bag player,equals,5</code> (player's bag: 5 potions and 2 tuxeball (5 items), in this case is true because 5 = 5)
* <code>is char_facing npc_maple,up</code>
* <code>is has_bag player,equals,9</code> (player's bag: 5 potions and 2 tuxeball (5 items), in this case is false because 9 != 5)
* <code>not char_facing npc_maple,down</code>
 
 
=== has_box ===
=== char_facing_char ===
Check to see how many monsters are in the character's box.
Check to see the character is next to and facing a particular character.


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


'''Examples'''  
'''Examples'''  
* <code>is has_box player,Kennel,less_than,1</code>
* <code>is char_facing_char npc_maple,player</code>


=== has_item ===
=== char_facing_tile ===
Check to see if a NPC inventory contains something.
Check to see if a character is facing a tile position.


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


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


=== has_monster ===
=== char_in ===
Checks to see the player has a monster in his party.
Check to see if the character is at the condition position on a specific set of tiles.


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


'''Examples'''  
'''Examples'''  
* <code>is has_monster txmn_pigabyte</code>
* <code>is char_in npc_maple,surfable</code>


=== has_party_breeder ===
=== char_moved ===
Check to see if the player has a male and female monster in the party (monster not basic, basic is the first step in the evolution stage).
Check to see the character has just moved into this tile. Using this condition will prevent a condition like "char_at" from constantly being true every single frame.
 
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").


'''Examples'''  
'''Examples'''  
* <code>is has_party_breeder</code>
* <code>is char_moved player</code>


=== has_sprite ===
=== char_sprite ===
Check to see if a NPC has a specific sprite.
Check the character's sprite


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


'''Examples'''  
'''Examples'''  
* <code>is has_sprite swimmer</code>
* <code>is char_sprite player,adventurer</code>


=== has_tech ===
=== check_char_parameter ===
Check to see if the player has a technique in his party (one of the monsters).
Check the parameter's value of the character against a given value.


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


'''Examples'''  
'''Examples'''  
* <code>is has_tech bullet</code>
* <code>is check_char_parameter player,name,alpha</code>
 
=== check_evolution ===
Check to see the character has at least one tuxemon evolving. If yes, it'll save the monster and the evolution inside a list. The list will be used by the event action <code>evolution</code>.


=== location_inside ===
'''Parameters'''
Check to see if the player is inside.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").


'''Examples'''  
'''Examples'''  
* <code>is location_inside</code>
* <code>is check_evolution player</code>


=== location_name ===
=== check_max_tech ===
Check to see if the player is in a certain location name.
Check to see the player has at least one tuxemon with more than the max number of techniques in its party. If yes, then it saves automatically the monster_id and inside the dictionary event_data.


'''Parameters'''  
'''Parameters'''  
* <code>technique</code>: Slug name. It's the name inside the maps. eg. <code><property name="slug" value="routeb"/></code>, so slug = routeb
* <code>nr</code>: Number of tech, default the constant


'''Examples'''  
'''Examples'''  
* <code>is location_name routeb</code>
* <code>is check_max_tech</code>
* <code>is location_name routea:routeb</code>
* <code>is check_max_tech 2</code>


=== location_type ===
=== check_mission ===
Check to see if the player is in a certain location type.
Check to see the player has failed or completed a mission. Check to see if a mission is still pending.


'''Parameters'''  
'''Parameters'''  
* <code>slug</code>: Slug name. Either all, notype, town, route, clinic, shop, dungeon
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
 
* <code>method</code>: Mission or missions, "all" means all the existing missions. 
* <code>staths</code>: pending, completed or failed   
 
'''Examples'''  
'''Examples'''  
* <code>is location_type town</code>
* <code>is check_mission player,mission1,completed</code>
* <code>is location_type town:shop:clinic</code>
* <code>is check_mission player,mission1,pending</code>
* <code>is check_mission player,mission1:mission2,completed</code>
* <code>is check_mission player,all,completed</code>


=== money_is ===
=== check_party_parameter ===
Check to see if the player has a certain amount of money (pocket).
Check to see the player has failed or completed a mission. Check to see if a mission is still pending.


'''Parameters'''  
'''Parameters'''  
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>operator</code>: One of "==", "!=", ">", ">=", "<" or "<=".
* <code>attribute</code>: Name of the monster attribute to check (e.g. level).
* <code>amount</code>: Amount of money.
* <code>value</code>: Value to check (related to the attribute) (e.g. 5 - level).
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
* <code>times</code>: Value to check with operator (how many times in the party?).  


'''Examples'''  
'''Examples'''  
* <code>is money_is player,>=,500</code>
* <code>check_party_parameter player,level,5,equals,1</code> (is there 1 monster in the party at level 5? True/False)


=== monster_flair ===
=== check_world ===
Check to see if the given monster flair matches the expected value.
Check some world's parameter against a given value.  


'''Parameters'''  
'''Parameters'''  
* <code>slot</code>: Position of the monster in the player monster list.
* <code>parameter</code>: Name of the parameter to check (eg. "layer", etc.).
* <code>property</code>: Category of the flair.
* <code>value</code>: Given value to check.
* <code>name</code>: Name of the flair.
 
'''Supported parameters'''
* '''layer''': color value which is used to overlay the world
* '''bubble''': speech bubble of an npc


'''Examples'''  
'''Examples'''  
* <code>to be defined</code>
* <code>is check_world</code>
* <code>is check_world layer,255:255:255:0</code>


=== monster_property ===
=== current_state ===
Check to see if a monster in the party has one of the following property.
Check to see if one or multiple state/states has/have been started or not.


'''Parameters'''  
'''Parameters'''  
* <code>property</code>: Property of the monster to check (e.g. "level"). Valid values are: slug, level, level_reached, stage, shape, taste_cold, taste_warm, type, gender and tech.
* <code>state</code>: Either "CombatState", "DialogState", etc
* <code>value</code>: Value to compare the property with.


'''Examples'''  
'''Examples'''  
* <code>is monster_property level,15</code>
* <code>is current_state DialogState</code>
* <code>is monster_property gender,male</code>
* <code>is current_state CombatState:DialogState</code>
* <code>is monster_property stage,standalone</code>
* <code>is monster_property shape,aquatic</code>


=== music_playing ===
=== has_bag ===
Check to see if the specified music file is currently playing.
Check to see how many items are in the character's bag. It doesn't count invisible items.


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


'''Examples'''  
'''Examples'''  
* <code>is music_playing 472452_8-Bit-Ambient.ogg</code>
* <code>is has_bag player,equals,5</code> (player's bag: 5 potions and 2 tuxeball (5 items), in this case is true because 5 = 5)
* <code>is has_bag player,equals,9</code> (player's bag: 5 potions and 2 tuxeball (5 items), in this case is false because 9 != 5)


=== npc_at ===
=== has_box ===
Check to see if the npc is inside the event's area. This event will check the event object's <code>X</code>, <code>Y</code>, <code>Width</code>, and <code>Height</code> properties and checks to see if the npc is within those bounds. That includes event areas that are greater than one tile in size. You can optionally include an <code>x,y</code> parameter to specify a single tile location.
Check to see how many monsters are in the character's box.


'''Parameters'''  
'''Parameters'''  
* <code>name</code>: The name of the NPC.  
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>x</code>: X tile coordinates that the player is at (optional) 
* <code>operator</code>: Numeric comparison operator. Accepted values are <code>less_than</code>, <code>less_or_equal</code>, <code>greater_than</code>, <code>greater_or_equal</code>, <code>equals</code> and <code>not_equals</code>.
* <code>y</code>: Y tile coordinate that the player is at (optional)
* <code>value</code>: The value to compare the party with.
* <code>box</code>: The box name.


'''Examples'''  
'''Examples'''  
* <code>is npc_at Maple</code> 
* <code>is has_box player,Kennel,less_than,1</code>
* <code>is npc_at Maple,4,3</code>


=== npc_exists ===
=== has_item ===
Check to see if an NPC exists on the current map with <code>npc_name</code>.
Check to see if a NPC inventory contains something.


'''Parameters'''  
'''Parameters'''  
* <code>npc_name</code>: The name of the NPC on the current map.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>item</code>: The item slug name (e.g. "item_cherry").
* <code>operator</code>: Numeric comparison operator. Accepted values are <code>less_than</code>, <code>less_or_equal</code>, <code>greater_than</code>, <code>greater_or_equal</code>, <code>equals</code> and <code>not_equals</code>.
* <code>quantity</code>: Quantity to compare with. (optional)


'''Examples'''  
'''Examples'''  
* <code>not npc_exists Apple</code>
* <code>is has_item player,potion</code>
* <code>is has_item player,potion,greater_than,2</code>


=== npc_facing_tile ===
=== has_monster ===
Check to see if the npc is facing a particular tile. This event will check the event object's <code>X</code>, <code>Y</code> coordinates for the tile to check for.
Check to see if a character has a monster in its party.


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


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


=== npc_facing ===
=== has_party_breeder ===
Check to see if the npc is facing: <code>up</code>, <code>down</code>, <code>left</code> or <code>right</code>.
Check to see if the character has a male and female monsters not basic (first evolution stage) in the party.


'''Parameters'''  
'''Parameters'''  
* <code>name</code>: The name of the NPC.  
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>direction</code>: Direction to check for: (<code>up</code>, <code>down</code>, <code>left</code>, <code>right</code>)


'''Examples'''  
'''Examples'''  
* <code>is npc_facing Maple,up</code> 
* <code>is has_party_breeder player</code>
* <code>not npc_facing Maple,down</code>


=== once ===
=== has_tech ===
Checks the date saved in the variables with today's date.
Check to see if the player has a technique in his party (one of the monsters).


'''Parameters'''  
'''Parameters'''  
* <code>timeframe</code>: nr of days the event stays "blocked" (eg. 1, 7, etc.)
* <code>technique</code>: Technique slug name (e.g. "bullet").
* <code>variable</code>: Variable where the date is stored.


'''Examples'''  
'''Examples'''  
* <code>set_variable variable_name:today</code> 
* <code>is has_tech bullet</code>
* <code>is once 1,variable_name</code> (it blocks the event for 1 day)
or
* <code>is once 7,variable_name</code> (it blocks the event for 7 days - 1 week)


=== one_of ===
=== location_inside ===
Check to see if at least 1 among multiple values in a variable is True. If the variable does not exist it will return ``False``.
Check to see if the player is inside.
 
'''Parameters'''
* <code>variable</code>: The variable to check.
* <code>values</code>: Value to check for (multiple values separated by ":").


'''Examples'''  
'''Examples'''  
* <code>is one_of stage_of_day,afternoon:dusk:morning</code>
* <code>is location_inside</code>


=== party_infected ===
=== location_name ===
Check to see how many monster are infected and stores the iids.
Check to see if the player is in a certain location name.


'''Parameters'''  
'''Parameters'''  
* <code>value</code>: all, some or none.
* <code>technique</code>: Slug name. It's the name inside the maps. eg. <code><property name="slug" value="routeb"/></code>, so slug = routeb


'''Examples'''  
'''Examples'''  
* <code>is party_infected some</code>
* <code>is location_name routeb</code>
* <code>is location_name routea:routeb</code>


=== party_size ===
=== location_type ===
Perform a check on the player's party size. The <code>check</code> parameter can be: <code>equals</code>, <code>less_than</code>, or <code>greater_than</code>.
Check to see if the player is in a certain location type.


'''Parameters'''  
'''Parameters'''  
* <code>operator</code>: Numeric comparison operator. Accepted values are <code>less_than</code>, <code>less_or_equal</code>, <code>greater_than</code>, <code>greater_or_equal</code>, <code>equals</code> and <code>not_equals</code>.
* <code>slug</code>: Slug name. Either all, notype, town, route, clinic, shop, dungeon
* <code>party_size</code>: The size of the party to check against.


'''Examples'''  
'''Examples'''  
* <code>is party_size less_than,1</code>
* <code>is location_type town</code>
* <code>not party_size equals,0</code> 
* <code>is location_type town:shop:clinic</code>
* <code>is party_size greater_than,4</code>


=== player_at ===
=== money_is ===
Check to see if the player is inside the event's area. This event will check the event object's <code>X</code>, <code>Y</code>, <code>Width</code>, and <code>Height</code> properties and checks to see if the player is within those bounds. That includes event areas that are greater than one tile in size. You can optionally include an <code>x,y</code> parameter to specify a single tile location.
Check to see if the player has a certain amount of money (pocket).


'''Parameters'''  
'''Parameters'''  
* <code>x</code>: X tile coordinates that the player is at (optional)
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>y</code>: Y tile coordinate that the player is at (optional)
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
* <code>amount</code>: Amount of money or value stored in variable.


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


=== player_defeated ===
=== monster_flair ===
Check to see the player has at least one tuxemon, and all tuxemon in their party are defeated.
Check to see if the given monster flair matches the expected value.


'''Parameters'''  
'''Parameters'''  
* <code>None</code>
* <code>slot</code>: Position of the monster in the player monster list.
* <code>property</code>: Category of the flair.
* <code>name</code>: Name of the flair.


'''Examples'''  
'''Examples'''  
* <code>is player_defeated</code>
* <code>to be defined</code>


=== player_facing_npc ===
=== music_playing ===
Check to see if the player is facing an NPC with the name <code>npc_name</code>.
Check to see if the specified music file is currently playing.


'''Parameters'''  
'''Parameters'''  
* <code>npc_name</code>: The name of the NPC on the current map.
* <code>music_file</code>: The music file to check.


'''Examples'''  
'''Examples'''  
* <code>is player_facing_npc Apple</code>
* <code>is music_playing 472452_8-Bit-Ambient.ogg</code>


=== player_facing_tile ===
=== once ===
Check to see if the player is facing a particular tile. This event will check the event object's <code>X</code>, <code>Y</code> coordinates for the tile to check for.
Checks the date saved in the variables with today's date.


'''Parameters'''  
'''Parameters'''  
* <code>value</code>: value (eg surfable) inside the tileset (optional)
* <code>timeframe</code>: nr of days the event stays "blocked" (eg. 1, 7, etc.)
* <code>variable</code>: Variable where the date is stored.


'''Examples'''  
'''Examples'''  
* <code>is player_facing_tile</code>
* <code>set_variable variable_name:today</code> 
* <code>is player_facing_tile surfable</code>
* <code>is once 1,variable_name</code> (it blocks the event for 1 day)
or
* <code>is once 7,variable_name</code> (it blocks the event for 7 days - 1 week)


=== player_facing ===
=== one_of ===
Check to see where an NPC is facing.
Check to see if at least 1 among multiple values in a variable is True. If the variable does not exist it will return ``False``.


'''Parameters'''
'''Parameters'''  
* <code>direction</code>: One of "up", "down", "left" or "right".
* <code>variable</code>: The variable to check.
* <code>values</code>: Value to check for (multiple values separated by ":").


'''Examples'''  
'''Examples'''  
* <code>is player_facing right</code>
* <code>is one_of stage_of_day,afternoon:dusk:morning</code>


=== player_in ===
=== party_infected ===
Check to see if the player is at the condition position on a specific set of tiles.
Check to see how many monster are infected in the character's party.
 
'''Parameters''' 
* <code>value</code>: value (eg surfable) inside the tileset.
 
'''Examples'''  
* <code>is player_in surfable</code>
 
=== player_moved ===
Check to see the player has just moved into this tile. Using this condition will prevent a condition like "player_at" from constantly being true every single frame. Check if player destination collides with event, if it collides, wait until destination changes. It become True after collides and destination has changed. These rules ensure that the event is true once player in in the tile and is only true once.


'''Parameters'''  
'''Parameters'''  
* <code>None</code>
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>value</code>: all, some or none.


'''Examples'''  
'''Examples'''  
* <code>is player_moved</code>
* <code>is party_infected some</code>


=== to_talk ===
=== party_size ===
Check if we are attempting interact with a map condition tile.
Check the character's party size. The <code>check</code> parameter can be: <code>equals</code>, <code>less_than</code>, or <code>greater_than</code>.


'''Parameters'''  
'''Parameters'''  
* <code>character</code>: Npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>operator</code>: Numeric comparison operator. Accepted values are <code>less_than</code>, <code>less_or_equal</code>, <code>greater_than</code>, <code>greater_or_equal</code>, <code>equals</code> and <code>not_equals</code>.
* <code>party_size</code>: The size of the party to check against.


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


=== to_use_tile ===
=== to_use_tile ===
Line 470: Line 475:


'''Parameters'''  
'''Parameters'''  
* <code>monster_id</code>: Id of the monster (name of the variable).
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>technique</code>: Slug of the technique (e.g. "bullet").
* <code>technique</code>: Slug of the technique (e.g. "bullet").
* <code>power</code>: Power between 0.0 and 3.0. (optional)
* <code>power</code>: Power between 0.0 and 3.0. (optional)
* <code>potency</code>: Potency between 0.0 and 1.0. (optional)
* <code>potency</code>: Potency between 0.0 and 1.0. (optional)
* <code>accuracy</code>: Accuracy between 0.0 and 1.0. (optional)
* <code>accuracy</code>: Accuracy between 0.0 and 1.0. (optional)
* <code>npc_slug</code>: npc slug name (e.g. "npc_maple") - if absent default "player" (optional)


'''Examples'''  
'''Examples'''  
* <code>get_player_monster name_variable</code>
* <code>get_player_monster name_variable</code>
* <code>add_tech name_variable,bullet</code>
* <code>add_tech name_variable,bullet</code>
=== battles_print ===
Print the current value of battle history to the console. If no variable is specified, print out values of all battles.
'''Parameters'''
* <code>character</code>: Npc slug name (e.g. "npc_maple"). (optional)
* <code>result</code>: One among "won", "lost" or "draw". (optional)
'''Examples'''
* <code>battles_print</code>
* <code>battles_print [character,result]</code>


=== breeding ===
=== breeding ===
Line 530: Line 523:
* <code>change_bg gradient_blue</code>
* <code>change_bg gradient_blue</code>
* <code>change_bg</code> (stop)
* <code>change_bg</code> (stop)
=== change_taste ===
hanges tastes monster.
'''Parameters''' 
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>taste</code>: Warm or cold.
'''Examples'''
* <code>change_taste name_variable,warm</code>


=== change_state ===
=== change_state ===
Line 536: Line 539:
'''Parameters'''   
'''Parameters'''   
* <code>state_name</code>: The state name to switch to (e.g. PCState).
* <code>state_name</code>: The state name to switch to (e.g. PCState).
* <code>optional</code>: Variable related to specific states (eg slug for JournalInfoState). (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'''  
Line 542: Line 545:
* <code>change_state JournalInfoState,rockitten</code>
* <code>change_state JournalInfoState,rockitten</code>


=== choice_item ===
=== char_face ===
Ask the player to make a choice among items.
Make the character face a certain direction.


'''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.
* <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>.


'''Examples'''  
'''Examples'''  
* <code>choice_monster potion:tea,name_variable</code>
* <code>char_face player,down</code>
* <code>char_face npc_maple,right</code>


=== choice_monster ===
=== char_look ===
Ask the player to make a choice among monsters.
Make a character look around.


'''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>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>choice_monster apeoro:rockitten,name_variable</code>
* <code>char_look character</code> 
* <code>char_look character,,right:left</code>


=== choice_npc ===
=== char_move ===
Ask the player to make a choice among NPCs.
Relative tile movement for character.


'''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_move spyder_homemakerpapertown, down 1, right 1, up 1, left 1</code>


=== clear_kennel ===
=== char_plague ===
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.
Set the character as infected, inoculated or healthy.


'''Parameters'''
'''Parameters'''  
* <code>kennel</code>: The kennel to clear.
* <code>condition</code>: Infected, inoculated or healthy.
* <code>transfer</code>: The kennel to transfer the monsters. (optional)
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple"). (optional)


'''Examples'''  
'''Examples'''  
* <code>clear_kennel name_kennel, new_kennel</code>
* <code>char_plague infected,npc_maple</code>


=== clear_tuxepedia ===
=== char_run ===
Clear the key and value in the Tuxepedia dictionary.
Set the character movement speed to the global run 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_run npc_mom</code>


=== clear_variable ===
=== char_speed ===
Clear the value of a variable from the game.
Set the character movement speed to a custom value.


'''Parameters''' :  
'''Parameters'''  
* <code>variable</code>: The variable to clear.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>speed</code>: Speed amount.


'''Examples'''  
'''Examples'''  
* <code>clear_variable name_variable</code>
* <code>char_speed npc_mom,0.2</code>


=== copy_variable ===
=== char_stop ===
Copy the value of var2 into var1 (e.g. var1 = var 2).
Make the character stop moving.


'''Parameters''' :
'''Parameters'''  
* <code>var1</code>: The variable to copy to.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>var2</code>: The variable to copy from.


'''Examples'''  
'''Examples'''  
* <code>copy_variable new_variable,old_variable</code>
* <code>char_stop npc_mom</code>


=== create_npc ===
=== char_walk ===
Creates an NPC and places them on the current map.
Set the character movement speed to the global walk speed.


'''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>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <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>create_npc Maple,2,3</code> 
* <code>char_walk npc_mom</code>
* <code>create_npc Pine,1,6,stand</code>


=== delayed_teleport ===
=== char_wander ===
Set teleport information. Teleport will be triggered during screen transition. Only use this if followed by a transition.
Make a character wander around the map.


'''Parameters'''  
'''Parameters'''  
* <code>map_name</code>: Name of the map to teleport to.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>position_x</code>: X position to teleport to.
* <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>position_y</code>: Y position to teleport to.
* <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>delayed_teleport cotton_town,10,10</code>
* <code>char_wander npc_maple</code>
* <code>char_wander npc_maple,,5,7,7,9</code>


=== evolution ===
=== choice_item ===
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>
Ask the player to make a choice among items.


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


'''Examples'''  
'''Examples'''  
* <code>evolution player</code>
* <code>choice_monster potion:tea,name_variable</code>


=== fadeout_music ===
=== choice_monster ===
Fades out music over <code>x</code> milliseconds.
Ask the player to make a choice among monsters.


'''Parameters'''  
'''Parameters'''
* <code>time_seconds</code>: Time in milliseconds to fade out the currently playing music.
* <code>choices</code>: List of possible choices (monster slugs eg: rockitten:apeoro), separated by a colon ":".
* <code>variable</code>: Variable to store the result of the choice.


'''Examples'''  
'''Examples'''  
* <code>fadeout_music 2</code>
* <code>choice_monster apeoro:rockitten,name_variable</code>


=== get_party_monster ===
=== choice_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.)
Ask the player to make a choice among NPCs.


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


'''Examples'''  
'''Examples'''  
* <code>get_party_monster</code>
* <code>choice_monster billie:maple,name_variable</code>
* <code>get_party_monster npc_maple</code>


=== get_player_monster ===
=== clear_kennel ===
Select a monster in the player party and store its id in a variable.
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.


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.
'''Parameters''' 
* <code>kennel</code>: The kennel to clear.
* <code>transfer</code>: The kennel to transfer the monsters. (optional)


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".
'''Examples'''
* <code>clear_kennel name_kennel, new_kennel</code>


Note:
=== clear_tuxepedia ===
* let's say a player doesn't has no options, then the variable will result as: name_variable:no_option
Clear the key and value in the Tuxepedia dictionary.
* 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>monster_slug</code>: Monster slug name (e.g. "rockitten").
* <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_player_monster name_variable</code>
* <code>clear_tuxepedia rockitten</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>


=== kennel_print ===
=== clear_variable ===
Print all the kennels or one. It returns <name, qty, visible/hidden>, where *qty = number of monsters inside.
Clear the value of a variable from the game.


'''Parameters'''  
'''Parameters''' :
* <code>kennel</code>: Name of the kennel. (optional)
* <code>variable</code>: The variable to clear.


'''Examples'''  
'''Examples'''  
* <code>kennel_print</code>
* <code>clear_variable name_variable</code>
* <code>kennel_print name_kennel</code>


=== load_game ===
=== copy_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)
Copy the value of var2 into var1 (e.g. var1 = var 2).


'''Parameters'''  
'''Parameters''' :
* <code>index</code>: Selected index. (optional)
* <code>var1</code>: The variable to copy to.
* <code>var2</code>: The variable to copy from.


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


=== lock_controls ===
=== create_npc ===
Lock player controls.
Creates an NPC and places them on the current map.


'''Parameters'''  
'''Parameters'''  
* <code>None</code>
* <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>lock_controls</code>
* <code>create_npc Maple,2,3</code> 
* <code>create_npc Pine,1,6,stand</code>


=== menu ===
=== delayed_teleport ===
Enable/disable one or more menu.
Set teleport information. Teleport will be triggered during screen transition. Only use this if followed by a transition.


'''Parameters'''  
'''Parameters'''  
* <code>act</code>: enable or disable
* <code>map_name</code>: Name of the map to teleport to.
* <code>menu</code>: specific menu (menu_monster, menu_bag, menu_player, exit, menu_options, menu_save, menu_load, menu_missions) without specification, everything disabled
* <code>position_x</code>: X position to teleport to.
* <code>position_y</code>: Y position to teleport to.


'''Examples'''  
'''Examples'''  
* <code>menu disable,menu_bag</code>
* <code>delayed_teleport cotton_town,10,10</code>


=== modify_monster_stats ===
=== evolution ===
Change the stats of a monster in the current player's party.
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>


'''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>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <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>evolution player</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>


=== modify_npc_attribute ===
=== fadeout_music ===
Modify the given attribute of the npc by modifier. By default this is achieved via addition, but prepending a '%' will cause it to be multiplied by the attribute.
Fades out music over <code>x</code> milliseconds.


'''Parameters'''  
'''Parameters'''  
* <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>time_seconds</code>: Time in milliseconds to fade out the currently playing music.
* <code>attribute</code>: Name of the attribute to modify.
* <code>value</code>: Value of the attribute modifier.


'''Examples'''  
'''Examples'''  
* <code>modify_npc_attribute npc_slug,attribute,value</code>
* <code>fadeout_music 2</code>


=== modify_player_attribute ===
=== format_variable ===
Modify the given attribute of the player character by modifier. By default this is achieved via addition, but prepending a '%' will cause it to be multiplied by the attribute.
Format the value of a variable from the game (eg. float or int).


'''Parameters'''  
'''Parameters'''  
* <code>attribute</code>: Name of the attribute to modify.
* <code>variable</code>: The variable to format.
* <code>value</code>: Value of the attribute modifier.
* <code>type_format</code>: Kind of format (float or int).


'''Examples'''  
'''Examples'''  
* <code>modify_player_attribute attribute,value</code>
* <code>format_variable name_variable,int</code>
* <code>format_variable name_variable,float</code>


=== money_print ===
=== get_monster_tech ===
Print the current value of money dictionary to the console. If no entity is specified, print out values of all money dictionary.
Select a tech among the monster's moves. It allows filtering: slug, element, range.


'''Parameters'''  
'''Parameters'''  
* <code>slug</code>: Slug name (e.g. player or NPC, etc.). (optional)
* <code>variable_name</code>: Variable where to store the technique id.
* <code>monster_id</code>: Variable where is stored the monster id.
* <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>money_print</code>
* <code>get_monster_tech name_variable,monster_id</code>
* <code>money_print player</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>


=== npc_face ===
=== get_party_monster ===
Makes the npc face a particular direction. Parameter can be set to: <code>left</code>, <code>right</code>, <code>up</code>, or <code>down</code>.
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>name</code>: The name of the npc.  
* <code>npc_slug</code>: npc slug name (e.g. "npc_maple") - if absent default "player" (optional)
* <code>direction</code>: Direction to make the player face. Can be set to: <code>left</code>, <code>right</code>, <code>up</code>, or <code>down</code>.


'''Examples'''  
'''Examples'''  
* <code>npc_face Maple,left</code>
* <code>get_party_monster</code>
* <code>npc_face Pine,up</code>
* <code>get_party_monster npc_maple</code>


=== npc_look ===
=== get_player_monster ===
Make an NPC look around.
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>npc_slug</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'''
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>npc_look npc_slug</code> 
* <code>npc_look npc_slug,,right:left</code>


=== npc_move ===
Note:
Determines the NPC's movement behaviour.
* 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>name</code>: The name of the npc. 
* <code>variable_name</code>: Name of the variable where to store the monster id.
* <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>npc_move spyder_homemakerpapertown, down 1, right 1, up 1, left 1</code>
* <code>get_player_monster 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>


=== npc_plague ===
=== give_experience ===
Set the NPC as infected, inoculated or healthy.
Gives experience points to the monster.


'''Parameters'''  
'''Parameters'''  
* <code>condition</code>: Infected, inoculated or healthy
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple"). (optional)
* <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.


'''Examples'''  
'''Examples'''  
* <code>npc_plague spyder_homemakerpapertown</code>
* <code>give_experience name_variable,steps_variable"</code>
* <code>give_experience name_variable,420</code>


=== npc_run ===
=== info ===
Sets the NPC's speed to the universal run speed.
Records monster's attribute values inside a game variable. It allows to record the monster's owner attribute values too.


'''Parameters'''  
'''Parameters'''  
* <code>name</code>: The name of the npc.
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>attribute</code>: The attribute to check (level, speed, etc.).


'''Examples'''  
'''Examples'''  
* <code>npc_run npc_mom</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"


=== npc_speed ===
=== input_variable ===
Sets the NPC's walk speed.  
Set a code and checks if it's correct or not. The player's output will be by default lowercase.


'''Parameters'''  
'''Parameters'''  
* <code>name</code>: The name of the npc.
* <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>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>npc_speed npc_mom, 0.2</code>
* <code>input_variable access_code,response_question</code>
* <code>input_variable access_code,response_question,escape</code>


=== npc_walk ===
=== load_game ===
Sets the NPC's speed to the universal walk speed.  
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>name</code>: The name of the npc.  
* <code>index</code>: Selected index. (optional)


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


=== npc_wander ===
=== lock_controls ===
Sets the NPC's behaviour to wander about instead of stand in place.
Lock player controls.


'''Parameters'''  
'''Parameters'''  
* <code>npc_slug</code>: Npc slug name (e.g. "npc_maple").
* <code>None</code>
* <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>npc_wander npc_maple</code>
* <code>lock_controls</code>
* <code>npc_wander npc_maple,,5,7,7,9</code>


=== open_shop ===
=== menu ===
Open the shop menu for a NPC.
Enable/disable one or more menu.


'''Parameters'''  
'''Parameters'''  
* <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>act</code>: enable or disable
* <code>menu</code>: Either "buy", "sell" or "both". Default is "both". (optional)
* <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'''  
'''Examples'''  
* <code>open_shop npc_maple</code>  
* <code>menu disable,menu_bag</code>


=== pathfind ===
=== modify_char_attribute ===
Moves an NPC to a certain tile on the map.
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>name</code>: The name of the NPC to be moved.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>tile_pos_x</code>: The X-tile coordinate to have the NPC to walk to.
* <code>attribute</code>: Name of the attribute to modify.
* <code>tile_pos_y</code>: The Y-tile coordinate to have the NPC to walk to.    
* <code>value</code>: Value of the attribute modifier.


'''Examples'''  
'''Examples'''  
* <code>pathfind Maple,2,3</code>
* <code>modify_char_attribute character,attribute,value</code>
* <code>pathfind Pine,1,6</code>


=== pathfind_to_player ===
=== modify_money ===
Pathfind NPC close the player.
Add or remove an amount of money for a wallet (slug).


'''Parameters'''  
'''Parameters'''  
* <code>npc_slug</code>: Npc slug name (e.g. "npc_maple").
* <code>slug</code>: Slug name (e.g. player or NPC, etc.).
* <code>direction</code>: Approaches the player from up, down, left or right.
* <code>amount</code>: Amount of money to add/remove (-/+)
* <code>distance</code>: How many tiles (2, 3, 4, etc.)
* <code>variable</code>: Name of the variable where to store the amount.


'''Examples'''  
'''Examples'''  
* <code>pathfind_to_player spyder_route2_roddick</code>  
* <code>modify_money npc_maple,100</code>
* <code>translated_dialog spyder_route2_roddick1</code>
* <code>modify_money npc_maple,-50</code>
* <code>start_battle spyder_route2_roddick</code>  
* <code>modify_money player,,name_variable</code>


=== pause_music ===
=== modify_monster_bond ===
Pauses the currently playing music.
Add or remove an amount of money for a wallet (slug).


'''Parameters'''  
'''Parameters'''  
* <code>None</code>
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are touched.
* <code>amount</code>: An int or float value, if no amount, then default 1 (int).


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


=== play_map_animation ===
=== modify_monster_health ===
Plays an animation on the map. The <code>position</code> parameter can also be <code>player</code> if you want to draw the animation at the player's location. Loop can be either <code>loop</code> or <code>noloop</code>.
Modify the hp of a monster in the current player's party.


'''Parameters'''  
'''Parameters'''  
* <code>animation_name</code>: The name of the animation to play under <code>resources/animations/tileset</code>.
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are healed.
* <code>duration</code>: The amount of time in seconds between each frame. 
* <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>loop</code>: Whether or not to loop the animation. Can be either <code>loop</code> or <code>noloop</code> to loop the animation. 
* <code>position</code>: The position to draw the animation. Can either be an <code>x,y</code> coordinate or <code>player</code> to draw the animation over the player.


'''Examples'''  
'''Examples'''  
* <code>play_map_animation grass,0.1,noloop,player</code>
* <code>modify_monster_health</code>
* <code>play_map_animation sign01,0.4,loop,33,10</code>
* <code>modify_monster_health ,0.25</code>
 


=== play_music ===
=== modify_monster_stats ===
Plays an audio file.
Change the stats of a monster in the current player's party.


'''Parameters'''  
'''Parameters'''  
* <code>filename</code>: Music 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. (Optional)
* <code>volume</code>: Number between 0.0 and 1.0. (optional)
* <code>stat</code>: A stat among armour, dodge, hp, melee, speed and ranged. If no stat, then all the stats. (Optional)
* <code>loop</code>: How many times loop, default forever. (optional)
* <code>amount</code>: A/an float/int value, if no amount, then default 1 (+). (Optional)


'''Examples'''  
'''Examples'''  
* <code>play_music music_mystic_island</code>  
* <code>modify_monster_stats</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>


=== play_sound ===
=== open_shop ===
Plays a sound file.
Open the shop menu for a NPC.


'''Parameters'''  
'''Parameters'''  
* <code>filename</code>: Sound file to load (slug inside the JSON in db/sound)
* <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>volume</code>: Number between 0.0 and 1.0. (optional)
* <code>menu</code>: Either "buy", "sell" or "both". Default is "both". (optional)


'''Examples'''  
'''Examples'''  
* <code>play_sound sound_confirm</code>
* <code>open_shop npc_maple</code>  


=== player_face ===
=== overwrite_tech ===
Makes the player face a particular direction. Parameter can be set to: <code>left</code>, <code>right</code>, <code>up</code>, or <code>down</code>.
Overwrite / replace a technique with another.


'''Parameters'''  
'''Parameters'''  
* <code>direction</code>: Direction to make the player face. Can be set to: <code>left</code>, <code>right</code>, <code>up</code>, or <code>down</code>.
* <code>removed</code>: Name of the variable where to store the tech id.
* <code>added</code>: Slug technique.


'''Examples'''  
'''Examples'''  
* <code>player_face left</code> 
* <code>overwrite_tech name_variable,peck</code>  
* <code>player_face up</code>


=== player_sprite ===
=== pathfind ===
Check the player's sprite
Moves an NPC to a certain tile on the map.


'''Parameters'''  
'''Parameters'''  
* <code>sprite</code>: slug of the sprite
* <code>name</code>: The name of the NPC to be moved.
* <code>tile_pos_x</code>: The X-tile coordinate to have the NPC to walk to. 
* <code>tile_pos_y</code>: The Y-tile coordinate to have the NPC to walk to.   


'''Examples'''  
'''Examples'''  
* <code>is player_sprite adventurer</code>
* <code>pathfind Maple,2,3</code>
* <code>pathfind Pine,1,6</code>


=== player_stop ===
=== pathfind_to_player ===
Stops the player's current movement. There is currently no way to stop a player from inputting another movement after being stopped ([https://github.com/Tuxemon/Tuxemon/issues/790 issue #790])
Pathfind NPC close the player.


'''Parameters'''  
'''Parameters'''  
* <code>None</code>
* <code>npc_slug</code>: Npc slug name (e.g. "npc_maple").
* <code>direction</code>: Approaches the player from up, down, left or right.
* <code>distance</code>: How many tiles (2, 3, 4, etc.)


'''Examples'''  
'''Examples'''  
* <code>player_stop</code>
* <code>pathfind_to_player spyder_route2_roddick</code>
* <code>translated_dialog spyder_route2_roddick1</code>
* <code>start_battle player,spyder_route2_roddick</code>  


=== print ===
=== pause_music ===
Print the current value of a game variable to the console. If no variable is specified, print out values of all game variables.
Pauses the currently playing music.


'''Parameters''' :
'''Parameters'''  
* <code>variable</code>: Prints out the value of this variable (optional)
* <code>None</code>


'''Examples'''  
'''Examples'''  
* <code>print</code>
* <code>pause_music</code>
* <code>print name_variable</code> 


=== quarantine ===
=== play_map_animation ===
Quarantine infected monsters. Amount works only for "out", it takes out the amount in a random way.  
Plays an animation on the map. The <code>position</code> parameter can also be <code>player</code> if you want to draw the animation at the player's location. Loop can be either <code>loop</code> or <code>noloop</code>.


'''Parameters'''  
'''Parameters'''  
* <code>value</code>: in or out
* <code>animation_name</code>: The name of the animation to play under <code>resources/animations/tileset</code>. 
* <code>amount</code>: number of monsters (optional)
* <code>duration</code>: The amount of time in seconds between each frame. 
* <code>loop</code>: Whether or not to loop the animation. Can be either <code>loop</code> or <code>noloop</code> to loop the animation. 
* <code>position</code>: The position to draw the animation. Can either be an <code>x,y</code> coordinate or <code>npc_slug</code> to draw the animation over the character.


'''Examples'''  
'''Examples'''  
* <code>quarantine out</code> everything out (player's party -> if full, then box)
* <code>play_map_animation grass,0.1,noloop,player</code>
* <code>quarantine out,5</code> eg. box contains 30 monsters <code>quarantine out,5</code>, it means 5 monsters by random
* <code>play_map_animation sign01,0.4,loop,33,10</code>


=== quit ===
=== play_music ===
Completely quit the game.
Plays an audio file.


'''Parameters'''  
'''Parameters'''  
* <code>None</code>
* <code>filename</code>: Music file to load (slug inside the JSON in db/sound)
* <code>volume</code>: Number between 0.0 and 1.0. (optional)
* <code>loop</code>: How many times loop, default forever. (optional)


'''Examples'''  
'''Examples'''  
* <code>quit</code>
* <code>play_music music_mystic_island</code>  


=== random_battle ===
=== play_sound ===
Start random battle with a random npc with a determined number of monster in a certain range of levels.
Plays a sound file.


'''Parameters'''  
'''Parameters'''  
* <code>nr_txmns</code>: Number of tuxemon (1 to 6).
* <code>filename</code>: Sound file to load (slug inside the JSON in db/sound)
* <code>min_level</code>: Minimum level of the party.
* <code>volume</code>: Number between 0.0 and 1.0. (optional)
* <code>max_level</code>: Maximum level of the party.


'''Examples'''  
'''Examples'''  
* <code>random_battle 6,1,99</code>
* <code>play_sound sound_confirm</code>
 
=== print ===
Print the current value of a game variable to the console. If no variable is specified, print out values of all game variables.


=== random_encounter ===
'''Parameters''' :
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>player_at</code> and <code>player_moved</code> conditions.
* <code>variable</code>: Prints out the value of this variable (optional)


Here is an example encounter file: ''resources/db/encounter/route1.json''  
'''Examples'''
* <code>print</code> 
* <code>print name_variable</code>  


<code>{"slug":"route1","monsters":[{"monster":"pairagrin","encounter_rate":3.5,"daytime":true,"exp_req_mod":1,"level_range":[2,4]}]}</code>
=== quarantine ===
Quarantine infected monsters. Amount works only for "out", it takes out the amount in a random way.


'''Parameters'''  
'''Parameters'''  
* <code>encounter_slug</code>: Slug of the encounter list.
* <code>value</code>: in or out
* <code>total_prob</code>: Total sum of the probabilities. (optional)
* <code>amount</code>: number of monsters (optional)
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)


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


=== random_integer ===
=== quit ===
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.
Completely quit the game.


'''Parameters'''  
'''Parameters'''  
* <code>variable</code>: Name of the variable.
* <code>None</code>
* <code>lower_bound</code>: Lower bound of range to return an integer between (inclusive)
* <code>upper_bound</code>: Upper bound of range to return an integer between (inclusive)


'''Examples'''  
'''Examples'''  
* <code>random_integer name_variable,1,9</code>
* <code>quit</code>


=== random_item ===
=== random_battle ===
Pick a random item from a list and add it to the trainer's inventory.
Start random battle with a random npc with a determined number of monster in a certain range of levels.


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


'''Examples'''  
'''Examples'''  
* <code>random_item potion:tea:revive</code> (adds 1 potion or tea or revive to the trainer's inventory).
* <code>random_battle 6,1,99</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).
=== random_encounter ===
* <code>random_item potion:tea:revive,,npc_maple</code> (adds 1 potion or tea or revive to the maple's inventory).
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.
 
Here is an example encounter file: ''resources/db/encounter/route1.json'' 


=== random_monster ===
  "slug": "route1",
Add a monster to the specified trainer's party if there is room.
  "monsters": [
    {
      "monster": "pairagrin",
      "encounter_rate": 3.5,
      "variable": "daytime:true",
      "exp_req_mod": 1,
      "level_range": [
        2,
        4
      ]
    },


'''Parameters'''  
'''Parameters'''  
* <code>monster_level</code>: Level of the added monster.
* <code>encounter_slug</code>: Slug of the encounter list.
* <code>trainer_slug</code>: Slug of the trainer that will receive the monster. It defaults to the current player. (optional)
* <code>total_prob</code>: Total sum of the probabilities. (optional)
* <code>exp_mod</code>: Experience modifier. (optional)
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)
* <code>money_mod</code>: Money modifier. (optional)
* <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>random_encounter route1</code>
* <code>random_monster 10,npc_maple</code>
* <code>random_encounter route1,20</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 ===
=== random_integer ===
Removes a collision defined by a specific label.
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.


'''Parameters''' :
'''Parameters'''  
* <code>label</code>: Name of the obstacle.
* <code>variable</code>: Name of the variable.
* <code>lower_bound</code>: Lower bound of range to return an integer between (inclusive)
* <code>upper_bound</code>: Upper bound of range to return an integer between (inclusive)


'''Examples'''  
'''Examples'''  
* <code>remove_collision obstacle</code> (it can one added with add_collision or an existing zone in the .tmx file).
* <code>random_integer name_variable,1,9</code>


=== remove_contacts ===
=== random_item ===
Remove contact from the app (Nu Phone).
Pick a random item from a list and add it to the trainer's inventory.


'''Parameters''' :
'''Parameters'''  
* <code>slug</code>: slug name (e.g. "npc_maple").
* <code>item_slug</code>: Item name to look up in the item database (multiple items separated by ":").
* <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>remove_contacts npc_maple</code>
* <code>random_item potion:tea:revive</code> (adds 1 potion or tea or revive to the trainer's inventory).
* <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).


=== remove_monster ===
=== random_monster ===
Remove a monster from the given trainer's party if the monster is there. Monster is determined by instance_id, which must be passed in a game variable.
Add a monster to the specified trainer's party if there is room.


'''Parameters'''  
'''Parameters'''  
* <code>instance_id</code>: Id of the monster to remove.
* <code>monster_level</code>: Level of the added monster.
* <code>trainer_slug</code>: Slug of the trainer. If no trainer slug is passed it defaults to the current player.
* <code>trainer_slug</code>: Slug of the trainer that will receive the monster. It defaults to the current player. (optional)
* <code>exp_mod</code>: Experience modifier. (optional)
* <code>money_mod</code>: Money modifier. (optional)
* <code>shape</code>: Shape (eg. varmint, brute, etc.). (optional)
* <code>evo</code>: Stage (eg. basic, stage1, etc.). (optional)


'''Examples'''  
'''Examples'''  
* <code>get_player_monster name_variable</code>
* <code>random_monster 10</code>
* <code>remove_monster name_variable</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_npc ===
=== remove_collision ===
Removes an NPC from the current map.
Removes a collision defined by a specific label.


'''Parameters'''  
'''Parameters''' :
* <code>name</code>: The name of the NPC to remove.
* <code>label</code>: Name of the obstacle.


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


=== remove_state ===
=== remove_contacts ===
Change to the specified state.
Remove contact from the app (Nu Phone).


'''Parameters'''
'''Parameters''' :
* <code>state_name</code>: The state name to switch to (e.g. PCState).
* <code>slug</code>: slug name (e.g. "npc_maple").
* <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>remove_contacts npc_maple</code>
* <code>remove_state JournalInfoState</code> (it removes everything, excluding the basic ones)


=== rename_monster ===
=== remove_monster ===
Open the monster menu and text input screens to rename a selected monster.
Remove a monster from the party if the monster is there.


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


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


=== rename_player ===
=== remove_npc ===
Open the text input screen to rename the player.
Removes an NPC from the current map.


'''Parameters'''  
'''Parameters'''  
* <code>None</code>
* <code>name</code>: The name of the NPC to remove. 


'''Examples'''  
'''Examples'''  
* <code>rename_player</code>   
* <code>remove_npc Maple</code>   
* <code>remove_npc Pine</code>


=== rumble ===
=== remove_state ===
Rumble available controllers with rumble support.
Change to the specified state.


'''Parameters'''  
'''Parameters'''
* <code>duration</code>: Time in seconds to rumble for.
* <code>state_name</code>: The state name to switch to (e.g. PCState).
* <code>power</code>: Percentage of power to rumble.
* <code>optional</code>: Variable related to specific states (eg slug for JournalInfoState).


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


=== save_game ===
=== remove_tech ===
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)
Remove a specific technique from a specific monster.


'''Parameters'''  
'''Parameters'''
* <code>index</code>: Selected index. (optional)
* <code>tech_id</code>: Name of the variable where to store the tech id.


'''Examples'''  
'''Examples'''  
* <code>save_game</code> (it's going to save slot4.save)
* <code>remove_tech name_variable</code>
* <code>save_game 1</code> (it's going to save slot2.save)


=== screen_transition ===
=== rename_monster ===
Fades the screen to black and back over <code>x</code> seconds.
Open the text input screen to rename the monster.


'''Parameters'''  
'''Parameters'''  
* <code>transition_time</code>: Time in seconds - default 2  (optional).
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)


'''Examples'''  
'''Examples'''  
* <code>screen_transition 2</code>
* <code>rename_monster name_variable</code>


=== set_battle ===
=== rename_player ===
Set the key in the player.battle_history dictionary.
Open the text input screen to rename the player.


'''Parameters'''  
'''Parameters'''  
* <code>character</code>: Npc slug name (e.g. "npc_maple").
* <code>None</code>
* <code>result</code>: One among "won", "lost" or "draw"


'''Examples'''  
'''Examples'''  
* <code>set_battle npc_maple,won</code>
* <code>rename_player</code>


=== set_bubble ===
=== rumble ===
Put a bubble above player sprite.
Rumble available controllers with rumble support.


'''Parameters'''  
'''Parameters'''  
* <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>duration</code>: Time in seconds to rumble for.
* <code>bubble</code>: dots, drop, exclamation, heart, note, question, sleep, angry, confused, fireworks
* <code>power</code>: Percentage of power to rumble.


'''Examples'''  
'''Examples'''  
* <code>set_bubble spyder_shopassistant</code> (remove bubble NPC)
* <code>rumble duration,power</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_code ===
=== save_game ===
Set a code and checks if it's correct or not. Case Sensitive: ATTENTION and AtTenTION are two different words.
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>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>index</code>: Selected index. (optional)
* <code>answer</code>: The right answer to the question.
* <code>variable</code>: Where the result (right/wrong) is saved.


'''Examples'''  
'''Examples'''  
* <code>set_code access_code,joke,name_variable</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_economy ===
=== screen_transition ===
Set the economy (prices of items) of the npc or player.
Fades the screen to black and back over <code>x</code> seconds.


'''Parameters'''  
'''Parameters'''  
* <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>trans_time</code>: Time in seconds - default 0.3 (optional).
* <code>economy_slug</code>: Slug of an economy.
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)


'''Examples'''  
'''Examples'''  
* <code>set_economy spyder_shopkeeper,spyder_candy_scoop</code>
* <code>screen_transition 2</code>


=== set_kennel_visible ===
=== set_battle ===
Set the kennel visible or hidden.
Append a new element in player.battles.
 
From hidden to visible: set_kennel_visible name_kennel,true
From visible to hidden: set_kennel_visible name_kennel,false


'''Parameters'''  
'''Parameters'''  
* <code>kennel</code>: Name of the kennel.
* <code>fighter</code>: Npc slug name (e.g. "npc_maple").
* <code>visible</code>: true/false.
* <code>result</code>: One among "won", "lost" or "draw"
* <code>opponent</code>: Npc slug name (e.g. "npc_maple").


'''Examples'''  
'''Examples'''  
* <code>set_kennel_visible name_kennel,true</code>
* <code>set_battle player,won,npc_maple</code> (player won against npc_maple)
* <code>set_kennel_visible name_kennel,false</code>


=== set_kennel ===
=== set_bubble ===
Create a new kennel. If the kennel is visible, then it's advisable to create a msgid in the en_US PO file.
Put a bubble above player sprite.
 
msgid "kennel_name"
msgstr "Kennel Name"


'''Parameters'''  
'''Parameters'''  
* <code>kennel</code>: Name of the kennel.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>visible</code>: true/false.
* <code>bubble</code>: dots, drop, exclamation, heart, note, question, sleep, angry, confused, fireworks


'''Examples'''  
'''Examples'''  
* <code>set_kennel new_kennel,true</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)


=== set_layer ===
=== set_economy ===
Allows to change the color of the transparent layer.
Set the economy (prices of items) of the npc or player.


'''Parameters'''  
'''Parameters'''  
* <code>rgb</code>: color (eg red > 255,0,0,128 > 255:0:0:128) - default transparent
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>economy_slug</code>: Slug of an economy.


'''Examples'''  
'''Examples'''  
* <code>set_layer 255:0:0:128</code>
* <code>set_economy spyder_shopkeeper,spyder_candy_scoop</code>
 
=== set_kennel_visible ===
Set the kennel visible or hidden.


=== set_money ===
From hidden to visible: set_kennel_visible name_kennel,true
Set the key and value in the money dictionary. It'll reset the previous amount.
From visible to hidden: set_kennel_visible name_kennel,false


'''Parameters'''  
'''Parameters'''  
* <code>slug</code>: Slug name (e.g. player or NPC, etc.).
* <code>kennel</code>: Name of the kennel.
* <code>amount</code>: Amount of money
* <code>visible</code>: true/false.


'''Examples'''  
'''Examples'''  
* <code>set_money player,500</code>
* <code>set_kennel_visible name_kennel,true</code>
* <code>set_kennel_visible name_kennel,false</code>
 
=== set_kennel ===
Create a new kennel. If the kennel is visible, then it's advisable to create a msgid in the en_US PO file.
 
msgid "kennel_name"
msgstr "Kennel Name"
 
'''Parameters'''
* <code>kennel</code>: Name of the kennel.
* <code>visible</code>: true/false.
 
'''Examples'''
* <code>set_kennel new_kennel,true</code>
 
=== set_layer ===
Allows to change the color of the transparent layer.
 
'''Parameters'''
* <code>rgb</code>: color (eg red > 255,0,0,128 > 255:0:0:128) - default transparent
 
'''Examples'''
* <code>set_layer 255:0:0:128</code>


=== set_mission ===
=== set_mission ===
Line 1,251: Line 1,312:


'''Parameters'''  
'''Parameters'''  
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>slug</code>: slug mission
* <code>slug</code>: slug mission
* <code>operation</code>: add, remove or change
* <code>operation</code>: add, remove or change
* <code>status</code>: completed, pending, failed (default pending)
* <code>status</code>: completed, pending, failed (default pending)
* <code>npc_slug</code>: slug name (e.g. "npc_maple"), default player.


'''Examples'''  
'''Examples'''  
* <code>set_mission mission1</code>
* <code>set_mission mission1</code>
* <code>set_mission mission1,change,completed</code>
* <code>set_mission mission1,change,completed</code>
=== set_money ===
Set an amount of money for a specific slug.
'''Parameters'''
* <code>slug</code>: Slug name (e.g. player or NPC, etc.).
* <code>amount</code>: Amount of money (>= 0) (default 0)
'''Examples'''
* <code>set_money player</code>
* <code>set_money player,500</code>
=== set_monster_attribute ===
Set the given attribute of the monster to the given value.
'''Parameters'''
* <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'''
* <code>set_monster_attribute name_variable,name,jimmy</code> (the monster will be named jimmy)


=== set_monster_flair ===
=== set_monster_flair ===
Line 1,273: Line 1,356:


=== set_monster_health ===
=== set_monster_health ===
Changes the hp of a monster in the current player's party. The action parameters may contain a monster slot and the amount of health.  
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'''  
Line 1,297: Line 1,380:
* <code>get_player_monster name_variable</code>
* <code>get_player_monster name_variable</code>
* <code>set_monster_level name_variable,1</code>
* <code>set_monster_level name_variable,1</code>
=== set_monster_plague ===
Cure or infect a monster.
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters get the condition. (optional)
* <code>condition</code>: inoculated, healthy or infected, default healthy (optional)
'''Examples'''
* <code>set_monster_plague</code> (all the monsters in the party are healthy)
or
* <code>get_player_monster name_variable</code>
* <code>set_monster_plague name_variable,infected</code>


=== set_monster_status ===
=== set_monster_status ===
Line 1,324: Line 1,394:
* <code>set_monster_status name_variable,status_blinded</code>
* <code>set_monster_status name_variable,status_blinded</code>


=== set_npc_attribute ===
=== set_char_attribute ===
Set the given attribute of the npc to the given value.
Set the given attribute of the character to the given value.


'''Parameters'''  
'''Parameters'''  
* <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>attribute</code>: Name of the attribute.
* <code>attribute</code>: Name of the attribute.
* <code>value</code>: Value of the attribute.
* <code>value</code>: Value of the attribute.


'''Examples'''  
'''Examples'''  
* <code>set_player_attribute npc_maple,attribute,value</code>
* <code>set_char_attribute character,attribute,value</code>


=== set_player_attribute ===
=== set_party_attribute ===
Set the given attribute of the player character to the given value.
Set the given attribute of party's monsters to the given value.


'''Parameters'''  
'''Parameters'''  
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>attribute</code>: Name of the attribute.
* <code>attribute</code>: Name of the attribute.
* <code>value</code>: Value of the attribute.
* <code>value</code>: Value of the attribute.


'''Examples'''  
'''Examples'''  
* <code>set_player_attribute attribute,value</code>
* <code>set_party_attribute player,name,jimmy</code> (all the monsters in the party will be named jimmy)
 
=== set_party_status ===
Records important information about all monsters in the party (eg average level of the party, etc.)
 
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
 
'''Examples'''
* <code>set_party_status player</code>


=== set_player_name ===
=== set_player_name ===
Line 1,386: Line 1,466:


'''Parameters'''  
'''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>monster_slug</code>: Monster slug name (e.g. "rockitten").  
* <code>string</code>: seen / caught
* <code>label</code>: seen / caught


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


=== set_variable ===
=== set_variable ===
Line 1,410: Line 1,491:


'''Parameters'''
'''Parameters'''
* <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple"). The one who is going to receive the new born.


'''Examples'''  
'''Examples'''  
Line 1,423: Line 1,504:


'''Examples'''  
'''Examples'''  
* <code>start_battle npc_maple</code>
* <code>start_battle player,npc_maple</code>
* <code>start_battle npc_maple,npc_apple</code>
* <code>start_battle npc_maple,npc_apple</code>


Line 1,448: Line 1,529:


'''Parameters'''  
'''Parameters'''  
* <code>monster_id</code>: Id of the monster to store.  
* <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)
* <code>box</code>: An existing box where the monster will be stored. (optional)


Line 1,462: Line 1,543:


'''Parameters'''  
'''Parameters'''  
* <code>None</code>
* <code>trans_time</code>: Transition time in seconds - default 0.3. 


'''Examples'''  
'''Examples'''  
* <code>teleport_faint</code>
* <code>teleport_faint</code>
* <code>teleport_faint 6.9</code>


=== teleport ===
=== teleport ===
Line 1,483: Line 1,565:


'''Parameters'''  
'''Parameters'''  
* <code>removed</code>: Instance id (name variable).
* <code>variable</code>: Name of the variable where to store the monster id (removed).
* <code>added</code>: Slug monster.
* <code>added</code>: Slug monster or Name of the variable where to store the monster id (added).


'''Examples'''  
'''Examples'''  
Line 1,492: Line 1,574:


=== transfer_money ===
=== transfer_money ===
Performs a mathematical transaction on the player's money.
Transfer money between entities. Both entities needs to have a wallet.


'''Parameters'''  
'''Parameters'''  
* <code>transaction</code>: Operator symbol.
* <code>slug1</code>: Slug name (e.g. NPC, etc.)
* <code>amount</code>: Amount of money.
* <code>amount</code>: Amount of money.
* <code>slug</code>: Slug name (e.g. NPC, etc.) (optional)
* <code>slug2</code>: Slug name (e.g. NPC, etc.)


'''Examples'''  
'''Examples'''  
* <code>transfer_money +,100,npc_mom</code> (player gets 100 from mom)
* <code>transfer_money player,100,npc_mom</code> (player transfers 100 to mom)
* <code>transfer_money -,100,npc_mom</code> (mom gets 100 from player)
* <code>transfer_money +,100</code> (player gets 100)


=== transition_teleport ===
=== transition_teleport ===
Line 1,511: Line 1,591:
* <code>x</code>: The X-tile coordinate 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>y</code>: The Y-tile coordinate to teleport the player to.   
* <code>transition_time</code>: The time in seconds - default 2. (optional)
* <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)
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (optional)


Line 1,539: Line 1,619:
* <code>translated_dialog msgid</code>   
* <code>translated_dialog msgid</code>   


=== tuxepedia_print ===
=== unlock_controls ===
Print the current value of Tuxepedia to the console. If no monster is specified, print out values of all Tuxepedia.
Unlock player controls


'''Parameters'''  
'''Parameters'''  
* <code>monster_slug</code>: Monster slug name (e.g. "rockitten").
* <code>None</code>


'''Examples'''  
'''Examples'''  
* <code>tuxepedia_print</code>
* <code>unlock_controls</code>
* <code>tuxepedia_print rockitten</code>


=== unlock_controls ===
=== update_tile_properties ===
Unlock player controls
Update tile properties. Enable movement and/or the moverate. '''moverate 0 = not accessible'''. The surface keys supported are: '''surfable''', '''walkable''' and '''climbable'''.


'''Parameters'''  
'''Parameters'''  
* <code>None</code>
* <code>label</code>: Name of the property
* <code>moverate</code>: Value of the moverate (eg 1 equal moverate, default 1)


'''Examples'''  
'''Examples'''  
* <code>unlock_controls</code>   
* <code>update_tile_properties surfable,0.5</code>   


=== variable_math ===
=== variable_math ===
Line 1,598: Line 1,678:


'''Parameters'''  
'''Parameters'''  
* <code>monster_id</code>: The id of the monster to pull (variable).
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>trainer</code>: Slug of the trainer that will receive the monster. It defaults to the current player.
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple"). The one who is going to receive the monster.
 
           
'''Examples'''  
'''Examples'''  
* <code>get_player_monster name_variable</code>
* <code>get_player_monster name_variable</code>
Line 1,616: Line 1,696:


=== Battle related ===
=== Battle related ===
* <code>battle_last_result</code>: the result can be <code>won</code>, <code>draw</code>, <code>lost</code> or <code>ran</code>.
other variables include:
* <code>battle_last_monster_name</code> name of the last monster fought.
* <code>battle_last_monster_name</code> name of the last monster fought.
* <code>battle_last_monster_level</code> level of the last monster fought.
* <code>battle_last_monster_level</code> level of the last monster fought.
Line 1,624: Line 1,701:
* <code>battle_last_monster_category</code> category of the last monster fought.
* <code>battle_last_monster_category</code> category of the last monster fought.
* <code>battle_last_monster_shape</code> shape of the last monster fought.
* <code>battle_last_monster_shape</code> shape of the last monster fought.
* <code>battle_last_trainer</code> slug of the last trainer fought (it applies only to trainer battles).
 
trainer battles:
* <code>battle_last_trainer</code> slug of the last trainer fought
battles PC vs NPC (eg player vs npc_maple or npc_maple vs player)
* <code>battle_last_result</code>: the result can be <code>won</code> or <code>draw</code>
battles NPC vs NPC (eg npc_maple vs npc_apple) or PC vs NPC (eg player vs npc_maple or npc_maple vs player)
* <code>battle_last_loser</code> slug of the last trainer fought ("player" for the player)
* <code>battle_last_winner</code> slug of the last trainer fought ("player" for the player)


=== Time related ===
=== Time related ===
Line 1,683: Line 1,767:
Let's say you want to set up and event for trading monsters. You need 3 events after creating the NPC in map.
Let's say you want to set up and event for trading monsters. You need 3 events after creating the NPC in map.
* <code>monster1</code> (monster desired by the NPC)
* <code>monster1</code> (monster desired by the NPC)
* <code>monster2</code> (monster the NPC wants to trade)
* <code>monster2</code> (monster the NPC wants to trade in exchange)


1st: if the player has the monster
1st: if the player has the monster
* <code>translated_dialog dialog_npc1</code>
    <property name="act10" value="translated_dialog dialog_npc1"/>
* <code>translated_dialog_choice yes:no,npc_willtrade</code>
    <property name="act20" value="translated_dialog_choice yes:no,npc_willtrade"/>
* <code>talk npc_slug</code>
    <property name="behav10" value="talk npc_slug"/>
* <code>is has_monster monster1</code>
    <property name="cond10" value="is has_monster player,monster1"/>
* <code>not variable_set npc_hastraded:yes</code>
    <property name="cond20" value="not variable_set npc_hastraded:yes"/>
2nd: if the player hasn't the monster
2nd: if the player hasn't the monster
* <code>translated_dialog dialog_npc1</code>
    <property name="act10" value="translated_dialog dialog_npc1"/>
* <code>translated_dialog dialog_npc_nomonster1</code>
    <property name="act20" value="translated_dialog dialog_npc_nomonster1"/>
* <code>talk npc_slug</code>
    <property name="behav10" value="talk npc_slug"/>
* <code>not has_monster monster1</code>
    <property name="cond10" value="not has_monster player,monster1"/>
* <code>not variable_set npc_hastraded:yes</code>
    <property name="cond20" value="not variable_set npc_hastraded:yes"/>
3rd: trading part
3rd: trading part
* <code>translated_dialog dialog_npc_willtrade</code>
    <property name="act10" value="translated_dialog dialog_npc_willtrade"/>
* <code>get_player_monster name_variable</code>
    <property name="act20" value="get_player_monster name_variable"/>
* <code>trading name_variable,traded_monster</code>
    <property name="act30" value="trading name_variable,traded_monster"/>
* <code>set_variable npc_hastraded:yes</code>
    <property name="act40" value="set_variable npc_hastraded:yes"/>
* <code>is has_monster monster1</code>
    <property name="cond10" value="is has_monster player,monster1"/>
* <code>is variable_set npc_willtrade</code>
    <property name="cond20" value="is variable_set npc_willtrade"/>
* <code>not variable_set npc_hastraded</code>
    <property name="cond30" value="not variable_set npc_hastraded"/>


==== Get Party Monster ====
==== Get Party Monster ====
Let's say you want to add a tech to a monster (NPC). Eg. the NPC [[Rockitten]] needs to know [[Canine]], but [[Rockitten]] is the 4th monster (equal to 3rd slot).
Let's say you want to add a tech to a monster (NPC). Eg. the NPC [[Rockitten]] needs to know [[Canine]], but [[Rockitten]] is the 4th monster (equal to 3rd slot).


* <code>add_monster rockitten,20,npc_slug,27,10</code>
    <property name="act10" value="add_monster rockitten,20,npc_slug,27,10"/>
* <code>add_monster vivipere,20,npc_slug,27,10</code>
    <property name="act20" value="add_monster vivipere,20,npc_slug,27,10"/>
* <code>add_monster budaye,20,npc_slug,27,10</code>
    <property name="act30" value="add_monster budaye,20,npc_slug,27,10"/>
* <code>add_monster rockitten,20,npc_slug,27,10</code>
    <property name="act40" value="add_monster rockitten,20,npc_slug,27,10"/>
* <code>add_monster nut,20,npc_slug,27,10</code>
    <property name="act50" value="add_monster nut,20,npc_slug,27,10"/>
* <code>get_party_monster npc_slug</code>
    <property name="act60" value="get_party_monster npc_slug"/>
* <code>add_tech iid_slot_3,canine,,,,npc_slug</code> here <code>iid_slot_3</code> followed by [[Canine]]
    <property name="act70" value="add_tech iid_slot_3,canine"/> ---> iid_slot_3 followed by [[Canine]]
* <code>start_battle npc_slug</code>
    <property name="act80" value="start_battle player,npc_slug"/>
 
==== Battle Among NPCs (the player watches without interacting) ====
(eg npc_maple vs npc_apple)
 
    <property name="act10" value="create_npc npc_maple,0,7,stand"/>
    <property name="act20" value="create_npc npc_apple,0,8,stand"/>
    <property name="act30" value="add_monster chloragon,3,npc_maple"/>
    <property name="act40" value="add_monster rockitten,3,npc_apple"/>
    <property name="act50" value="start_battle npc_maple,npc_apple"/>
separate event, multiple endings, if npc_maple wins
    <property name="cond1" value="is variable_set battle_last_winner:npc_maple"/>
separate event, multiple endings, if npc_apple wins
    <property name="cond1" value="not variable_set battle_last_winner:npc_maple"/>
separate event, multiple endings, if no-one wins
    <property name="cond1" value="is variable_set battle_last_result:draw"/>

Latest revision as of 15:25, 17 March 2024

Introduction[edit | edit source]

This page is a reference for all the available actions and conditions available in Tuxemon. You can use this reference to create new map events for your own maps. All action and condition parameters are separated with a comma (,).

Condition Reference[edit | edit source]

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

battle_is[edit | edit source]

Check to see if a character has fought against another one and won, lost or draw.

Parameters

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

Examples

  • is battle_is player,won,npc_maple (has player won against npc_maple in the last fight?)

button_pressed[edit | edit source]

Check to see if a particular key has been pressed. E.g. K_RETURN.

Parameters

  • key: A pygame key constant such as K_RETURN. For a list of all possible keys, refer to the Pygame Key Page

Examples

  • is button_pressed K_RETURN
  • is button_pressed K_ESCAPE
  • not button_pressed K_SPACE

char_at[edit | edit source]

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

Parameters

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

Examples

  • is char_at Maple

char_defeated[edit | edit source]

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

Parameters

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

Examples

  • is char_defeated player

char_exists[edit | edit source]

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

Parameters

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

Examples

  • not char_exists npc_maple

char_facing[edit | edit source]

Check to see where a character is facing.

Parameters

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

Examples

  • is char_facing npc_maple,up
  • not char_facing npc_maple,down

char_facing_char[edit | edit source]

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

Parameters

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

Examples

  • is char_facing_char npc_maple,player

char_facing_tile[edit | edit source]

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

Parameters

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

Examples

  • is char_facing_tile npc_maple

char_in[edit | edit source]

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

Parameters

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

Examples

  • is char_in npc_maple,surfable

char_moved[edit | edit source]

Check to see the character has just moved into this tile. Using this condition will prevent a condition like "char_at" from constantly being true every single frame.

Parameters

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

Examples

  • is char_moved player

char_sprite[edit | edit source]

Check the character's sprite

Parameters

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

Examples

  • is char_sprite player,adventurer

check_char_parameter[edit | edit source]

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

Parameters

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

Examples

  • is check_char_parameter player,name,alpha

check_evolution[edit | edit source]

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

Parameters

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

Examples

  • is check_evolution player

check_max_tech[edit | edit source]

Check to see the player has at least one tuxemon with more than the max number of techniques in its party. If yes, then it saves automatically the monster_id and inside the dictionary event_data.

Parameters

  • nr: Number of tech, default the constant

Examples

  • is check_max_tech
  • is check_max_tech 2

check_mission[edit | edit source]

Check to see the player has failed or completed a mission. Check to see if a mission is still pending.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • method: Mission or missions, "all" means all the existing missions.
  • staths: pending, completed or failed

Examples

  • is check_mission player,mission1,completed
  • is check_mission player,mission1,pending
  • is check_mission player,mission1:mission2,completed
  • is check_mission player,all,completed

check_party_parameter[edit | edit source]

Check to see the player has failed or completed a mission. Check to see if a mission is still pending.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • attribute: Name of the monster attribute to check (e.g. level).
  • value: Value to check (related to the attribute) (e.g. 5 - level).
  • operator: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
  • times: Value to check with operator (how many times in the party?).

Examples

  • check_party_parameter player,level,5,equals,1 (is there 1 monster in the party at level 5? True/False)

check_world[edit | edit source]

Check some world's parameter against a given value.

Parameters

  • parameter: Name of the parameter to check (eg. "layer", etc.).
  • value: Given value to check.

Supported parameters

  • layer: color value which is used to overlay the world
  • bubble: speech bubble of an npc

Examples

  • is check_world
  • is check_world layer,255:255:255:0

current_state[edit | edit source]

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

Parameters

  • state: Either "CombatState", "DialogState", etc

Examples

  • is current_state DialogState
  • is current_state CombatState:DialogState

has_bag[edit | edit source]

Check to see how many items are in the character's bag. It doesn't count invisible items.

Parameters

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

Examples

  • is has_bag player,equals,5 (player's bag: 5 potions and 2 tuxeball (5 items), in this case is true because 5 = 5)
  • is has_bag player,equals,9 (player's bag: 5 potions and 2 tuxeball (5 items), in this case is false because 9 != 5)

has_box[edit | edit source]

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

Parameters

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

Examples

  • is has_box player,Kennel,less_than,1

has_item[edit | edit source]

Check to see if a NPC inventory contains something.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • item: The item slug name (e.g. "item_cherry").
  • operator: Numeric comparison operator. Accepted values are less_than, less_or_equal, greater_than, greater_or_equal, equals and not_equals.
  • quantity: Quantity to compare with. (optional)

Examples

  • is has_item player,potion
  • is has_item player,potion,greater_than,2

has_monster[edit | edit source]

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

Parameters

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

Examples

  • is has_monster player,rockitten

has_party_breeder[edit | edit source]

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

Parameters

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

Examples

  • is has_party_breeder player

has_tech[edit | edit source]

Check to see if the player has a technique in his party (one of the monsters).

Parameters

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

Examples

  • is has_tech bullet

location_inside[edit | edit source]

Check to see if the player is inside.

Examples

  • is location_inside

location_name[edit | edit source]

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

Parameters

  • technique: Slug name. It's the name inside the maps. eg. <property name="slug" value="routeb"/>, so slug = routeb

Examples

  • is location_name routeb
  • is location_name routea:routeb

location_type[edit | edit source]

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

Parameters

  • slug: Slug name. Either all, notype, town, route, clinic, shop, dungeon

Examples

  • is location_type town
  • is location_type town:shop:clinic

money_is[edit | edit source]

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

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • operator: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
  • amount: Amount of money or value stored in variable.

Examples

  • is money_is player,>=,500
  • is money_is player,equals,name_variable (name_variable:75)

monster_flair[edit | edit source]

Check to see if the given monster flair matches the expected value.

Parameters

  • slot: Position of the monster in the player monster list.
  • property: Category of the flair.
  • name: Name of the flair.

Examples

  • to be defined

music_playing[edit | edit source]

Check to see if the specified music file is currently playing.

Parameters

  • music_file: The music file to check.

Examples

  • is music_playing 472452_8-Bit-Ambient.ogg

once[edit | edit source]

Checks the date saved in the variables with today's date.

Parameters

  • timeframe: nr of days the event stays "blocked" (eg. 1, 7, etc.)
  • variable: Variable where the date is stored.

Examples

  • set_variable variable_name:today
  • is once 1,variable_name (it blocks the event for 1 day)

or

  • is once 7,variable_name (it blocks the event for 7 days - 1 week)

one_of[edit | edit source]

Check to see if at least 1 among multiple values in a variable is True. If the variable does not exist it will return ``False``.

Parameters

  • variable: The variable to check.
  • values: Value to check for (multiple values separated by ":").

Examples

  • is one_of stage_of_day,afternoon:dusk:morning

party_infected[edit | edit source]

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

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • value: all, some or none.

Examples

  • is party_infected some

party_size[edit | edit source]

Check the character's party size. The check parameter can be: equals, less_than, or greater_than.

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • operator: Numeric comparison operator. Accepted values are less_than, less_or_equal, greater_than, greater_or_equal, equals and not_equals.
  • party_size: The size of the party to check against.

Examples

  • is party_size less_than,1
  • not party_size equals,0
  • is party_size greater_than,4

to_use_tile[edit | edit source]

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

Parameters

  • None

Examples

  • is to_use_tile

true[edit | edit source]

The true condition will always evaluate to *True* (unless the "not" operator is used)

Parameters

  • None

Examples

  • is true
  • not true

tuxepedia[edit | edit source]

Check Tuxepedia's progress.

Parameters

  • operator: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
  • percentage: Number between 0.1 and 1.0
  • total: Total, by default the total number of tuxemon.

Examples

  • is tuxepedia less_than,0.2
  • is tuxepedia less_than,0.2,10

variable_is[edit | edit source]

Check an operation over a variable.

Parameters

  • value1: Either a variable or a number.
  • operation: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
  • value2: Either a variable or a number.

Examples

  • is variable_is [value1],operator,[value2]

variable_set[edit | edit source]

Check to see if variable_name has been set to value.

Parameters

  • variable_name:value: A key, value pair of the variable to look up and the expected value.

Examples

  • is variable_set battle_won:yes
  • not variable_set current_badges:4
  • is variable_set talked_to_prof:false

Action Reference[edit | edit source]

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

add_collision[edit | edit source]

Adds a collision defined by a specific label. With numbers, it blocks a specific tile.

Parameters

  • label: Name of the obstacle.
  • coord: Coordinates map (single coordinate). (optional)

Examples

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

add_contacts[edit | edit source]

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

Parameters

  • slug: slug name (e.g. "npc_maple").
  • phone_number: 3 digits

Examples

  • add_contacts npc_maple,123

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_tech[edit | edit source]

Adds a tech to a specific monster.

Parameters

  • variable: Name of the variable where to store the monster id.
  • technique: Slug of the technique (e.g. "bullet").
  • power: Power between 0.0 and 3.0. (optional)
  • potency: Potency between 0.0 and 1.0. (optional)
  • accuracy: Accuracy between 0.0 and 1.0. (optional)

Examples

  • get_player_monster name_variable
  • add_tech name_variable,bullet

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

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_taste[edit | edit source]

hanges tastes monster.

Parameters

  • variable: Name of the variable where to store the monster id.
  • taste: Warm or cold.

Examples

  • change_taste name_variable,warm

change_state[edit | edit source]

Change to the specified state.

Parameters

  • state_name: The state name to switch to (e.g. PCState).
  • optional: Variable related to specific states (e.g. variable with monster_id for MonsterInfo, monster slug for JournalInfoState and character slug for CharacterState). (Optional)

Examples

  • change_state PCState
  • change_state JournalInfoState,rockitten

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, or down.

Examples

  • char_face player,down
  • char_face npc_maple,right

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

Parameters

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

Examples

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

char_plague[edit | edit source]

Set the character as infected, inoculated or healthy.

Parameters

  • condition: Infected, inoculated or healthy.
  • character: Either "player" or npc slug name (e.g. "npc_maple"). (optional)

Examples

  • char_plague infected,npc_maple

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_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

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

  • kennel: The kennel to clear.
  • transfer: The kennel to transfer the monsters. (optional)

Examples

  • clear_kennel 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]

Clear the value of a variable from the game.

Parameters  :

  • variable: The variable to clear.

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

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

delayed_teleport[edit | edit source]

Set teleport information. Teleport will be triggered during screen transition. Only use this if followed by a transition.

Parameters

  • map_name: Name of the map to teleport to.
  • position_x: X position to teleport to.
  • position_y: Y position to teleport to.

Examples

  • delayed_teleport cotton_town,10,10

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").

Examples

  • evolution player

fadeout_music[edit | edit source]

Fades out music over x milliseconds.

Parameters

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

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_monster_tech[edit | edit source]

Select a tech among the monster's moves. It allows filtering: slug, element, range.

Parameters

  • variable_name: Variable where to store the technique id.
  • monster_id: Variable where is stored 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_monster_tech name_variable,monster_id
  • get_monster_tech name_variable,monster_id,element,water
  • get_monster_tech name_variable,monster_id,power,less_than,1.6

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

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

menu[edit | edit source]

Enable/disable one or more menu.

Parameters

  • act: enable or disable
  • menu: specific menu (menu_monster, menu_bag, menu_player, exit, menu_options, menu_save, menu_load, menu_missions) without specification, everything disabled

Examples

  • menu disable,menu_bag

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_money[edit | edit source]

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

Parameters

  • slug: Slug name (e.g. player or NPC, etc.).
  • 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_shop[edit | edit source]

Open the shop menu for a NPC.

Parameters

  • npc_slug: Either "player" or npc slug name (e.g. "npc_maple").
  • menu: Either "buy", "sell" or "both". Default is "both". (optional)

Examples

  • open_shop npc_maple

overwrite_tech[edit | edit source]

Overwrite / replace a technique with another.

Parameters

  • removed: Name of the variable where to store the tech id.
  • added: Slug technique.

Examples

  • overwrite_tech name_variable,peck

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]

Plays an animation on the map. The position parameter can also be player if you want to draw the animation at the player's location. Loop can be either loop or noloop.

Parameters

  • animation_name: The name of the animation to play under resources/animations/tileset.
  • duration: The amount of time in seconds between each frame.
  • loop: Whether or not to loop the animation. Can be either loop or noloop to loop the animation.
  • position: The position to draw the animation. Can either be an x,y coordinate or npc_slug to draw the animation over the character.

Examples

  • play_map_animation grass,0.1,noloop,player
  • play_map_animation sign01,0.4,loop,33,10

play_music[edit | edit source]

Plays an audio file.

Parameters

  • filename: Music file to load (slug inside the JSON in db/sound)
  • volume: Number between 0.0 and 1.0. (optional)
  • loop: How many times loop, default forever. (optional)

Examples

  • play_music music_mystic_island

play_sound[edit | edit source]

Plays a sound file.

Parameters

  • filename: Sound file to load (slug inside the JSON in db/sound)
  • volume: Number between 0.0 and 1.0. (optional)

Examples

  • play_sound sound_confirm

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 infected monsters. Amount works only for "out", it takes out the amount in a random way.

Parameters

  • value: in or out
  • amount: number of monsters (optional)

Examples

  • quarantine out everything out (player's party -> if full, then box)
  • quarantine 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]

Start random battle with a random npc with a determined number of monster in a certain range of levels.

Parameters

  • nr_txmns: Number of tuxemon (1 to 6).
  • min_level: Minimum level of the party.
  • max_level: Maximum level of the party.

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_integer[edit | edit source]

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.

Parameters

  • variable: Name of the variable.
  • lower_bound: Lower bound of range to return an integer between (inclusive)
  • upper_bound: Upper bound of range to return an integer between (inclusive)

Examples

  • random_integer name_variable,1,9

random_item[edit | edit source]

Pick a random item from a list and add it to the trainer's inventory.

Parameters

  • item_slug: Item name to look up in the item database (multiple items separated by ":").
  • 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

  • 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]

Add a monster to the specified trainer's party if there is room.

Parameters

  • 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)
  • shape: Shape (eg. varmint, brute, etc.). (optional)
  • evo: Stage (eg. basic, stage1, etc.). (optional)

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 defined by a specific label.

Parameters :

  • label: Name of the obstacle.

Examples

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

remove_contacts[edit | edit source]

Remove contact from the app (Nu Phone).

Parameters :

  • slug: slug name (e.g. "npc_maple").

Examples

  • remove_contacts npc_maple

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]

Change to the specified state.

Parameters

  • state_name: The state name to switch to (e.g. PCState).
  • optional: Variable related to specific states (eg slug for JournalInfoState).

Examples

  • remove_state (it removes everything, excluding the basic ones)
  • remove_state JournalInfoState (it removes everything, excluding the basic ones)

remove_tech[edit | edit source]

Remove a specific technique from a specific monster.

Parameters

  • tech_id: Name of the variable where to store the tech id.

Examples

  • remove_tech name_variable

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

rumble[edit | edit source]

Rumble available controllers with rumble support.

Parameters

  • duration: Time in seconds to rumble for.
  • power: Percentage of power to rumble.

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)

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_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)

set_economy[edit | edit source]

Set the economy (prices of items) of the npc or player.

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

  • kennel: Name of the kennel.
  • visible: true/false.

Examples

  • set_kennel_visible name_kennel,true
  • set_kennel_visible name_kennel,false

set_kennel[edit | edit source]

Create a new kennel. If the kennel is visible, then it's advisable to create a msgid in the en_US PO file.

msgid "kennel_name" msgstr "Kennel Name"

Parameters

  • kennel: Name of the kennel.
  • visible: true/false.

Examples

  • set_kennel new_kennel,true

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

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • slug: slug mission
  • operation: add, remove or change
  • status: completed, pending, failed (default pending)

Examples

  • set_mission mission1
  • set_mission mission1,change,completed

set_money[edit | edit source]

Set an amount of money for a specific slug.

Parameters

  • slug: Slug name (e.g. player or NPC, etc.).
  • 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 a monster's flair to the given value.

Parameters

  • variable: Name of the variable where to store the monster id. If no variable is specified, all monsters are changed.
  • category: Category of the monster flair.
  • flair: Name of the monster flair.

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_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: Single name or multiple names separated by ":" (random choice). NB: the names must be in the en_US PO file.

Examples

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

set_random_variable[edit | edit source]

Set the key in the player.game_variables dictionary with a random value.

Parameters

  • variable: Name of the variable.
  • values: Multiple values of the variable separated with ":".

Examples

  • set_random_variable alpha,one:two:three (variable "alpha" can be "alpha:one" or "alpha:two" or "alpha:three").

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

if you choose a feminine sprite, then it's advisable: heroine if you choose a masculine sprite, then it's advisable: adventurer

Parameters

  • character: Either "player" or npc slug name (e.g. "npc_maple").
  • sprite: must be inside mods/tuxemon/sprites (default = original), 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]

Sets an arbitrary variable to a particular value. This action is good for seeing if battles with NPCs have been fought or not. These variables are also saved when the player saves the game.

Also used to set the environment.

Parameters

  • variable_name:value: A key, value pair of the variable_name to set with value.

Examples

  • set_variable battle_won:yes
  • set_variable talked_to_prof:true
  • set_variable environment:grass
  • set_variable whatever:today: whatever stores today's date (use in combination with condition once)

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").

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.

Parameters

  • None

Examples

  • start_cinema_mode

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

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

  • trans_time: Transition time in seconds - default 0.3.

Examples

  • teleport_faint
  • teleport_faint 6.9

teleport[edit | edit source]

Teleports the player to a given position on a map. This teleport is immediate and does not have any transition animation.

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.

Examples

  • teleport map1.tmx,3,4
  • teleport room1.tmx,8,1

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: Slug name (e.g. NPC, etc.)
  • amount: Amount of money.
  • slug2: Slug name (e.g. NPC, etc.)

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

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

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.
  • style: a predefined style in db/dialogue/dialogue.json

Examples

  • translated_dialog msgid

unlock_controls[edit | edit source]

Unlock player controls

Parameters

  • None

Examples

  • unlock_controls

update_tile_properties[edit | edit source]

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

Parameters

  • label: Name of the property
  • moverate: Value of the moverate (eg 1 equal moverate, default 1)

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)

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

Variables[edit | edit source]

The following are the "main" variables generated by the game and these can be useful to trigger specific events.

These can be used with the condition: is variable_set name_variable:result_variable

Battle related[edit | edit source]

  • battle_last_monster_name name of the last monster fought.
  • battle_last_monster_level level of the last monster fought.
  • battle_last_monster_type type of the last monster fought.
  • battle_last_monster_category category of the last monster fought.
  • battle_last_monster_shape shape of the last monster fought.

trainer battles:

  • battle_last_trainer slug of the last trainer fought

battles PC vs NPC (eg player vs npc_maple or npc_maple vs player)

  • battle_last_result: the result can be won or draw

battles NPC vs NPC (eg npc_maple vs npc_apple) or PC vs NPC (eg player vs npc_maple or npc_maple vs player)

  • battle_last_loser slug of the last trainer fought ("player" for the player)
  • battle_last_winner slug of the last trainer fought ("player" for the player)

Time related[edit | edit source]

  • weekday tracks the day of the week (Monday, Tuesday, etc.)
  • hour tracks the hour
  • day_of_year tracks the days in a year (1 to 365/366)
  • year tracks the year
  • leap_year the result can be true or false
  • daytime the result can be true or false (true between from 06:00 to 18:00, false during the rest of the day).
  • stage_of_day the result can be dawn (from 4 to 8), morning (from 8 to 12), afternoon (from 12 to 16), dusk (from 16 to 20) or night (from 20 to 04).
  • season the result can be winter, spring, summer or autumn

Campaign related[edit | edit source]

  • gender_choice the result can be gender_male or gender_female, depending on the player's choice at the beginning. Useful to create different events for gender.

Party related (monsters)[edit | edit source]

  • party_level_lowest the result shows the lowest level in the player's party (weakest monster).
  • party_level_highest the result shows the highest level in the player's party (strongest monster).
  • party_level_average the result shows the average level in the player's party.

Examples[edit | edit source]

Battle[edit | edit source]

Let's say you want to trigger different events based on the output of the fight:

  • is variable_set battle_last_result:won

or

  • is variable_set battle_last_result:lost

Date[edit | edit source]

Let's say you want to trigger an event in a specific date (mom's birthday, anniversary, etc.), eg. on the 25th May (day nr 145 or 146 if leap year or not):

  • is variable_set day_of_year:146
  • is variable_set leap_year:true

or

  • is variable_set day_of_year:145
  • is variable_set leap_year:false

but if the specific date is before (included) the 28th February (day nr 59):

  • is variable_set day_of_year:59

Season[edit | edit source]

Let's say you want to grant access to a location only in summer:

  • is variable_set season:summer

Stage of the day[edit | edit source]

Let's say you want to block the access during the night:

  • not variable_set stage_of_day:night

while if you want to grant the access only during the night:

  • is variable_set stage_of_day:night

Steps Countdown[edit | edit source]

Let's say you want to trigger an event after 1234 steps:

  • set_variable steps_whatever:1234

steps_ followed by your variable whatever.

  • is variable_is steps_whatever,equals,0.0: Checking for the results, separate event.

Note: you can replace equals with: less_than, less_or_equal, greater_than, greater_or_equal, and not_equals.

Trading[edit | edit source]

Let's say you want to set up and event for trading monsters. You need 3 events after creating the NPC in map.

  • monster1 (monster desired by the NPC)
  • monster2 (monster the NPC wants to trade in exchange)

1st: if the player has the monster

   <property name="act10" value="translated_dialog dialog_npc1"/>
   <property name="act20" value="translated_dialog_choice yes:no,npc_willtrade"/>
   <property name="behav10" value="talk npc_slug"/>
   <property name="cond10" value="is has_monster player,monster1"/>
   <property name="cond20" value="not variable_set npc_hastraded:yes"/>

2nd: if the player hasn't the monster

   <property name="act10" value="translated_dialog dialog_npc1"/>
   <property name="act20" value="translated_dialog dialog_npc_nomonster1"/>
   <property name="behav10" value="talk npc_slug"/>
   <property name="cond10" value="not has_monster player,monster1"/>
   <property name="cond20" value="not variable_set npc_hastraded:yes"/>

3rd: trading part

   <property name="act10" value="translated_dialog dialog_npc_willtrade"/>
   <property name="act20" value="get_player_monster name_variable"/>
   <property name="act30" value="trading name_variable,traded_monster"/>
   <property name="act40" value="set_variable npc_hastraded:yes"/>
   <property name="cond10" value="is has_monster player,monster1"/>
   <property name="cond20" value="is variable_set npc_willtrade"/>
   <property name="cond30" value="not variable_set npc_hastraded"/>

Get Party Monster[edit | edit source]

Let's say you want to add a tech to a monster (NPC). Eg. the NPC Rockitten needs to know Canine, but Rockitten is the 4th monster (equal to 3rd slot).

   <property name="act10" value="add_monster rockitten,20,npc_slug,27,10"/>
   <property name="act20" value="add_monster vivipere,20,npc_slug,27,10"/>
   <property name="act30" value="add_monster budaye,20,npc_slug,27,10"/>
   <property name="act40" value="add_monster rockitten,20,npc_slug,27,10"/>
   <property name="act50" value="add_monster nut,20,npc_slug,27,10"/>
   <property name="act60" value="get_party_monster npc_slug"/>
   <property name="act70" value="add_tech iid_slot_3,canine"/> ---> iid_slot_3 followed by Canine
   <property name="act80" value="start_battle player,npc_slug"/>

Battle Among NPCs (the player watches without interacting)[edit | edit source]

(eg npc_maple vs npc_apple)

   <property name="act10" value="create_npc npc_maple,0,7,stand"/>
   <property name="act20" value="create_npc npc_apple,0,8,stand"/>
   <property name="act30" value="add_monster chloragon,3,npc_maple"/>
   <property name="act40" value="add_monster rockitten,3,npc_apple"/>
   <property name="act50" value="start_battle npc_maple,npc_apple"/>

separate event, multiple endings, if npc_maple wins

   <property name="cond1" value="is variable_set battle_last_winner:npc_maple"/>

separate event, multiple endings, if npc_apple wins

   <property name="cond1" value="not variable_set battle_last_winner:npc_maple"/>

separate event, multiple endings, if no-one wins

   <property name="cond1" value="is variable_set battle_last_result:draw"/>