-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathechoNPC.json
More file actions
276 lines (276 loc) · 13.4 KB
/
echoNPC.json
File metadata and controls
276 lines (276 loc) · 13.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
{
"$id": "https://aexer0e.github.io/bedrock-schema/",
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/Echo:NPC",
"definitions": {
"Echo:NPC": {
"type": "object",
"properties": {
"header": { "$ref": "#/definitions/header" },
"states": { "$ref": "#/definitions/states" },
"entity": { "$ref": "#/definitions/entity" }
}
},
"header": {
"$ref": "#/definitions/settings"
},
"states": {
"type": "array",
"title": "States",
"items": { "$ref": "#/definitions/state" }
},
"entity": {
"type": [ "string", "object" ],
"title": "Entity",
"description": "Entity definition can either be an entity_template, or an actual entity: (Don't include both, pick one)",
"if": { "type": "object" },
"then": { "$ref": "https://aexer0e.github.io/bedrock-schema" }
},
"state": {
"type": "object",
"title": "State",
"properties": {
"name": {
"title": "Name",
"type": "string",
"description": "The name of the state. All states should have a name"
},
"next": {
"title": "Next",
"type": "string",
"description": "Determines what state to move to after the sub-states are used up."
},
"length": {
"title": "Length",
"type": "integer",
"description": "Determines what state to move to after the sub-states are used up."
},
"text": {
"title": "Text",
"type": "array",
"description": "Text is printed in order, one dialogue option, then the next.",
"items": { "type": "string" }
},
"commands": {
"title": "Commands",
"type": [ "array", "object" ],
"description": "Commands accepts either arrays that contain arrays with batches of commands, or numbery arguments to play arbitrary commands at arbitrary states",
"$ref": "#/library/commands_format"
},
"events": {
"title": "Events",
"type": [ "array", "object" ],
"description": "events accepts either arrays that contain arrays with batches of events, or numbery arguments to run arbitrary events at arbitrary states",
"$ref": "#/library/commands_format"
},
"custom_components": {
"title": "Custom Components",
"type": [ "array", "object" ],
"description": "Custom components accepts either arrays that contain arrays with batches of custom components, or numbery arguments to add arbitrary custom components at arbitrary states\nCustom components are pulled from component_templates in settings and custom settings.",
"$ref": "#/library/commands_format"
},
"transitions": {
"title": "Transitions",
"type": [ "array", "object" ],
"description": "Transitions accepts either arrays that contain arrays with batches of component groups, or numbery arguments to use arbitrary transitions at arbitrary states\nTransitions are pulled from transition_templates in settings and custom settings.",
"$ref": "#/library/transitions_format"
},
"components": {
"title": "Components",
"type": "object",
"description": "Components can be added into the entity using numbery arguments.",
"patternProperties": {
//if you use eleventh or above it's your fault
"^(([1-9]+)|((all)|(last)|(end)|(first)|(second)|(third)|(fourth)|(fifth)|(sixth)|(seventh)|(eighth)|(ninth)|(tenth)))-?(([1-9]*)|((all)|(last)|(end)|(first)|(second)|(third)|(fourth)|(fifth)|(sixth)|(seventh)|(eighth)|(ninth)|(tenth)))$": {
"type": "object",
"$ref": "https://aexer0e.github.io/bedrock-schema#/definitions/components"
}
},
"additionalProperties": false
}
}
},
"settings": {
"type": "object",
"title": "Header",
"description": "Template settings",
"properties": {
"default_state": {
"title": "Defaul State",
"type": "string",
"description": "Sets default state to add when the entity is spawned. Default state \"none\" means that no state will be added.",
"examples": [ "main" ]
},
"default_transitions": {
"title": "Defaul Transtitions",
"type": "array",
"description": "Sets default transition types when no transition is specified inside states.",
"items": { "$ref": "#/library/transitions" }
},
"sound_template": {
"title": "Sound Template",
"type": "string",
"description": "This is the template for the sounds list.\nThe \"SOUND\" part will be replaced by whatever argument",
"examples": [ "/playsound SOUND @a ~ ~ ~" ]
},
"text_template": {
"title": "Text Template",
"type": "string",
"description": "This is the template for the text list.\nThe \"TEXT\" part will be replaced by whatever argument",
"examples": [ "/say TEXT" ]
},
"output_type": {
"title": "Output Type",
"type": "string",
"description": "Default output location.",
"examples": [ "here", "dev", "world" ],
"allOf": [
{
"if": { "const": "here" },
"then": { "description": "Exports into the same folder as Echo was run in" }
},
{
"if": { "items": { "const": "dev" } },
"then": { "description": "Searches for the BP in the development_behavior_pack folder, based on Manifest ID" }
},
{
"if": { "items": { "const": "world" } },
"then": { "description": "Searches for the BP in the minecraftWorlds folder, based on Manifest ID" }
}
]
},
"default_state_type": {
"title": "Default State Type",
"type": "string",
"description": "Default state type.",
"examples": [ "standard", "single" ]
},
"use_translations": {
"title": "Use Translations",
"type": "boolean",
"description": "Future proofing some concepts. Don't touch.",
"default": false
},
"max_allowed_states": {
"title": "Max Allowed States",
"type": "integer",
"description": "Maximum amount of states before the warning kicks in.",
"default": 20
},
"entity_templates": {
"title": "Entity Templates",
"type": "object",
"description": "Please read the Echo:NPC Documentation for details.",
"patternProperties": {
"^.*$": {
"title": "Entity",
"type": "object",
"$ref": "https://aexer0e.github.io/bedrock-schema/"
}
}
},
"component_templates": {
"title": "Component Templates",
"type": "object",
"description": "Please read the Echo:NPC Documentation for details.",
"patternProperties": {
"^.*$": {
"title": "Component",
"type": "object",
"$ref": "https://aexer0e.github.io/bedrock-schema#/definitions/components"
}
}
},
"transition_templates": {
"title": "Transition Templates",
"type": "object",
"description": "Please read the Echo:NPC Documentation for details.",
"patternProperties": {
"^.*$": {
"title": "Transition",
"type": "object",
"$ref": "https://aexer0e.github.io/bedrock-schema#/definitions/components"
}
}
}
}
}
},
"library": {
"transitions": {
"type": "string",
"examples": [
"interact",
"timer",
"interact_has_item",
"proximity",
"reverse_proximity",
"has_tag"
],
"allOf": [
{
"if": { "pattern": "^(interact ).*$" },
"then": { "description": "This is the “right click” transition. If no transitions are supplied, this transition is used.\n<interact> [event]" }
},
{
"if": { "pattern": "^(timer).*$" },
"then": { "description": "This is a simple timer: It will run after the time runs down.\n<timer> [time in second] [event]" }
},
{
"if": { "pattern": "^(interact_has_item).*$" },
"then": { "description": "Tests for a right click with a specific item.\n<interact_has_item> <item identifier> [event]" }
},
{
"if": { "pattern": "^(proximity).*$" } ,
"then": { "description": "Tests for when a player is within a set distance.\n<proximity> [ditance in blocks] [event]" }
},
{
"if": { "pattern": "^(reverse_proximity).*$" },
"then": { "description": "Tests for when NO players are within a set distance.\n<reverse_proximity> [distnace in blocks] [event]" }
},
{
"if": { "pattern": "^(has_tag).*$" },
"then": { "description": "Tests for if the entity has a specific tag.\n<has_tag> <tag> [event]" }
}
]
},
"commands_format": {
"if": { "type": "object" },
"then": {
"patternProperties": {
//if you use eleventh or above it's your fault
"^(([1-9]+)|((all)|(last)|(end)|(first)|(second)|(third)|(fourth)|(fifth)|(sixth)|(seventh)|(eighth)|(ninth)|(tenth)))-?(([1-9]*)|((all)|(last)|(end)|(first)|(second)|(third)|(fourth)|(fifth)|(sixth)|(seventh)|(eighth)|(ninth)|(tenth)))$": {
"type": [ "string", "array" ],
"$ref": "#/library/transitions",
"if": { "type": "string" },
"then": { "$ref": "#/library/transitions" },
"else": { "items": { "type": "string", "$ref": "#/library/transitions" } }
}
},
"additionalProperties": false
},
"else": { "items": { "type": "array", "items": { "type": "string" } } }
},
"transitions_format": {
"if": { "type": "object" },
"then": {
"patternProperties": {
//if you use eleventh or above it's your fault
"^(([1-9]+)|((all)|(last)|(end)|(first)|(second)|(third)|(fourth)|(fifth)|(sixth)|(seventh)|(eighth)|(ninth)|(tenth)))-?(([1-9]*)|((all)|(last)|(end)|(first)|(second)|(third)|(fourth)|(fifth)|(sixth)|(seventh)|(eighth)|(ninth)|(tenth)))$": {
"type": [ "string", "array" ],
"$ref": "#/library/transitions",
"if": { "type": "string" },
"then": { "$ref": "#/library/transitions" },
"else": { "items": { "type": "string", "$ref": "#/library/transitions" } }
}
},
"additionalProperties": false
},
"else": {
"if": { "type": "array" },
"then": { "items": { "type": "string", "$ref": "#/library/transitions" } },
"else": { "type": "string", "$ref": "#/library/transitions" }
}
}
}
}