Files
minecraft-bedrock-json-schemas/behavior/dialogue/dialogue.json

1 line
7.2 KiB
JSON
Raw Normal View History

2022-06-07 20:31:34 +00:00
{"$schema":"http://json-schema.org/draft-07/schema","$id":"blockception.minecraft.behavior.dialogue","examples":[{"format_version":"1.19.0","minecraft:npc_dialogue":{"scenes":[{"scene_tag":"fast_travel","npc_name":{"rawtext":[{"translate":"dialogue.guide.name"}]},"text":{"rawtext":[{"translate":"dialogue.fast_travel.body","with":["\n"]}]},"buttons":[]}]}}],"type":"object","title":"NPC Dialogue","description":"Specifies the dialogue scenes","$comment":"UNDOCUMENTED","additionalProperties":false,"required":["format_version","minecraft:npc_dialogue"],"properties":{"format_version":{"$ref":"#/definitions/A"},"minecraft:npc_dialogue":{"title":"NPC Dialogue","description":"Specifies the dialogue of an npc","$comment":"UNDOCUMENTED","type":"object","additionalProperties":false,"properties":{"scenes":{"title":"Scenes","description":"The different scenes","$comment":"UNDOCUMENTED","type":"array","minItems":1,"items":{"title":"Scene","description":"A single scene specification","$comment":"UNDOCUMENTED","type":"object","additionalProperties":false,"required":["scene_tag"],"examples":[{"scene_tag":"foo_intro"}],"properties":{"buttons":{"title":"Buttons","description":"This is where you can create buttons for your NPC","type":"array","maxItems":6,"items":{"title":"Button","description":"This is where you can create buttons for your NPC","type":"object","additionalProperties":false,"properties":{"name":{"title":"Name","description":"Set the text that is going to be displayed on your NPCs button","oneOf":[{"type":"string"},{"$ref":"#/definitions/B"}]},"commands":{"type":"array","description":"allows you to add commands which will be run in-game when the button is pressed","title":"Commands","items":{"title":"Minecraft Command","description":"The commands to execute","type":"string","pattern":"^/[a-z].*$"}}}}},"npc_name":{"title":"NPC Name","description":"This is where you can add or change a name for your NPC dialogue box. This is an optional property that is useful for dynamically changing NPC names.","oneOf":[{"type":"string"},{"$ref":"#/definitions/B"}]},"on_close_commands":{"type":"array","description":"This is where you can define which commands will fire when the NPC dialogue box closes","title":"On Close Commands","items":{"title":"Minecraft Command","description":"A minecraft command to execute","type":"string","pattern":"^/[a-z].*$"}},"on_open_commands":{"type":"array","description":"This is where you can define which commands will fire when the NPC dialogue box opens","title":"On Close Commands","items":{"title":"Minecraft Command","description":"A minecraft command to execute","type":"string","pattern":"^/[a-z].*$"}},"scene_tag":{"title":"Scene Tag","description":"This is the name you will use to call this scene in-game. This is a required property.","type":"string"},"text":{"title":"Text","description":"This is where you enter the dialogue you want your NPC to display in-game for this scene. You can type the dialogue text directly here or use raw text if you are using a language file. This is an optional property, but without it your NPC dialogue box will be empty.","oneOf":[{"type":"string"},{"$ref":"#/definitions/B"}]}}}}}}},"definitions":{"A":{"title":"Format Version","description":"A version that tells minecraft what type of data format can be expected when reading this file.","pattern":"^([1-9]+)\\.([0-9]+)\\.([0-9]+)$","type":"string","default":"1.19.0","examples":["1.19.0","1.18.30","1.18.20","1.18.10","1.18.0","1.17.0","1.16.0","1.15.0","1.14.0","1.13.0","1.12.0","1.10.0","1.8.0"],"defaultSnippets":[{"label":"New Format version","body":"1.${1|8,10,12,17,18|}.${3|2|0|}"}]},"B_rawtext":{"title":"Rawtext","description":"The raw text component, which consists of an array of text components","$comment":"UNDOCUMENTED","type":"array","default":[],"example":[[{"translate":"example.language.key"}]],"items":{"oneOf":[{"type":"string"},{"$ref":"#/definitions/B_translate"},{"$ref":"#/definitions/B_text"},{"$ref":"#/definitions/B_selector"},{"$ref":"#/definitions/B_score"}]}},"B_selector":{"title":"Selector","description