Ability Templates⚓︎
Abilities belong to the "ability_templates" folder in Data.
Ability templates are, as the name suggests, a base for different abilities to be created off of. Because each ability template corrosponds to a internal "class" which actually codes the movement or action, templates are merely a set of stats for the class that determine how the most basic version of the movement or action should go, usually giving it a cost, target, and damage_instance. Each of these are tables that contain variables belonging to them. This article, then, means moreover to show users both the internal stats of each ability template, as well as how one should use the ability template when making their own ability.
Overall Structure⚓︎
Ability templates are found in the data folder ability_templates in a .gon file the same name. Here is a example of the first, and most basic, ability template.
Example Ability
Here is a broken down example ability. It uses the most common template of abilities, damaging abilities.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
Setup⚓︎
Here are the enums of a ability template. You'll notice, it is extremely similar to abilities.
Info
When a string is put in brackets, it indicates the variable supports multiple strings within a required bracket.
Example Code
tags [summon musical]
| Field Name | Input Type | Description |
|---|---|---|
| Class | string | Ability class, mostly used when making a template [check ablity_template.gon for classes] |
| meta | table | Contains the informations about the ability |
| graphics | table | Contains the graphical properties of the ability |
| cost | table | Contains the costs and requirements of the ability |
| target | table | Contains the targetting properties of the ability |
| damage_instance | table | Contains the damage properties of the ability |
| spawn | table | Used for spawning abilities, contains the spawn properties of the ability |
Variables⚓︎
Anywhere iside the ability structure variables can be used to make certain stats of the ability change based on different factors.
| Variable Name | Type | Description |
|---|---|---|
| bonus_range | int | Bonus range value based on the character's dexterity |
| bonus_ranged_damage | int | Bonus ranged damage value based on the character's dexterity |
| bonus_meele_range | int | |
| bonus_meele_damage | int | Bonus melee damage value based on the character's strenght |
| bonus_basic_spell_damage | int | |
| level | int | The level of the ability |
| str | int | The character's strenght |
| spd | int | The character's speed |
| int | int | The character's intelligence |
| cha | int | The character's charisma |
| con | int | The character's constitution |
| dex | int | The character's dexterity |
| lck | int | The character's luck |
| X | int | Value based on what is put in X_is |
This is a subsection of ability_templates.⚓︎
Ability Templates⚓︎
template_move ()⚓︎
Basic template for moving to a tile.
template_move Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |
template_teleport ()⚓︎
Basic template for teleporting to a tile.
template_teleport Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
template_swap ()⚓︎
Basic template for swapping with an entity on a tile.
template_swap Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
template_melee_attack ()⚓︎
Basic template for attacking a tile.
???- example "template_melee_attack Cod"e
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |