桌面模组文档进阶联动
模组开发文档

进阶联动

组件动画

让角色的动作配合额外图层,展示特效或场景。

什么是组件?

组件是主角色之外的动画图层。例如角色施法时出现一个光圈,或同时展示一座小建筑。角色动作和组件动作仍都写在 act_conf.json 中。

这部分涉及多个动画的配合,建议先完成普通动作和动作组。

配置一个场景效果

先准备名为 cast 的角色动作和 aura 的组件动作。再将以下条目加入 pet_conf.json 的 accessory_act:

{
  "name": "光圈",
  "act_list": ["cast"],
  "acc_list": ["aura"],
  "act_prob": 0.1,
  "act_type": [2, 0],
  "follow_mouse": false,
  "above_main": false,
  "anchor": [-64, -128]
}

这是一个动作组条目,不是完整文件。anchor 仅为示意,要按自己的画布和图层尺寸调整。

参数与引用关系

字段 用途
act_list 主角色要播放的动作列表
acc_list 额外组件要播放的动作列表
act_prob / act_type 与普通随机动作相同的权重和状态条件
follow_mouse 组件是否跟随鼠标
above_main 组件显示在角色整体上方还是下方
anchor 组件左上角的定位偏移;跟随鼠标时参考鼠标,否则参考角色底边中心

组件图层顺序不会识别角色轮廓。一个组件不能凭 above_main 让一部分在角色前面、另一部分在后面。

从效果到持续穿戴

普通特效与可持续穿戴的组件用途不同。要把收藏品变成可收回、可恢复的外观,请继续可穿戴物品,不要只把一段普通特效无限重复。

What is an accessory animation?

An accessory is an animation layer outside the main character, such as a glowing ring during a spell or a small building beside it. Both character and accessory animations are defined in act_conf.json.

This involves coordinating animations. Learn basic animations and action groups first.

Configure a scene effect

Prepare a character animation named cast and an accessory animation named aura. Add this entry to accessory_act in pet_conf.json:

{
  "name": "Aura",
  "act_list": ["cast"],
  "acc_list": ["aura"],
  "act_prob": 0.1,
  "act_type": [2, 0],
  "follow_mouse": false,
  "above_main": false,
  "anchor": [-64, -128]
}

This is one group entry, not a complete file. The offset is illustrative; adjust it for your canvas and layer dimensions.

Fields and references

Field Purpose
act_list Main character animation list
acc_list Accessory animation list
act_prob / act_type Weight and state conditions, as with ordinary random actions
follow_mouse Whether the component follows the pointer
above_main Place it above or below the entire character
anchor Offset for the component’s top-left corner; relative to the pointer when following it, otherwise the character’s bottom center

Layer order does not detect body contours. above_main cannot put part of a component in front of the character and another part behind it.

From an effect to a persistent wearable

Ordinary effects and persistent wearables serve different purposes. To connect a collectible to a retractable, restorable appearance, continue to wearable items rather than simply looping an ordinary effect forever.

文档持续完善中。 查看原始开发文档 ↗

使用指南

待后续补充

使用指南将在后续补充,介绍呆啵桌宠的设置与日常使用。

常见问题

待后续补充

常见问题将在后续补充,汇总使用过程中常遇到的问题与解答。

QQ 群

一起分享使用体验,抢先测试新版

群号557261268

QQ 群二维码

使用 QQ 扫码,或搜索群号加入。