# 生物注册JSON

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

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

{
    "misty:entity":{
        "description": {
            "identifier": "furina",
            "name": "芙宁娜",
            "entity_type": "player",
            "level": 3
        },
        "components": {
            "misty:player": {
                "hp": 12,
                "atk": 1.2,
                "def": 0.1,
                "crhr": 0.05,
                "crd": 0.5,
                "mem": 0.1,
                "ra": 100,
                "speed": 1,
                "weapon_count": 2
            }
        }
    }
}

# description

key values 说明 默认值 是否必须
identifier string 生物的唯一标识符 \
name string 生物的默认格式化文本 identifier
entity_type entityType 生物的类型 item
level int 当entity_type为player时,定义角色的星级(3-5星),否则无效 3

# components

key values 说明 默认值 是否必须
misty:player player entity_type为player时填写,定义玩家基本数值 {}
misty:monster monster entity_type为monster时填写,定义怪物基本数值 {}
misty:animal animal entity_type为animal时填写,定义动物基本数值 {}
misty:npc npc entity_type为npc时填写,定义NPC基本数值 {}
misty:item item entity_type为item时填写,定义NPC基本数值 {}

# 复杂组件详解

# player

key values 说明 默认值 是否必须
hp int 角色的生命值 500
atk float 角色的攻击力 1.0
def float 角色的防御力 0.0
crhr float 角色的暴击率 1.0
crd float 角色的暴击伤害 100.0
mem float(0-1) 角色的记忆力 \
ra int 角色的理智 \
speed float 角色的速度 \
weapon_count int 角色最多能装备的武器 \

# monster

key values 说明 默认值 是否必须
hp int 怪物的生命值 500
atk float 怪物的攻击力 1.0
def float 怪物的防御力 0.0
crhr float 怪物的暴击率 1.0
crd int 怪物的暴击伤害 100
speed float 怪物的速度 \
loot List<loot> 怪物被击杀后的掉落物 \

# animal

key values 说明 默认值 是否必须
hp int 动物的生命值 500
atk float 动物的攻击力 1.0
def float 动物的防御力 0.0
crhr float 动物的暴击率 1.0
crd int 动物的暴击伤害 100
speed float 动物的速度 \
loot List<loot> 动物被击杀后的掉落物 \

# npc

key values 说明 默认值 是否必须
hp int NPC的生命值 500
atk float NPC的攻击力 1.0
def float NPC的防御力 0.0
crhr float NPC的暴击率 1.0
crd int NPC的暴击伤害 100
speed float NPC的速度 \
is_npc bool 是否为不动的NPC false
dialogue string 靠近该NPC触发的对话系统 \

# item

key values 说明 默认值 是否必须
identifier string 物品标识符 \
count int 数量 \

# loot

    {
        "item": "misty:short_sword",
        "count": 1
    }
key values 说明 默认值 是否必须
item string 物品标识符 \
count int 物品数量 1
上次更新: 3/21/2025, 8:07:42 PM