-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodex-schema-v1.json
More file actions
709 lines (709 loc) · 25.7 KB
/
codex-schema-v1.json
File metadata and controls
709 lines (709 loc) · 25.7 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
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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/lk-code/armyplanner/main/codex-schema-v1.json",
"type": "object",
"title": "The ArmyPlanner Open-Format Codex schema",
"description": "This schema comprises the codex JSON format from the ArmyPlanner Open Format.",
"definitions": {
"keyword-translation": {
"type": "object",
"title": "the keyword-translation schema",
"description": "describes how the unit object must be constructed",
"required": [
"keyword",
"translation"
],
"properties": {
"keyword": {
"type": "string",
"title": "the name of keyword",
"description": "contains the unique name of the keyword"
},
"translation": {
"type": "string",
"title": "the translation-value of the unit",
"description": "contains the translation value for the keyword - ready for translate engine"
}
}
},
"unit": {
"type": "object",
"title": "the unit schema",
"description": "describes how the unit object must be constructed",
"required": [
"id",
"name",
"unit-type",
"factions",
"weapons",
"characteristics"
],
"properties": {
"id": {
"type": "string",
"title": "the id of the unit",
"description": "contains an unique id for the unit"
},
"name": {
"type": "string",
"title": "the name of the unit",
"description": "contains the name of the unit - ready for translate engine"
},
"unit-type": {
"type": "string",
"title": "the unit-type of the unit",
"description": "contains the unit-type of the unit - must be one of the values",
"examples": [
"hq",
"troops",
"elites",
"fast-attack",
"flyer",
"heavy-support",
"fortification",
"transport",
"lord-of-war"
]
},
"power": {
"type": "number",
"title": "the power-value of the unit",
"description": "contains the power-value of the unit"
},
"points": {
"type": "number",
"title": "the point-value of the unit",
"description": "contains the point-value of the unit"
},
"factions": {
"type": "array",
"title": "the faction-list schema",
"description": "contains a list of display-values for the factions",
"additionalItems": true,
"items": {
"anyOf": [
{
"type": "string",
"title": "the display-value of the faction",
"description": "contains a display-value for the faction - ready for translate engine"
}
]
}
},
"weapons": {
"type": "array",
"title": "the weapon-list schema",
"description": "contains a list of keys of all weapons for the unit",
"additionalItems": true,
"items": {
"anyOf": [
{
"type": "string",
"title": "the key of the weapon",
"description": "contains the key of the weapon"
}
]
}
},
"characteristics": {
"type": "array",
"title": "the characteristics-list schema",
"description": "contains a list of characteristic-objects for the unit",
"additionalItems": true,
"items": {
"anyOf": [
{
"type": "object",
"title": "the characteristics schema",
"description": "contains the characteristics-object for the unit",
"required": [
"name",
"move",
"weapon-skill",
"ballistic-skill",
"strength",
"toughness",
"wounds",
"attacks",
"leadership",
"save"
],
"properties": {
"countMin": {
"type": "number",
"title": "the countmin-entry of the characteristic-entry",
"description": "describes how many models are contained in this characteristic"
},
"countMax": {
"type": "number",
"title": "the countmax-entry of the characteristic-entry",
"description": "optional - if 2-5 models are included in this characteristic, this value must be set to 5."
},
"id": {
"type": "string",
"title": "the id-entry of the characteristic-entry",
"description": "contains the unique id of the characteristics-entry"
},
"name": {
"type": "string",
"title": "the name-entry of the characteristic-entry",
"description": "contains the name of the characteristics-entry (as specified in the Codex) - ready for translate engine"
},
"move": {
"type": "string",
"title": "the move-value of the characteristic-entry",
"description": "contains the move-value of the characteristic-entry (as specified in the Codex)"
},
"weapon-skill": {
"type": "string",
"title": "the weapon-skill-value of the characteristic-entry",
"description": "contains the weapon-skill-value of the characteristic-entry (as specified in the Codex)"
},
"ballistic-skill": {
"type": "string",
"title": "the ballistic-skill-value of the characteristic-entry",
"description": "contains the ballistic-skill-value of the characteristic-entry (as specified in the Codex)"
},
"strength": {
"type": "string",
"title": "the strength-value of the characteristic-entry",
"description": "contains the strength-value of the characteristic-entry (as specified in the Codex)"
},
"toughness": {
"type": "string",
"title": "the toughness-value of the characteristic-entry",
"description": "contains the toughness-value of the characteristic-entry (as specified in the Codex)"
},
"wounds": {
"type": "string",
"title": "the wounds-value of the characteristic-entry",
"description": "contains the mowoundsve-value of the characteristic-entry (as specified in the Codex)"
},
"attacks": {
"type": "string",
"title": "the attacks-value of the characteristic-entry",
"description": "contains the attacks-value of the characteristic-entry (as specified in the Codex)"
},
"leadership": {
"type": "string",
"title": "the leadership-value of the characteristic-entry",
"description": "contains the leadership-value of the characteristic-entry (as specified in the Codex)"
},
"save": {
"type": "string",
"title": "the save-value of the characteristic-entry",
"description": "contains the save-value of the characteristic-entry (as specified in the Codex)"
},
"points": {
"type": "number",
"title": "the point-value of the unit",
"description": "contains the point-value of the unit"
}
},
"additionalProperties": true
}
]
}
},
"options": {
"type": "array",
"title": "the options-list schema",
"description": "contains a list of options-objects for the unit",
"additionalItems": true,
"items": {
"anyOf": [
{
"type": "object",
"title": "the option schema",
"description": "contains the option-object for the unit",
"required": [
"description",
"max-count"
],
"properties": {
"description": {
"type": "string",
"title": "the description of this option",
"description": "contains the description of this option - ready for translate engine."
},
"target-unit": {
"type": "string",
"title": "the key of the target unit",
"description": "if this option only applies to a specific unit or model, then the key must be specified here."
},
"target-equipment": {
"type": "string",
"title": "the key of the target equipment",
"description": "if this option only applies to a specific equipment, then the key must be specified here."
},
"max-count": {
"type": "number",
"title": "the max-count-value of this option",
"description": "specifies how often this option may be used for this unit or model. if -1 is specified, then this option can be used as often as desired.",
"default": -1
},
"additional-power": {
"type": "number",
"title": "the additional power-value of this option",
"description": "Specifies how much power is added by this option."
},
"actions": {
"type": "array",
"title": "the max-count-value of this option",
"description": "specifies how often this option may be used for this unit or model. if -1 is specified, then this option can be used as often as desired.",
"items": {
"anyOf": [
{
"type": "object",
"title": "the action schema",
"description": "describes for the exact steps for the option for the app",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"title": "the description of this option",
"description": "contains the description of this option - ready for translate engine",
"examples": [
"replace",
"addtounit"
]
},
"source-unit": {
"type": "string",
"title": "the key of the source unit",
"description": "the key of the unit to be replaced."
},
"source-equipment": {
"type": "string",
"title": "the key of the source equipment",
"description": "the key of the equipment to be replaced."
},
"target-unit": {
"type": "string",
"title": "the key of the target unit",
"description": "the key of the unit which will be inserted so."
},
"target-equipment": {
"type": "string",
"title": "the key of the target equipment",
"description": "the key of the equipment which will be inserted so."
},
"max-count": {
"type": "number",
"title": "the max-count-value of this action",
"description": "specifies how often this particular action may be used within the option."
}
}
}
]
}
}
},
"additionalProperties": true
}
]
}
}
}
},
"weapon": {
"type": "object",
"title": "the weapon schema",
"description": "describes how the weapon object must be constructed",
"required": [
"id",
"name",
"weapon-type",
"range",
"type",
"dices",
"strength",
"armour-penetration",
"damage",
"abilities",
"profiles"
],
"properties": {
"id": {
"type": "string",
"title": "the id of the weapon",
"description": "contains an unique id for this weapon"
},
"is-profile": {
"type": "boolean",
"title": "the is-proile value of the weapon",
"description": "defines if this weapon entry is a profile"
},
"name": {
"type": "string",
"title": "the name of the weapon",
"description": "contains the name of the weapon - ready for translate engine"
},
"weapon-type": {
"type": "string",
"title": "the weapon-type of the weapon",
"description": "contains the weapon-type of the weapon",
"enum": [
"ranged",
"melee"
]
},
"range": {
"type": "string",
"title": "the range value of the weapon",
"description": "contains the range value of the weapon (as specified in the codex) - ready for translate engine",
"examples": [
"18\"",
"24\"",
"72\"",
"{{weapon_type_melee}}"
]
},
"type": {
"type": "string",
"title": "the type value of the weapon",
"description": "contains the type value of the weapon (as specified in the codex) - ready for translate engine"
},
"dices": {
"type": "string",
"title": "the number of dices of the weapon",
"description": "contains the number of dices for the weapon - ready for translate engine",
"examples": [
"2",
"4",
"D3",
"D6",
"{{title_dices,6}}"
]
},
"strength": {
"type": "string",
"title": "the strength value of the weapon",
"description": "contains the strength value of the weapon"
},
"armour-penetration": {
"type": "string",
"title": "the armour-penetration value of the weapon",
"description": "contains the armour-penetration value of the weapon"
},
"damage": {
"type": "string",
"title": "the damage value of the weapon",
"description": "contains the damage value of the weapon"
},
"abilities": {
"type": "array",
"title": "the abilities-list schema",
"description": "contains a list of display-values for the abilities of the weapon",
"additionalItems": true,
"items": {
"anyOf": [
{
"type": "string",
"title": "the display-value of the ability",
"description": "contains a display-value for the ability - ready for translate engine"
}
]
}
},
"profiles": {
"type": "array",
"title": "the profiles-list schema",
"description": "contains a list of names with all profiles",
"additionalItems": true,
"items": {
"anyOf": [
{
"type": "string",
"title": "the key of the profile",
"description": "contains the key of the profile-entry"
}
]
}
}
},
"additionalProperties": true
},
"user-interface": {
"type": "object",
"title": "the keyword-translation schema",
"description": "describes how the unit object must be constructed",
"required": [
"element",
"items"
],
"properties": {
"element": {
"type": "string",
"title": "the name of ui-element",
"enum": [
"codex-unit-list",
"codex-wargear-list",
"codex-weapon-list",
"roster-detail-summary-header"
],
"description": "to which ui element is this element directed"
},
"items": {
"type": "array",
"title": "the items-list schema",
"description": "contains a listing with the properties of the object to be displayed",
"additionalItems": true,
"items": {
"anyOf": [
{
"type": "object",
"title": "the characteristics schema",
"description": "contains the characteristics-object for the unit",
"required": [
"property"
],
"properties": {
"header": {
"type": "string",
"title": "the header-key of the property",
"description": "contains the key of the header-property to be displayed - ready for translation-engine"
},
"property": {
"type": "string",
"title": "the name of the property to be displayed",
"description": "specifies from which properties the value should be displayed (read more in the documentation)."
}
},
"additionalProperties": true
}
]
}
}
}
}
},
"required": [
"meta",
"languages",
"keywords",
"units",
"weapons",
"wargear"
],
"properties": {
"meta": {
"type": "object",
"title": "the codex-meta schema",
"description": "contains the code-meta informations",
"required": [
"created",
"game",
"codex"
],
"properties": {
"created": {
"type": "string",
"title": "the timestamp of the last update",
"description": "contains the (utc-)timestamp of the last update of the codex-data (needed for update functionality)"
},
"based-codex": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "the key of the parent codex",
"description": "if this codex is based on another codex, the key of the parent codex (meta->codex->key) must be specified here"
},
"game": {
"type": "object",
"title": "the game-meta schema",
"description": "contains the meta-informations of the game",
"required": [
"key",
"name"
],
"properties": {
"key": {
"type": "string",
"title": "the unique key of the game",
"description": "contains the unique key of the game (must match the folder name in the repository)"
},
"name": {
"type": "string",
"title": "the name of the game",
"description": "contains the name of the game - ready for translate engine"
}
},
"additionalProperties": true
},
"codex": {
"type": "object",
"title": "the codex-meta schema",
"description": "contains the meta-informations of the codex",
"required": [
"key",
"name"
],
"properties": {
"key": {
"type": "string",
"title": "the unique key of this codex",
"description": "contains the unique key of this codex"
},
"name": {
"type": "string",
"title": "the name of the codex",
"description": "contains the name of the codex - ready for translate engine"
},
"description": {
"type": "string",
"title": "an optional description for the codex",
"description": "contains a description of the codex - note: the description is given as markdown code"
}
},
"additionalProperties": true
}
},
"additionalProperties": true
},
"languages": {
"type": "array",
"title": "the languages-list schema",
"description": "contains a list of available languages of this codex",
"additionalItems": true,
"items": {
"anyOf": [
{
"type": "object",
"title": "the codex-language schema",
"description": "describes how the codex language entry must be structured.",
"required": [
"name",
"path",
"lang"
],
"properties": {
"name": {
"type": "string",
"title": "the display-value for the language",
"description": "contains an universal display value for the language"
},
"path": {
"type": "string",
"title": "the path to the language file",
"description": "contains the path to the codex-language json-file - must be in the same directory as the main codex file"
},
"lang": {
"type": "string",
"title": "the code for this language",
"description": "contains the ISO 639-1 code for this language (en for english, de for german, etc.)"
}
},
"additionalProperties": true
}
]
}
},
"keywords": {
"type": "array",
"title": "the list of keyword translations for this codex",
"description": "contains a list of all keyword-translations for the codex",
"additionalItems": true,
"items": {
"anyOf": [
{
"$ref": "#/definitions/keyword-translation",
"additionalProperties": true
}
],
"additionalProperties": true
}
},
"units": {
"type": "array",
"title": "the list of units for this codex",
"description": "contains a list with all units for the codex",
"additionalItems": true,
"items": {
"anyOf": [
{
"$ref": "#/definitions/unit",
"additionalProperties": true
}
],
"additionalProperties": true
}
},
"weapons": {
"type": "array",
"title": "the list of weapons for this codex",
"description": "contains a list with all weapons for the codex",
"additionalItems": true,
"items": {
"anyOf": [
{
"$ref": "#/definitions/weapon",
"additionalProperties": true
}
],
"additionalProperties": true
}
},
"wargear": {
"type": "array",
"title": "the wargear-list schema",
"description": "contains the list of wargear for this codex",
"additionalItems": true,
"items": {
"anyOf": [
{
"type": "object",
"title": "the wargear schema",
"description": "describes how a wargear entry must be structured.",
"required": [
"id",
"name",
"effect"
],
"properties": {
"id": {
"type": "string",
"title": "the unique id of this wargear",
"description": "contains an unique id for the wargear"
},
"name": {
"type": "string",
"title": "the name of the wagear",
"description": "contains the name of the wargear - ready for translate engine"
},
"effect": {
"type": "string",
"title": "the effect content of this wargear",
"description": "contains the effect content to display of the wargear - ready for translate engine"
}
},
"additionalProperties": true
}
]
}
},
"ui": {
"type": "array",
"title": "a list of elements describing specific app ui parts",
"description": "optional (if the entry is empty, the UI entry in the game-record is used.) - contains various elements that describe the structure of certain app interface elements.",
"additionalItems": true,
"items": {
"anyOf": [
{
"$ref": "#/definitions/user-interface",
"additionalProperties": true
}
],
"additionalProperties": true
}
}
},
"additionalProperties": true
}