forked from Wangscape/Wangscape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions_schema.json
324 lines (324 loc) · 11.8 KB
/
options_schema.json
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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Wangscape options schema",
"description": "Specifies how Wangscape should convert a set of terrain tiles into corner Wang tilesets.",
"additionalProperties":false,
"properties": {
"MetaOutput": {
"type": "object",
"title": "Meta-output information schema",
"description": "Specifies the filenames Wangscape will use to write meta-output.",
"additionalProperties": false,
"properties": {
"TileData": {
"type": "string",
"title": "Tile data filename",
"description": "Specifies the file which will contain individual details about each output tile.",
"minLength": 1
},
"TileGroups": {
"type": "string",
"title": "Tile groups filename",
"description": "Specifies the file which will contain grouped arrays of details for similar tiles.",
"minLength": 1
},
"TilesetData": {
"type": "string",
"title": "Tileset data filename",
"description": "Specifies the file which will contain details about output tilesets.",
"minLength": 1
},
"TerrainHypergraph": {
"type": "string",
"title": "Terrain hypergraph filename",
"description": "Specifies the file which will contain the hypergraph of terrains which can appear in the same tile.",
"minLength": 1
}
},
"required": [
"TileData",
"TilesetData"
]
},
"TileFormat": {
"type": "object",
"title": "Tile format schema",
"description": "Specifies the format of Wangscape's input and output tiles.",
"additionalProperties": false,
"properties": {
"Resolution": {
"type": "array",
"title": "Tile resolution",
"description": "Specifies the width and height of the square tiles Wangscape will operate on.",
"items": {
"type": "integer",
"multipleOf": 1,
"maximum": 512,
"minimum": 8
},
"minItems": 2,
"maxItems": 2
},
"FileType": {
"type": "string",
"title": "File type schema",
"description": "Specifies the file type of Wangscape's output tiles.",
"default": "png",
"enum": [
"bmp",
"png",
"tga",
"jpg"
]
}
},
"required": [
"Resolution"
]
},
"OutputDirectory": {
"type": "string",
"title": "Output directory schema.",
"description": "Specifies the directory where Wangscape should write the output tiles (may be wiped first!)",
"minLength": 1
},
"Terrains": {
"type": "object",
"title": "Terrains schema",
"description": "Specifies the names and textures of Wangscape's input terrain tiles.",
"minProperties": 2,
"additionalProperties": false,
"patternProperties": {
"^[0-9a-zA-Z_-]+$": {
"type": "object",
"title": "Terrain schema",
"description": "Specifies the name and texture of one of Wangscape's input terrain tiles.",
"additionalProperties": false,
"properties": {
"FullName": {
"type": "string",
"title": "Full name schema",
"description": "Specifies the full name of one of Wangscape's input terrain tiles.",
"minLength": 1
},
"FileName": {
"type": "string",
"title": "File name schema",
"description": "Specifies the file in which the texture of one of Wangscape's input terrain tiles can be found.",
"minLength": 1
},
"OffsetX": {
"type": "integer",
"title": "X offset schema",
"description": "Specifies the horizontal offset of the terrain tile's texture in the input image, divided by the tile resolution.",
"multipleOf": 1,
"minimum": 0,
"maximum": 512,
"default": 0
},
"OffsetY": {
"type": "integer",
"title": "Y offset schema",
"description": "Specifies the vertical offset of the terrain tile's texture in the input image, divided by the tile resolution.",
"multipleOf": 1,
"minimum": 0,
"maximum": 512,
"default": 0
}
},
"required": [
"FullName",
"FileName"
]
}
}
},
"Cliques": {
"type": "array",
"title": "Cliques schema",
"description": "Specifies terrain type sets for which corner Wang tilesets will be generated.",
"uniqueItems": true,
"minItems": 1,
"items": {
"type": "array",
"title": "Clique schema",
"description": "Specifies a set of 2-4 terrain types for which a corner Wang tileset will be generated.",
"uniqueItems": true,
"minItems": 2,
"maxItems": 4,
"items": {
"type": "string",
"minLength": 1,
"title": "Clique item schema",
"description": "Specifies a terrain type by its key in the Terrains property.",
"pattern": "^[0-9a-zA-Z_-]+$"
}
}
},
"AlphaCalculatorMode": {
"type": "string",
"title": "AlphaCalculatorMode schema",
"description": "Specifies which type of AlphaCalculator should be used to convert corner weights into alpha values.",
"enum": [
"Max",
"Linear",
"TopTwo",
"Dither"
]
},
"AlphaCalculatorTopTwoPower": {
"type": "number",
"title": "AlphaCalculatorTopTwoPower schema",
"description": "Specifies an exponent to which noise values should be raised before applying TopTwo or related alpha calculators."
},
"DefaultModuleGroup": {
"type": "string",
"title": "DefaultModuleGroup schema",
"description":"Optionally specifies the location of a JSON file containing a default module group to use for tile centres and borders which don't have a module group specified in CentralModuleGroups, LeftBorderModuleGroups, or RightBorderModuleGroups.",
"minLength":1
},
"LeftBorderModuleGroups": {
"type": "array",
"title":"LeftBorderModuleGroup schema",
"description":"Specifies the locations of JSON files containing module groups to use to weight the left side of horizontal borders in tile generation.",
"uniqueItems": true,
"minItems":1,
"items": {
"type": "object",
"title": "BorderModuleGroup item schema",
"description": "Specifies an ordered pair of terrains and the location of a JSON file containing the module group which should be used for borders connecting them.",
"properties": {
"Terrains": {
"type": "array",
"title": "BorderModuleGroups Terrains schema",
"description":"Specifies an ordered pair of terrains for which the module group should be used",
"elements": {
"type": "string",
"title": "BorderModuleGroups terrain schema",
"description":"Specifies a terrain by its key in the Terrains property.",
"minLength": 1,
"pattern":"^[0-9a-zA-Z_-]+$"
},
"minLength": 2,
"maxLength": 2
},
"Filename": {
"type": "string",
"minLength": 1,
"title":"BorderModuleGroup Filename schema",
"description":"Specifies the location of the JSON file containing the module group for use on borders with this pair of terrains."
}
},
"required":[
"Terrains",
"Filename"
],
"additionalProperties":false
}
},
"TopBorderModuleGroups": {
"type": "array",
"title":"TopBorderModuleGroup schema",
"description":"Specifies the locations of JSON files containing module groups to use to weight the top side of vertical borders in tile generation.",
"uniqueItems": true,
"minItems": 1,
"items": {
"type": "object",
"title": "BorderModuleGroup item schema",
"description": "Specifies an ordered pair of terrains and the location of a JSON file containing the module group which should be used for borders connecting them.",
"properties": {
"Terrains": {
"type": "array",
"title": "BorderModuleGroups Terrains schema",
"description":"Specifies an ordered pair of terrains for which the module group should be used",
"elements": {
"type": "string",
"title": "BorderModuleGroups terrain schema",
"description":"Specifies a terrain by its key in the Terrains property.",
"minLength": 1,
"pattern":"^[0-9a-zA-Z_-]+$"
},
"minLength": 2,
"maxLength": 2
},
"Filename": {
"type": "string",
"minLength": 1,
"title":"BorderModuleGroup Filename schema",
"description":"Specifies the location of the JSON file containing the module group for use on borders with this pair of terrains."
}
},
"required":[
"Terrains",
"Filename"
],
"additionalProperties":false
}
},
"CentralModuleGroups": {
"type": "array",
"title": "CentralModuleGroups schema",
"description":"Specifies the locations of JSON files containing module groups to use in the centre of generated tile partitions.",
"uniqueItems": true,
"minItems": 1,
"items": {
"type": "object",
"title": "CentralModuleGroups item schema",
"description": "Specifies a terrain and the location of a JSON file containing the module group which should be used for the central weight of corner masks associated with that terrain.",
"properties": {
"Terrain": {
"type": "string",
"title": "CentralModuleGroups terrain schema",
"description":"Specifies a terrain by its key in the Terrains property.",
"minLength": 1,
"pattern":"^[0-9a-zA-Z_-]+$"
},
"Filename": {
"type": "string",
"title": "CentralModuleGroups Filename schema",
"description": "Specifies the location of the JSON file containing the module group for use in tile centres with this terrain.",
"minLength": 1
}
},
"required":[
"Terrain",
"Filename"
],
"additionalProperties":false
}
},
"CombinerModuleGroup": {
"type": "string",
"title": "CombinerModuleGroup filename schema",
"description": "Specifies the location of the JSON file containing the module group to use to combine border and central module groups into the corner masks used to generate tiles.",
"minLength": 1
},
"DebugOutput": {
"type": "boolean",
"title": "DebugOutput schema",
"description": "Specifies whether Wangscape should write debug data during tile generation.",
"default": false
},
"DebugTileResolution": {
"type": "array",
"title": "DebugTileResolution schema",
"description": "Specifies the resolution of the images written as debug data during tile generation.",
"items": {
"type": "integer",
"multipleOf": 1,
"minimum": 1
},
"minItems": 2,
"maxItems": 2
}
},
"required": [
"TileFormat",
"OutputDirectory",
"Terrains",
"Cliques",
"AlphaCalculatorMode",
"CombinerModuleGroup"
]
}