VNLE 使用手册
JSON 字段参考
执行和内容
format 和 containerVersion 标识数据容器。execution 包含入口和节点,content 包含文本、译文和内容目录。各表通过 UUID 关联,不要通过显示名称查找。JSON 不支持注释,因此说明放在代码之外,以保证示例仍是有效的 JSON。
// Explanation only — not a JSON file
// execution.entries[entryId].nodeRef -> execution.nodes[nodeId]
// node.text.textRef -> content.texts[textId].sourceMessage
// content.translations[locale][textId].message -> translated segments
// dialogue.continuation.nodeRef -> next node
// end -> stop; never keep advancing
story.json
语言切换和缺失的翻译
将语言与当前节点分开保存。切换语言后,重新解析同一个 textRef:若 locale 对应的译文存在则使用译文,否则使用 sourceMessage。缺少语言表表示该语言没有译文。allowEmpty 支持有意留空的文本。按类型格式化占位符片段,不要直接把 JSON 转成字符串显示。原文指纹用于识别过时的译文,仅凭 workflowStatus 无法判断译文是否仍与原文一致。
以下列出当前故事导出 Schema 中可引用的全部定义,包含所有属性、变体和约束;展开 Schema 也能查看嵌套规则。additionalProperties 为 false 时,不允许额外字段。
JSON Schema · Draft 2020-12
Capability
Schema · Capability
{
"type": "string",
"pattern": "^[a-z][a-z0-9.-]*$",
"title": "Capability"
}
ContentAsset
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
mediaType | string · 必填 | 媒体内容的 MIME 类型。 |
relativePath | RelativePath · 必填 | 经过验证的相对资源路径;未经检查不可直接作为文件系统路径使用。 |
contentHash | Hash · 必填 | 所引用媒体文件内容的 SHA-256 哈希。 |
displayName | string · 必填 | 供人阅读的资源显示名称。 |
licenseNote | string | 资源的许可证备注,不表示已经自动完成法律核查。 |
width | integer | 结构与有效值请参阅类型和模式定义。
{"minimum":0,"maximum":2147483647} |
height | integer | 结构与有效值请参阅类型和模式定义。
{"minimum":0,"maximum":2147483647} |
byteSize | integer | 结构与有效值请参阅类型和模式定义。
{"minimum":0,"maximum":2147483647} |
originalName | string | 结构与有效值请参阅类型和模式定义。 |
Schema · ContentAsset
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"mediaType": {
"type": "string"
},
"relativePath": {
"$ref": "#/$defs/RelativePath"
},
"contentHash": {
"$ref": "#/$defs/Hash"
},
"displayName": {
"type": "string"
},
"licenseNote": {
"type": "string"
},
"width": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647
},
"height": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647
},
"byteSize": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647
},
"originalName": {
"type": "string"
}
},
"required": [
"id",
"mediaType",
"relativePath",
"contentHash",
"displayName"
],
"additionalProperties": false,
"title": "ContentAsset"
}
ContentCharacter
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
name | string · 必填 | 创作者设置的名称,不可用作引用键。 |
key | Key · 必填 | 稳定且可读的键;技术引用仍使用 ID。 |
nameTextRef | Id · 必填 | 本地化名称的文本 ID。 |
color | string · 必填 | 角色的显示颜色,不是逻辑值。
{"pattern":"^#[0-9a-fA-F]{6}$"} |
defaultPortraitRef | Id | 角色默认立绘资源;通用导出不包含此项。 |
emotions | object · 必填 | 表情 ID → 表情定义。
{"additionalProperties":{"$ref":"#/$defs/Emotion"}} |
emotions[key] | Emotion | 结构与有效值请参阅类型和模式定义。 |
Schema · ContentCharacter
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"name": {
"type": "string"
},
"key": {
"$ref": "#/$defs/Key"
},
"nameTextRef": {
"$ref": "#/$defs/Id"
},
"color": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$"
},
"defaultPortraitRef": {
"$ref": "#/$defs/Id"
},
"emotions": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/Emotion"
}
}
},
"required": [
"id",
"name",
"key",
"nameTextRef",
"color",
"emotions"
],
"additionalProperties": false,
"title": "ContentCharacter"
}
ContentCommandDefinition
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
name | string · 必填 | 创作者设置的名称,不可用作引用键。 |
key | Key · 必填 | 稳定且可读的键;技术引用仍使用 ID。 |
category | string · 必填 | 用于整理此定义的目录分类。 |
inputs | Array<ParameterDefinition> · 必填 | 带有名称和类型的签名输入参数。 |
outcomes | Array<OutcomeDefinition> · 必填 | 命令可能返回的结果名称,以及对应的数据约定和绑定。
{"minItems":1} |
description | string | 创作者编写的描述,不是可执行指令。 |
Schema · ContentCommandDefinition
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"name": {
"type": "string"
},
"key": {
"$ref": "#/$defs/Key"
},
"category": {
"type": "string"
},
"inputs": {
"type": "array",
"items": {
"$ref": "#/$defs/ParameterDefinition"
}
},
"outcomes": {
"type": "array",
"items": {
"$ref": "#/$defs/OutcomeDefinition"
},
"minItems": 1
},
"description": {
"type": "string"
}
},
"required": [
"id",
"name",
"key",
"category",
"inputs",
"outcomes"
],
"additionalProperties": false,
"title": "ContentCommandDefinition"
}
ContentItemDefinition
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
name | string · 必填 | 创作者设置的名称,不可用作引用键。 |
key | Key · 必填 | 稳定且可读的键;技术引用仍使用 ID。 |
nameTextRef | Id · 必填 | 本地化名称的文本 ID。 |
descriptionTextRef | Id | 本地化描述的文本 ID。 |
iconAssetRef | Id | 目录图标的资源 ID。 |
Schema · ContentItemDefinition
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"name": {
"type": "string"
},
"key": {
"$ref": "#/$defs/Key"
},
"nameTextRef": {
"$ref": "#/$defs/Id"
},
"descriptionTextRef": {
"$ref": "#/$defs/Id"
},
"iconAssetRef": {
"$ref": "#/$defs/Id"
}
},
"required": [
"id",
"name",
"key",
"nameTextRef"
],
"additionalProperties": false,
"title": "ContentItemDefinition"
}
ContentLocationDefinition
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
name | string · 必填 | 创作者设置的名称,不可用作引用键。 |
key | Key · 必填 | 稳定且可读的键;技术引用仍使用 ID。 |
nameTextRef | Id · 必填 | 本地化名称的文本 ID。 |
descriptionTextRef | Id | 本地化描述的文本 ID。 |
previewAssetRef | Id | 预览资源的资源 ID。 |
Schema · ContentLocationDefinition
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"name": {
"type": "string"
},
"key": {
"$ref": "#/$defs/Key"
},
"nameTextRef": {
"$ref": "#/$defs/Id"
},
"descriptionTextRef": {
"$ref": "#/$defs/Id"
},
"previewAssetRef": {
"$ref": "#/$defs/Id"
}
},
"required": [
"id",
"name",
"key",
"nameTextRef"
],
"additionalProperties": false,
"title": "ContentLocationDefinition"
}
ContentMinigameDefinition
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
name | string · 必填 | 创作者设置的名称,不可用作引用键。 |
key | Key · 必填 | 稳定且可读的键;技术引用仍使用 ID。 |
nameTextRef | Id | 本地化名称的文本 ID。 |
commandRef | Id · 必填 | 要执行的游戏命令 ID。 |
Schema · ContentMinigameDefinition
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"name": {
"type": "string"
},
"key": {
"$ref": "#/$defs/Key"
},
"nameTextRef": {
"$ref": "#/$defs/Id"
},
"commandRef": {
"$ref": "#/$defs/Id"
}
},
"required": [
"id",
"name",
"key",
"commandRef"
],
"additionalProperties": false,
"title": "ContentMinigameDefinition"
}
ContentQuestDefinition
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
name | string · 必填 | 创作者设置的名称,不可用作引用键。 |
key | Key · 必填 | 稳定且可读的键;技术引用仍使用 ID。 |
titleTextRef | Id · 必填 | 本地化标题的文本 ID。 |
descriptionTextRef | Id | 本地化描述的文本 ID。 |
objectiveDefinitions | Array<QuestObjective> · 必填 | 任务目标 ID → 目标定义。 |
Schema · ContentQuestDefinition
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"name": {
"type": "string"
},
"key": {
"$ref": "#/$defs/Key"
},
"titleTextRef": {
"$ref": "#/$defs/Id"
},
"descriptionTextRef": {
"$ref": "#/$defs/Id"
},
"objectiveDefinitions": {
"type": "array",
"items": {
"$ref": "#/$defs/QuestObjective"
}
}
},
"required": [
"id",
"name",
"key",
"titleTextRef",
"objectiveDefinitions"
],
"additionalProperties": false,
"title": "ContentQuestDefinition"
}
ContentTextEntry
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
key | Key | 稳定且可读的键;技术引用仍使用 ID。 |
category | string · 必填 | 用于整理此定义的目录分类。 |
sourceMessage | 消息 · 必填 | 由文本片段和占位符片段组成的原文消息。 |
placeholders | object · 必填 | 占位符键 → 类型及格式定义。
{"additionalProperties":{"$ref":"#/$defs/PlaceholderDefinition"}} |
placeholders[key] | PlaceholderDefinition | 结构与有效值请参阅类型和模式定义。 |
externalUse | boolean · 必填 | 标记在节点图之外使用的文本。 |
Schema · ContentTextEntry
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"key": {
"$ref": "#/$defs/Key"
},
"category": {
"type": "string"
},
"sourceMessage": {
"$ref": "#/$defs/Message"
},
"placeholders": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/PlaceholderDefinition"
}
},
"externalUse": {
"type": "boolean"
}
},
"required": [
"id",
"category",
"sourceMessage",
"placeholders",
"externalUse"
],
"additionalProperties": false,
"title": "ContentTextEntry"
}
ContentVariableDefinition
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
name | string · 必填 | 创作者设置的名称,不可用作引用键。 |
key | Key · 必填 | 稳定且可读的键;技术引用仍使用 ID。 |
valueType | ScalarType · 必填 | 期望值的数据约定,包含允许的实体类型。 |
defaultValue | ScalarValue · 必填 | 带类型的初始值或默认值。 |
description | string | 创作者编写的描述,不是可执行指令。 |
Schema · ContentVariableDefinition
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"name": {
"type": "string"
},
"key": {
"$ref": "#/$defs/Key"
},
"valueType": {
"$ref": "#/$defs/ScalarType"
},
"defaultValue": {
"$ref": "#/$defs/ScalarValue"
},
"description": {
"type": "string"
}
},
"required": [
"id",
"name",
"key",
"valueType",
"defaultValue"
],
"additionalProperties": false,
"title": "ContentVariableDefinition"
}
Emotion
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
name | string · 必填 | 创作者设置的名称,不可用作引用键。 |
portraitRef | Id | 某个表情的立绘资源;通用导出不包含此项。 |
Schema · Emotion
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"name": {
"type": "string"
},
"portraitRef": {
"$ref": "#/$defs/Id"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false,
"title": "Emotion"
}
EntityType
Schema · EntityType
{
"type": "string",
"enum": [
"item",
"quest",
"location",
"minigame",
"asset"
],
"title": "EntityType"
}
EntryRef
| 字段 | 类型/必填 | 含义/规则 |
|---|
flowRef | Id · 必填 | 场景或子故事的 ID。 |
entryRef | Id · 必填 | 指定流程中的入口 ID。 |
Schema · EntryRef
{
"type": "object",
"properties": {
"flowRef": {
"$ref": "#/$defs/Id"
},
"entryRef": {
"$ref": "#/$defs/Id"
}
},
"required": [
"flowRef",
"entryRef"
],
"additionalProperties": false,
"title": "EntryRef"
}
ExecutableChoiceOption
Schema · ExecutableChoiceOption
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"text": {
"$ref": "#/$defs/ExecutableTextUse"
},
"condition": {
"$ref": "#/$defs/ExecutableCondition"
},
"effects": {
"type": "array",
"items": {
"$ref": "#/$defs/ExecutableEffect"
}
},
"continuation": {
"$ref": "#/$defs/ExecutableContinuation"
}
},
"required": [
"id",
"text",
"effects",
"continuation"
],
"additionalProperties": false,
"title": "ExecutableChoiceOption"
}
ExecutableCondition
| 字段 | 类型/必填 | 含义/规则 |
|---|
[oneOf 1].kind | "compare" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 1].left | ExecutableOperand · 必填 | 比较左侧带类型的操作数。 |
[oneOf 1].operator | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" · 必填 | 比较或逻辑运算符;允许值见各变体。 |
[oneOf 1].right | ExecutableOperand · 必填 | 比较右侧带类型的操作数。 |
[oneOf 2].kind | "all" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 2].children | Array<ExecutableCondition> · 必填 | 复合表达式中的子条件。 |
[oneOf 3].kind | "any" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 3].children | Array<ExecutableCondition> · 必填 | 复合表达式中的子条件。 |
[oneOf 4].kind | "not" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 4].child | ExecutableCondition · 必填 | 一元运算符的子条件。 |
Schema · ExecutableCondition
{
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"const": "compare"
},
"left": {
"$ref": "#/$defs/ExecutableOperand"
},
"operator": {
"type": "string",
"enum": [
"eq",
"ne",
"lt",
"lte",
"gt",
"gte"
]
},
"right": {
"$ref": "#/$defs/ExecutableOperand"
}
},
"required": [
"kind",
"left",
"operator",
"right"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "all"
},
"children": {
"type": "array",
"items": {
"$ref": "#/$defs/ExecutableCondition"
}
}
},
"required": [
"kind",
"children"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "any"
},
"children": {
"type": "array",
"items": {
"$ref": "#/$defs/ExecutableCondition"
}
}
},
"required": [
"kind",
"children"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "not"
},
"child": {
"$ref": "#/$defs/ExecutableCondition"
}
},
"required": [
"kind",
"child"
],
"additionalProperties": false
}
],
"title": "ExecutableCondition"
}
ExecutableContinuation
| 字段 | 类型/必填 | 含义/规则 |
|---|
[oneOf 1].kind | "node" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 1].nodeRef | Id · 必填 | 下一个可执行节点的 ID。 |
[oneOf 2].kind | "end" · 必填 | 用于选择有效变体的判别字段。 |
Schema · ExecutableContinuation
{
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"const": "node"
},
"nodeRef": {
"$ref": "#/$defs/Id"
}
},
"required": [
"kind",
"nodeRef"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "end"
}
},
"required": [
"kind"
],
"additionalProperties": false
}
],
"title": "ExecutableContinuation"
}
ExecutableEffect
| 字段 | 类型/必填 | 含义/规则 |
|---|
[oneOf 1].kind | "set" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 1].variableRef | Id · 必填 | 要读取或写入的变量 ID。 |
[oneOf 1].value | ExecutableOperand · 必填 | 固定值,必须与声明的类型匹配。 |
[oneOf 2].kind | "add" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 2].variableRef | Id · 必填 | 要读取或写入的变量 ID。 |
[oneOf 2].value | ExecutableOperand · 必填 | 固定值,必须与声明的类型匹配。 |
[oneOf 3].kind | "subtract" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 3].variableRef | Id · 必填 | 要读取或写入的变量 ID。 |
[oneOf 3].value | ExecutableOperand · 必填 | 固定值,必须与声明的类型匹配。 |
Schema · ExecutableEffect
{
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"const": "set"
},
"variableRef": {
"$ref": "#/$defs/Id"
},
"value": {
"$ref": "#/$defs/ExecutableOperand"
}
},
"required": [
"kind",
"variableRef",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "add"
},
"variableRef": {
"$ref": "#/$defs/Id"
},
"value": {
"$ref": "#/$defs/ExecutableOperand"
}
},
"required": [
"kind",
"variableRef",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "subtract"
},
"variableRef": {
"$ref": "#/$defs/Id"
},
"value": {
"$ref": "#/$defs/ExecutableOperand"
}
},
"required": [
"kind",
"variableRef",
"value"
],
"additionalProperties": false
}
],
"title": "ExecutableEffect"
}
ExecutableEmptyChoice
| 字段 | 类型/必填 | 含义/规则 |
|---|
[oneOf 1].kind | "continue" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 1].continuation | ExecutableContinuation · 必填 | 节点完成后的后续流程。 |
[oneOf 2].kind | "fault" · 必填 | 用于选择有效变体的判别字段。 |
Schema · ExecutableEmptyChoice
{
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"const": "continue"
},
"continuation": {
"$ref": "#/$defs/ExecutableContinuation"
}
},
"required": [
"kind",
"continuation"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "fault"
}
},
"required": [
"kind"
],
"additionalProperties": false
}
],
"title": "ExecutableEmptyChoice"
}
ExecutableNode
| 字段 | 类型/必填 | 含义/规则 |
|---|
[oneOf 1].id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
[oneOf 1].flowRef | Id · 必填 | 场景或子故事的 ID。 |
[oneOf 1].kind | "dialogue" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 1].text | ExecutableTextUse · 必填 | 对于文本片段:固定文本内容。对于文本引用:textRef 和 bindings。 |
[oneOf 1].speakerRef | Id | 说话角色的 ID;省略表示未指定说话角色。 |
[oneOf 1].emotionRef | Id | 为此句对话选择的角色表情。 |
[oneOf 1].continuation | ExecutableContinuation · 必填 | 节点完成后的后续流程。 |
[oneOf 2].id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
[oneOf 2].flowRef | Id · 必填 | 场景或子故事的 ID。 |
[oneOf 2].kind | "choice" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 2].optionOrder | Array<Id> · 必填 | 按显示顺序排列的选项 ID。 |
[oneOf 2].options | object · 必填 | 选项 ID → 包含文本、条件和后续流程的选项。
{"additionalProperties":{"$ref":"#/$defs/ExecutableChoiceOption"}} |
[oneOf 2].options[key] | ExecutableChoiceOption | 结构与有效值请参阅类型和模式定义。 |
[oneOf 2].whenEmpty | ExecutableEmptyChoice · 必填 | 没有可用选项时的行为。 |
[oneOf 3].id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
[oneOf 3].flowRef | Id · 必填 | 场景或子故事的 ID。 |
[oneOf 3].kind | "branch" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 3].condition | ExecutableCondition · 必填 | 在分支选择或启用选项之前判断的条件。 |
[oneOf 3].whenTrue | ExecutableContinuation · 必填 | 条件为真时的后续流程。 |
[oneOf 3].whenFalse | ExecutableContinuation · 必填 | 条件为假时的后续流程。 |
[oneOf 4].id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
[oneOf 4].flowRef | Id · 必填 | 场景或子故事的 ID。 |
[oneOf 4].kind | "action" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 4].effects | Array<ExecutableEffect> · 必填 | 由动作节点按顺序应用的状态变更。 |
[oneOf 4].continuation | ExecutableContinuation · 必填 | 节点完成后的后续流程。 |
[oneOf 5].id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
[oneOf 5].flowRef | Id · 必填 | 场景或子故事的 ID。 |
[oneOf 5].kind | "command" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 5].commandRef | Id · 必填 | 要执行的游戏命令 ID。 |
[oneOf 5].arguments | object · 必填 | 传给调用的具名参数值。
{"additionalProperties":{"$ref":"#/$defs/ExecutableOperand"}} |
[oneOf 5].arguments[key] | ExecutableOperand | 结构与有效值请参阅类型和模式定义。 |
[oneOf 5].outcomes | object · 必填 | 命令可能返回的结果名称,以及对应的数据约定和绑定。
{"additionalProperties":{"$ref":"#/$defs/ExecutableOutcomeBinding"}} |
[oneOf 5].outcomes[key] | ExecutableOutcomeBinding | 结构与有效值请参阅类型和模式定义。 |
[oneOf 6].id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
[oneOf 6].flowRef | Id · 必填 | 场景或子故事的 ID。 |
[oneOf 6].kind | "jump" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 6].target | EntryRef · 必填 | 带类型的目标引用,例如变量或入口;具体结构见对应变体。 |
[oneOf 7].id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
[oneOf 7].flowRef | Id · 必填 | 场景或子故事的 ID。 |
[oneOf 7].kind | "end" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 8].id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
[oneOf 8].flowRef | Id · 必填 | 场景或子故事的 ID。 |
[oneOf 8].kind | "call" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 8].target | EntryRef · 必填 | 带类型的目标引用,例如变量或入口;具体结构见对应变体。 |
[oneOf 8].continuation | ExecutableContinuation · 必填 | 节点完成后的后续流程。 |
[oneOf 9].id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
[oneOf 9].flowRef | Id · 必填 | 场景或子故事的 ID。 |
[oneOf 9].kind | "return" · 必填 | 用于选择有效变体的判别字段。 |
Schema · ExecutableNode
{
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"flowRef": {
"$ref": "#/$defs/Id"
},
"kind": {
"const": "dialogue"
},
"text": {
"$ref": "#/$defs/ExecutableTextUse"
},
"speakerRef": {
"$ref": "#/$defs/Id"
},
"emotionRef": {
"$ref": "#/$defs/Id"
},
"continuation": {
"$ref": "#/$defs/ExecutableContinuation"
}
},
"required": [
"id",
"flowRef",
"kind",
"text",
"continuation"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"flowRef": {
"$ref": "#/$defs/Id"
},
"kind": {
"const": "choice"
},
"optionOrder": {
"type": "array",
"items": {
"$ref": "#/$defs/Id"
},
"uniqueItems": true
},
"options": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ExecutableChoiceOption"
}
},
"whenEmpty": {
"$ref": "#/$defs/ExecutableEmptyChoice"
}
},
"required": [
"id",
"flowRef",
"kind",
"optionOrder",
"options",
"whenEmpty"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"flowRef": {
"$ref": "#/$defs/Id"
},
"kind": {
"const": "branch"
},
"condition": {
"$ref": "#/$defs/ExecutableCondition"
},
"whenTrue": {
"$ref": "#/$defs/ExecutableContinuation"
},
"whenFalse": {
"$ref": "#/$defs/ExecutableContinuation"
}
},
"required": [
"id",
"flowRef",
"kind",
"condition",
"whenTrue",
"whenFalse"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"flowRef": {
"$ref": "#/$defs/Id"
},
"kind": {
"const": "action"
},
"effects": {
"type": "array",
"items": {
"$ref": "#/$defs/ExecutableEffect"
}
},
"continuation": {
"$ref": "#/$defs/ExecutableContinuation"
}
},
"required": [
"id",
"flowRef",
"kind",
"effects",
"continuation"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"flowRef": {
"$ref": "#/$defs/Id"
},
"kind": {
"const": "command"
},
"commandRef": {
"$ref": "#/$defs/Id"
},
"arguments": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ExecutableOperand"
}
},
"outcomes": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ExecutableOutcomeBinding"
}
}
},
"required": [
"id",
"flowRef",
"kind",
"commandRef",
"arguments",
"outcomes"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"flowRef": {
"$ref": "#/$defs/Id"
},
"kind": {
"const": "jump"
},
"target": {
"$ref": "#/$defs/EntryRef"
}
},
"required": [
"id",
"flowRef",
"kind",
"target"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"flowRef": {
"$ref": "#/$defs/Id"
},
"kind": {
"const": "end"
}
},
"required": [
"id",
"flowRef",
"kind"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"flowRef": {
"$ref": "#/$defs/Id"
},
"kind": {
"const": "call"
},
"target": {
"$ref": "#/$defs/EntryRef"
},
"continuation": {
"$ref": "#/$defs/ExecutableContinuation"
}
},
"required": [
"id",
"flowRef",
"kind",
"target",
"continuation"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"flowRef": {
"$ref": "#/$defs/Id"
},
"kind": {
"const": "return"
}
},
"required": [
"id",
"flowRef",
"kind"
],
"additionalProperties": false
}
],
"title": "ExecutableNode"
}
ExecutableOperand
| 字段 | 类型/必填 | 含义/规则 |
|---|
[oneOf 1].kind | "literal" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 1].value | TypedValue · 必填 | 固定值,必须与声明的类型匹配。 |
[oneOf 2].kind | "variable" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 2].variableRef | Id · 必填 | 要读取或写入的变量 ID。 |
Schema · ExecutableOperand
{
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"const": "literal"
},
"value": {
"$ref": "#/$defs/TypedValue"
}
},
"required": [
"kind",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "variable"
},
"variableRef": {
"$ref": "#/$defs/Id"
}
},
"required": [
"kind",
"variableRef"
],
"additionalProperties": false
}
],
"title": "ExecutableOperand"
}
ExecutableOutcomeBinding
| 字段 | 类型/必填 | 含义/规则 |
|---|
resultBindings | object · 必填 | 命令结果名称 → 用于接收返回值的目标变量。
{"additionalProperties":{"$ref":"#/$defs/Id"}} |
resultBindings[key] | Id | 结构与有效值请参阅类型和模式定义。 |
continuation | ExecutableContinuation · 必填 | 节点完成后的后续流程。 |
Schema · ExecutableOutcomeBinding
{
"type": "object",
"properties": {
"resultBindings": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/Id"
}
},
"continuation": {
"$ref": "#/$defs/ExecutableContinuation"
}
},
"required": [
"resultBindings",
"continuation"
],
"additionalProperties": false,
"title": "ExecutableOutcomeBinding"
}
ExecutableStory
| 字段 | 类型/必填 | 含义/规则 |
|---|
format | "vnle.story" · 必填 | 此数据容器的确切格式标识符。 |
containerVersion | 1 · 必填 | 故事容器的整数版本号,目前为 1。 |
storyBuildId | Hash · 必填 | 规范化执行数据的 SHA-256 哈希;仅修改内容不会改变此值。 |
execution | ExecutionContract · 必填 | 带类型的执行数据约定。 |
content | object · 必填 | 与执行数据分开的语言和目录数据。
{"additionalProperties":false} |
content.sourceLocale | Locale · 必填 | 文本的源语言,也是缺失译文时的回退语言。 |
content.locales | Array<Locale> · 必填 | 声明的导出语言,包含源语言。
{"minItems":1} |
content.fallbackPolicy | FallbackPolicy · 必填 | 目前为 source:缺少译文时使用原文。 |
content.texts | object · 必填 | 文本 ID → 原文消息、占位符和元数据。
{"additionalProperties":{"$ref":"#/$defs/ContentTextEntry"}} |
content.texts[key] | ContentTextEntry | 结构与有效值请参阅类型和模式定义。 |
content.translations | object · 必填 | 语言代码 → 文本 ID → 译文;缺少条目时回退到原文。
{"additionalProperties":{"type":"object","propertyNames":{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"additionalProperties":{"$ref":"#/$defs/Translation"},"minProperties":1}} |
content.translations[key] | object | 结构与有效值请参阅类型和模式定义。 |
content.characters | object · 必填 | 角色 ID → 含本地化姓名和表情的角色。
{"additionalProperties":{"$ref":"#/$defs/ContentCharacter"}} |
content.characters[key] | ContentCharacter | 结构与有效值请参阅类型和模式定义。 |
content.quests | object · 必填 | 任务 ID → 含目标的任务定义。
{"additionalProperties":{"$ref":"#/$defs/ContentQuestDefinition"}} |
content.quests[key] | ContentQuestDefinition | 结构与有效值请参阅类型和模式定义。 |
content.items | object · 必填 | 物品 ID → 物品定义。
{"additionalProperties":{"$ref":"#/$defs/ContentItemDefinition"}} |
content.items[key] | ContentItemDefinition | 结构与有效值请参阅类型和模式定义。 |
content.locations | object · 必填 | 地点 ID → 地点定义。
{"additionalProperties":{"$ref":"#/$defs/ContentLocationDefinition"}} |
content.locations[key] | ContentLocationDefinition | 结构与有效值请参阅类型和模式定义。 |
content.minigames | object · 必填 | 小游戏 ID → 定义;具体玩法由游戏端实现。
{"additionalProperties":{"$ref":"#/$defs/ContentMinigameDefinition"}} |
content.minigames[key] | ContentMinigameDefinition | 结构与有效值请参阅类型和模式定义。 |
content.assets | object · 必填 | 资源 ID → 媒体定义;通用导出目前不提供已解析的引擎资源。
{"additionalProperties":{"$ref":"#/$defs/ContentAsset"}} |
content.assets[key] | ContentAsset | 结构与有效值请参阅类型和模式定义。 |
content.variableDefinitions | object · 必填 | 作者创建的变量定义,包含名称和文本引用。
{"additionalProperties":{"$ref":"#/$defs/ContentVariableDefinition"}} |
content.variableDefinitions[key] | ContentVariableDefinition | 结构与有效值请参阅类型和模式定义。 |
content.commandDefinitions | object · 必填 | 作者创建的命令定义,包含文本引用。
{"additionalProperties":{"$ref":"#/$defs/ContentCommandDefinition"}} |
content.commandDefinitions[key] | ContentCommandDefinition | 结构与有效值请参阅类型和模式定义。 |
Schema · ExecutableStory
{
"type": "object",
"properties": {
"format": {
"const": "vnle.story"
},
"containerVersion": {
"const": 1
},
"storyBuildId": {
"$ref": "#/$defs/Hash"
},
"execution": {
"$ref": "#/$defs/ExecutionContract"
},
"content": {
"type": "object",
"properties": {
"sourceLocale": {
"$ref": "#/$defs/Locale"
},
"locales": {
"type": "array",
"items": {
"$ref": "#/$defs/Locale"
},
"minItems": 1,
"uniqueItems": true
},
"fallbackPolicy": {
"$ref": "#/$defs/FallbackPolicy"
},
"texts": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ContentTextEntry"
}
},
"translations": {
"type": "object",
"propertyNames": {
"pattern": "^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$"
},
"additionalProperties": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/Translation"
},
"minProperties": 1
}
},
"characters": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ContentCharacter"
}
},
"quests": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ContentQuestDefinition"
}
},
"items": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ContentItemDefinition"
}
},
"locations": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ContentLocationDefinition"
}
},
"minigames": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ContentMinigameDefinition"
}
},
"assets": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ContentAsset"
}
},
"variableDefinitions": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ContentVariableDefinition"
}
},
"commandDefinitions": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ContentCommandDefinition"
}
}
},
"required": [
"sourceLocale",
"locales",
"fallbackPolicy",
"texts",
"translations",
"characters",
"quests",
"items",
"locations",
"minigames",
"assets",
"variableDefinitions",
"commandDefinitions"
],
"additionalProperties": false
}
},
"required": [
"format",
"containerVersion",
"storyBuildId",
"execution",
"content"
],
"additionalProperties": false,
"title": "ExecutableStory"
}
ExecutableTextUse
| 字段 | 类型/必填 | 含义/规则 |
|---|
textRef | Id · 必填 | 对 content.texts 及其文本数据约定的引用。 |
bindings | object · 必填 | 占位符或参数名称 → 带类型的操作数。
{"additionalProperties":{"$ref":"#/$defs/ExecutableOperand"}} |
bindings[key] | ExecutableOperand | 结构与有效值请参阅类型和模式定义。 |
Schema · ExecutableTextUse
{
"type": "object",
"properties": {
"textRef": {
"$ref": "#/$defs/Id"
},
"bindings": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ExecutableOperand"
}
}
},
"required": [
"textRef",
"bindings"
],
"additionalProperties": false,
"title": "ExecutableTextUse"
}
ExecutionContract
| 字段 | 类型/必填 | 含义/规则 |
|---|
format | "vnle.execution" · 必填 | 此数据容器的确切格式标识符。 |
contractVersion | RuntimeVersion · 必填 | 执行兼容性版本:主版本号和次版本号。 |
projectId | Id · 必填 | 源项目的稳定 ID。 |
requiredCapabilities | Array<Capability> · 必填 | 完整运行时适配器在启动前必须检查的能力。 |
limits | object · 必填 | 自动执行与递归的限制。
{"additionalProperties":false} |
limits.maxAutomaticTransitions | 1000 · 必填 | 没有用户输入时允许的最大自动跳转次数。 |
limits.maxConditionDepth | 32 · 必填 | 条件的最大嵌套深度。 |
limits.maxConditionTerms | 1024 · 必填 | 条件项的最大数量。 |
limits.maxCallDepth | 32 · 必填 | 子故事嵌套调用的最大深度。 |
entries | object · 必填 | 入口 ID → 流程和节点引用。
{"additionalProperties":{"$ref":"#/$defs/RuntimeEntry"}} |
entries[key] | RuntimeEntry | 结构与有效值请参阅类型和模式定义。 |
nodes | object · 必填 | 节点 ID → 可执行节点;kind 决定其字段。
{"additionalProperties":{"$ref":"#/$defs/ExecutableNode"}} |
nodes[key] | ExecutableNode | 结构与有效值请参阅类型和模式定义。 |
variables | object · 必填 | 变量 ID → 带类型的运行时变量定义。
{"additionalProperties":{"$ref":"#/$defs/RuntimeVariable"}} |
variables[key] | RuntimeVariable | 结构与有效值请参阅类型和模式定义。 |
commands | object · 必填 | 命令 ID → 带类型的运行时签名。
{"additionalProperties":{"$ref":"#/$defs/RuntimeSignature"}} |
commands[key] | RuntimeSignature | 结构与有效值请参阅类型和模式定义。 |
textContracts | object · 必填 | 文本 ID → 执行所需的占位符数据约定。
{"additionalProperties":{"$ref":"#/$defs/PlaceholderContract"}} |
textContracts[key] | PlaceholderContract | 结构与有效值请参阅类型和模式定义。 |
Schema · ExecutionContract
{
"type": "object",
"properties": {
"format": {
"const": "vnle.execution"
},
"contractVersion": {
"$ref": "#/$defs/RuntimeVersion"
},
"projectId": {
"$ref": "#/$defs/Id"
},
"requiredCapabilities": {
"type": "array",
"items": {
"$ref": "#/$defs/Capability"
},
"uniqueItems": true
},
"limits": {
"type": "object",
"properties": {
"maxAutomaticTransitions": {
"const": 1000
},
"maxConditionDepth": {
"const": 32
},
"maxConditionTerms": {
"const": 1024
},
"maxCallDepth": {
"const": 32
}
},
"required": [
"maxAutomaticTransitions",
"maxConditionDepth",
"maxConditionTerms",
"maxCallDepth"
],
"additionalProperties": false
},
"entries": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/RuntimeEntry"
}
},
"nodes": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ExecutableNode"
}
},
"variables": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/RuntimeVariable"
}
},
"commands": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/RuntimeSignature"
}
},
"textContracts": {
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/PlaceholderContract"
}
}
},
"required": [
"format",
"contractVersion",
"projectId",
"requiredCapabilities",
"limits",
"entries",
"nodes",
"variables",
"commands",
"textContracts"
],
"additionalProperties": false,
"title": "ExecutionContract"
}
FallbackPolicy
Schema · FallbackPolicy
{
"type": "string",
"enum": [
"block",
"source"
],
"title": "FallbackPolicy"
}
Hash
Schema · Hash
{
"type": "string",
"pattern": "^sha256:[0-9a-f]{64}$",
"title": "Hash"
}
Id
Schema · Id
{
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
"title": "Id"
}
Key
Schema · Key
{
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9_.-]{0,127}$",
"title": "Key"
}
Locale
Schema · Locale
{
"type": "string",
"pattern": "^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$",
"title": "Locale"
}
消息
| 字段 | 类型/必填 | 含义/规则 |
|---|
kind | "segments" · 必填 | 用于选择有效变体的判别字段。 |
segments | Array<object | object> · 必填 | 按顺序排列的文本和占位符消息片段。 |
Schema · Message
{
"type": "object",
"properties": {
"kind": {
"const": "segments"
},
"segments": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"const": "text"
},
"text": {
"type": "string"
}
},
"required": [
"kind",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "placeholder"
},
"placeholderRef": {
"$ref": "#/$defs/Id"
}
},
"required": [
"kind",
"placeholderRef"
],
"additionalProperties": false
}
]
}
}
},
"required": [
"kind",
"segments"
],
"additionalProperties": false,
"title": "Message"
}
OutcomeDefinition
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
name | string · 必填 | 创作者设置的名称,不可用作引用键。 |
results | Array<ResultDefinition> · 必填 | 某个结果中带名称和类型的返回值。 |
Schema · OutcomeDefinition
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"name": {
"type": "string"
},
"results": {
"type": "array",
"items": {
"$ref": "#/$defs/ResultDefinition"
}
}
},
"required": [
"id",
"name",
"results"
],
"additionalProperties": false,
"title": "OutcomeDefinition"
}
ParameterDefinition
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
name | string · 必填 | 创作者设置的名称,不可用作引用键。 |
valueType | ValueType · 必填 | 期望值的数据约定,包含允许的实体类型。 |
defaultValue | TypedValue | 带类型的初始值或默认值。 |
Schema · ParameterDefinition
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"name": {
"type": "string"
},
"valueType": {
"$ref": "#/$defs/ValueType"
},
"defaultValue": {
"$ref": "#/$defs/TypedValue"
}
},
"required": [
"id",
"name",
"valueType"
],
"additionalProperties": false,
"title": "ParameterDefinition"
}
PlaceholderContract
Schema · PlaceholderContract
{
"type": "object",
"propertyNames": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"additionalProperties": {
"$ref": "#/$defs/ScalarType"
},
"title": "PlaceholderContract"
}
PlaceholderDefinition
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
displayName | string · 必填 | 供人阅读的资源显示名称。 |
valueType | ScalarType · 必填 | 期望值的数据约定,包含允许的实体类型。 |
Schema · PlaceholderDefinition
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"displayName": {
"type": "string"
},
"valueType": {
"$ref": "#/$defs/ScalarType"
}
},
"required": [
"id",
"displayName",
"valueType"
],
"additionalProperties": false,
"title": "PlaceholderDefinition"
}
QuestObjective
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
labelTextRef | Id · 必填 | 本地化标签的文本 ID。 |
descriptionTextRef | Id | 本地化描述的文本 ID。 |
Schema · QuestObjective
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"labelTextRef": {
"$ref": "#/$defs/Id"
},
"descriptionTextRef": {
"$ref": "#/$defs/Id"
}
},
"required": [
"id",
"labelTextRef"
],
"additionalProperties": false,
"title": "QuestObjective"
}
RelativePath
Schema · RelativePath
{
"type": "string",
"minLength": 1,
"maxLength": 1024,
"title": "RelativePath"
}
ResultDefinition
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
name | string · 必填 | 创作者设置的名称,不可用作引用键。 |
valueType | ValueType · 必填 | 期望值的数据约定,包含允许的实体类型。 |
Schema · ResultDefinition
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"name": {
"type": "string"
},
"valueType": {
"$ref": "#/$defs/ValueType"
}
},
"required": [
"id",
"name",
"valueType"
],
"additionalProperties": false,
"title": "ResultDefinition"
}
RuntimeEntry
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
flowRef | Id · 必填 | 场景或子故事的 ID。 |
nodeRef | Id · 必填 | 下一个可执行节点的 ID。 |
Schema · RuntimeEntry
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"flowRef": {
"$ref": "#/$defs/Id"
},
"nodeRef": {
"$ref": "#/$defs/Id"
}
},
"required": [
"id",
"flowRef",
"nodeRef"
],
"additionalProperties": false,
"title": "RuntimeEntry"
}
RuntimeSignature
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
inputs | Array<object> · 必填 | 带有名称和类型的签名输入参数。 |
outcomes | Array<object> · 必填 | 命令可能返回的结果名称,以及对应的数据约定和绑定。
{"minItems":1} |
Schema · RuntimeSignature
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"inputs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"valueType": {
"$ref": "#/$defs/ValueType"
},
"defaultValue": {
"$ref": "#/$defs/TypedValue"
}
},
"required": [
"id",
"valueType"
],
"additionalProperties": false
}
},
"outcomes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"valueType": {
"$ref": "#/$defs/ValueType"
}
},
"required": [
"id",
"valueType"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"results"
],
"additionalProperties": false
},
"minItems": 1
}
},
"required": [
"id",
"inputs",
"outcomes"
],
"additionalProperties": false,
"title": "RuntimeSignature"
}
RuntimeVariable
| 字段 | 类型/必填 | 含义/规则 |
|---|
id | Id · 必填 | 稳定 ID;显示名称不能用作键。 |
valueType | ScalarType · 必填 | 期望值的数据约定,包含允许的实体类型。 |
defaultValue | ScalarValue · 必填 | 带类型的初始值或默认值。 |
Schema · RuntimeVariable
{
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/Id"
},
"valueType": {
"$ref": "#/$defs/ScalarType"
},
"defaultValue": {
"$ref": "#/$defs/ScalarValue"
}
},
"required": [
"id",
"valueType",
"defaultValue"
],
"additionalProperties": false,
"title": "RuntimeVariable"
}
RuntimeVersion
| 字段 | 类型/必填 | 含义/规则 |
|---|
major | 1 · 必填 | 不兼容的主版本号;必须拒绝不受支持的版本。 |
minor | 1 · 必填 | 同一主版本内的扩展版本号。 |
Schema · RuntimeVersion
{
"type": "object",
"properties": {
"major": {
"const": 1
},
"minor": {
"const": 1
}
},
"required": [
"major",
"minor"
],
"additionalProperties": false,
"title": "RuntimeVersion"
}
ScalarType
Schema · ScalarType
{
"type": "string",
"enum": [
"boolean",
"integer",
"string"
],
"title": "ScalarType"
}
ScalarValue
| 字段 | 类型/必填 | 含义/规则 |
|---|
[oneOf 1].type | "boolean" · 必填 | 类型判别字段;允许值由所在的 Schema 定义决定。 |
[oneOf 1].value | boolean · 必填 | 固定值,必须与声明的类型匹配。 |
[oneOf 2].type | "integer" · 必填 | 类型判别字段;允许值由所在的 Schema 定义决定。 |
[oneOf 2].value | integer · 必填 | 固定值,必须与声明的类型匹配。
{"minimum":-2147483648,"maximum":2147483647} |
[oneOf 3].type | "string" · 必填 | 类型判别字段;允许值由所在的 Schema 定义决定。 |
[oneOf 3].value | string · 必填 | 固定值,必须与声明的类型匹配。 |
Schema · ScalarValue
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"const": "boolean"
},
"value": {
"type": "boolean"
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "integer"
},
"value": {
"type": "integer",
"minimum": -2147483648,
"maximum": 2147483647
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "string"
},
"value": {
"type": "string"
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
}
],
"title": "ScalarValue"
}
Translation
| 字段 | 类型/必填 | 含义/规则 |
|---|
textRef | Id · 必填 | 对 content.texts 及其文本数据约定的引用。 |
locale | Locale · 必填 | 此译文条目的语言代码。 |
message | 消息 · 必填 | 遵循占位符数据约定的译文消息。 |
allowEmpty | boolean · 必填 | 允许译文有意留空。 |
workflowStatus | "draft" | "translated" | "reviewed" · 必填 | 翻译工作流状态,不是运行时分支。 |
basedOnSourceFingerprint | Hash · 必填 | 此译文所依据的原文信息;不匹配表示译文已过时。 |
reviewedContextFingerprint | Hash | 译文处于已审核状态时的上下文指纹。 |
origin | "ai" | 结构与有效值请参阅类型和模式定义。 |
Schema · Translation
{
"type": "object",
"properties": {
"textRef": {
"$ref": "#/$defs/Id"
},
"locale": {
"$ref": "#/$defs/Locale"
},
"message": {
"$ref": "#/$defs/Message"
},
"allowEmpty": {
"type": "boolean"
},
"workflowStatus": {
"type": "string",
"enum": [
"draft",
"translated",
"reviewed"
]
},
"basedOnSourceFingerprint": {
"$ref": "#/$defs/Hash"
},
"reviewedContextFingerprint": {
"$ref": "#/$defs/Hash"
},
"origin": {
"const": "ai"
}
},
"required": [
"textRef",
"locale",
"message",
"allowEmpty",
"workflowStatus",
"basedOnSourceFingerprint"
],
"additionalProperties": false,
"title": "Translation"
}
TypedValue
| 字段 | 类型/必填 | 含义/规则 |
|---|
[oneOf 2].type | "reference" · 必填 | 类型判别字段;允许值由所在的 Schema 定义决定。 |
[oneOf 2].entityType | EntityType · 必填 | 实体引用的目录类型。 |
[oneOf 2].value | Id · 必填 | 固定值,必须与声明的类型匹配。 |
Schema · TypedValue
{
"oneOf": [
{
"$ref": "#/$defs/ScalarValue"
},
{
"type": "object",
"properties": {
"type": {
"const": "reference"
},
"entityType": {
"$ref": "#/$defs/EntityType"
},
"value": {
"$ref": "#/$defs/Id"
}
},
"required": [
"type",
"entityType",
"value"
],
"additionalProperties": false
}
],
"title": "TypedValue"
}
ValueType
| 字段 | 类型/必填 | 含义/规则 |
|---|
[oneOf 2].kind | "reference" · 必填 | 用于选择有效变体的判别字段。 |
[oneOf 2].entityType | EntityType · 必填 | 实体引用的目录类型。 |
Schema · ValueType
{
"oneOf": [
{
"$ref": "#/$defs/ScalarType"
},
{
"type": "object",
"properties": {
"kind": {
"const": "reference"
},
"entityType": {
"$ref": "#/$defs/EntityType"
}
},
"required": [
"kind",
"entityType"
],
"additionalProperties": false
}
],
"title": "ValueType"
}