Behavior3editor
行为树编辑器
Install / Use
/learn @zhandouxiaojiji/Behavior3editorREADME
vscode插件
行为树编辑器
这是一个直观、可视化、通用的行为树编辑器,行为树的保存格式为 json,可以让策划自行去实现 AI,技能,buff 等复杂的游戏逻辑,从而减少不必要的沟通成本和提升开发效率。

示例项目
- 工作区: sample/workspace.b3-workspace
- 节点定义: sample/node-config.b3-setting
- 行为树目录: sample/workdir
- 批处理脚本: sample/scripts
节点定义
export interface NodeDef {
name: string;
type: "Action" | "Decorator" | "Condition" | "Composite";
desc: string;
icon?: string;
color?: string;
input?: string[];
output?: string[];
args?: {
name: string;
type:
| "boolean"
| "boolean?"
| "boolean[]"
| "boolean[]?"
| "int"
| "int?"
| "int[]"
| "int[]?"
| "float"
| "float?"
| "float[]"
| "float[]?"
| "string"
| "string?"
| "string[]"
| "string[]?"
| "json"
| "json?"
| "json[]"
| "json[]?"
| "expr"
| "expr?"
| "expr[]"
| "expr[]?";
desc: string;
default?: unknown;
/** Input `value`, only one is allowed between `value` and this arg.*/
oneof?: string;
options?: { name: string; value: unknown }[];
}[];
status?:
| "success"
| "failure"
| "running"
| "!success" !(child_success | child_success...)
| "!failure" !(child_failure | child_failure...)
| "|success" child_success | child_success...
| "|failure" child_failure | child_failure...
| "|running" child_running | child_running...
| "&success" child_success & child_success...
| "&failure"; child_failure & child_failure...
/** Allowed number of children
* + -1: unlimited
* + 0: no children
* + 1: exactly one
* + 3: exactly three child (ifelse)
*/
children?: -1 | 0 | 1 | 3;
doc?: string; //文档说明(markdown格式)
}
节点定义配置在项目创建的时候会自动生成一个配置,参照sample/node-config.b3-setting,这是个 json 的配置文件。编辑器不提供节点定义的编辑,强烈建议节点定义文件由代码生成 (参照示例项目behavior3lua)。
编译与构建
npm install # 安装依赖
npm start # 运行测试
npm run build # 编译可执行文件
技术栈
- react + ts
- electron
- antd
- g6
示例行为树框架
- lua 版本 behavior3lua
- js/ts 版本 behavior3-ts。
About
本项目将长期维护,欢迎各位大佬加群交流(Q 群:644761605)
Related Skills
bluebubbles
334.1kUse when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration). Calls go through the generic message tool with channel="bluebubbles".
slack
334.1kUse when you need to control Slack from OpenClaw via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
frontend-design
82.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Agent Development
82.1kThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
