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 27: | Line 26: | ||
* <code>is button_pressed K_RETURN</code> | * <code>is button_pressed K_RETURN</code> | ||
* <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> | ||
=== | === combat_started === | ||
Check to see if | Check to see if combat has currently started. | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>None</code> | ||
'''Examples''' | '''Examples''' | ||
* <code>is | * <code>is combat_started</code> | ||
=== | === dialog_open === | ||
Check to see | Check to see if a dialog window is currently open. | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>None</code> | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>is dialog_open</code> | ||
* <code>not dialog_open</code> | |||
* <code>not | |||
=== has_item === | === has_item === | ||
Check to see if | Check to see if the NPC has an item in his inventory. | ||
'''Parameters''' | '''Parameters''' | ||
* <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple"). | * <code>character</code>: Either "player" or npc slug name (e.g. "npc_maple"). | ||
* <code>item</code>: The item slug name (e.g. "item_cherry"). | * <code>item</code>: The item slug name (e.g. "item_cherry"). | ||
* <code>operator</code>: Numeric comparison operator. Accepted values are | * <code>operator (optional)</code>: Numeric comparison operator. Accepted values are "less_than", "greater_than", "equals", "less_or_equal" and "greater_or_equal". The default value is "greater_or_equal". | ||
* <code>quantity</code>: Quantity to compare with. | * <code>quantity (optional)</code>: Quantity to compare with. Must be a non-negative integer. The default value is 1. | ||
'''Examples''' | '''Examples''' | ||
Line 235: | Line 61: | ||
=== 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''' | '''Examples''' | ||
* <code>is has_party_breeder | * <code>is has_party_breeder</code> | ||
=== has_tech === | === has_tech === | ||
Line 261: | Line 83: | ||
'''Examples''' | '''Examples''' | ||
* <code>is has_tech bullet</code> | * <code>is has_tech bullet</code> | ||
=== money_is === | === money_is === | ||
Line 292: | Line 88: | ||
'''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 === | ||
[...] | |||
=== monster_property === | |||
[...] | |||
=== music_playing === | === music_playing === | ||
Line 320: | Line 110: | ||
* <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''' | '''Parameters''' | ||
* <code> | * <code>npc_name</code>: The name of the NPC on the current map. | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>not npc_exists Apple</code> | ||
=== | === npc_facing_tile === | ||
Check to see if | 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''' | '''Parameters''' | ||
* <code> | * <code>name</code>: The name of the NPC. | ||
'''Examples''' | '''Examples''' | ||
* <code>is | * <code>is npc_facing_tile Maple</code> | ||
=== | === npc_facing === | ||
Check to see | Check to see if the npc is facing: <code>up</code>, <code>down</code>, <code>left</code> or <code>right</code>. | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>name</code>: The name of the NPC. | ||
* <code> | * <code>direction</code>: Direction to check for: (<code>up</code>, <code>down</code>, <code>left</code>, <code>right</code>) | ||
'''Examples''' | '''Examples''' | ||
* <code>is | * <code>is npc_facing Maple,up</code> | ||
* <code>not npc_facing Maple,down</code> | |||
=== 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> | * <code>check</code>: The check to run against the party size. Can be: <code>equals</code>, <code>less_than</code>, or <code>greater_than</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 366: | Line 163: | ||
* <code>is party_size greater_than,4</code> | * <code>is party_size greater_than,4</code> | ||
=== | === player_at === | ||
Check if | 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''' | '''Parameters''' | ||
* <code> | * <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''' | '''Examples''' | ||
* <code>is | * <code>is player_at</code> | ||
* <code>is player_at 4,3</code> | |||
=== | === player_defeated === | ||
[...] | |||
=== player_facing_npc === | |||
Check to see if the player is facing an NPC with the name <code>npc_name</code>. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>npc_name</code>: The name of the NPC on the current map. | ||
'''Examples''' | '''Examples''' | ||
* <code>is | * <code>is player_facing_npc Apple</code> | ||
=== | === player_facing_tile === | ||
Check | 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''' | '''Parameters''' | ||
* <code> | * <code>None</code> | ||
'''Examples''' | '''Examples''' | ||
* <code>is | * <code>is player_facing_tile</code> | ||
=== player_facing === | |||
[...] | |||
=== player_moved === | |||
[...] | |||
=== to_talk === | |||
[...] | |||
=== to_use_tile === | |||
[...] | |||
=== | === true === | ||
The <code>true</code> condition will always evaluate to *True* (unless the "not" operator is used) | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>None</code> | ||
'''Examples''' | '''Examples''' | ||
* <code>is | * <code>is true</code> | ||
* <code>not true</code> | |||
=== tuxepedia_is === | |||
[...] | |||
=== variable_is === | |||
[...] | |||
=== variable_set === | === variable_set === | ||
Line 423: | Line 238: | ||
Here is a list of currently supported actions. New event actions can be created by creating a new page under the '''tuxemon/event/actions''': | Here is a list of currently supported actions. New event actions can be created by creating a new page under the '''tuxemon/event/actions''': | ||
=== add_contacts === | |||
[...] | |||
=== add_contacts === | |||
=== add_item === | === add_item === | ||
Add the specified | Add the specified itemto the player's party. | ||
'''Parameters''' | '''Parameters''' | ||
* <code>item_name</code>: | * <code>item_name</code>: The name of the item to add as defined in the monster JSON under <code>resources/db/item</code>. | ||
'''Examples''' | '''Examples''' | ||
* <code>add_item hatchet</code> | * <code>add_item hatchet</code> | ||
=== add_monster === | === add_monster === | ||
Line 461: | Line 254: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>monster_name</code>: The name of the monster to add as defined in the monster JSON under <code>resources/db/monster</code>. | ||
* <code>monster_lvl</code>: The level of the monster to start at. | |||
* <code> | |||
'''Examples''' | '''Examples''' | ||
* <code>add_monster fruitera,10</code> | * <code>add_monster fruitera,10</code> | ||
=== | === battles_print === | ||
[...] | |||
=== breeding === | === breeding === | ||
[...] | |||
=== call_event === | === call_event === | ||
Line 499: | Line 270: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>event_id</code>: The id of the event whose actions should be executed. | ||
'''Examples''' | '''Examples''' | ||
* <code>call_event | * <code>call_event 11</code> | ||
* <code>call_event 8</code> | |||
* <code> | |||
=== change_state === | === change_state === | ||
[...] | |||
=== clear_kennel === | === clear_kennel === | ||
[...] | |||
=== clear_tuxepedia === | === clear_tuxepedia === | ||
[...] | |||
=== clear_variable === | === clear_variable === | ||
[...] | |||
=== copy_variable === | === copy_variable === | ||
[...] | |||
=== create_npc === | === create_npc === | ||
Line 712: | Line 298: | ||
* <code>tile_pos_x</code>: The X-tile coordinate to place the NPC. | * <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>tile_pos_y</code>: The Y-tile coordinate to place the NPC. | ||
* <code>animations</code>: The name of the sprite to use for the animations in <code>resources/sprites</code>. | |||
* <code>behavior</code>: The NPC's movement behavior. Currently not implemented. | * <code>behavior</code>: The NPC's movement behavior. Currently not implemented. | ||
'''Examples''' | '''Examples''' | ||
* <code>create_npc Maple,2,3</code> | * <code>create_npc Maple,2,3,maple,wander</code> | ||
* <code>create_npc Pine,1,6,stand</code> | * <code>create_npc Pine,1,6,maple,stand</code> | ||
=== delayed_teleport === | === delayed_teleport === | ||
[...] | |||
=== dialog_chain === | |||
Deprecated. Use [#dialog dialog] | |||
=== | === dialog === | ||
Opens the dialog box with provided text. For line breaks, use the <code>\n</code> character. You may also use special variables in dialog events. If you have multiple dialog commands they will display sequentially. Using <code>$<nowiki>{{</nowiki>end<nowiki>}}</nowiki></code> does nothing as it used to denote the end of a dialog chain. Here is a list of available variables: | |||
* <code>$<nowiki>{{</nowiki>name<nowiki>}}</nowiki></code> - The current player's name. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>text</code>: The text to display in a dialog window. | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>dialog Red:\n This is some dialog!</code> | ||
* <code>dialog $<nowiki>{{</nowiki>name<nowiki>}}</nowiki>:\n Hello there! \nHow are you?</code> | |||
=== fadeout_music === | === fadeout_music === | ||
Line 746: | Line 331: | ||
'''Examples''' | '''Examples''' | ||
* <code>fadeout_music 2</code> | * <code>fadeout_music 2</code> | ||
=== get_player_monster === | === get_player_monster === | ||
[...] | |||
=== kennel_print === | |||
[...] | |||
=== lock_controls === | |||
[...] | |||
=== modify_npc_attribute === | |||
[...] | |||
=== modify_player_attribute === | |||
[...] | |||
=== money_print === | |||
[...] | |||
=== | === 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> | * <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> | * <code>npc_face Pine,up</code> | ||
=== | === npc_move === | ||
Determines the NPC's movement behaviour. | |||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>npc_move spyder_homemakerpapertown, down 1, right 1, up 1, left 1</code> | ||
=== | === npc_run === | ||
Sets the NPC's speed to the universal run speed. | |||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>npc_run npc_mom</code> | ||
=== | === npc_speed === | ||
Sets the NPC's walk speed. | |||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>npc_speed npc_mom, 0.2</code> | ||
=== npc_walk === | |||
Sets the NPC's speed to the universal walk speed. | |||
=== | |||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>npc_walk npc_mom</code> | ||
=== | === npc_wander === | ||
Sets the NPC's behaviour to wander about instead of stand in place. | |||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>npc_wander npc_mom</code> | ||
=== open_shop === | === open_shop === | ||
[...] | |||
=== pathfind === | === pathfind === | ||
Line 964: | Line 405: | ||
* <code>pathfind Maple,2,3</code> | * <code>pathfind Maple,2,3</code> | ||
* <code>pathfind Pine,1,6</code> | * <code>pathfind Pine,1,6</code> | ||
=== pause_music === | === pause_music === | ||
Line 994: | Line 422: | ||
* <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,001: | Line 429: | ||
=== play_music === | === play_music === | ||
Plays an audio file. | Plays an audio file located under "music/" on a loop. | ||
'''Parameters''' | '''Parameters''' | ||
* <code>filename</code>: | * <code>filename</code>: The name of the music file to play under "music/" | ||
'''Examples''' | '''Examples''' | ||
* <code>play_music | * <code>play_music 472452_8-Bit-Ambient.ogg</code> | ||
=== play_sound === | === play_sound === | ||
Plays | Plays an audio file located under "sounds/". | ||
'''Parameters''' | '''Parameters''' | ||
* <code>filename</code>: | * <code>filename</code>: The name of the sound file to play under "sounds/" | ||
'''Examples''' | '''Examples''' | ||
* <code>play_sound | * <code>play_sound combat/falling_Macro.ogg</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''' | '''Parameters''' | ||
* <code> | * <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>player_face left</code> | ||
* <code> | * <code>player_face up</code> | ||
=== | === player_resume === | ||
Does not currently have a purpose. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>None</code> | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>player_resume</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''' | '''Parameters''' | ||
Line 1,049: | Line 474: | ||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>player_stop</code> | ||
=== | === print === | ||
[...] | |||
=== quit === | |||
[...] | |||
=== 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>player_at</code> and <code>player_moved</code> conditions. | |||
Here is an example encounter file: | |||
''resources/db/encounter/1.json'' | |||
json | |||
{ | { | ||
"id": 1, | |||
"monsters": [ | |||
{ | |||
"monster_slug": "bigfin", | |||
"encounter_rate": 10, | |||
"level_range": [ | |||
1, | |||
6 | |||
} | ] | ||
}, | |||
{ | |||
"monster_slug": "dandylion", | |||
"encounter_rate": 10, | |||
"level_range": [ | |||
1, | |||
6 | |||
] | |||
}, | |||
{ | |||
"monster_slug": "tux", | |||
"encounter_rate": 10, | |||
"level_range": [ | |||
1, | |||
6 | |||
] | |||
} | |||
] | |||
} | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>encounter_id</code>: The id of the encounter JSON file to use for random battles under <code>resources/db/encounter</code>. | ||
* <code>total_prob</code>: The probability of an encounter, with 100 = 100% probability of an encounter. If not set, then the probability of an encounter is the sum of all encounter_rates in the encounter JSON file (as a percentage). | |||
* <code> | |||
'''Examples''' | '''Examples''' | ||
Line 1,090: | Line 529: | ||
=== random_integer === | === random_integer === | ||
[...] | |||
=== random_monster === | === random_monster === | ||
[...] | |||
=== remove_contacts === | === remove_contacts === | ||
[...] | |||
=== remove_monster === | === remove_monster === | ||
Removes the specified monster from the player's party. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>monster_slug</code>: The slug of the monster to remove as defined in the monster JSON under <code>resources/db/monster</code>. | ||
'''Examples''' | '''Examples''' | ||
* <code>remove_monster fruitera</code> | |||
* <code>remove_monster | |||
=== remove_npc === | === remove_npc === | ||
Line 1,169: | Line 555: | ||
* <code>remove_npc Maple</code> | * <code>remove_npc Maple</code> | ||
* <code>remove_npc Pine</code> | * <code>remove_npc Pine</code> | ||
=== rename_monster === | === rename_monster === | ||
[...] | |||
=== rename_player === | === rename_player === | ||
[...] | |||
=== rumble === | === rumble === | ||
[...] | |||
=== screen_transition === | === screen_transition === | ||
Line 1,232: | Line 569: | ||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>transition_time</code>: Time in seconds to fade the screen to black. | ||
'''Examples''' | '''Examples''' | ||
Line 1,239: | Line 575: | ||
=== set_battle === | === set_battle === | ||
[...] | |||
=== set_code === | |||
[...] | |||
=== set_economy === | |||
[...] | |||
=== | === set_inventory === | ||
Overwrites the inventory of the npc or player. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>npc_slug</code>: The slug of the player or NPC. | ||
* <code>inventory_slug</code>: The slug of the inventory that will overwrite the NPC's existing inventory. | |||
* <code> | |||
'''Examples''' | '''Examples''' | ||
* <code> | * <code>set_inventory shopkeeper,new_stock</code> | ||
=== set_kennel_visible === | === set_kennel_visible === | ||
[...] | |||
=== set_kennel === | === set_kennel === | ||
[...] | |||
=== set_money === | === set_money === | ||
[...] | |||
=== set_monster_flair === | === 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 === | ||
Changes the level of a monster in the current player's party. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>slot</code>: The slot the monster appears in. If no slot is specified, all monsters are leveled. | ||
* <code> | * <code>level</code>: The amount by which to level. If no level is specified, the level is reverted to 1. | ||
'''Examples''' | '''Examples''' | ||
* <code>set_monster_level</code> | * <code>set_monster_level 1,100</code> | ||
=== set_monster_level === | |||
[...] | |||
=== set_monster_status === | === set_monster_status === | ||
[...] | |||
=== set_npc_attribute === | |||
[...] | |||
=== set_player_attribute === | |||
[...] | |||
=== set_tuxepedia === | === set_tuxepedia === | ||
[...] | |||
=== set_variable === | === set_variable === | ||
Line 1,485: | Line 651: | ||
* <code>set_variable talked_to_prof:true</code> | * <code>set_variable talked_to_prof:true</code> | ||
* <code>set_variable environment:grass</code> | * <code>set_variable environment:grass</code> | ||
=== spawn_monster === | === spawn_monster === | ||
[...] | |||
=== start_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 | |||
{ | |||
"monsters": [ | |||
{ | |||
"attack": 50, | |||
"defense": 7, | |||
"name": "Snowball", | |||
"special_attack": 9, | |||
"level": 5, | |||
"monster_slug": 1, | |||
"hp": 50, | |||
"speed": 7, | |||
"special_defense": 7, | |||
"exp_give_mod": 3, | |||
"exp_req_mod": 27 | |||
} | |||
], | |||
"id": 1, | |||
"name": "Maple" | |||
} | |||
'''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 === | ||
[...] | |||
=== stop_cinema_mode === | === stop_cinema_mode === | ||
[...] | |||
=== store_monster === | === store_monster === | ||
[...] | |||
=== teleport_faint === | === teleport_faint === | ||
[...] | |||
=== teleport === | === teleport === | ||
Line 1,560: | Line 712: | ||
* <code>teleport map1.tmx,3,4</code> | * <code>teleport map1.tmx,3,4</code> | ||
* <code>teleport room1.tmx,8,1</code> | * <code>teleport room1.tmx,8,1</code> | ||
=== transfer_money === | === transfer_money === | ||
[...] | |||
=== transition_teleport === | === transition_teleport === | ||
Line 1,591: | Line 723: | ||
* <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 the transition will last. | ||
'''Examples''' | '''Examples''' | ||
* <code>teleport map2.tmx,1,6,1.5</code> | * <code>teleport map2.tmx,1,6,1.5</code> | ||
* <code>teleport room1.tmx,8,1,4</code> | * <code>teleport room1.tmx,8,1,4</code> | ||
=== translated_dialog_chain === | |||
Deprecated. Use [#translated_dialog translated_dialog] | |||
=== translated_dialog_choice === | === translated_dialog_choice === | ||
Line 1,609: | Line 743: | ||
=== translated_dialog === | === translated_dialog === | ||
Opens the dialog box with translated text for a given key found in <code>resources/db/locale/<locale>.json</code>. Optional variable replacement will also be translated if the value is a key in the locale file. For line breaks, use the <code>\n</code> character. If you have multiple translated_dialog commands they will display sequentially. Using <code>$<nowiki>{{</nowiki>end<nowiki>}}</nowiki></code> does nothing as it used to denote the end of a dialog chain. You may also use special variables in dialog events. Here is a list of available variables: | |||
* <code>$<nowiki>{{</nowiki>name<nowiki>}}</nowiki></code> - The current player's name. | |||
'''Parameters''' | '''Parameters''' | ||
* <code> | * <code>dialog_key</code>: The translated text for a given key found in <code>resources/db/locale/<locale>.json</code> to display in a dialog window. | ||
* <code> | * <code>parameters</code>: Optional comma-separated <code>var=value</code> parameters to replace variables in the translation text. The <code>value</code> can either be text or a key found in <code>resources/db/locale/<locale>.json</code>. | ||
'''Examples''' | '''Examples''' | ||
* <code>translated_dialog | * <code>translated_dialog received_x,name=a brand new car!</code> | ||
* <code>translated_dialog received_x,name=item_potion</code> | |||
* <code>translated_dialog combat_fainted,name=$<nowiki>{{</nowiki>name<nowiki>}}</nowiki></code> | |||
* <code>translated_dialog combat_opponent_call_tuxemon,user=$<nowiki>{{</nowiki>name<nowiki>}}</nowiki>,name=some guy</code> | |||
=== tuxepedia_print === | |||
[...] | |||
=== unlock_controls === | === unlock_controls === | ||
[...] | |||
=== variable_math === | === variable_math === | ||
Line 1,658: | Line 783: | ||
* <code>wait 2.0</code> | * <code>wait 2.0</code> | ||
* <code>wait 5.2</code> | * <code>wait 5.2</code> | ||
=== withdraw_monster === | === withdraw_monster === | ||
[...] | |||