Difference between revisions of "Creating Techniques"

From Tuxepedia
Jump to navigation Jump to search
Line 6: Line 6:
! Description
! Description
|-
|-
| id
| tech_id
| The id of the individual technique.
| The id of the individual technique.
|-
|-
| name
| accuracy
| The name of the technique.  
| The id of the individual technique.
|-
| animation
| Name of the animation under `resources/animations/technique` to use when the move is used.  
|-
|-
| effect
| 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.
| A comma-separated list of effects that will go off when this move is used. Multiple effects can be bound to a single technique.
|-
|-
| type1
| effects
| The primary type of technique. Used for super-effectiveness, etc.
| A comma-separated list of effects that will go off when this move is used. Multiple effects can be bound to a single technique.
|-
|-
| type2
| flip_axes
| The secondary type of technique. Used for super-effectiveness, etc.
| The id of the individual technique.
|-
| is_fast
| The id of the individual technique.
|-
| potency
| Amount of power the technique has. Used in "effect" calculations (such as damage).  
|-
|-
| power
| power
| Amount of power the technique has. Used in "effect" calculations (such as damage).  
| Amount of power the technique has. Used in "effect" calculations (such as damage).  
|-
|-
| category
| 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. Can be either "physical" or "special". Coincides with the monster's attack and special attack stats.  
|-
| animation
| Name of the animation under `resources/animations/technique` to use when the move is used.
|-
|-
| sfx
| sfx
| The sound effect under `resources/sounds/technique` to play when using the move.  
| 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, 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").
|-
| 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 ([[Wood]], [[Fire]], [[Water]], etc.).
|-
| use_failure (optional)
| Text will appear if the technique fails.
|-
| use_success (optional)
| Text will appear if the technique hits.
|-
| use_tech
| Text 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/poison_sting.json`
`resources/db/technique/sting.json`
 


    json
  json
    {   
  {   
    "animation": "spike",
  "tech_id": 1,
     "sfx": "bite1.ogg",
  "accuracy": 0.8,
    "category": "special",
  "animation": "pound",
    "effects": [
  "effects": [
        "damage",
    "give poison,target",
        "poison"
     "damage"
     ],  
  ],
     "id": 2,  
  "flip_axes": "",
     "name": "Poison Sting",  
  "is_fast": false,
     "power": 40,  
  "potency": 0.4,
     "types": [
  "power": 1.25,
        "Poison"
  "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"
  }

Revision as of 09:20, 26 December 2023

Techniques can be created by creating a simple JSON text file in the Technique Table 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. You can create **brand new** technique effects by adding it as a new method to the core.components.monster.Technique class. With each new technique, the following data must be specified:

Name Description
tech_id The id of the individual technique.
accuracy The id of the individual technique.
animation Name of the animation under `resources/animations/technique` to use when the move is used.
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.
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.
flip_axes The id of the individual technique.
is_fast The id of the individual technique.
potency Amount of power the technique has. Used in "effect" calculations (such as damage).
power Amount of power the technique has. Used in "effect" calculations (such as damage).
range The kind of technique. Can be either "physical" or "special". Coincides with the monster's attack and special attack stats.
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, 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").
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 (Wood, Fire, Water, etc.).
use_failure (optional) Text will appear if the technique fails.
use_success (optional) Text will appear if the technique hits.
use_tech Text will appear when the technique is used in battle.

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

`resources/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"
 }