Difference between revisions of "Creating Techniques"

From Tuxepedia
Jump to navigation Jump to search
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
Techniques can be created by creating a simple [http://en.wikipedia.org/wiki/JSON JSON] text file in the '''Technique Folder''' folder under `resources/db/technique`. This folder contains all of the details of each technique available in Tuxemon. Here you can specify the technique's type(s), power, and [[Technique effects]]. With each new technique, the following data must be specified:
Techniques in Tuxemon can be created by adding a JSON file to the <code>mods/tuxemon/db/technique</code> directory. With each new technique, the following data must be specified:


{| class="wikitable"
{| class="wikitable"
Line 10: Line 10:
|-
|-
| accuracy
| accuracy
| Float parameter between 0 and 100 which decides against a random value if the technique hits or not.
| Float parameter between 0 and 1 which decides against a random value if the technique hits or not.
|-
|-
| animation
| animation
| Name of the animation under `resources/animations/technique` to use when the move is used.  
| Name of the animation under `mods/tuxemon/animations/technique` to use when the move is used.  
|-
|-
| conditions
| conditions
| A comma-separated list of effects that will go off when this move is used. Multiple effects can be bound to a single technique.
| Conditions are the prerequisites on which a technique fails or not.
|-
|-
| effects
| effects
| A comma-separated list of effects that will go off when this move is used. Multiple effects can be bound to a single technique.
| Effects can change some characteristics of the enemy. By using the example below: "give poison,target" will give [[Poisoned]] status to the enemy and "damage" will inflict damage to the enemy.
|-
|-
| flip_axes
| flip_axes
| The id of the individual technique.
| On which axes the animation needs to be flipped, by default is empty '''""'''.
|-
|-
| is_fast
| is_fast
| The id of the individual technique.
| Boolean, whether the technique is fast or not. Fast means that will be used before the enemy ones. By default is '''False'''.
|-
|-
| potency
| potency
| Float parameter between 0 and 100 which decides against a random value if the technique will give a [[:Category:Condition]].
| Float parameter between 0 and 1 which decides against a random value if the technique will give a [[:Category:Condition]].
|-
|-
| power
| power
| Amount of power the technique has. Used in "effect" calculations (such as damage).  
| Float parameter between 0 and 3 that will be used to calculate the quantity of damages.
|-
|-
| range
| range
| The kind of technique. Can be either "physical" or "special". Coincides with the monster's attack and special attack stats.  
| The kind of technique: [[Melee]], [[Ranged]], [[Touch]], [[Special]], [[Reach]] or [[Reliable]].
|-
| recharge
| Recharging time of the technique (eg 2 = it can be used every 2 turns).
|-
|-
| sfx
| sfx
Line 40: Line 43:
|-
|-
| slug
| slug
| The slug identifier of the technique. It defines the name of the technique, since inside the PO file there is a translation corresponding at the slug (msgid "sting" - msgstr "Sting") as well as the description (msgid "sting_description" - msgstr "Describing the technique").  
| The slug identifier of the technique. It defines the name of the technique and there is a translation in the PO file (msgid "sting" - msgstr "Sting") as well as the description (msgid "sting_description" - msgstr "Describing the technique").  
|-
|-
| sort
| sort
Line 49: Line 52:
|-
|-
| types
| types
| The technique's types [[:Category:Types]].  
| The technique's types [[:Category:Type]].  
|-
|-
| use_failure (optional)
| use_failure (optional)
| Text will appear if the technique fails.
| Corresponding msgid (translation PO file) will appear if the technique fails.
|-
|-
| use_success (optional)
| use_success (optional)
| Text will appear if the technique hits.
| Corresponding msgid (translation PO file) will appear if the technique hits.
|-
|-
| use_tech
| use_tech
| Text will appear when the technique is used in battle.
| Corresponding msgid (translation PO file) will appear when the technique is used in battle.
|}
|}


Here is an example of what a technique file might look like:
Here is an example of what a technique file might look like:


`resources/db/technique/sting.json`
`mods/tuxemon/db/technique/sting.json`


   json
   json

Latest revision as of 17:53, 26 December 2023

Techniques in Tuxemon can be created by adding a JSON file to the mods/tuxemon/db/technique directory. With each new technique, the following data must be specified:

Name Description
tech_id The id of the individual technique.
accuracy Float parameter between 0 and 1 which decides against a random value if the technique hits or not.
animation Name of the animation under `mods/tuxemon/animations/technique` to use when the move is used.
conditions Conditions are the prerequisites on which a technique fails or not.
effects Effects can change some characteristics of the enemy. By using the example below: "give poison,target" will give Poisoned status to the enemy and "damage" will inflict damage to the enemy.
flip_axes On which axes the animation needs to be flipped, by default is empty "".
is_fast Boolean, whether the technique is fast or not. Fast means that will be used before the enemy ones. By default is False.
potency Float parameter between 0 and 1 which decides against a random value if the technique will give a Category:Condition.
power Float parameter between 0 and 3 that will be used to calculate the quantity of damages.
range The kind of technique: Melee, Ranged, Touch, Special, Reach or Reliable.
recharge Recharging time of the technique (eg 2 = it can be used every 2 turns).
sfx The sound effect under `resources/sounds/technique` to play when using the move.
slug The slug identifier of the technique. It defines the name of the technique and there is a translation in the PO file (msgid "sting" - msgstr "Sting") as well as the description (msgid "sting_description" - msgstr "Describing the technique").
sort Whether damage or meta, meta doesn't do damage.
target The target can be set among "enemy_monster", "enemy_team", etc.
types The technique's types Category:Type.
use_failure (optional) Corresponding msgid (translation PO file) will appear if the technique fails.
use_success (optional) Corresponding msgid (translation PO file) will appear if the technique hits.
use_tech Corresponding msgid (translation PO file) will appear when the technique is used in battle.

Here is an example of what a technique file might look like:

`mods/tuxemon/db/technique/sting.json`

 json
 {  
 "tech_id": 1,
 "accuracy": 0.8,
 "animation": "pound",
 "effects": [
   "give poison,target",
   "damage"
 ],
 "flip_axes": "",
 "is_fast": false,
 "potency": 0.4,
 "power": 1.25,
 "range": "melee",
 "recharge": 1,
 "sfx": "sfx_blaster",
 "slug": "sting",
 "sort": "damage",
 "target": {
   "enemy monster": 2,
   "enemy team": 0,
   "enemy trainer": 0,
   "own monster": 0,
   "own team": 0,
   "own trainer": 0
 },
 "types": [
   "wood"
 ],
 "use_failure": "combat_miss",
 "use_success": null,
 "use_tech": "combat_used_x"
 }