> For the complete documentation index, see [llms.txt](https://ersha.gitbook.io/nk-attributeplus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ersha.gitbook.io/nk-attributeplus/zi-ding-yi-wu-pin.md).

# 自定义物品

## 占位符

| 占位符                       | 描述                   | 示例                           |
| ------------------------- | -------------------- | ---------------------------- |
| \<r:min-max(可选)\|decimal> | 随机值并选择性保留小数位数(默认无小数) | \<r:10-100> 或 \<r:10-100\|2> |
| \<r-s:内容,内容,...>          | 从内容中随机选取一个           | \<r-s:燃烧,暴击>                 |

> 这里的 **\<r-s>** 占位符 **内容** 中允许设置 **{r}** 占位符,该占位符与 **\<r>** 作用相同\
> 例如: **\<r-s:物理伤害: {r:10-20|2} - {r:20-40|0},暴击伤害: {r:10-20}>**

## 示例配置

> 配置文件夹位于 plugins/AttributePlus/**item**  插件将默认生成一个 testItem.yml 配置\
> 可新建不同命名的配置,方便修改

```yaml
item:
  "测试物品":
    id: 267
    ids: 0
    name: "武器"
    lore:
      - "&6基础属性"
      - "&3物理伤害&f: <r:1-5|2> - <r:10-100|2>"
      - "&3暴击几率&f: <r-s:5,10,20>"
      - "&3暴击伤害&f: <r-s:20,40,50>"
      - " "
      - "&6特殊属性"
      - "<r-s:&6燃烧几率&f: {r:10-30},&c吸血几率&f: {r:5-15}>"
      - " "
      - "&6物品获取时间&f: %time%"
```

![效果图](/files/-MHAtdHyi4If9TJ17MBx)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://ersha.gitbook.io/nk-attributeplus/zi-ding-yi-wu-pin.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.
