# 自定义变量符

你可以通过自定义变量符来制作自己想要实现的变量符。在自定义变量符中也可以使用其他变量符，并将它们使用 [数学计算](https://docs.superiormc.cn/auxilor-plugins/tong-yong-xin-xi/shu-xue-ji-suan) 一节介绍的函数、计算，加强几个插件之间的互联程度。

自定义变量符的相关配置可以在 `plugins/libreforge/config.yml` 中找到：

```yaml
placeholders:
  - id: "example_placeholder" # 变量符ID
    value: "这是一个示例变量符!" # 变量符值

  - id: "example_expression_placeholder"
    value: "%level% * 2" # 支持数学计算

  - id: "conditional_placeholder"
    default: 5 # 默认值
    values:
      - conditions: # 使用条件格式
          - id: has_permission
            args:
              permission: "ecomc.rank.netherite"
            value: 20 # 满足该条件的玩家将会显示这个值

      - conditions:
          - id: has_permission
            args:
              permission: "ecomc.rank.diamond"
            value: 10
```

你可以按此格式添加无数多的自定义变量符。

你可以通过使用 `%libreforge_变量符ID%` 以显示对应自定义变量符的值。（需要 PlaceholderAPI）


---

# 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-bian-liang-fu.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.
