> For the complete documentation index, see [llms.txt](https://mossuh.gitbook.io/projects/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mossuh.gitbook.io/projects/plugins/moarmors/armor-format.md).

# Armor Format

Every armor configuration uses a unique code to identify the armor set.

## Basic Structure

```yml
# Custom code to identify the armor pieces.
ExampleArmor:
```

## Tags

Tags are used to categorize armor sets.

```yml
tags: Combat, PvP, Legendary
```

> Tags can later be checked using PlaceholderAPI or local variables

## Variables

Variables allow custom information to be stored inside each armor piece.

```yml
variables:
  - damage -> 15
  - rarity -> legendary
```

{% hint style="info" %}
Variables can be useful for adding new information or using them for new functions with actions. For example, you can add a counter for the number of kills the player has made, and once they reach a certain number of kills, they will unlock a new ability.
{% endhint %}

Example:

```yml
variables:
  - 'kills -> 0'
  - 'regeneration_ability -> no'
actions:
  default:
    KillsCounter:
      event: PLAYER_KILLS
      rewards:
        - '[CHANCE -> 100] SET_VARIABLE -> kills::%math_%helmet_variable_{kills}%+1%'
    RegenerationAbilityChecker:
      event: PLAYER_ATTACK
      requirements:
        - '[EVAL] %helmet_variable_{regeneration_ability}% equals no'
        - '[EVAL] %helmet_variable_{kills}% >= 1000'
      rewards:
        - '[CHANCE -> 100] SET_VARIABLE:HELMET -> regeneration_ability::yes && MESSAGE -> &a&lUNLOCKED! &eUnlocked regeneration ability.'
    RegenerationAbility:
      event: PLAYER_KILLS
      requirements:
        - '[EVAL] %helmet_variable_{regeneration_ability}% equals yes'
      rewards:
        - '[CHANCE -> 50] EFFECT -> REGENERATION::3.5::2 && MESSAGE -> &a&lABILITY! &aRegeneration ability activated.'
      
```

### Booster Identifier (Coming Soon...)

An armor configuration can define a booster identifier.

```yml
booster-identifier: ExampleBoost
```

The identifier ensures that only one booster with the same identifier is applied to certain items.

The identifier must be registered in the MoBoosters configuration.

For MoArmors, the booster must use:

```yml
Applicator: MoArmors
```

The current supported boosted type for this integration is experience.

> If you want all boosters with the same applicator type to be considered, remove `booster-identifier`.

## Upgrade System

### Configuration

Each armor configuration can define its own progression.

```yml
upgrades:
  max-level: 10
  cost-per-level: 100
  message:
    progress:
      - '&7Progress: %progress%'
    maxed-progress:
      - '&aMAX LEVEL'
```

### Options

| Option           | Description                                  |
| ---------------- | -------------------------------------------- |
| `max-level`      | Maximum level the armor can reach.           |
| `cost-per-level` | Upgrade cost formula.                        |
| `progress`       | Displayed while leveling.                    |
| `maxed-progress` | Displayed once the maximum level is reached. |

## Pieces Information

Each armor configuration can define information for its individual pieces.

### Supported Pieces

```yml
HELMET
CHESTPLATE
LEGGINGS
BOOTS
```

### Configuration

```yml
pieces-info:
  HELMET:
    material: DIAMOND_HELMET
    data: 0
    name: '&e&lTokens &f❙ &fHelmet'
    lore:
      - ''
      - '&7&o(( Equip this piece and receive'
      - '&7&oboost of tokens ))'
      - ''
      - '&e&lINFO'
      - '&e ❙ &fLevel: &a%level%&7/&a%max_level%'
      - ''
      - '&e&lBOOSTS'
      - '&e ❙ &fBoost: &e+{math_%level%/200}'
      - ''
      - '%progress%'
      - ''
    unbreakable: true
    enchantments:
      - LUCK:2
    flags:
      - HIDE_ENCHANTS
```

### Available Options

| Option         | Description                                               |
| -------------- | --------------------------------------------------------- |
| `material`     | Minecraft material, custom head or colored leather armor. |
| `data`         | Legacy durability/data value.                             |
| `name`         | Item display name.                                        |
| `lore`         | Item description.                                         |
| `unbreakable`  | Makes the armor piece unbreakable.                        |
| `enchantments` | Item enchantments.                                        |
| `flags`        | Item flags.                                               |

## Materials

MoArmors supports standard Minecraft materials, custom heads and colored leather armor.

### Normal Material

```yml
material: DIAMOND_HELMET
```

### Custom Head

```yml
material: basehead-<base64>
```

## Armor Actions

Each armor configuration can define one or more actions.

### Configuration

```yml
actions:
  # This is the supoort with MoBoosters it won't work
  # if you don't have it in your server.
  boosters:
    mine_experience:
      multiplier: BOOST_PER_LEVEL
      type: PERSONAL
      applicator: MINECRAFT
      boosted: EXPERIENCE
      boost: 0.01
  # This is the default rewards that no depend from another plugin to work.
  default:
    SpeedBoost:
      event: PLAYER_KILLS
      cooldown: 5
      cooldown_bypass: false
      cooldown_message: "&cWait %cooldown_formatted%!"
      requirements:
        - '[EVENT] ZOMBIE'
      rewards:
        - '[CHANCE -> 50] EFFECT -> SPEED:5:1'
      else:
        - '[CHANCE -> 100] MESSAGE -> &cRequirements not met.'
```

### Available Options

| Option             | Description                                      |
| ------------------ | ------------------------------------------------ |
| `event`            | Minecraft event that triggers the action.        |
| `cooldown`         | Cooldown in seconds.                             |
| `cooldown_bypass`  | Executes rewards even if the cooldown is active. |
| `cooldown_message` | Message shown while on cooldown.                 |
| `requirements`     | Conditions required before executing rewards.    |
| `rewards`          | Rewards executed when requirements succeed.      |
| `else`             | Rewards executed when requirements fail.         |
| `cancel_action`    | Cancels the current action when enabled.         |

```yml
SpeedBoost:
  event: PLAYER_KILLS
  cancel_action: true
  cooldown: 5
  cooldown_bypass: false
  cooldown_message: "&cWait %cooldown_formatted%!"
  requirements:
    - '[EVENT] ZOMBIE'
  rewards:
    - '[CHANCE -> 50] EFFECT -> SPEED:5:1'
  else:
    - '[CHANCE -> 100] MESSAGE -> &cRequirements not met.'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://mossuh.gitbook.io/projects/plugins/moarmors/armor-format.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
