迷你宠物
昼夜作息
把睡眠与夜间动作纳入迷你宠物的日常。
与角色使用相同配置
迷你宠物的昼夜作息配置与角色一致:在动作组中标记 phase: "night",再用 day_night 指定睡眠循环、夜间随机动作和过渡动作。
这是迷你宠物的日常行为配置,不属于进阶功能。配置写在迷你宠物自己的 pet_conf.json 中,动作定义和素材也来自这位迷你宠物。
按同一套步骤接入
完整步骤、字段表和示例统一放在昼夜作息配置,避免两份说明出现差异。
- 准备迷你宠物自己的睡眠动作,写入其
act_conf.json。 - 在迷你宠物的
random_act或accessory_act中添加夜间动作组。 - 在同一份
pet_conf.json中填写day_night,引用这些组的name。 - 在软件设置中开启昼夜作息,再测试睡眠、起床及配置过的夜间反应。
复制角色示例时,替换动作名和组名,确保它们指向迷你宠物自身的素材。
与其他联动分开理解
昼夜作息不需要先配置 main_interact。后者用于迷你宠物与主角色的专属联动,其具体格式后续另行补充,不影响先完成这套共用的作息配置。
The same configuration as characters
Mini-pets use the same day/night configuration as characters: mark action groups with phase: "night", then use day_night for sleep loops, random nighttime actions and transitions.
This is part of everyday mini-pet behavior, not an advanced feature. Configure it in the mini-pet’s own pet_conf.json, using that mini-pet’s animations and assets.
Follow the shared steps
The full workflow, field reference and examples are maintained in day/night configuration so the instructions stay consistent.
- Prepare the mini-pet’s sleep animation in its
act_conf.json. - Add nighttime groups to its
random_actoraccessory_act. - Add
day_nightto the samepet_conf.json, referencing those groups byname. - Enable day/night routines in the app and test sleep, waking up and any nighttime reactions you configured.
When copying a character example, replace animation and group names with ones that belong to the mini-pet’s own assets.
Separate this from other interactions
Day/night routines do not require setting up main_interact first. That field handles dedicated interactions with the main character; its format will be documented separately. It does not prevent you from completing the shared day/night setup.
文档持续完善中。 查看原始开发文档 ↗