# 物品注册JSON

游戏内所有物品的配置文件,也为将来创意工坊Add-ons做铺垫

目录: Behavior/items/*.json
格式示例

{
    "misty:item":{
        "description": {
            "identifier": "short_sword",
            "name": "锈蚀短刀",
            "item_type": "weapon",
            "max_stack_size" : 1,
            "level": 3,
            "info": "这是一把生锈的短刀",
            "textures": "short_sword"
        },
        "components": {
            "misty:is_can_in_hand": true,
            "misty:weapon": {
                "attack_damage": 12,
                "attack_speed": 1.2,
                "crhr": 0.1,
                "mutation_level": 0.0,
                "durability": 500,
                "level": 3,
                "type": "sword"
            }
        }
    }
}

# description

key values 说明 默认值 是否必须
identifier string 物品的唯一标识符 \
name string 物品的默认格式化文本 identifier
item_type itemType 物品的类型 item
max_stack_size int 物品堆叠最大数量 1
level int 物品的星级(1-5星) 1
info string 物品介绍 \
textures string 物品贴图Id \

# components

key values 说明 默认值 是否必须
misty:can_in_hand bool 是否可以手持使用 false
misty:weapon weapon item_type为weapon时填写,定义武器基本数值 {}
misty:equip equip item_type为equip时填写,定义装备基本数值 {}
misty:food food item_type为food时填写,定义食物基本数值 {}

# 复杂组件详解

# weapon

key values 说明 默认值 是否必须
attack_damage float 武器的攻击力 1.0
attack_speed float 武器的攻速 1.0
crhr float 武器提升的暴击率 0.0
mutation_level float 武器变异后基于自己额外提升的百分比 1.0
durability int 武器的耐久值 100
type weaponType 武器的类型 \

# equip

key values 说明 默认值 是否必须
defense float 装备的防御力 1.0
resilience float 装备的韧性 1.0
durability int 装备的耐久值 100
type equipType 装备的类型 \

# food

key values 说明 默认值 是否必须
health float 食用后立即恢复生命值 0.0
effect List<effect> 食用后获取的状态效果 1.0
type foodType 食物的类型 \

# effect

{
    "name": "xxx",
    "seconds": 5.0,
    "level" : 0
}
key values 说明 默认值 是否必须
name effectMenu 状态效果id \
seconds float 持续时间 5.0
level int(0-15) 状态效果强度 0
上次更新: 3/21/2025, 8:07:42 PM