> For the complete documentation index, see [llms.txt](https://enchantedmobs.superiormc.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enchantedmobs.superiormc.cn/info/configuration-files.md).

# Configuration files

EnchantedMobs creates its data folder at `plugins/EnchantedMobs`.

The plugin generates the following configuration files, some of which will only be generated after you first use this feature.

* `items` folder: stores saved item files. Saved items created by the item commands.
* `languages` folder: stores language message files. Language files and translated power display text.

These two folders are less critical. Focus on the following:

* `powers` folder: stores all created power files. One YAML file per mob power. The filename without `.yml` is the power ID.
* `config.yml`: stores general plugin configuration, like power generation, display, optimization, language, math, and combat settings.
* `player-power.yml`: stores how player strength is calculated. Calculates player strength from inventory items, enchantments, and optional PlaceholderAPI values.
* `generated-item-format.yml`: Output from `/enchantedmobs generateitemformat`; created when the command is used.

{% hint style="info" %}
The bundled files in the latest JAR are the source of truth for defaults. When upgrading a major version, compare your existing files with the current repository resources instead of assuming newly added keys are injected automatically.
{% endhint %}

## Latest default files

* [`config.yml`](https://github.com/ManyouTeam/EnchantedMobs2/blob/master/plugin/src/main/resources/config.yml)
* [`player-power.yml`](https://github.com/ManyouTeam/EnchantedMobs2/blob/master/plugin/src/main/resources/player-power.yml)
* [`powers/`](https://github.com/ManyouTeam/EnchantedMobs2/tree/master/plugin/src/main/resources/powers/README.md)

## Current `config.yml` sections

```yaml
debug: false
display-spawn-message: false

optimize:
  enabled-projectile-tick: true
  enabled-entity-scanner-cache: true

powers:
  temp-block-crack-animation:
    enabled: true
    start-at: 0.5
    update-interval: 5
    view-distance: 64

config-files:
  language: en_US
  per-player-language: true
  force-parse-mini-message: true

debuild-item-method: LEGACY
hook-item-method: DEFAULT

math:
  enabled: true
  enable-function: true

mob-power-generator: {}
mob-display: {}
mob-combat: {}
```

### `debug`

Enables plugin debugging output. Leave disabled on normal production servers unless support asks for additional logs.

### `display-spawn-message`

When enabled, players with `enchantedmobs.nodify` can receive powered-mob spawn notifications.

### `optimize`

* `enabled-projectile-tick`: enables the tracked projectile tick runtime used by `on-projectile-tick`.
* `enabled-entity-scanner-cache`: caches powered living entities instead of repeatedly scanning every world.

Disabling an optimization can change performance substantially and should normally be used only for compatibility testing.

### `powers.temp-block-crack-animation`

Controls the client-side break animation for temporary blocks created by powers:

* `enabled`
* `start-at`: initial progress ratio before animation begins.
* `update-interval`: ticks between progress updates.
* `view-distance`: maximum viewer distance.

### `config-files`

* `language`: default language file ID.
* `per-player-language`: premium per-player language selection.
* `force-parse-mini-message`: parse supported text through MiniMessage formatting.

### Item serialization and hooks

* `debuild-item-method`: item deserialization compatibility mode.
* `hook-item-method`: item-provider integration method; current supported values include `DEFAULT` and `ITEMBRIDGE`.

### `math`

* `enabled`: enables configured formula evaluation.
* `enable-function`: enables registered math functions in formulas.

### `mob-power-generator`

```yaml
mob-power-generator:
  enabled: true
  ignore-custom-spawn: true
  default-level: '15~60'
  max-level: 400
  max-powers: 0
  spawn-chance: '5~25'
  player-scan-range: 48
  disabled-worlds: []
  disabled-entity:
    entity-types:
      - WARDEN
      - WITHER
```

`max-powers` limits the total number of powers assigned to one mob. The generator stops adding powers when this limit or the `max-level` budget is reached first. Set it to `0` or a negative value for no power-count limit.

See [Mechanic](/configs/mechanic.md) for level calculation and power rolling.

### `mob-display`

```yaml
mob-display:
  name:
    enabled: true
    format: '&6[{powers}] &f{mob}'
    separator: ', '
    max-show: 4
    more: '...(+{count})'
  bossbar:
    enabled: true
    min-powers: 2
    keep-ticks: 20
    radius: 16
    color: RED
    style: SOLID
    title: '&c{entity} &7[{health}/{max-health}] &f{powers_full}'
```

Set `name.enabled` or `bossbar.enabled` to `false` to disable the corresponding display feature. Both options default to `true`.

Individual power files may set `hide-name: true` to remove that power from the visible name and BossBar power lists without disabling its behavior.

### `mob-combat`

```yaml
mob-combat:
  disable-powered-mob-friendly-fire: false
  disarm-auto-return-item: true
  min-damage: 1
```

* `disable-powered-mob-friendly-fire`: cancel damage between powered monsters when enabled.
* `disarm-auto-return-item`: return an item dropped by the `disarm` ability when it would otherwise be removed.
* `min-damage`: minimum damage threshold used by the combat runtime.

## `player-power.yml`

The current default formula is:

```yaml
placeholderapi-cache-ticks: 20
formula: '{equipment_sum} + {backpack_max} * 0.8 + {backpack_avg} * 0.2'
incremental-slot-update: true
```

Built-in variables:

* `{equipment_sum}`
* `{backpack_sum}`
* `{backpack_max}`
* `{backpack_avg}`
* `{backpack_count}`

Numeric PlaceholderAPI placeholders may also be used when PlaceholderAPI is installed. Item rules use the normal Match Item format and matching rule weights are added together.

## Current player-powers.yml section.

{% code title="" %}

```yaml
# Built-in variables:
# {equipment_sum} {backpack_sum} {backpack_max} {backpack_avg} {backpack_count}
# PlaceholderAPI placeholders that resolve to numbers are also supported when PlaceholderAPI is installed.
# Built-in variables are refreshed when the player's inventory changes; PlaceholderAPI values are resolved in real time when power is read.
# Final player power value cache for PlaceholderAPI results, in ticks. 0 = disable cache.
placeholderapi-cache-ticks: 20
# Example:
# formula: "{equipment_sum} + %player_level% * 10"
formula: "{equipment_sum} + {backpack_max} * 0.8 + {backpack_avg} * 0.2"
incremental-slot-update: true

rules:
  wooden-sword:
    match-item:
      material:
        - WOODEN_SWORD
    add-weight: 5

  stone-sword:
    match-item:
      material:
        - STONE_SWORD
    add-weight: 10

  golden-sword:
    match-item:
      material:
        - GOLDEN_SWORD
    add-weight: 15

  iron-sword:
    match-item:
      material:
        - IRON_SWORD
    add-weight: 30

  diamond-sword:
    match-item:
      material:
        - DIAMOND_SWORD
    add-weight: 50

  netherite-sword:
    match-item:
      material:
        - NETHERITE_SWORD
    add-weight: 80

  trident:
    match-item:
      material:
        - TRIDENT
    add-weight: 70

  bow:
    match-item:
      material:
        - BOW
    add-weight: 35

  crossbow:
    match-item:
      material:
        - CROSSBOW
    add-weight: 40

  shield:
    match-item:
      material:
        - SHIELD
    add-weight: 15

  leather-helmet:
    match-item:
      material:
        - LEATHER_HELMET
    add-weight: 5

  leather-chestplate:
    match-item:
      material:
        - LEATHER_CHESTPLATE
    add-weight: 10

  leather-leggings:
    match-item:
      material:
        - LEATHER_LEGGINGS
    add-weight: 8

  leather-boots:
    match-item:
      material:
        - LEATHER_BOOTS
    add-weight: 7

  golden-helmet:
    match-item:
      material:
        - GOLDEN_HELMET
    add-weight: 10

  golden-chestplate:
    match-item:
      material:
        - GOLDEN_CHESTPLATE
    add-weight: 20

  golden-leggings:
    match-item:
      material:
        - GOLDEN_LEGGINGS
    add-weight: 18

  golden-boots:
    match-item:
      material:
        - GOLDEN_BOOTS
    add-weight: 15

  chainmail-helmet:
    match-item:
      material:
        - CHAINMAIL_HELMET
    add-weight: 12

  chainmail-chestplate:
    match-item:
      material:
        - CHAINMAIL_CHESTPLATE
    add-weight: 25

  chainmail-leggings:
    match-item:
      material:
        - CHAINMAIL_LEGGINGS
    add-weight: 20

  chainmail-boots:
    match-item:
      material:
        - CHAINMAIL_BOOTS
    add-weight: 18

  iron-helmet:
    match-item:
      material:
        - IRON_HELMET
    add-weight: 15

  iron-chestplate:
    match-item:
      material:
        - IRON_CHESTPLATE
    add-weight: 35

  iron-leggings:
    match-item:
      material:
        - IRON_LEGGINGS
    add-weight: 30

  iron-boots:
    match-item:
      material:
        - IRON_BOOTS
    add-weight: 25

  diamond-helmet:
    match-item:
      material:
        - DIAMOND_HELMET
    add-weight: 20

  diamond-chestplate:
    match-item:
      material:
        - DIAMOND_CHESTPLATE
    add-weight: 55

  diamond-leggings:
    match-item:
      material:
        - DIAMOND_LEGGINGS
    add-weight: 40

  diamond-boots:
    match-item:
      material:
        - DIAMOND_BOOTS
    add-weight: 35

  netherite-helmet:
    match-item:
      material:
        - NETHERITE_HELMET
    add-weight: 30

  netherite-chestplate:
    match-item:
      material:
        - NETHERITE_CHESTPLATE
    add-weight: 80

  netherite-leggings:
    match-item:
      material:
        - NETHERITE_LEGGINGS
    add-weight: 60

  netherite-boots:
    match-item:
      material:
        - NETHERITE_BOOTS
    add-weight: 50
  sharpness:
    match-item:
      contains-enchants:
        sharpness: 3
    add-weight: 20

  sharpness-high:
    match-item:
      contains-enchants:
        sharpness: 4
    add-weight: 35

  smite:
    match-item:
      contains-enchants:
        smite: 3
    add-weight: 15

  bane-of-arthropods:
    match-item:
      contains-enchants:
        bane_of_arthropods: 3
    add-weight: 15

  fire-aspect:
    match-item:
      contains-enchants:
        fire_aspect: [1,2]
    add-weight: 10

  knockback:
    match-item:
      contains-enchants:
        knockback: [1,2]
    add-weight: 8

  sweeping-edge:
    match-item:
      contains-enchants:
        sweeping_edge: [2,3]
    add-weight: 10

  looting:
    match-item:
      contains-enchants:
        looting: [2,3]
    add-weight: 8

  protection:
    match-item:
      contains-enchants:
        protection: 2
    add-weight: 15

  protection-high:
    match-item:
      contains-enchants:
        protection: 3
    add-weight: 25

  fire-protection:
    match-item:
      contains-enchants:
        fire_protection: [2,3,4]
    add-weight: 12

  blast-protection:
    match-item:
      contains-enchants:
        blast_protection: [2,3,4]
    add-weight: 12

  projectile-protection:
    match-item:
      contains-enchants:
        projectile_protection: [2,3,4]
    add-weight: 12

  thorns:
    match-item:
      contains-enchants:
        thorns: [1,2,3]
    add-weight: 10

  feather-falling:
    match-item:
      contains-enchants:
        feather_falling: [3,4]
    add-weight: 10

  depth-strider:
    match-item:
      contains-enchants:
        depth_strider: [2,3]
    add-weight: 8

  soul-speed:
    match-item:
      contains-enchants:
        soul_speed: [1,2,3]
    add-weight: 8

  power:
    match-item:
      contains-enchants:
        power: 3
    add-weight: 18

  power-high:
    match-item:
      contains-enchants:
        power: 4
    add-weight: 30

  punch:
    match-item:
      contains-enchants:
        punch: [1,2]
    add-weight: 10

  flame:
    match-item:
      contains-enchants:
        flame: 1
    add-weight: 10

  multishot:
    match-item:
      contains-enchants:
        multishot: 1
    add-weight: 12

  piercing:
    match-item:
      contains-enchants:
        piercing: [2,3,4]
    add-weight: 10

  quick-charge:
    match-item:
      contains-enchants:
        quick_charge: [2,3]
    add-weight: 8

  loyalty:
    match-item:
      contains-enchants:
        loyalty: [2,3]
    add-weight: 10

  riptide:
    match-item:
      contains-enchants:
        riptide: [2,3]
    add-weight: 8

  impaling:
    match-item:
      contains-enchants:
        impaling: [3,4,5]
    add-weight: 15

  channeling:
    match-item:
      contains-enchants:
        channeling: 1
    add-weight: 12

  unbreaking:
    match-item:
      contains-enchants:
        unbreaking: [2,3]
    add-weight: 5

  mending:
    match-item:
      contains-enchants:
        mending: 1
    add-weight: 8

```

{% endcode %}
