# 宠物

自定义宠物配置可以在 `plugins/EcoPets/pets` 文件夹中找到，它的文件名称即为 **宠物id**，其一般配置如下：

```
name: "&#FF6600Blaze"
description: "&7Earn more XP from killing mobs"
level-xp-requirements:
  - 50
  - 125
  - 200
  - 300
  - 500
  - 750
  - 1000
  - 1500
  - 2000
  - 3500
  - 5000
  - 7500
  - 10000
  - 15000
  - 20000
  - 30000
  - 50000
  - 75000
  - 100000
  - 200000
  - 300000
  - 400000
  - 500000
  - 600000
  - 700000
  - 800000
  - 900000
  - 1000000
  - 1100000
  - 1200000
  - 1300000
  - 1400000
  - 1500000
  - 1600000
  - 1700000
  - 1800000
  - 1900000
  - 2000000
  - 2100000
  - 2200000
  - 2300000
  - 2400000
  - 2500000
  - 2600000
  - 2750000
  - 2900000
  - 3100000
  - 3400000
  - 3700000
xp-gain-methods:
  - id: kill
    multiplier: 1
level-placeholders:
  - id: "xp_multiplier"
    value: "%level% * 2"
effects-description:
  1:
    - "&6Â» &7Increased XP gain by %xp_multiplier%%!"
rewards-description: []
level-up-messages: []
level-commands: []
effects:
  - id: xp_multiplier
    args:
      multiplier: "%level% * 0.02 + 1"
entity-texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjIwNjU3ZTI0YjU2ZTFiMmY4ZmMyMTlkYTFkZTc4OGMwYzI0ZjM2Mzg4YjFhNDA5ZDBjZDJkOGRiYTQ0YWEzYiJ9fX0="
icon: player_head texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjIwNjU3ZTI0YjU2ZTFiMmY4ZmMyMTlkYTFkZTc4OGMwYzI0ZjM2Mzg4YjFhNDA5ZDBjZDJkOGRiYTQ0YWEzYiJ9fX0=
spawn-egg:
  enabled: true # If the pet should have a spawn egg
  item: blaze_spawn_egg unbreaking:1 hide_enchants
  name: "&#FF6600Blaze &fSpawn Egg"
  lore:
    - ""
    - "&8&oPlace on the ground to"
    - "&8&ounlock the &#FF6600Blaze pet!"
  craftable: false
  recipe: []
  recipe-permission: ecopets.craft.blaze
```

我们可以看出它由以下部分组成：

* **id：**&#x5BA0;物的 **id**。
* **name：**&#x5BA0;物的名称。
* **description：**&#x5BA0;物的介绍。
* **level-xp-requirements：**&#x5BA0;物升级所需的宠物经验值。
* **xp-gain-methods：**&#x5BA0;物经验值的获取方式。

其中：

* **xp-gain-methods.id**：填写一个宠物获得经验值的触发器名称。
* **xp-gain-methods.multipulier**：对应触发器获得宠物经验值默认值的加倍值。
* **xp-gain-methods.conditions**：对应触发器的条件。
* **xp-gain-methods.filters**：对应触发器的过滤。

具体请参考 **The Effect System** 的详细介绍。

* **level-placeholders**：自定义变量符。

每个自定义变量符下由以下部分组成：

* **level-placeholders.id**：变量符 **id**，在该宠物配置下的其他位置可以使用 `%变量符 id%` 来显示该变量符。
* **level-placeholders.value**：变量符值，具体请看 **数值语法学习**。

继续：

* **effects-description**：宠物菜单中对该宠物的描述内容，一般填写该宠物带来的技能（增益）。此处是 %effects% 变量的内容。
* **rewards-description**：宠物升级时的提示。此处是 %rewards% 变量的内容。

此处多说无益，你在 `config.yml` 找到宠物菜单（UI）方面的设置内容时就知道这两个变量是在哪里使用了。

* **level-commands**：宠物升级时的指令。
* **entity-texture**：宠物的材质。

有两种形式，第一种是直接填写玩家头颅 **base64** 码，我们已经在 **EcoX 物品语法学习** 一节详细说明了它，在此不再赘述。另外一种是 `modelengine:id` 形式，这样宠物就是 **ModelEngine** 插件下对应id的模型了。

* **icon**：宠物菜单中显示的物品。
* **spawn-egg：**&#x5BA0;物蛋物品。下面的子选项可以在 **护身符和盔甲** 两节找到对应的内容，在此不再赘述。
* **effects/conditions：**&#x54;he Effect System（自定义技能系统）的内容，将在后文介绍。


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.superiormc.cn/ecox-doc/yi-ban-pei-zhi-ge-shi/chong-wu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
