# 自定义参数

自定义参数允许您为效果添加自己想要的参数，参数内是一系列新的子效果。如果你有重复多次使用某个效果的情况，不妨使用它。例如，为多个效果增加同样的音效以增加游戏沉浸感、某个效果执行后扣除物品耐久等，那么就可以将这个音效效果设置为一个参数，这样在各个效果之间只需要新增这个参数即可，无需添加整个效果，方便省事。

自定义参数的配置文件可以在 `/plugins/libreforge/arguments/` 目录下找到，您可以自行添加或者删除它们。

下面是一个示例文件：

```yaml
# 自定义参数的ID就是文件的名称
# 例如 named_mana.yml 的ID为 named_mana

# 查看该参数是否满足的条件
is-met:
  - id: above_magic
    args:
      type: mana
      amount: "%amount%"

# 如果条件满足，则执行的动作
if-met:
  - id: give_magic
    args:
      type: mana
      amount: "- %amount%"
  - id: send_message
    args:
      message: "-%amount% %ecoskills_mana_name% &f(%reason%)"

# 如果条件不满足，则执行的动作
if-not-met: [ ]
```

## 使用自定义变量符

可以在各个效果中的参数（args选项）中使用自定义参数，和其他正常参数类似，但是自定义参数都以 `custom_` 开头。例如，如果你有一个 ID 为 `named_mana` 的自定义参数，那么要在效果中使用它，需要像下面这个样子：

```yaml
args:
  custom_named_mana:
    amount: 10
    reason: 快速传送
```

amount 和 reason 选项是用在 `%amount%` 和 `%reason%` 中。


---

# 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/auxilor-plugins/zi-ding-yi-xiao-guo/zi-ding-yi-can-shu.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.
