# 自定义模型（ModelEngine）

## 设置自定义模型

本教程假设你已经有一个合适的模型文件 (`.bbmodel`)，如果你没有，那么你可以使用 Blockbench 软件制作。

EliteMobs 可以为自定义 NPC 和自定义怪物设置自定义模型，它们的步骤是一样的：

### 第一步：设置自定义怪物配置

到对应自定义 NPC 或者自定义怪物的配置文件中新增如下一行：

```
customModel: modelname
```

将 `modelname` 替换为你的模型文件的名称，例如你的模型文件是 `showcase_boss.bbmodel`，那么你就应该填写：

```
customModel: showcase_boss
```

### 第二步：生成 ModelEngine 数据

1. 将你的模型文件 (`.bbmodel`) 放置到 `(你的服务端)/plugins/ModelEngine/blueprints` 文件夹。
2. 在你的服务器输入指令 `/meg reload` ，如果一切顺利你会得到提示 `[Model Engine] X models loaded`，X 代表你的服务器当前的模型数量。

### 第三步：获得 ModelEngine 资源包

打开 `(你的服务器)/plugins/ModelEngine/resource pack` 文件夹，这就是 ModelEngine 自动生成的资源包的位置，如果你的服务器有配套资源包，请将该文件夹内的 `assets` 文件夹复制到你的服务器的 `assets` 文件夹，然后打包你的资源包，并发送给玩家。有关具体信息请 [点击这里](https://github.com/Ticxo/Model-Engine-Wiki/wiki/Importing-and-Exporting#preexisting-resource-pack) 查看。

### 第四步：完工

理论上这时在安装资源包情况下你的自定义模型应该能够正常显示，你可以使用下面的指令生成它们以检查：

* 自定义怪物: `/em spawncustom filename.yml`
* NPC: `/em spawnnpc filename.yml`

检查完毕，你可以使用指令 `/em remove` 移除它们。

## EliteMobs 自定义模型的创建指导

因对模型的技术性学识有限，相关内容不做介绍。请到原 Wiki 查看。


---

# 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/elitemobs-wiki/pei-zhi/zi-ding-yi-mo-xing-modelengine.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.
