> For the complete documentation index, see [llms.txt](https://tyzbrand.gitbook.io/docs.tyzs_skills/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tyzbrand.gitbook.io/docs.tyzs_skills/json-tweaks/create_skill.md).

# Create a Custom Skill with Tyz's Skills

## Disclaimer

* I will not cover every detail for each property here, as that is already explained [here](/docs.tyzs_skills/json-tweaks/skill-structure-on-tyzs-skills-6.4+.md).
* If you intend to create skills using Java/JS code, you are in the wrong place. This guide only covers skill creation using JSON files.
* You can only create custom skills that modify player attributes.

***

## Create a custom skill

{% stepper %}
{% step %}

### Create the file

* Go to `GAMEDIRECTORY/config/tyzs_skills/custom/skills/`.
* Create a file ending with `.json` (e.g., `my_custom_skill.json`).

{% endstep %}

{% step %}

### Use the template

* Copy and paste the template below into your file:

```json
{
  "active": true,
  "id": "my_custom_skill",
  "maximumLevel": 4,
  "prices": [4, 6, 8, 12],
  "type": "CUSTOM",
  "category": "abilities",
  "icon": "tyzs_skills:textures/gui/skills/block_reach.png",
  "displayName": "skill.tyzs_skills.block_reach.displayName",
  "description": "skill.tyzs_skills.block_reach.description",
  "modifiers": [],
  "customValues": {},
  "config": {}
}
```

* Now we are going to change all the properties

{% endstep %}

{% step %}

### Choose a unique ID

This is the most important part. It lets the mod recognize and manage it.

* Choose a unique id in lower case, without spaces and with only underscores (e.g., `my_custom_skill`).
* Make sure the id matches your file name for consistency.

{% endstep %}

{% step %}

### Setup Your Modifiers

The JSON file contains a `modifiers` property. This property holds "modifiers", which we will use to apply in-game effects.

*A modifier follows this format:*

```json
{
      "attribute": "minecraft:generic.movement_speed",
      "operation": "ADD_VALUE",
      "values": [1.0, 2.0, 3.0, 4.0],
      "unit": "skill.tyzs_skills.unit.percentage"
}
```

* Copy and paste this template between the brackets `[]` of `modifiers`.
* We can now modify the data:

`attribute`

* The player attribute you want to modify.
* It can come from another mod.
* In the template I use "minecraft:generic.movement\_speed", but you can use the one you want [Full vanilla attribute list](https://minecraft.wiki/w/Attribute).

{% hint style="warning" %}

* If the `modifier` property is missing, the skill will not load.&#x20;
* If the attribute name is incorrect, the skill will have no effect in-game.
  {% endhint %}

`operation`

* This is how we are going to modify the attribute.
* You have to decide if it will add a value (ex: adding 1 heart) or increase by a percentage (ex: +10% respiration).\
  -> If it's the first case then write **"ADD\_VALUE".**\
  -> Otherwise, write **"ADD\_MULTIPLIED\_BASE".**

`values`

* This is the list of values for the modifier.
* Values can be negative or positive.
* The size of the list must match the maximumLevel (1st value = attribute value at skill level 1).

`unit`

* This is a translation key for the unit to be displayed in the purchase/refund tooltip.
* This field can be empty, in which case no unit will be displayed.

{% endstep %}

{% step %}

### Finalizing

Before trying it in game, make sure these conditions are met:

* The skill ID is unique and without spaces.
* The price list size matches the maximum level.
* The field `type` is is strictly set to "CUSTOM".
* At least one valid modifier object exists inside the "modifiers" array.

If everything looks correct, you are ready to test your skill!
{% endstep %}
{% endstepper %}

***

## Tips

**Values**

* You can use negative values to simulate a penalties or debuffs (e.g., `"values": [-1.0, -2.0, -3.0, -4.0]`).
* If you want your skill to work on top of existing effects (like potions or other modifiers), you can use "ADD\_MULTIPLIED\_TOTAL" as the `operation`.

<br>

**Design**

* You can use minecraft item/block textures as an icon (example with stick:`minecraft:textures/item/stick.png`).
* You can use icons already used (example with the one for Health Boost: `tyzs_skills:textures/gui/skills/health_boost.png`).
* I've added few unused icons you can use (e.g., `tyzs_skills:textures/gui/skills/unused_icon_set/FILENAME.png`).

<br>

**Texts**

* You can use `{value}` in your description to display skill effect intensity. If there are multiple modifiers, use numbers for the subsequent ones (e.g, `{value2}`).
* You can directly write plain text (description, displayName, units) instead of translation keys. You simply won't be able to translate them into other languages via resource packs.

<br>

**Other**

* Use `/skills reload` to apply changes you made while in game.
