Editing Event Reference

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 158: Line 158:
* <code>is check_mission player,mission1:mission2,completed</code>
* <code>is check_mission player,mission1:mission2,completed</code>
* <code>is check_mission player,all,completed</code>
* <code>is check_mission player,all,completed</code>
=== check_party_parameter ===
Check to see the player has failed or completed a mission. Check to see if a mission is still pending.
'''Parameters'''
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>attribute</code>: Name of the monster attribute to check (e.g. level).
* <code>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'''
* <code>check_party_parameter player,level,5,equals,1</code> (is there 1 monster in the party at level 5? True/False)
=== check_world ===
Check some world's parameter against a given value.
'''Parameters'''
* <code>parameter</code>: Name of the parameter to check (eg. "layer", etc.).
* <code>value</code>: Given value to check.
'''Supported parameters'''
* '''layer''': color value which is used to overlay the world
* '''bubble''': speech bubble of an npc
'''Examples'''
* <code>is check_world</code>
* <code>is check_world layer,255:255:255:0</code>


=== current_state ===
=== current_state ===
Line 293: Line 265:
'''Parameters'''  
'''Parameters'''  
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals".
* <code>operator</code>: One of "==", "!=", ">", ">=", "<" or "<=".
* <code>amount</code>: Amount of money or value stored in variable.
* <code>amount</code>: Amount of money.


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


=== monster_flair ===
=== monster_flair ===
Line 310: Line 281:
'''Examples'''  
'''Examples'''  
* <code>to be defined</code>
* <code>to be defined</code>
=== monster_property ===
Check to see if a monster in the party has one of the following property.
'''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>value</code>: Value to compare the property with.
'''Examples'''
* <code>is monster_property level,15</code>
* <code>is monster_property gender,male</code>
* <code>is monster_property stage,standalone</code>
* <code>is monster_property shape,aquatic</code>


=== music_playing ===
=== music_playing ===
Line 539: Line 523:
'''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 (e.g. variable with monster_id for '''MonsterInfo''', monster slug for '''JournalInfoState''' and character slug for '''CharacterState'''). (Optional)
* <code>optional</code>: Variable related to specific states (eg slug for JournalInfoState). (optional)


'''Examples'''  
'''Examples'''  
Line 610: Line 594:


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


'''Examples'''  
'''Examples'''  
* <code>char_stop npc_mom</code>
* <code>char_stop</code>


=== char_walk ===
=== char_walk ===
Line 746: Line 730:
'''Examples'''  
'''Examples'''  
* <code>fadeout_music 2</code>
* <code>fadeout_music 2</code>
=== format_variable ===
Format the value of a variable from the game (eg. float or int).
'''Parameters'''
* <code>variable</code>: The variable to format.
* <code>type_format</code>: Kind of format (float or int).
'''Examples'''
* <code>format_variable name_variable,int</code>
* <code>format_variable name_variable,float</code>


=== get_monster_tech ===
=== get_monster_tech ===
Line 807: Line 780:
* <code>get_player_monster name_variable,shape,serpent</code>
* <code>get_player_monster name_variable,shape,serpent</code>


=== give_experience ===
=== load_game ===
Gives experience points to the monster.
 
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id.
* <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'''
* <code>give_experience name_variable,steps_variable"</code>
* <code>give_experience name_variable,420</code>
 
=== info ===
Records monster's attribute values inside a game variable. It allows to record the monster's owner attribute values too.
 
'''Parameters'''
* <code>variable</code>: Name of the variable where to store the monster id.
* <code>attribute</code>: The attribute to check (level, speed, etc.).
 
'''Examples'''
* <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"
 
=== input_variable ===
Set a code and checks if it's correct or not. The player's output will be by default lowercase.
 
'''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>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'''
* <code>input_variable access_code,response_question</code>
* <code>input_variable access_code,response_question,escape</code>
 
=== load_game ===
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)
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)


Line 870: Line 809:
* <code>menu disable,menu_bag</code>
* <code>menu disable,menu_bag</code>


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


'''Parameters'''  
'''Parameters'''  
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are touched. (Optional)
* <code>attribute</code>: Name of the attribute to modify.
* <code>stat</code>: A stat among armour, dodge, hp, melee, speed and ranged. If no stat, then all the stats. (Optional)
* <code>value</code>: Value of the attribute modifier.
* <code>amount</code>: A/an float/int value, if no amount, then default 1 (+). (Optional)


'''Examples'''  
'''Examples'''  
* <code>modify_char_attribute character,attribute,value</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>


=== modify_money ===
=== modify_char_attribute ===
Add or remove an amount of money for a wallet (slug).
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>slug</code>: Slug name (e.g. player or NPC, etc.).
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>amount</code>: Amount of money to add/remove (-/+)
* <code>attribute</code>: Name of the attribute to modify.
* <code>variable</code>: Name of the variable where to store the amount.
* <code>value</code>: Value of the attribute modifier.


'''Examples'''  
'''Examples'''  
* <code>modify_money npc_maple,100</code>
* <code>modify_char_attribute character,attribute,value</code>
* <code>modify_money npc_maple,-50</code>
* <code>modify_money player,,name_variable</code>


=== modify_monster_bond ===
=== open_shop ===
Add or remove an amount of money for a wallet (slug).
Open the shop menu for a NPC.


'''Parameters'''  
'''Parameters'''  
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are touched.
* <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>amount</code>: An int or float value, if no amount, then default 1 (int).
* <code>menu</code>: Either "buy", "sell" or "both". Default is "both". (optional)


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


=== modify_monster_health ===
=== overwrite_tech ===
Modify the hp of a monster in the current player's party.
Overwrite / replace a technique with another.


'''Parameters'''  
'''Parameters'''  
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are healed.
* <code>removed</code>: Name of the variable where to store the tech id.
* <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>added</code>: Slug technique.


'''Examples'''  
'''Examples'''  
* <code>modify_monster_health</code>
* <code>overwrite_tech name_variable,peck</code>  
* <code>modify_monster_health ,0.25</code>


 
=== pathfind ===
=== modify_monster_stats ===
Moves an NPC to a certain tile on the map.
Change the stats of a monster in the current player's party.


'''Parameters'''  
'''Parameters'''  
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are touched. (Optional)
* <code>name</code>: The name of the NPC to be moved.
* <code>stat</code>: A stat among armour, dodge, hp, melee, speed and ranged. If no stat, then all the stats. (Optional)
* <code>tile_pos_x</code>: The X-tile coordinate to have the NPC to walk to.
* <code>amount</code>: A/an float/int value, if no amount, then default 1 (+). (Optional)
* <code>tile_pos_y</code>: The Y-tile coordinate to have the NPC to walk to.    


'''Examples'''  
'''Examples'''  
* <code>modify_monster_stats</code>
* <code>pathfind Maple,2,3</code>  
* <code>modify_monster_stats ,,0.25</code>
* <code>pathfind Pine,1,6</code>
* <code>modify_monster_stats name_variable,speed,25</code>
* <code>modify_monster_stats name_variable,dodge,-12</code>
* <code>modify_monster_stats name_variable,dodge,-0.4</code>


=== open_shop ===
=== pathfind_to_player ===
Open the shop menu for a NPC.
Pathfind NPC close the player.


'''Parameters'''  
'''Parameters'''  
* <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple").
* <code>npc_slug</code>: Npc slug name (e.g. "npc_maple").
* <code>menu</code>: Either "buy", "sell" or "both". Default is "both". (optional)
* <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>open_shop npc_maple</code>  
* <code>pathfind_to_player spyder_route2_roddick</code>
* <code>translated_dialog spyder_route2_roddick1</code>
* <code>start_battle player,spyder_route2_roddick</code>  


=== overwrite_tech ===
=== pause_music ===
Overwrite / replace a technique with another.
Pauses the currently playing music.


'''Parameters'''  
'''Parameters'''  
* <code>removed</code>: Name of the variable where to store the tech id.
* <code>None</code>
* <code>added</code>: Slug technique.


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


=== pathfind ===
=== play_map_animation ===
Moves an NPC to a certain tile on the map.
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>name</code>: The name of the NPC to be moved.
* <code>animation_name</code>: The name of the animation to play under <code>resources/animations/tileset</code>.
* <code>tile_pos_x</code>: The X-tile coordinate to have the NPC to walk to.   
* <code>duration</code>: The amount of time in seconds between each frame. 
* <code>tile_pos_y</code>: The Y-tile coordinate to have the NPC to walk to.    
* <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>pathfind Maple,2,3</code>  
* <code>play_map_animation grass,0.1,noloop,player</code>
* <code>pathfind Pine,1,6</code>
* <code>play_map_animation sign01,0.4,loop,33,10</code>


=== pathfind_to_player ===
=== play_music ===
Pathfind NPC close the player.
Plays an audio file.


'''Parameters'''  
'''Parameters'''  
* <code>npc_slug</code>: Npc slug name (e.g. "npc_maple").
* <code>filename</code>: Music file to load (slug inside the JSON in db/sound)
* <code>direction</code>: Approaches the player from up, down, left or right.
* <code>volume</code>: Number between 0.0 and 1.0. (optional)
* <code>distance</code>: How many tiles (2, 3, 4, etc.)
* <code>loop</code>: How many times loop, default forever. (optional)


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


=== pause_music ===
=== play_sound ===
Pauses the currently playing music.
Plays a sound file.


'''Parameters'''  
'''Parameters'''  
* <code>None</code>
* <code>filename</code>: Sound file to load (slug inside the JSON in db/sound)
* <code>volume</code>: Number between 0.0 and 1.0. (optional)


'''Examples'''  
'''Examples'''  
* <code>pause_music</code>
* <code>play_sound sound_confirm</code>


=== play_map_animation ===
=== print ===
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>.
Print the current value of a game variable to the console. If no variable is specified, print out values of all game variables.


'''Parameters'''  
'''Parameters''' :
* <code>animation_name</code>: The name of the animation to play under <code>resources/animations/tileset</code>. 
* <code>variable</code>: Prints out the value of this variable (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>play_map_animation grass,0.1,noloop,player</code>   
* <code>print</code>   
* <code>play_map_animation sign01,0.4,loop,33,10</code>
* <code>print name_variable</code>


=== play_music ===
=== quarantine ===
Plays an audio file.
Quarantine infected monsters. Amount works only for "out", it takes out the amount in a random way.


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


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


=== play_sound ===
=== quit ===
Plays a sound file.
Completely quit the game.


'''Parameters'''  
'''Parameters'''  
* <code>filename</code>: Sound file to load (slug inside the JSON in db/sound)
* <code>None</code>
* <code>volume</code>: Number between 0.0 and 1.0. (optional)


'''Examples'''  
'''Examples'''  
* <code>play_sound sound_confirm</code>   
* <code>quit</code>   


=== print ===
=== random_battle ===
Print the current value of a game variable to the console. If no variable is specified, print out values of all game variables.
Start random battle with a random npc with a determined number of monster in a certain range of levels.


'''Parameters''' :  
'''Parameters'''  
* <code>variable</code>: Prints out the value of this variable (optional)
* <code>nr_txmns</code>: Number of tuxemon (1 to 6).
* <code>min_level</code>: Minimum level of the party.
* <code>max_level</code>: Maximum level of the party.


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


=== quarantine ===
=== random_encounter ===
Quarantine infected monsters. Amount works only for "out", it takes out the amount in a random way.
Randomly start a battle based on the encounter group looked up via the <code>encounter_id</code>. Encounter groups contain a list of monsters that can be encountered as well as their level and encounter rate. In most circumstances you will pair this action with the <code>char_at</code> and <code>char_moved</code> conditions.


'''Parameters'''  
Here is an example encounter file: ''resources/db/encounter/route1.json''
* <code>value</code>: in or out
* <code>amount</code>: number of monsters (optional)


'''Examples'''
  "slug": "route1",
* <code>quarantine out</code> everything out (player's party -> if full, then box)
  "monsters": [
* <code>quarantine out,5</code> eg. box contains 30 monsters <code>quarantine out,5</code>, it means 5 monsters by random
    {
 
      "monster": "pairagrin",
=== quit ===
      "encounter_rate": 3.5,
Completely quit the game.
      "variable": "daytime:true",
      "exp_req_mod": 1,
      "level_range": [
        2,
        4
      ]
    },


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


'''Examples'''  
'''Examples'''  
* <code>quit</code>
* <code>random_encounter route1</code>
* <code>random_encounter route1,20</code>


=== random_battle ===
=== random_integer ===
Start random battle with a random npc with a determined number of monster in a certain range of levels.
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>nr_txmns</code>: Number of tuxemon (1 to 6).
* <code>variable</code>: Name of the variable.
* <code>min_level</code>: Minimum level of the party.
* <code>lower_bound</code>: Lower bound of range to return an integer between (inclusive)
* <code>max_level</code>: Maximum level of the party.
* <code>upper_bound</code>: Upper bound of range to return an integer between (inclusive)


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


=== random_encounter ===
=== random_item ===
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.
Pick a random item from a list and add it to the trainer's inventory.


Here is an example encounter file: ''resources/db/encounter/route1.json'' 
'''Parameters'''
* <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)


  "slug": "route1",
'''Examples'''
  "monsters": [
* <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).
      "monster": "pairagrin",
* <code>random_item potion:tea:revive,2,npc_maple</code> (adds 2 potions or teas or revives to the maple's inventory).
      "encounter_rate": 3.5,
* <code>random_item potion:tea:revive,,npc_maple</code> (adds 1 potion or tea or revive to the maple's inventory).
      "variable": "daytime:true",
 
      "exp_req_mod": 1,
=== random_monster ===
      "level_range": [
Add a monster to the specified trainer's party if there is room.
        2,
        4
      ]
    },


'''Parameters'''  
'''Parameters'''  
* <code>encounter_slug</code>: Slug of the encounter list.
* <code>monster_level</code>: Level of the added monster.
* <code>total_prob</code>: Total sum of the probabilities. (optional)
* <code>trainer_slug</code>: Slug of the trainer that will receive the monster. It defaults to the current player. (optional)
* <code>rgb</code>: color (eg red > 255,0,0 > 255:0:0) - default rgb(255,255,255) (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>random_encounter route1</code>
* <code>random_monster 10</code>
* <code>random_encounter route1,20</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>


=== random_integer ===
=== remove_collision ===
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.
Removes a collision defined by a specific label.


'''Parameters'''  
'''Parameters''' :
* <code>variable</code>: Name of the variable.
* <code>label</code>: Name of the obstacle.
* <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>remove_collision obstacle</code> (it can one added with add_collision or an existing zone in the .tmx file).


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


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


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


=== random_monster ===
=== remove_monster ===
Add a monster to the specified trainer's party if there is room.
Remove a monster from the party if the monster is there.


'''Parameters'''  
'''Parameters'''  
* <code>monster_level</code>: Level of the added monster.
* <code>variable</code>: Name of the variable where to store the monster id.
* <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>random_monster 10</code>
* <code>get_player_monster name_variable</code>
* <code>random_monster 10,npc_maple</code>
* <code>remove_monster name_variable</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 ===
=== remove_npc ===
Removes a collision defined by a specific label.
Removes an NPC from the current map.


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


'''Examples'''  
'''Examples'''  
* <code>remove_collision obstacle</code> (it can one added with add_collision or an existing zone in the .tmx file).
* <code>remove_npc Maple</code> 
* <code>remove_npc Pine</code>
 
=== remove_state ===
Change to the specified state.
 
'''Parameters''' 
* <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).
 
'''Examples'''
* <code>remove_state</code> (it removes everything, excluding the basic ones)
* <code>remove_state JournalInfoState</code> (it removes everything, excluding the basic ones)


=== remove_contacts ===
=== remove_tech ===
Remove contact from the app (Nu Phone).
Remove a specific technique from a specific monster.


'''Parameters''' :
'''Parameters'''
* <code>slug</code>: slug name (e.g. "npc_maple").
* <code>tech_id</code>: Name of the variable where to store the tech id.


'''Examples'''  
'''Examples'''  
* <code>remove_contacts npc_maple</code>
* <code>remove_tech name_variable</code>


=== remove_monster ===
=== rename_monster ===
Remove a monster from the party if the monster is there.
Open the text input screen to rename the monster.


'''Parameters'''  
'''Parameters'''  
Line 1,157: Line 1,099:


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


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


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


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


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


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


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


=== remove_tech ===
=== save_game ===
Remove a specific technique from a specific monster.
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>tech_id</code>: Name of the variable where to store the tech id.
* <code>index</code>: Selected index. (optional)


'''Examples'''  
'''Examples'''  
* <code>remove_tech 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)


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


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


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


=== rename_player ===
=== set_battle ===
Open the text input screen to rename the player.
Append a new element in player.battles.


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


'''Examples'''  
'''Examples'''  
* <code>rename_player</code>
* <code>set_battle player,won,npc_maple</code> (player won against npc_maple)


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


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


'''Examples'''  
'''Examples'''  
* <code>rumble duration,power</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)


=== save_game ===
=== set_code ===
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)
Set a code and checks if it's correct or not. Case Sensitive: ATTENTION and AtTenTION are two different words.


'''Parameters'''  
'''Parameters'''  
* <code>index</code>: Selected index. (optional)
* <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>answer</code>: The right answer to the question.
* <code>variable</code>: Where the result (right/wrong) is saved.


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


=== screen_transition ===
=== set_economy ===
Fades the screen to black and back over <code>x</code> seconds.
Set the economy (prices of items) of the npc or player.


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


'''Examples'''  
'''Examples'''  
* <code>screen_transition 2</code>
* <code>set_economy spyder_shopkeeper,spyder_candy_scoop</code>
 
=== set_kennel_visible ===
Set the kennel visible or hidden.


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


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


'''Examples'''  
'''Examples'''  
* <code>set_battle player,won,npc_maple</code> (player won against npc_maple)
* <code>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.


=== set_bubble ===
msgid "kennel_name"
Put a bubble above player sprite.
msgstr "Kennel Name"


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


'''Examples'''  
'''Examples'''  
* <code>set_bubble spyder_shopassistant</code> (remove bubble NPC)
* <code>set_kennel new_kennel,true</code>
* <code>set_bubble spyder_shopassistant,note</code> (set bubble NPC)
* <code>set_bubble player,note</code> (set bubble player)
* <code>set_bubble player</code> (remove bubble player)


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


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


'''Examples'''  
'''Examples'''  
* <code>set_economy spyder_shopkeeper,spyder_candy_scoop</code>
* <code>set_layer 255:0:0:128</code>


=== set_kennel_visible ===
=== set_money ===
Set the kennel visible or hidden.
Set the key and value in the money dictionary. It'll reset the previous amount.
 
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>slug</code>: Slug name (e.g. player or NPC, etc.).
* <code>visible</code>: true/false.
* <code>amount</code>: Amount of money


'''Examples'''  
'''Examples'''  
* <code>set_kennel_visible name_kennel,true</code>
* <code>set_money player,500</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,321: Line 1,244:
* <code>set_mission mission1,change,completed</code>
* <code>set_mission mission1,change,completed</code>


=== set_money ===
=== set_monster_flair ===
Set an amount of money for a specific slug.
Set a monster's flair to the given value.


'''Parameters'''  
'''Parameters'''  
* <code>slug</code>: Slug name (e.g. player or NPC, etc.).
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are changed.
* <code>amount</code>: Amount of money (>= 0) (default 0)
* <code>category</code>: Category of the monster flair.
* <code>flair</code>: Name of the monster flair.


'''Examples'''  
'''Examples'''  
* <code>set_money player</code>
* <code>get_player_monster name_variable</code>
* <code>set_money player,500</code>
* <code>set_monster_flair name_variable,category,flair</code>


=== set_monster_attribute ===
=== set_monster_health ===
Set the given attribute of the monster to the given value.
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.  


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


'''Examples'''  
'''Examples'''  
* <code>set_monster_attribute name_variable,name,jimmy</code> (the monster will be named jimmy)
* <code>set_monster_health</code> (heals all the monsters in the party)
or
* <code>get_player_monster name_variable</code>
* <code>set_monster_health name_variable,1</code>


=== set_monster_flair ===
=== set_monster_level ===
Set a monster's flair to the given value.
Change the level of a monster in the current player's party.


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


'''Examples'''  
'''Examples'''  
* <code>set_monster_level</code> (all the monsters in the party level up by 1)
or
* <code>get_player_monster name_variable</code>
* <code>get_player_monster name_variable</code>
* <code>set_monster_flair name_variable,category,flair</code>
* <code>set_monster_level name_variable,1</code>
 
=== set_monster_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'''
* <code>variable</code>: Name of the variable where to store the monster id. If no variable is specified, all monsters are healed. (optional)
* <code>health</code>: A float value between 0 and 1, which is the percent of max hp to be restored to. A int value, which is the number of HP to be restored to. If no health is specified, the hp is maxed out. (optional)
 
'''Examples'''
* <code>set_monster_health</code> (heals all the monsters in the party)
or
* <code>get_player_monster name_variable</code>
* <code>set_monster_health name_variable,1</code>


=== set_monster_level ===
=== set_monster_plague ===
Change the level of a monster in the current player's party.
Cure or infect a monster.


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


'''Examples'''  
'''Examples'''  
* <code>set_monster_level</code> (all the monsters in the party level up by 1)
* <code>set_monster_plague</code> (all the monsters in the party are healthy)
or
or
* <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_plague name_variable,infected</code>


=== set_monster_status ===
=== set_monster_status ===
Line 1,404: Line 1,318:
'''Examples'''  
'''Examples'''  
* <code>set_char_attribute character,attribute,value</code>
* <code>set_char_attribute character,attribute,value</code>
=== set_party_attribute ===
Set the given attribute of party's monsters to the given value.
'''Parameters'''
* <code>character</code>: Either "player" or character slug name (e.g. "npc_maple").
* <code>attribute</code>: Name of the attribute.
* <code>value</code>: Value of the attribute.
'''Examples'''
* <code>set_party_attribute player,name,jimmy</code> (all the monsters in the party will be named jimmy)


=== set_party_status ===
=== set_party_status ===
Line 1,547: Line 1,450:
'''Examples'''  
'''Examples'''  
* <code>teleport_faint</code>
* <code>teleport_faint</code>
* <code>teleport_faint 6.9</code>


=== teleport ===
=== teleport ===
Line 1,574: Line 1,476:


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


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


'''Examples'''  
'''Examples'''  
* <code>transfer_money player,100,npc_mom</code> (player transfers 100 to mom)
* <code>transfer_money +,100,npc_mom</code> (player gets 100 from 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,627: Line 1,531:
'''Examples'''  
'''Examples'''  
* <code>unlock_controls</code>   
* <code>unlock_controls</code>   
=== update_tile_properties ===
Update tile properties. Enable movement and/or the moverate. '''moverate 0 = not accessible'''. The surface keys supported are: '''surfable''', '''walkable''' and '''climbable'''.
'''Parameters'''
* <code>label</code>: Name of the property
* <code>moverate</code>: Value of the moverate (eg 1 equal moverate, default 1)
'''Examples'''
* <code>update_tile_properties surfable,0.5</code> 


=== variable_math ===
=== variable_math ===
Line 1,809: Line 1,703:
     <property name="act30" value="add_monster chloragon,3,npc_maple"/>
     <property name="act30" value="add_monster chloragon,3,npc_maple"/>
     <property name="act40" value="add_monster rockitten,3,npc_apple"/>
     <property name="act40" value="add_monster rockitten,3,npc_apple"/>
     <property name="act50" value="start_battle npc_maple,npc_apple"/>
     <property name="act50" value="start_battle speck,acolyte"/>
separate event, multiple endings, if npc_maple wins
separate event, multiple endings, if npc_maple wins
     <property name="cond1" value="is variable_set battle_last_winner:npc_maple"/>
     <property name="cond1" value="is variable_set battle_last_winner:npc_maple"/>
separate event, multiple endings, if npc_apple wins
separate event, multiple endings, if npc_apple wins
     <property name="cond1" value="not variable_set battle_last_winner:npc_maple"/>
     <property name="cond1" value="is variable_set battle_last_winner:npc_apple"/>
separate event, multiple endings, if no-one wins
separate event, multiple endings, if no-one wins
     <property name="cond1" value="is variable_set battle_last_result:draw"/>
     <property name="cond1" value="is variable_set battle_last_result:draw"/>

Please note that all contributions to Tuxepedia are considered to be released under the Creative Commons Attribution-ShareAlike (see Tuxepedia:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)