> 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)
