7 个版本
0.1.6 | 2023年11月11日 |
---|---|
0.1.5 | 2023年11月9日 |
0.1.4 | 2023年9月3日 |
0.1.2 | 2023年8月27日 |
0.1.0 | 2023年1月3日 |
#751 in 文本处理
每月55次下载
135KB
3.5K SLoC
卡塔尔乌 「カタル」用 Rust 编写的最小化对话系统。
卡塔尔乌 「カタル」是一个基于 YAML 的交互式对话系统,由 Rust 解析。
卡塔尔乌与 Twine 和 Yarn Spinner 类似,但提供了更多组织段落和在多个角色之间共享通用功能的支持。
---
# Define what namespace this file is in.
namespace: global
state:
coffee: 0
$passage.completed: 0
# Configure the scene. List your characters, commands, etc.
characters:
May:
June:
commands:
Wait:
duration: 0.3
$character.SetAnimatorTrigger:
clip: ""
onExit:
set:
$passage.completed +: 1
---
Start:
- May: Welcome to my story!
- June: Want a coffee?
- choices:
Yes: YesCoffee
No: NoCoffee
YesCoffee:
- May: Yeah, thanks!
- set:
$coffee +: 1
- May.SetAnimatorTrigger: ["drinkcoffee"]
- call: End
NoCoffee:
- May: No thanks.
- Wait: { duration: 1 }
- June: Want to end this story?
- call: End
End:
- May: The end!
特性
- 简单轻量
- 将对话、状态、角色和命令组织到本地命名空间中
- 特定角色的命令
- 语法高亮和 Unity 集成
以及您在对话语言中期望的所有条件、变量和其他内容。
入门
阅读 kataru-lang.github.io/#/installation。
下载后,检查 examples/simple 中的示例。
寻求帮助
对于错误或功能请求,提交一个问题。对于其他问题,请联系 [email protected]。
许可
卡塔尔乌遵循 MIT 许可。感谢您的认可,但不是必需的。
由 Josiah Putman 制作,并得到 Angela He 的帮助。
依赖
~7–19MB
~231K SLoC