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 8: | Line 8: | ||
=== battle_is === | === battle_is === | ||
Check to see if | Check to see if the player has fought against NPC and won, lost or draw. | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>character</code>: Npc slug name (e.g. "npc_maple"). | ||
* <code> | * <code>result</code>: One among "won", "lost" or "draw". | ||
'''Examples''' | '''Examples''' | ||
* <code>is battle_is | * <code>is battle_is npc_maple,won</code> | ||
=== button_pressed === | === button_pressed === | ||
Line 28: | Line 27: | ||
* <code>is button_pressed K_ESCAPE</code> | * <code>is button_pressed K_ESCAPE</code> | ||
* <code>not button_pressed K_SPACE</code> | * <code>not button_pressed K_SPACE</code> | ||
=== check_evolution === | === check_evolution === | ||
Check to see the | Check to see the player has at least one tuxemon evolving. If yes, it'll save the monster and the evolution inside a list. The list will be used by the event action <code>evolution</code>. Note: methods of evolution are: element, gender, location, variable, standard, stat and tech. | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>method</code>: Method or methods of evolution. "all" means all the existing methods. | ||
'''Examples''' | '''Examples''' | ||
* <code>is check_evolution | * <code>is check_evolution standard</code> | ||
* <code>is check_evolution standard:tech:stat</code> | |||
* <code>is check_evolution all</code> | |||
* <code> | |||
* <code>is | |||
=== check_mission === | === check_mission === | ||
Line 149: | Line 43: | ||
'''Parameters''' | '''Parameters''' | ||
* <code>method</code>: Mission or missions, "all" means all the existing missions. | * <code>method</code>: Mission or missions, "all" means all the existing missions. | ||
* <code>staths</code>: pending, completed or failed | * <code>staths</code>: pending, completed or failed | ||
'''Examples''' | '''Examples''' | ||
* <code>is check_mission | * <code>is check_mission mission1,completed</code> | ||
* <code>is check_mission | * <code>is check_mission mission1,pending</code> | ||
* <code>is check_mission | * <code>is check_mission mission1:mission2,completed</code> | ||
* <code>is check_mission | * <code>is check_mission all,completed</code> | ||
=== current_state === | === current_state === | ||
Line 198: | Line 63: | ||
=== has_bag === | === has_bag === | ||
Check to see how many items are in the | Check to see how many items are in the bag. It doesn't count invisible items. | ||
'''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>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. | * <code>value</code>: The value to compare the bag with. | ||
'''Examples''' | '''Examples''' | ||
* <code>is has_bag | * <code>is has_bag 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 | * <code>is has_bag equals,9</code> (player's bag: 5 potions and 2 tuxeball (5 items), in this case is false because 9 != 5) | ||
=== has_box === | === has_box === | ||
Check to see how many monsters are in the | Check to see how many monsters are in the box. | ||
'''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>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 party with. | * <code>value</code>: The value to compare the party with. | ||
Line 219: | Line 82: | ||
'''Examples''' | '''Examples''' | ||
* <code>is has_box | * <code>is has_box Kennel,less_than,1</code> | ||
=== has_item === | === has_item === | ||
Line 235: | Line 98: | ||
=== has_monster === | === has_monster === | ||
Checks to see the player has a monster in his party. | |||
'''Parameters''' | '''Parameters''' | ||
* <code>monster_slug</code>: The slug of the monster to check for. | |||
* <code>monster_slug</code>: | |||
'''Examples''' | '''Examples''' | ||
* <code>is has_monster | * <code>is has_monster txmn_pigabyte</code> | ||
=== has_party_breeder === | === has_party_breeder === | ||
Check to see if the | 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). | ||
'''Examples''' | |||
* <code>is has_party_breeder</code> | |||
=== has_sprite === | |||
Check to see if a NPC has a specific sprite. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>sprite</code>: Sprite slug (eg. adventurer, heroine, swimmer, etc.) | ||
'''Examples''' | '''Examples''' | ||
* <code>is | * <code>is has_sprite swimmer</code> | ||
=== has_tech === | === has_tech === | ||
Line 292: | Line 160: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>slug</code>: Slug name (player). | ||
* <code>operator</code>: | * <code>operator</code>: One of "==", "!=", ">", ">=", "<" or "<=". | ||
* <code>amount</code>: Amount of money | * <code>amount</code>: Amount of money. | ||
'''Examples''' | '''Examples''' | ||
* <code>is money_is player,>=,500</code> | * <code>is money_is player,>=,500</code> | ||
=== monster_flair === | === monster_flair === | ||
Line 310: | Line 177: | ||
'''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 319: | Line 199: | ||
'''Examples''' | '''Examples''' | ||
* <code>is music_playing 472452_8-Bit-Ambient.ogg</code> | * <code>is music_playing 472452_8-Bit-Ambient.ogg</code> | ||
=== npc_at === | |||
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. | |||
'''Parameters''' | |||
* <code>name</code>: The name of the NPC. | |||
* <code>x</code>: X tile coordinates that the player is at (optional) | |||
* <code>y</code>: Y tile coordinate that the player is at (optional) | |||
'''Examples''' | |||
* <code>is npc_at Maple</code> | |||
* <code>is npc_at Maple,4,3</code> | |||
=== npc_exists === | |||
Check to see if an NPC exists on the current map with <code>npc_name</code>. | |||
'''Parameters''' | |||
* <code>npc_name</code>: The name of the NPC on the current map. | |||
'''Examples''' | |||
* <code>not npc_exists Apple</code> | |||
=== npc_facing_tile === | |||
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. | |||
'''Parameters''' | |||
* <code>name</code>: The name of the NPC. | |||
'''Examples''' | |||
* <code>is npc_facing_tile Maple</code> | |||
=== npc_facing === | |||
Check to see if the npc is facing: <code>up</code>, <code>down</code>, <code>left</code> or <code>right</code>. | |||
'''Parameters''' | |||
* <code>name</code>: The name of the NPC. | |||
* <code>direction</code>: Direction to check for: (<code>up</code>, <code>down</code>, <code>left</code>, <code>right</code>) | |||
'''Examples''' | |||
* <code>is npc_facing Maple,up</code> | |||
* <code>not npc_facing Maple,down</code> | |||
=== once === | === once === | ||
Line 332: | Line 253: | ||
or | or | ||
* <code>is once 7,variable_name</code> (it blocks the event for 7 days - 1 week) | * <code>is once 7,variable_name</code> (it blocks the event for 7 days - 1 week) | ||
=== party_infected === | === party_infected === | ||
Check to see how many monster are infected | Check to see how many monster are infected and stores the iids. | ||
'''Parameters''' | '''Parameters''' | ||
* <code>value</code>: all, some or none. | * <code>value</code>: all, some or none. | ||
Line 354: | Line 264: | ||
=== party_size === | === party_size === | ||
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>. | |||
'''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>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. | * <code>party_size</code>: The size of the party to check against. | ||
Line 365: | Line 274: | ||
* <code>not party_size equals,0</code> | * <code>not party_size equals,0</code> | ||
* <code>is party_size greater_than,4</code> | * <code>is party_size greater_than,4</code> | ||
=== player_at === | |||
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. | |||
'''Parameters''' | |||
* <code>x</code>: X tile coordinates that the player is at (optional) | |||
* <code>y</code>: Y tile coordinate that the player is at (optional) | |||
'''Examples''' | |||
* <code>is player_at</code> | |||
* <code>is player_at 4,3</code> | |||
=== player_defeated === | |||
Check to see the player has at least one tuxemon, and all tuxemon in their party are defeated. | |||
'''Parameters''' | |||
* <code>None</code> | |||
'''Examples''' | |||
* <code>is player_defeated</code> | |||
=== player_facing_npc === | |||
Check to see if the player is facing an NPC with the name <code>npc_name</code>. | |||
'''Parameters''' | |||
* <code>npc_name</code>: The name of the NPC on the current map. | |||
'''Examples''' | |||
* <code>is player_facing_npc Apple</code> | |||
=== player_facing_tile === | |||
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. | |||
'''Parameters''' | |||
* <code>value</code>: value (eg surfable) inside the tileset (optional) | |||
'''Examples''' | |||
* <code>is player_facing_tile</code> | |||
* <code>is player_facing_tile surfable</code> | |||
=== player_facing === | |||
Check to see where an NPC is facing. | |||
'''Parameters''' | |||
* <code>direction</code>: One of "up", "down", "left" or "right". | |||
'''Examples''' | |||
* <code>is player_facing right</code> | |||
=== player_in === | |||
Check to see if the player is at the condition position on a specific set of tiles. | |||
'''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''' | |||
* <code>None</code> | |||
'''Examples''' | |||
* <code>is player_moved</code> | |||
=== to_talk === | |||
Check if we are attempting interact with a map condition tile. | |||
'''Parameters''' | |||
* <code>character</code>: Npc slug name (e.g. "npc_maple"). | |||
'''Examples''' | |||
* <code>is to_talk npc_maple</code> | |||
=== to_use_tile === | === to_use_tile === | ||
Line 391: | Line 375: | ||
* <code>operator</code>: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals". | * <code>operator</code>: Numeric comparison operator. Accepted values are "less_than", "less_or_equal", "greater_than", "greater_or_equal", "equals" and "not_equals". | ||
* <code>percentage</code>: Number between 0.1 and 1.0 | * <code>percentage</code>: Number between 0.1 and 1.0 | ||
'''Examples''' | '''Examples''' | ||
* <code>is tuxepedia less_than,0.2</code> | * <code>is tuxepedia less_than,0.2</code> | ||
=== variable_is === | === variable_is === | ||
Line 402: | Line 384: | ||
'''Parameters''' | '''Parameters''' | ||
* <code>value1</code>: Either a variable or a number. | * <code>value1</code>: Either a variable or a number. | ||
* <code>operation</code>: | * <code>operation</code>: One of "==", "!=", ">", ">=", "<" or "<=". | ||
* <code>value2</code>: Either a variable or a number. | * <code>value2</code>: Either a variable or a number. | ||
Line 475: | Line 457: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>monster_id</code>: Id of the monster (name of the variable). | ||
* <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 511: | Line 505: | ||
* it can be the name of the file (see below note) | * it can be the name of the file (see below note) | ||
* it can be a RGB color separated by ":" (eg 255:0:0) | * it can be a RGB color separated by ":" (eg 255:0:0) | ||
note: the files must be inside the folder (gfx/ui/background/) - Size: 240x160 | |||
'''Examples''' | '''Examples''' | ||
* <code>change_bg | * <code>change_bg background</code> | ||
* <code>change_bg</code> (stop) | * <code>change_bg</code> (stop) | ||
=== change_state === | === change_state === | ||
Line 539: | Line 517: | ||
'''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 ( | * <code>optional</code>: Variable related to specific states (eg slug for JournalInfoState). (optional) | ||
'''Examples''' | '''Examples''' | ||
* <code>change_state PCState</code> | * <code>change_state PCState</code> | ||
* <code>change_state JournalInfoState,rockitten</code> | * <code>change_state JournalInfoState,rockitten</code> | ||
=== choice_item === | === choice_item === | ||
Line 730: | Line 616: | ||
=== evolution === | === evolution === | ||
Checks, asks and evolves. It's the action responsible for evolving monster when one or more conditions are met. It's advisable to use it with the condition <code>is/not check_evolution | 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</code> | ||
'''Parameters''' | '''Parameters''' | ||
- | |||
'''Examples''' | '''Examples''' | ||
* <code>evolution | * <code>evolution</code> | ||
=== fadeout_music === | === fadeout_music === | ||
Line 746: | Line 632: | ||
'''Examples''' | '''Examples''' | ||
* <code>fadeout_music 2</code> | * <code>fadeout_music 2</code> | ||
=== get_party_monster === | === get_party_monster === | ||
Line 807: | Line 667: | ||
* <code>get_player_monster name_variable,shape,serpent</code> | * <code>get_player_monster name_variable,shape,serpent</code> | ||
=== | === kennel_print === | ||
Print all the kennels or one. It returns <name, qty, visible/hidden>, where *qty = number of monsters inside. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>kennel</code>: Name of the kennel. (optional) | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>kennel_print</code> | ||
* <code> | * <code>kennel_print name_kennel</code> | ||
=== | === lock_controls === | ||
Lock player controls. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>None</code> | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>lock_controls</code> | ||
=== | === menu === | ||
Enable/disable one or more menu. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>act</code>: enable or disable | ||
* <code> | * <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> | |||
'''Examples''' | |||
* <code>menu disable,menu_bag</code> | |||
=== modify_npc_attribute === | |||
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. | |||
'''Parameters''' | |||
* <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple"). | |||
* <code>attribute</code>: Name of the attribute to modify. | |||
* <code>value</code>: Value of the attribute modifier. | |||
'''Examples''' | |||
* <code>modify_npc_attribute npc_slug,attribute,value</code> | |||
=== modify_player_attribute === | |||
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. | |||
'''Parameters''' | |||
* <code>attribute</code>: Name of the attribute to modify. | |||
* <code>value</code>: Value of the attribute modifier. | |||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>modify_player_attribute attribute,value</code> | ||
=== | === money_print === | ||
Print the current value of money dictionary to the console. If no entity is specified, print out values of all money dictionary. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>slug</code>: Slug name (e.g. player or NPC, etc.). (optional) | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>money_print</code> | ||
* <code> | * <code>money_print player</code> | ||
=== | === npc_face === | ||
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>. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>name</code>: The name of the npc. | ||
* <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> | * <code>npc_face Maple,left</code> | ||
* <code>npc_face Pine,up</code> | |||
=== | === npc_look === | ||
Make an NPC look around. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple"). | ||
* <code> | * <code>frequency</code>: Frequency of movements. 0 to stop looking. If set to a different value it will be clipped to the range [0.5, 5]. If not passed the default value is 1. | ||
* <code>directions</code>: the direction the npc is going to look, by default all. (optional) | |||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>npc_look npc_slug</code> | ||
* <code>npc_look npc_slug,,right:left</code> | |||
=== | === npc_move === | ||
Determines the NPC's movement behaviour. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>name</code>: The name of the npc. | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>npc_move spyder_homemakerpapertown, down 1, right 1, up 1, left 1</code> | ||
=== | === npc_plague === | ||
Set the NPC as infected, inoculated or healthy. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>condition</code>: Infected, inoculated or healthy | ||
* <code> | * <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple"). (optional) | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>npc_plague spyder_homemakerpapertown</code> | ||
=== | === npc_run === | ||
Sets the NPC's speed to the universal run speed. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>name</code>: The name of the npc. | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>npc_run npc_mom</code> | ||
=== | === npc_speed === | ||
Sets the NPC's walk speed. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>name</code>: The name of the npc. | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>npc_speed npc_mom, 0.2</code> | ||
* <code> | |||
=== npc_walk === | |||
Sets the NPC's speed to the universal walk speed. | |||
'''Parameters''' | |||
* <code>name</code>: The name of the npc. | |||
'''Examples''' | |||
* <code>npc_walk npc_mom</code> | |||
=== | === npc_wander === | ||
Sets the NPC's behaviour to wander about instead of stand in place. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>npc_slug</code>: Npc slug name (e.g. "npc_maple"). | ||
* <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> | * <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> | * <code>npc_wander npc_maple</code> | ||
* <code> | * <code>npc_wander npc_maple,,5,7,7,9</code> | ||
=== open_shop === | === open_shop === | ||
Line 942: | Line 818: | ||
'''Examples''' | '''Examples''' | ||
* <code>open_shop npc_maple</code> | * <code>open_shop npc_maple</code> | ||
=== pathfind === | === pathfind === | ||
Line 976: | Line 842: | ||
* <code>pathfind_to_player spyder_route2_roddick</code> | * <code>pathfind_to_player spyder_route2_roddick</code> | ||
* <code>translated_dialog spyder_route2_roddick1</code> | * <code>translated_dialog spyder_route2_roddick1</code> | ||
* <code>start_battle | * <code>start_battle spyder_route2_roddick</code> | ||
=== pause_music === | === pause_music === | ||
Line 994: | Line 860: | ||
* <code>duration</code>: The amount of time in seconds between each frame. | * <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>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> | * <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''' | ||
Line 1,020: | Line 886: | ||
'''Examples''' | '''Examples''' | ||
* <code>play_sound sound_confirm</code> | * <code>play_sound sound_confirm</code> | ||
=== player_face === | |||
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>. | |||
'''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>. | |||
'''Examples''' | |||
* <code>player_face left</code> | |||
* <code>player_face up</code> | |||
=== player_sprite === | |||
Check the player's sprite | |||
'''Parameters''' | |||
* <code>sprite</code>: slug of the sprite | |||
'''Examples''' | |||
* <code>is player_sprite adventurer</code> | |||
=== player_stop === | |||
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]) | |||
'''Parameters''' | |||
* <code>None</code> | |||
'''Examples''' | |||
* <code>player_stop</code> | |||
=== print === | === print === | ||
Line 1,032: | Line 926: | ||
=== quarantine === | === quarantine === | ||
Quarantine infected monsters. Amount works only for "out", it takes out the amount in a random way. | Quarantine infected monsters. Amount works only for "out", it takes out the amount in a random way. | ||
'''Parameters''' | '''Parameters''' | ||
Line 1,063: | Line 957: | ||
=== random_encounter === | === random_encounter === | ||
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> | 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. | ||
Here is an example encounter file: ''resources/db/encounter/route1.json'' | Here is an example encounter file: ''resources/db/encounter/route1.json'' | ||
<code>{"slug":"route1","monsters":[{"monster":"pairagrin","encounter_rate":3.5,"daytime":true,"exp_req_mod":1,"level_range":[2,4]}]}</code> | |||
'''Parameters''' | '''Parameters''' | ||
Line 1,151: | Line 1,034: | ||
=== remove_monster === | === remove_monster === | ||
Remove a monster from the party if the monster is there. | 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. | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>instance_id</code>: Id of the monster to remove. | ||
* <code>trainer_slug</code>: Slug of the trainer. If no trainer slug is passed it defaults to the current player. | |||
'''Examples''' | '''Examples''' | ||
Line 1,180: | Line 1,064: | ||
* <code>remove_state</code> (it removes everything, excluding the basic ones) | * <code>remove_state</code> (it removes everything, excluding the basic ones) | ||
* <code>remove_state JournalInfoState</code> (it removes everything, excluding the basic ones) | * <code>remove_state JournalInfoState</code> (it removes everything, excluding the basic ones) | ||
=== rename_monster === | === rename_monster === | ||
Open the text input | Open the monster menu and text input screens to rename a selected monster. | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>None</code> | ||
'''Examples''' | '''Examples''' | ||
* <code>rename_monster | * <code>rename_monster</code> | ||
=== rename_player === | === rename_player === | ||
Line 1,217: | Line 1,092: | ||
'''Examples''' | '''Examples''' | ||
* <code>rumble duration,power</code> | * <code>rumble duration,power</code> | ||
=== screen_transition === | === screen_transition === | ||
Line 1,232: | Line 1,097: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>transition_time</code>: 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,239: | Line 1,104: | ||
=== set_battle === | === set_battle === | ||
Set the key in the player.battle_history dictionary. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>character</code>: Npc slug name (e.g. "npc_maple"). | ||
* <code>result</code>: One among "won", "lost" or "draw" | * <code>result</code>: One among "won", "lost" or "draw" | ||
'''Examples''' | '''Examples''' | ||
* <code>set_battle | * <code>set_battle npc_maple,won</code> | ||
=== | === set_code === | ||
Set a code and checks if it's correct or not. Case Sensitive: ATTENTION and AtTenTION are two different words. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <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> | * <code>answer</code>: The right answer to the question. | ||
* <code>variable</code>: Where the result (right/wrong) is saved. | |||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>set_code access_code,joke,name_variable</code> | ||
=== set_economy === | === set_economy === | ||
Line 1,266: | Line 1,128: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple"). | ||
* <code>economy_slug</code>: Slug of an economy. | * <code>economy_slug</code>: Slug of an economy. | ||
Line 1,307: | Line 1,169: | ||
'''Examples''' | '''Examples''' | ||
* <code>set_layer 255:0:0:128</code> | * <code>set_layer 255:0:0:128</code> | ||
=== set_money === | === set_money === | ||
Set | Set the key and value in the money dictionary. It'll reset the previous amount. | ||
'''Parameters''' | '''Parameters''' | ||
* <code>slug</code>: Slug name (e.g. player or NPC, etc.). | * <code>slug</code>: Slug name (e.g. player or NPC, etc.). | ||
* <code>amount</code>: Amount of money | * <code>amount</code>: Amount of money | ||
'''Examples''' | '''Examples''' | ||
* <code>set_money player,500</code> | * <code>set_money player,500</code> | ||
=== | === set_mission === | ||
Set | Set mission. | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>slug</code>: slug mission | ||
* <code> | * <code>operation</code>: add, remove or change | ||
* <code> | * <code>status</code>: completed, pending, failed (default pending) | ||
* <code>npc_slug</code>: slug name (e.g. "npc_maple"), default player. | |||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>set_mission mission1</code> | ||
* <code>set_mission mission1,change,completed</code> | |||
=== set_monster_flair === | === set_monster_flair === | ||
Line 1,347: | Line 1,197: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>slot</code>: Slot of the monster in the party. | ||
* <code>category</code>: Category of the monster flair. | * <code>category</code>: Category of the monster flair. | ||
* <code>flair</code>: Name of the monster flair. | * <code>flair</code>: Name of the monster flair. | ||
'''Examples''' | '''Examples''' | ||
* <code>set_monster_flair 1,category,flair</code> | |||
* <code>set_monster_flair | |||
=== 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. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>slot</code>: The slot the monster appears in. If no slot is specified, all monsters are healed. | ||
* <code>health</code>: A float value between 0 and 1, which is the percent of max hp | * <code>health</code>: A float value between 0 and 1, which is the percent of max hp to be restored to. If no health is specified, the hp is maxed out. | ||
'''Examples''' | '''Examples''' | ||
* <code>set_monster_health | * <code>set_monster_health 1,1</code> | ||
=== set_monster_level === | === set_monster_level === | ||
Line 1,372: | Line 1,218: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>level</code>: Number of levels to add. Negative numbers are allowed. | ||
* <code> | * <code>slot</code>: Slot of the monster in the party. If no slot is specified, all monsters are leveled. (optional) | ||
'''Examples''' | '''Examples''' | ||
* <code>set_monster_level | * <code>set_monster_level 5,1</code> | ||
=== | === set_monster_plague === | ||
Cure or infect a monster. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>condition</code>: inoculated, healthy or infected | ||
* <code>slot</code>: Slot of the monster in the party. If no slot is specified, all monsters are touched by the action. (optional) | |||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>set_monster_plague infected</code> | ||
* <code>set_monster_plague inoculated,1</code> | |||
* <code> | |||
=== | === set_monster_status === | ||
Change the status of a monster in the current player's party. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>slot</code>: Slot of the monster in the party. If no slot is specified, all monsters are modified. (optional) | ||
* <code> | * <code>status</code>: Status to set. If no status is specified, the status is cleared. | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>set_monster_status 1,status_blinded</code> | ||
=== | === set_npc_attribute === | ||
Set the given attribute of | Set the given attribute of the npc to the given value. | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>npc_slug</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> | * <code>set_player_attribute npc_maple,attribute,value</code> | ||
=== | === set_player_attribute === | ||
Set the given attribute of the player character to the given value. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>attribute</code>: Name of the attribute. | ||
* <code>value</code>: Value of the attribute. | |||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>set_player_attribute attribute,value</code> | ||
=== set_player_name === | === set_player_name === | ||
Line 1,460: | Line 1,301: | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>set_player_template default</code> this will set the default sprite (chosen at the beginning). | ||
* <code>set_player_template adventurer,adventurer</code> | |||
=== set_tuxepedia === | === set_tuxepedia === | ||
Line 1,466: | Line 1,308: | ||
'''Parameters''' | '''Parameters''' | ||
* <code>monster_slug</code>: Monster slug name (e.g. "rockitten"). | * <code>monster_slug</code>: Monster slug name (e.g. "rockitten"). | ||
* <code> | * <code>string</code>: seen / caught | ||
'''Examples''' | '''Examples''' | ||
* <code>set_tuxepedia | * <code>set_tuxepedia rockitten,caught</code> | ||
=== set_variable === | === set_variable === | ||
Line 1,491: | Line 1,332: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>npc_slug</code>: Either "player" or npc slug name (e.g. "npc_maple"). | ||
'''Examples''' | '''Examples''' | ||
Line 1,497: | Line 1,338: | ||
=== start_battle === | === start_battle === | ||
Start a battle | Start a battle with an NPC defined in <code>resources/db/npc</code>. | ||
Here is an example NPC file: | |||
''resources/db/npc/maple.json'' | |||
json | |||
{ | |||
"slug": "maple_girl", | |||
"template": [ | |||
{ | |||
"sprite_name": "girl1", | |||
"combat_front": "heroine", | |||
"slug": "heroine" | |||
} | |||
], | |||
"monsters": [ | |||
{ | |||
"name": "Snowball", | |||
"slug": "bamboon", | |||
"level": 5, | |||
"money_mod": 10, | |||
"exp_req_mod": 27, | |||
"gender": "male" | |||
} | |||
] | |||
} | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>npc_slug</code>: The NPC's slug as defined in the NPC's JSON file in <code>resources/db/npc</code>. | ||
'''Examples''' | '''Examples''' | ||
* <code>start_battle | * <code>start_battle npc_maple</code> | ||
=== start_cinema_mode === | === start_cinema_mode === | ||
Line 1,529: | Line 1,394: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>monster_id</code>: Id of the monster to store. | ||
* <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,543: | Line 1,408: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>None</code> | ||
'''Examples''' | '''Examples''' | ||
* <code>teleport_faint</code> | * <code>teleport_faint</code> | ||
=== teleport === | === teleport === | ||
Line 1,565: | Line 1,429: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>removed</code>: Instance id (name variable). | ||
* <code>added</code>: Slug monster | * <code>added</code>: Slug monster. | ||
'''Examples''' | '''Examples''' | ||
Line 1,574: | Line 1,438: | ||
=== transfer_money === | === transfer_money === | ||
Performs a mathematical transaction on the player's money. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>transaction</code>: Operator symbol. | ||
* <code>amount</code>: Amount of money. | * <code>amount</code>: Amount of money. | ||
* <code> | * <code>slug</code>: Slug name (e.g. NPC, etc.) (optional) | ||
'''Examples''' | '''Examples''' | ||
* <code>transfer_money player,100,npc_mom</code> (player | * <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,591: | Line 1,457: | ||
* <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> | * <code>transition_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,619: | Line 1,485: | ||
* <code>translated_dialog msgid</code> | * <code>translated_dialog msgid</code> | ||
=== | === tuxepedia_print === | ||
Print the current value of Tuxepedia to the console. If no monster is specified, print out values of all Tuxepedia. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>monster_slug</code>: Monster slug name (e.g. "rockitten"). | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>tuxepedia_print</code> | ||
* <code>tuxepedia_print rockitten</code> | |||
=== | === unlock_controls === | ||
Unlock player controls | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>None</code> | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>unlock_controls</code> | ||
=== variable_math === | === variable_math === | ||
Line 1,678: | Line 1,544: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>monster_id</code>: The id of the monster to pull (variable). | ||
* <code> | * <code>trainer</code>: Slug of the trainer that will receive the monster. It defaults to the current player. | ||
'''Examples''' | '''Examples''' | ||
* <code>get_player_monster name_variable</code> | * <code>get_player_monster name_variable</code> | ||
Line 1,696: | Line 1,562: | ||
=== 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,701: | Line 1,570: | ||
* <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). | |||
* <code>battle_last_trainer</code> slug of the last trainer fought | |||
battles | |||
=== Time related === | === Time related === | ||
* <code>hour</code> tracks the hour | * <code>hour</code> tracks the hour | ||
* <code>day_of_year</code> tracks the days in a year (1 to 365/366) | * <code>day_of_year</code> tracks the days in a year (1 to 365/366) | ||
Line 1,767: | Line 1,628: | ||
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) | ||
1st: if the player has the monster | 1st: if the player has the monster | ||
* <code>translated_dialog dialog_npc1</code> | |||
* <code>translated_dialog_choice yes:no,npc_willtrade</code> | |||
* <code>talk npc_slug</code> | |||
* <code>is has_monster monster1</code> | |||
* <code>not variable_set npc_hastraded:yes</code> | |||
2nd: if the player hasn't the monster | 2nd: if the player hasn't the monster | ||
* <code>translated_dialog dialog_npc1</code> | |||
* <code>translated_dialog dialog_npc_nomonster1</code> | |||
* <code>talk npc_slug</code> | |||
* <code>not has_monster monster1</code> | |||
* <code>not variable_set npc_hastraded:yes</code> | |||
3rd: trading part | 3rd: trading part | ||
* <code>translated_dialog dialog_npc_willtrade</code> | |||
* <code>get_player_monster name_variable</code> | |||
* <code>trading name_variable,traded_monster</code> | |||
* <code>set_variable npc_hastraded:yes</code> | |||
* <code>is has_monster monster1</code> | |||
* <code>is variable_set npc_willtrade</code> | |||
* <code>not variable_set npc_hastraded</code> | |||
==== 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> | |||
* <code>add_monster vivipere,20,npc_slug,27,10</code> | |||
* <code>add_monster budaye,20,npc_slug,27,10</code> | |||
* <code>add_monster rockitten,20,npc_slug,27,10</code> | |||
* <code>add_monster nut,20,npc_slug,27,10</code> | |||
* <code>get_party_monster npc_slug</code> | |||
* <code>add_tech iid_slot_3,canine,,,,npc_slug</code> here <code>iid_slot_3</code> followed by [[Canine]] | |||
* <code>start_battle npc_slug</code> | |||