-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from Ladysnake/blabber-illustrations
Document Blabber's illustrations
- Loading branch information
Showing
18 changed files
with
407 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://ladysnake.org/schemas/blabber/dialogue.schema.json", | ||
"title": "Dialogue", | ||
"description": "A dialogue to be given to a player", | ||
"type": "object", | ||
"properties": { | ||
"layout": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"description": "The type of layout used for the default screen", | ||
"enum": ["blabber:classic", "blabber:rpg"] | ||
} | ||
} | ||
}, | ||
"start_at": { | ||
"description": "The entrypoint for this dialogue", | ||
"type": "string" | ||
}, | ||
"unskippable": { | ||
"description": "If true, players will not be able to leave the dialogue screen before completion", | ||
"type": "boolean" | ||
}, | ||
"states": { | ||
"description": "Available states for the dialogue", | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"description": "The type of the current state", | ||
"type": "string", | ||
"enum": ["default", "ask_confirmation", "end_dialogue"] | ||
}, | ||
"action": { | ||
"description": "The action to run when arriving to this state", | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"description": "The type of action to run", | ||
"type": "string", | ||
"pattern": "^[a-z0-9_-]+:[a-z0-9/_-]+$" | ||
}, | ||
"value": { | ||
"description": "Optional value used to configure the action; depends on the type of action" | ||
} | ||
}, | ||
"required": ["type"] | ||
}, | ||
"text": { | ||
"description": "The heading text to be displayed before the choices", | ||
"$ref": "https://raw.githubusercontent.com/Levertion/minecraft-json-schema/master/java/shared/text_component.json" | ||
}, | ||
"choices": { | ||
"description": "Available choices for the player", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"text": { | ||
"description": "The line of text corresponding to the given choice item", | ||
"$ref": "https://raw.githubusercontent.com/Levertion/minecraft-json-schema/master/java/shared/text_component.json" | ||
}, | ||
"next": { | ||
"description": "The id of the state to switch to when selecting this choice", | ||
"type": "string" | ||
}, | ||
"only_if": { | ||
"type": "object", | ||
"description": "Make this choice available only if a predicate is fulfilled", | ||
"properties": { | ||
"predicate": { | ||
"description": "The identifier of a datapack predicate", | ||
"type": "string" | ||
}, | ||
"when_unavailable": { | ||
"type": "object", | ||
"properties": { | ||
"action": { | ||
"enum": ["grayed_out", "hide"] | ||
}, | ||
"message": { | ||
"description": "The message to display for why the choice is unavailable. Only applicable if the action is gray_out.", | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"illustrations": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"required": [] | ||
} | ||
}, | ||
"illustrations": { | ||
"type": "object", | ||
"description": "Available illustrations in dialogue states", | ||
"additionalProperties": { | ||
"$ref": "/schemas/blabber/dialogue_illustration.schema.json" | ||
} | ||
} | ||
}, | ||
"required": [ "start_at", "states" ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://ladysnake.org/schemas/blabber/dialogue_illustration.schema.json", | ||
"$ref": "#/definitions/illustration", | ||
"title": "Dialogue Illustration", | ||
"description": "An illustration that can be referenced in dialogue states", | ||
"definitions": { | ||
"illustration": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/definitions/illustration_object" | ||
}, | ||
{ | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/illustration" | ||
}, | ||
"title": "Illustration Group", | ||
"description": "Equivalent to {\"type\": \"blabber:group\", \"elements\": [...]}" | ||
} | ||
] | ||
}, | ||
"illustration_object": { | ||
"oneOf": [ | ||
{ | ||
"title": "Item Illustration", | ||
"properties": { | ||
"type": { | ||
"const": "blabber:item" | ||
}, | ||
"item": { | ||
"$ref": "/schemas/minecraft/itemstack.schema.json" | ||
} | ||
}, | ||
"required": ["type", "item"] | ||
}, | ||
{ | ||
"title": "Entity Illustration", | ||
"properties": { | ||
"type": { | ||
"const": "blabber:entity" | ||
}, | ||
"entity": { | ||
"$ref": "/schemas/minecraft/entity_selector.schema.json" | ||
} | ||
}, | ||
"required": ["type", "entity"] | ||
}, | ||
{ | ||
"title": "Fake Entity Illustration", | ||
"properties": { | ||
"type": { | ||
"const": "blabber:fake_entity" | ||
}, | ||
"id": { | ||
"$ref": "/schemas/minecraft/entity_selector.schema.json" | ||
} | ||
}, | ||
"required": ["type", "entity"] | ||
}, | ||
{ | ||
"title": "Illustration Composition", | ||
"properties": { | ||
"type": { | ||
"const": "blabber:group" | ||
}, | ||
"elements": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/illustration" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://ladysnake.org/schemas/minecraft/entity_selector.schema.json", | ||
"title": "Entity Selector", | ||
"type": "string", | ||
"pattern": "^@\\w+(\\[(\\w+=.*)(,\\w+=.*)*\\])?$" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://ladysnake.org/schemas/minecraft/itemstack.schema.json", | ||
"title": "Item Stack", | ||
"oneOf": [ | ||
{ | ||
"$ref": "/schemas/minecraft/itemstack_v1.schema.json" | ||
}, | ||
{ | ||
"$ref": "/schemas/minecraft/itemstack_v2.schema.json" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://ladysnake.org/schemas/minecraft/itemstack_v1.schema.json", | ||
"title": "Item Stack (pre-1.20.5)", | ||
"properties": { | ||
"id": { | ||
"title": "Registry Identifier", | ||
"description": "The type of item stored in the stack", | ||
"type": "string", | ||
"pattern": "^([a-z_-]+:[a-z_/-]+)" | ||
}, | ||
"Count": { | ||
"description": "The number of items contained in the stack", | ||
"type": "integer", | ||
"minimum": 0 | ||
}, | ||
"tag": { | ||
"type": "object", | ||
"title": "NBT Data" | ||
} | ||
}, | ||
"required": ["id"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://ladysnake.org/schemas/minecraft/itemstack_v2.schema.json", | ||
"title": "Item Stack (post-1.20.5)", | ||
"properties": { | ||
"id": { | ||
"title": "Registry Identifier", | ||
"description": "The type of item stored in the stack", | ||
"type": "string", | ||
"pattern": "^([a-z_-]+:[a-z_/-]+)" | ||
}, | ||
"count": { | ||
"description": "The number of items contained in the stack", | ||
"type": "integer", | ||
"minimum": 0 | ||
}, | ||
"components": { | ||
"type": "object", | ||
"title": "Item Component Data" | ||
} | ||
}, | ||
"required": ["id"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.