> For the complete documentation index, see [llms.txt](https://treasurestore.gitbook.io/treasure-particles/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://treasurestore.gitbook.io/treasure-particles/effects/basic-usage.md).

# Basic Usage

## Example Effect

{% tabs %}
{% tab title="effects.yml" %}

```yml
effects:
  rainbow-circle:
    display-name: "%rainbow-circle%"
    color-animation: "rainbow"
    permission: "%rainbow-effects%"
    description:
      - "..."
      - "..."
      - "..."
    icon:
      material: paper
      custom-model-data: 1
```

{% endtab %}
{% endtabs %}

## Basics

```yml
effects:
  key:
    display-name: "<STRING>" # optional
    color-animation: "<COLOR>" # optional
    name-color-animation: <BOOLEAN> # default=false
    permission: "<PERMISSION>" # optional
    icon: # optional
      material: "<MATERIAL>" # see below
    only-elytra: <BOOLEAN> # optional, default=false 
    description: # optional
      - ..
      - ..
```

{% hint style="info" %}

## key

#### Description

`key` is unique to effect, it won't show up in-game except for the */trparticles select* command.
{% endhint %}

{% hint style="info" %}

## display-name

#### Description

The name that shows up in-game for the effect. It could be any name, no need to use unique names.

#### Notes

* If you don't give your effect a display name, it will automatically display the effect's key name.
* You can select a display name from the translations file. Just put `%%` and type the key from the `effects` section. Example:

<pre class="language-yaml"><code class="lang-yaml"><strong>display-name: "%helix-rainbow%" # Result: &#x3C;rainbow>Rainbow Helix (locale: en)
</strong></code></pre>

{% endhint %}

{% hint style="info" %}

## color-animation

#### Description

Determines the item color that will be used in GUI.

**Supported Item Types:**

* Leather Armors
* Tipped Arrows
* Potions
* Maps

#### Static Color

* Use hex color codes for static color.
* Color names like *red*, *green*, and *blue* are **not supported**.

#### Animated Color

* Pick a color scheme from colors.yml.
* Or use *rainbow* for rainbow colors.
  {% endhint %}

{% hint style="info" %}

## name-color-animation

#### Description

Gives the item name a color animation if enabled.
{% endhint %}

{% hint style="info" %}

## permission

#### Description

The permission needed for this effect.

#### Using Hardcoded Permission

```yaml
effects:
  rainbow-circle:
    display-name: "Rainbow Circle"
    permission: "trparticles.rainbow-circle"
```

#### Pulling Permission From config.yml

```yaml
effects:
  rainbow-circle:
    display-name: "Rainbow Circle"
    permission: "%rainbow-effects%" # It will be replaced with the permission "trparticles.effects.rainbow" that is defined in the permissions section in `config.yml`
```

{% endhint %}

{% hint style="info" %}

## icon

#### Description

The item that shows up in the GUIs for the effect.

[*See Item Properties page for details.*](/treasure-particles/configuration/gui-config/item-properties.md)

#### Example

```yaml
icon:
  material: paper
  custom-model-data: 1
  amount: 1
  glow: true
```

{% endhint %}

{% hint style="info" %}

## description

#### Description

The description message for the effect.

#### Pulling Descriptions From Translations

* Putting the translation keys in `%%` will replace it with the translation for that translation key. Example:

```yaml
description:
  - "%seasonal-effect%"
  - "%christmas%"
# Result: (Locale: EN)
# <gray>Seasonal Effect
# <gradient:#A7C957:#F2E8CF:#BC4749>Shine with New Year's colors.
```

{% endhint %}

{% hint style="info" %}

## only-elytra

#### Description

If this option is set to true, Effect will only work when player is equipped Elytra.
{% endhint %}
