Difference between revisions of "Creating Techniques"
Jump to navigation
Jump to search
Jaskrendix (talk | contribs) |
Jaskrendix (talk | contribs) |
||
| Line 1: | Line 1: | ||
= What Is a Technique in a Tuxemon Game? = | |||
In a Tuxemon-style game, a '''technique''' is a special move that a creature can use during battle. Think of moves like '''Sting''', '''Ram''', or '''Shuriken'''. Each move has different properties that define how it works in the game. | |||
We use a '''JSON file''' to describe each move in detail. This file tells the game engine everything it needs to know about the move—how it looks, how strong it is, who it targets, and more. | |||
== What Each Field Means == | |||
=== Basic Info === | |||
* '''slug''': A unique name used in code (e.g. <code>"sting"</code>). | |||
* '''sort''': What kind of move it is (e.g. <code>"damage"</code> or <code>"meta"</code>). | |||
* '''category''': A label for how the move behaves (e.g. <code>"powerful"</code>, <code>"basic"</code>, <code>"exotic"</code>). | |||
=== Tags === | |||
* '''tags''': Keywords that describe the move (e.g. <code>"toxic"</code>, <code>"bug"</code>). These help group similar moves together. | |||
=== Conditions === | |||
* '''conditions''': Rules that must be true before the move can be used. For example, <code>"current_hp"</code>. | |||
=== Effects === | |||
* '''effects''': What happens when the move is used. Examples: | |||
** <code>"damage"</code>: Hurts the target. | |||
** <code>"give"</code>: Adds a condition like <code>"hard_shell"</code> or <code>"poisoned"</code>. | |||
=== Flip Axes === | |||
* '''flip_axes''': If the move’s animation should be flipped horizontally (<code>"x"</code>), vertically (<code>"y"</code>), both (<code>"xy"</code>), or not at all (<code>""</code>). | |||
=== Target === | |||
* '''target''': Who the move affects. You can target: | |||
** The enemy monster | |||
** The enemy team | |||
** The enemy trainer | |||
** Your own monster | |||
** Your own team | |||
** Yourself (own trainer) | |||
Each of these is a <code>true</code> or <code>false</code> value. | |||
=== Animation & Sound === | |||
* '''animation''': The name of the animation to play. | |||
* '''sfx''': The sound effect file to play when the move is used. | |||
=== Modifiers === | |||
* '''modifiers''': Special changes to how the move behaves. For example: | |||
** <code>"attribute": "type"</code> with <code>"values": ["fire"]</code> and <code>"multiplier": 1.5</code> means the move is fire-type and does 1.5× damage. | |||
=== Text Feedback === | |||
* '''use_tech''': Message shown when the move is used. | |||
* '''use_success''': Message shown when the move hits. | |||
* '''use_failure''': Message shown when the move misses. | |||
* '''confirm_text''' and '''cancel_text''': Labels used in the UI when confirming or canceling the move. | |||
=== Types === | |||
* '''types''': What kind of move it is (e.g. <code>"fire"</code>, <code>"water"</code>). This affects how it interacts with other types. | |||
=== Usability === | |||
* '''usable_on''': Can the move be used outside of battle? (<code>true</code> or <code>false</code>) | |||
=== Power & Speed === | |||
* '''power''': How strong the move is (e.g. <code>1.9</code>). | |||
* '''speed''': How fast the move is. Options include: | |||
** <code>"extremely_slow"</code> | |||
** <code>"very_slow"</code> | |||
** <code>"slow"</code> | |||
** <code>"normal"</code> | |||
** <code>"fast"</code> | |||
** <code>"very_fast"</code> | |||
** <code>"extremely_fast"</code> | |||
=== Randomness === | |||
* '''randomly''': If the move is chosen randomly (<code>true</code> or <code>false</code>). | |||
=== Healing === | |||
* '''healing_power''': If the move heals, how much healing it does. | |||
=== Recharge === | |||
* '''recharge''': How many turns you must wait before using the move again. | |||
=== Range === | |||
* '''range''': How far the move reaches. Options include: | |||
** <code>"melee"</code>: Close-range | |||
** <code>"ranged"</code>: Long-range | |||
** <code>"touch"</code>: Requires physical contact | |||
** <code>"reach"</code>: Slightly extended range | |||
** <code>"special"</code>: Unique targeting | |||
** <code>"reliable"</code>: Always hits | |||
=== ID & Accuracy === | |||
* '''tech_id''': A unique number for the move. | |||
* '''accuracy''': Chance to hit (from <code>0.0</code> to <code>1.0</code>, where <code>1.0</code> is 100%). | |||
* '''potency''': How effective the move is overall (can affect damage, status chance, etc.). | |||
<syntaxhighlight lang="json"> | |||
{ | |||
"tech_id": 1, | "tech_id": 1, | ||
"accuracy": 0.8, | "accuracy": 0.8, | ||
"animation": " | "animation": "needle", | ||
"effects": [ | "effects": [ | ||
"give poison, | { | ||
"damage" | "type": "give", | ||
"parameters": [ | |||
"poison", | |||
"enemy_monster" | |||
] | |||
}, | |||
{ | |||
"type": "damage" | |||
} | |||
], | ], | ||
"flip_axes": "", | "flip_axes": "", | ||
" | "speed": "normal", | ||
"potency": 0.4, | "potency": 0.4, | ||
"power": 1.25, | "power": 1.25, | ||
| Line 86: | Line 117: | ||
"slug": "sting", | "slug": "sting", | ||
"sort": "damage", | "sort": "damage", | ||
"modifiers": [], | |||
"target": { | "target": { | ||
" | "enemy_monster": true, | ||
" | "enemy_team": false, | ||
" | "enemy_trainer": false, | ||
" | "own_monster": false, | ||
" | "own_team": false, | ||
" | "own_trainer": false | ||
}, | }, | ||
"category": "simple", | |||
"tags": [ | |||
"bug", | |||
"toxic" | |||
], | |||
"types": [ | "types": [ | ||
"wood" | "wood" | ||
| Line 100: | Line 137: | ||
"use_success": null, | "use_success": null, | ||
"use_tech": "combat_used_x" | "use_tech": "combat_used_x" | ||
} | |||
</syntaxhighlight> | |||
Revision as of 12:00, 1 August 2025
What Is a Technique in a Tuxemon Game?
In a Tuxemon-style game, a technique is a special move that a creature can use during battle. Think of moves like Sting, Ram, or Shuriken. Each move has different properties that define how it works in the game.
We use a JSON file to describe each move in detail. This file tells the game engine everything it needs to know about the move—how it looks, how strong it is, who it targets, and more.
What Each Field Means
Basic Info
- slug: A unique name used in code (e.g.
"sting"). - sort: What kind of move it is (e.g.
"damage"or"meta"). - category: A label for how the move behaves (e.g.
"powerful","basic","exotic").
Tags
- tags: Keywords that describe the move (e.g.
"toxic","bug"). These help group similar moves together.
Conditions
- conditions: Rules that must be true before the move can be used. For example,
"current_hp".
Effects
- effects: What happens when the move is used. Examples:
"damage": Hurts the target."give": Adds a condition like"hard_shell"or"poisoned".
Flip Axes
- flip_axes: If the move’s animation should be flipped horizontally (
"x"), vertically ("y"), both ("xy"), or not at all ("").
Target
- target: Who the move affects. You can target:
- The enemy monster
- The enemy team
- The enemy trainer
- Your own monster
- Your own team
- Yourself (own trainer)
Each of these is a true or false value.
Animation & Sound
- animation: The name of the animation to play.
- sfx: The sound effect file to play when the move is used.
Modifiers
- modifiers: Special changes to how the move behaves. For example:
"attribute": "type"with"values": ["fire"]and"multiplier": 1.5means the move is fire-type and does 1.5× damage.
Text Feedback
- use_tech: Message shown when the move is used.
- use_success: Message shown when the move hits.
- use_failure: Message shown when the move misses.
- confirm_text and cancel_text: Labels used in the UI when confirming or canceling the move.
Types
- types: What kind of move it is (e.g.
"fire","water"). This affects how it interacts with other types.
Usability
- usable_on: Can the move be used outside of battle? (
trueorfalse)
Power & Speed
- power: How strong the move is (e.g.
1.9). - speed: How fast the move is. Options include:
"extremely_slow""very_slow""slow""normal""fast""very_fast""extremely_fast"
Randomness
- randomly: If the move is chosen randomly (
trueorfalse).
Healing
- healing_power: If the move heals, how much healing it does.
Recharge
- recharge: How many turns you must wait before using the move again.
Range
- range: How far the move reaches. Options include:
"melee": Close-range"ranged": Long-range"touch": Requires physical contact"reach": Slightly extended range"special": Unique targeting"reliable": Always hits
ID & Accuracy
- tech_id: A unique number for the move.
- accuracy: Chance to hit (from
0.0to1.0, where1.0is 100%). - potency: How effective the move is overall (can affect damage, status chance, etc.).
{
"tech_id": 1,
"accuracy": 0.8,
"animation": "needle",
"effects": [
{
"type": "give",
"parameters": [
"poison",
"enemy_monster"
]
},
{
"type": "damage"
}
],
"flip_axes": "",
"speed": "normal",
"potency": 0.4,
"power": 1.25,
"range": "melee",
"recharge": 1,
"sfx": "sfx_blaster",
"slug": "sting",
"sort": "damage",
"modifiers": [],
"target": {
"enemy_monster": true,
"enemy_team": false,
"enemy_trainer": false,
"own_monster": false,
"own_team": false,
"own_trainer": false
},
"category": "simple",
"tags": [
"bug",
"toxic"
],
"types": [
"wood"
],
"use_failure": "combat_miss",
"use_success": null,
"use_tech": "combat_used_x"
}