-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCardGameDef.json
871 lines (871 loc) · 32.1 KB
/
CardGameDef.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
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
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "https://cardgamesim.finoldigital.com/schema/CardGameDef.json",
"title": "CGS Custom Card Game",
"type": "object",
"description": "Card Game Simulator (CGS) custom card game specification",
"additionalProperties": false,
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the custom card game as it appears to the user. This name is required for the *Game:Id*."
},
"allCardsUrl": {
"type": [
"null",
"string"
],
"description": "From allCardsUrl, CGS downloads the json that contains the Card data for the game. If CGS is able to successfully download this file, it will save it as AllCards.json.",
"format": "uri"
},
"allCardsUrlPageCount": {
"type": "integer",
"description": "If allCardsUrlPageCount > 1, CGS will download <allCardsUrl> with <allCardsUrlPageIdentifier>+<page> for each page.",
"format": "int32",
"default": 1
},
"allCardsUrlPageCountIdentifier": {
"type": "string",
"description": "If allCardsUrlPageCountIdentifier is set, CGS will set the allCardsUrlPageCount to the response value of <allCardsUrlPageCountIdentifier> from <allCardsUrl>."
},
"allCardsUrlPageCountDivisor": {
"type": "integer",
"description": "allCardsUrlPageCountDivisor can be set to the # of cards per page, ie: allCardsUrlPageCount = <allCardsUrlPageCountIdentifier pointing to total # of cards>/<allCardsUrlPageCountDivisor>.",
"format": "int32",
"default": 1
},
"allCardsUrlPageCountStartIndex": {
"type": "integer",
"description": "allCardsUrlPageCountStartIndex is used to identify the first page of allCardsUrlPageCount.",
"format": "int32",
"default": 1
},
"allCardsUrlPageIdentifier": {
"type": "string",
"description": "If allCardsUrlPageCount > 1, CGS will download <allCardsUrl> with <allCardsUrlPageIdentifier>+<page> for each page.",
"default": "?page="
},
"allCardsUrlPostBodyContent": {
"type": "string",
"description": "If allCardsUrlPostBodyContent is set, CGS will make a POST to <allCardsUrl> with a JSON body that contains <allCardsUrlPostBodyContent>. If not set, CGS will just GET from <allCardsUrl>."
},
"allCardsUrlRequestHeader": {
"type": "string",
"description": "allCardsUrlRequestHeader and allCardsUrlRequestHeader can be used together for secured APIs.",
"default": "X-Api-Key"
},
"allCardsUrlRequestHeaderValue": {
"type": "string",
"description": "allCardsUrlRequestHeader and allCardsUrlRequestHeader can be used together for secured APIs."
},
"allCardsUrlWrapped": {
"type": "boolean",
"description": "If allCardsUrl points to file(s) enclosed by extra characters, set allCardsUrlWrapped to true, and CGS will trim the first and last characters."
},
"allCardsUrlZipped": {
"type": "boolean",
"description": "If allCardsUrl points to zipped file(s), set allCardsUrlZipped to true, and CGS will unzip the file(s)."
},
"allDecksUrl": {
"type": [
"null",
"string"
],
"description": "From allDecksUrl, CGS downloads the json that contains the Deck data for the game. If CGS is able to successfully download this file, it will save it as AllDecks.json.",
"format": "uri"
},
"allDecksUrlDataIdentifier": {
"type": "string",
"description": "If allDecksUrlDataIdentifier is set to a non-empty string, AllDecks.json will be parsed as a JSON object: {\"@allDecksUrlDataIdentifier\":{\"$ref\":\"AllDecks.json\"}}"
},
"allDecksUrlPostBodyContent": {
"type": "string",
"description": "If allDecksUrlPostBodyContent is set, CGS will make a POST to <allDecksUrl> with a JSON body that contains <allDecksUrlPostBodyContent>. If not set, CGS will just GET from <allDecksUrl>."
},
"allDecksUrlTxtRoot": {
"type": "string",
"description": "If allDecksUrlTxtRoot is set, CGS will parse deck urls as <allDecksUrlTxtRoot>+*DeckUrl:Txt*"
},
"allSetsUrl": {
"type": [
"null",
"string"
],
"description": "From allSetsUrl, CGS downloads the json that contains the Set data for the game. If CGS is able to successfully download this json, it will save it as AllSets.json.",
"format": "uri"
},
"allSetsUrlWrapped": {
"type": "boolean",
"description": "If allSetsUrl points to a file enclosed by extra characters, set allSetsUrlWrapped to true, and CGS will trim the first and last characters."
},
"allSetsUrlZipped": {
"type": "boolean",
"description": "If allSetsUrl points to a zipped file, set allSetsUrlZipped to true, and CGS will unzip the file."
},
"autoUpdate": {
"type": "integer",
"description": "autoUpdate indicates how many days to use cached files instead of re-downloading. autoUpdate=0 will re-download files at every opportunity. autoUpdate<0 will never attempt to download anything.",
"format": "int32",
"default": 30
},
"autoUpdateUrl": {
"type": [
"null",
"string"
],
"description": "autoUpdateUrl indicates the url from which users download *Game:Name*.json, and CGS will automatically re-download the custom game from this url every <autoUpdate> days. This url is used in the *Game:Id*. You should host *Game:Name*.json at this url, but if you do not, you can set autoUpdate to -1, and there should be no issues.",
"format": "uri"
},
"bannerImageFileType": {
"type": "string",
"description": "bannerImageFileType is the file type extension for the image file that CGS downloads from bannerImageUrl.",
"default": "png"
},
"bannerImageUrl": {
"type": [
"null",
"string"
],
"description": "If bannerImageUrl is a valid url, CGS will download the image at that url and save it as Banner.<bannerImageFileType>. CGS will attempt to display the Banner.<bannerImageFileType> as an identifier to the user. If it is unable to read Banner.<bannerImageFileType>, CGS will simply display the CGS logo.",
"format": "uri"
},
"cardBackFaceImageUrls": {
"type": "array",
"description": "CGS will go through each CardBackFaceImageUrl and save the data from *CardBackFaceImageUrl:Url* to 'backs/*CardBackFaceImageUrl:Id*.<cardBackImageFileType>'",
"items": {
"$ref": "#/definitions/CardBackFaceImageUrl"
}
},
"cardBackImageFileType": {
"type": "string",
"description": "cardBackImageFileType is the file type extension for the image file that CGS downloads from cardBackImageUrl.",
"default": "png"
},
"cardBackImageUrl": {
"type": [
"null",
"string"
],
"description": "If cardBackImageUrl is a valid url, CGS will download the image at that url and save it as CardBack.<cardBackImageFileType>. CGS will display the CardBack.<cardBackImageFileType> when the user turns a card facedown or if CGS is unable to find the appropriate card image. If CGS is unable to get a custom card back, CGS will use the default CGS card back.",
"format": "uri"
},
"cardDataIdentifier": {
"type": "string",
"description": "If cardDataIdentifier is set to a non-empty string, AllCards.json will be parsed as a JSON object: {\"@cardDataIdentifier\":{\"$ref\":\"AllCards.json\"}}"
},
"cardIdIdentifier": {
"type": "string",
"description": "Every Card must have a unique id. When defining a Card in AllCards.json or AllSets.json, you can have the *Card:Id* mapped to the field defined by cardIdIdentifier. Most custom games will likely want to keep the default cardIdIdentifier.",
"default": "id"
},
"cardIdStop": {
"type": "string",
"description": "Every Card must have a unique id. When defining a Card in AllCards.json or AllSets.json, you can have the *Card:Id* mapped to the field defined by cardIdIdentifier. Most custom games will likely want to keep the default cardIdIdentifier. If cardIdStop is set, any id that contains cardIdStop will be stopped at <cardIdStop>."
},
"cardImageFileType": {
"type": "string",
"description": "cardImageFileType is the file type extension for the image files that CGS downloads for each individual Card.",
"default": "png"
},
"cardImageProperty": {
"type": "string",
"description": "cardImageProperty is the *Card:Property* which points to the image for this Card. If <cardImageProperty> is empty, <cardImageUrl> will be used instead."
},
"cardImageUrl": {
"type": "string",
"description": "cardImageUrl is a parameterized template url from which CGS downloads card image files if <cardImageProperty> is empty. Parameters: {cardId}=*Card:Id*, {cardName}=*Card:Name*, {cardSet}=*Card:SetCode*, {cardImageFileType}=<cardImageFileType>, {<property>}=*Card:<property>*. Example: https://www.cardgamesimulator.com/games/Standard/sets/{cardSet}/{cardId}.{cardImageFileType}",
"format": "uri-template"
},
"cardNameBackIdentifier": {
"type": "string",
"description": "When defining a Card in AllCards.json or AllSets.json, you can have the *Card:Name* of the back face mapped to the field defined by cardNameBackIdentifier. Most custom games will likely want to keep the default cardNameBackIdentifier."
},
"cardNameIdentifier": {
"type": "string",
"description": "When defining a Card in AllCards.json or AllSets.json, you can have the *Card:Name* mapped to the field defined by cardNameIdentifier. Most custom games will likely want to keep the default cardNameIdentifier.",
"default": "name"
},
"cardNameIsUnique": {
"type": "boolean",
"description": "If cardNameIsUnique is true, different Cards are not allowed to have the same *Card:Name*. Cards with the same name will be treated as reprints, with the option to hide reprints available. If cardNameIsUnique is false, DeckFileType.Txt will require <deckFileTxtId> for every Card.",
"default": true
},
"cardPrimaryProperty": {
"type": "string",
"description": "The cardPrimaryProperty is the *Card:Property* that is first selected and displayed in the Card Viewer, which appears whenever a user selects a card."
},
"cardProperties": {
"type": "array",
"description": "cardProperties defines the name keys for *Card:Property*s. The values should be mapped in AllCards.json or AllSets.json.",
"items": {
"$ref": "#/definitions/PropertyDef"
}
},
"cardPropertyIdentifier": {
"type": "string",
"description": "When defining a Card in AllCards.json or AllSets.json, you can integrate objectEnum and objectEnumList properties with enums by using cardPropertyIdentifier. Most custom games will likely want to keep the default cardPropertyIdentifier.",
"default": "id"
},
"cardRotationDefault": {
"type": "integer",
"description": "Cards will be rotated <cardRotationDefault> degrees, unless you override with cardRotationIdentifier. Most custom games will likely want to keep the default cardRotationDefault.",
"format": "int32",
"default": 0
},
"cardRotationIdentifier": {
"type": "string",
"description": "When defining a Card in AllCards.json or AllSets.json, you can set <cardRotationIdentifier> to an int field that indicates the rotation of a card in degrees. If left blank or missing, cards will be rotated <cardRotationDefault> degrees."
},
"cardSetIdentifier": {
"type": "string",
"description": "When defining a Card in AllCards.json, you can have the *Card:SetCode* mapped to the field defined by cardSetIdentifier. If the mapping is missing, CGS will use <setCodeDefault>. Most custom games will likely want to keep the default cardSetIdentifier.",
"default": "set"
},
"cardSetIsObject": {
"type": "boolean",
"description": "If cardSetIsObject is set to true, <cardSetIdentifier> should point to an object (or list of objects) that follows the rules for AllSets.json."
},
"cardSetNameIdentifier": {
"type": "string",
"description": "When defining a Card in AllCards.json, you can have the *Card:SetCode* mapped to the field defined by cardSetIdentifier. That Set's name can be defined by cardSetNameIdentifier.",
"default": "setname"
},
"cardSetsInList": {
"type": "boolean",
"description": "If cardSetInList is set to true, Cards will be duplicated for each Set in <cardSetIdentifier>."
},
"cardSetsInListIsCsv": {
"type": "boolean",
"description": "If cardSetsInListIsCsv is set to true, Cards will be duplicated for each Set found in the comma-separated list of <cardSetIdentifier>."
},
"cardSize": {
"description": "cardSize indicates a card's width and height in inches.",
"default": "(x: 2.5, y: 3.5)",
"oneOf": [
{
"$ref": "#/definitions/Float2"
}
]
},
"cgsGamesLink": {
"type": [
"null",
"string"
],
"description": "cgsGamesLink is a clickable url that will take the user directly to this game on the CGS Games website, which can be shared between users.",
"format": "uri"
},
"copyright": {
"type": "string",
"description": "copyright indicates the legal owner of this Card Game. CGS will display this value in the bottom-left corner of the Main Menu."
},
"deckFileAltId": {
"type": "string",
"description": "When saving or loading a deck with <deckFileType> NOT txt, deckFileAltId refers to the *Card:Property* used to uniquely identify each Card. For hsd, this is stored as a varint within the deck string.",
"default": "dbfId"
},
"deckFileTxtId": {
"description": "When saving a deck as txt, different Cards may share the same name, and if they do, the *Card:<deckFileTxtId>* will be used to uniquely identify Cards.",
"default": "set",
"oneOf": [
{
"$ref": "#/definitions/DeckFileTxtId"
}
]
},
"deckFileType": {
"description": "When saving a deck, the formatting for how it is saved and loaded is defined by the deckFileType. dec refers to the old MTGO deck file format. hsd refers to the Hearthstone deck string format. ydk refers to the YGOPRO deck file format. txt parses each line for the following: <Quantity> [*Card:Id*] *Card:Name* (*Card:SetCode*).",
"default": "txt",
"oneOf": [
{
"$ref": "#/definitions/DeckFileType"
}
]
},
"deckPlayCards": {
"type": "array",
"description": "deckPlayCards indicates cards that should automatically be played when a player loads a deck in Play Mode.",
"items": {
"$ref": "#/definitions/DeckPlayCard"
}
},
"deckSharePreference": {
"description": "For networked games, CGS will use deckSharePreference to: ask players if they want to share the same deck, force all players to share the same deck, or force an individual deck for each player.",
"default": "share",
"oneOf": [
{
"$ref": "#/definitions/SharePreference"
}
]
},
"deckUrls": {
"type": "array",
"description": "CGS will go through each DeckUrl and save the data from *DeckUrl:Url* to 'decks/*DeckUrl:Name*.<deckFileType>'",
"items": {
"$ref": "#/definitions/DeckUrl"
}
},
"enums": {
"type": "array",
"description": "The value is displayed to the user through the UI while the keys remain hidden. If the keys are entered as a hexadecimal integers (prefixed with 0x), multiple values can go through bitwise and/ors to have a single enumValue represent multiple values. The multiple values would be displayed together to the user, using | as the delimiter.",
"items": {
"$ref": "#/definitions/EnumDef"
}
},
"extras": {
"type": "array",
"description": "Describes extra cards separate from the main deck: The hsd deckFileType treats all extra cards as Heroes, and the ydk deckFileType treats all extra cards as extra deck cards.",
"items": {
"$ref": "#/definitions/ExtraDef"
}
},
"gameBoardImageFileType": {
"type": "string",
"description": "gameBoardImageFileType is the file type extension for the image files that CGS downloads for each game board.",
"default": "png"
},
"gameBoardCards": {
"type": "array",
"items": {
"$ref": "#/definitions/GameBoardCard"
}
},
"gameBoardUrls": {
"type": "array",
"description": "CGS will go through each GameBoardUrl and save the data from *GameBoardUrl:Url* to 'boards/*GameBoardUrl:Id*.<gameBoardImageFileType>'",
"items": {
"$ref": "#/definitions/GameBoardUrl"
}
},
"gameCardRotationDegrees": {
"type": "integer",
"description": "gameCardRotationDegrees indicates how many degrees to rotate Cards in Play Mode.",
"format": "int32",
"default": 90
},
"gameDefaultCardAction": {
"description": "If possible, CGS will take the gameDefaultCardAction when a Card is double-clicked in Play Mode.",
"default": "flip",
"oneOf": [
{
"$ref": "#/definitions/CardAction"
}
]
},
"gamePlayDeckName": {
"type": "string",
"description": "gamePlayDeckName is the name of the card stack shown when a player loads a deck. If <gamePlayDeckName> is empty, the *Deck:Name* is used."
},
"gamePlayDeckPositions": {
"type": "array",
"description": "Each deck loaded during a game will be loaded to its corresponding position in gamePlayDeckPositions. The first deck loaded will go to the first position, second to second, etc.",
"items": {
"$ref": "#/definitions/Float2"
}
},
"gamePlayZones": {
"type": "array",
"description": "gamePlayZones will appear in the Play Area in Play Mode.",
"items": {
"$ref": "#/definitions/GamePlayZone"
}
},
"gameStartDecks": {
"type": "array",
"description": "gameStartDecks indicates decks that should automatically be loaded when a player starts playing in Play Mode.",
"items": {
"$ref": "#/definitions/DeckUrl"
}
},
"gameStartHandCount": {
"type": "integer",
"description": "gameStartHandCount indicates how many cards are automatically dealt from a loaded deck to a player's hand.",
"format": "int32"
},
"gameStartPointsCount": {
"type": "integer",
"description": "gameStartPointsCount indicates how many points are automatically assigned to each player.",
"format": "int32"
},
"playMatImageFileType": {
"type": "string",
"description": "playMatImageFileType is the file type extension for the image file that CGS downloads from playMatImageUrl.",
"default": "png"
},
"playMatImageUrl": {
"type": [
"null",
"string"
],
"description": "If playMatImageUrl is a valid url, CGS will download the image at that url and save it as PlayMat.<playMatImageFileType>. CGS will use the PlayMat.<playMatImageFileType> as the background image while in Play Mode. If CGS is unable to get this image, CGS will use the default table image.",
"format": "uri"
},
"playMatSize": {
"description": "playMatSize indicates the width and height in inches of the play area in Play Mode.",
"default": "(x: 36, y: 36)",
"oneOf": [
{
"$ref": "#/definitions/Float2"
}
]
},
"playMatGridCellSize": {
"description": "playMatGridCellSize indicates the width and height in inches of each cell in the play area in Play Mode.",
"default": "(x: 0.5, y: 0.5)",
"oneOf": [
{
"$ref": "#/definitions/Float2"
}
]
},
"rulesUrl": {
"type": [
"null",
"string"
],
"description": "rulesUrl should link to this game's online rulebook.",
"format": "uri"
},
"setCardsIdentifier": {
"type": "string",
"description": "When defining a Set in AllSets.json, you can also define Cards to include in that Set by indicating them with setCardsIdentifier. Most custom games will likely want to keep the default setCardsIdentifier.",
"default": "cards"
},
"setCardsUrlIdentifier": {
"type": "string",
"description": "When defining a Set in AllSets.json, you can also define Cards to include in that Set by indicating them with SetCardsUrlIdentifier. Most custom games will likely want to keep the default SetCardsUrlIdentifier.",
"default": "cardsUrl"
},
"setCodeDefault": {
"type": "string",
"description": "If a Card does not specify its Set, it will be included in the Set with *Set:Code* specified by setCodeDefault. This Set's name is specified by setNameDefault.",
"default": "_CGSDEFAULT_"
},
"setCodeIdentifier": {
"type": "string",
"description": "When defining a Set in AllSets.json, you can have the *Set:Code* mapped to the field defined by setCodeIdentifier. Most custom games will likely want to keep the default setCodeIdentifier.",
"default": "code"
},
"setDataIdentifier": {
"type": "string",
"description": "If setDataIdentifier is set to a non-empty string, AllSets.json will be parsed as a JSON object: {\"@setDataIdentifier\":{\"$ref\":\"AllSets.json\"}}"
},
"setNameDefault": {
"type": "string",
"description": "If a Card does not specify its Set, it will be included in the Set with *Set:Code* specified by setCodeDefault. This Set's name is specified by setNameDefault.",
"default": "_CGSDEFAULT_"
},
"setNameIdentifier": {
"type": "string",
"description": "When defining a Set in AllSets.json, you can have the *Set:Name* mapped to the field defined by setNameIdentifier. If the mapping is missing, CGS will use the *Set:Code*. Most custom games will likely want to keep the default setNameIdentifier.",
"default": "name"
}
},
"definitions": {
"CardBackFaceImageUrl": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "The id of the card back"
},
"url": {
"type": "string",
"description": "The url from which to download the card back",
"format": "uri"
}
}
},
"PropertyDef": {
"type": "object",
"additionalProperties": false,
"required": [
"name",
"type"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the property: This name can be referenced to lookup a Card's property"
},
"type": {
"description": "The type of the property",
"default": "string",
"oneOf": [
{
"$ref": "#/definitions/PropertyType"
}
]
},
"display": {
"type": "string",
"description": "The name of the property as it is displayed to the end user"
},
"displayEmpty": {
"type": "string",
"description": "The value to display if the value is null or empty"
},
"displayEmptyFirst": {
"type": "boolean",
"description": "List <displayEmpty> as the first option if this property is an enum?"
},
"delimiter": {
"type": "string",
"description": "If this property is a stringList or stringEnumList, the value will be delimited by this delimiter"
},
"backName": {
"type": "string",
"description": "If the Card is a back Face: This name can be referenced to lookup a Card's property"
},
"frontName": {
"type": "string",
"description": "If the Card is a front Face: This name can be referenced to lookup a Card's property"
},
"properties": {
"type": "array",
"items": {
"$ref": "#/definitions/PropertyDef"
}
}
}
},
"PropertyType": {
"type": "string",
"description": "",
"x-enumNames": [
"String",
"EscapedString",
"Integer",
"Boolean",
"Object",
"StringEnum",
"StringList",
"StringEnumList",
"ObjectEnum",
"ObjectList",
"ObjectEnumList"
],
"enum": [
"string",
"escapedString",
"integer",
"boolean",
"object",
"stringEnum",
"stringList",
"stringEnumList",
"objectEnum",
"objectList",
"objectEnumList"
]
},
"Float2": {
"type": "object",
"additionalProperties": false,
"properties": {
"x": {
"type": "number",
"format": "float"
},
"y": {
"type": "number",
"format": "float"
}
}
},
"DeckFileTxtId": {
"type": "string",
"description": "",
"x-enumNames": [
"Id",
"Set"
],
"enum": [
"id",
"set"
]
},
"DeckFileType": {
"type": "string",
"description": "",
"x-enumNames": [
"Dec",
"Hsd",
"Lor",
"Txt",
"Ydk"
],
"enum": [
"dec",
"hsd",
"lor",
"txt",
"ydk"
]
},
"DeckPlayCard": {
"type": "object",
"additionalProperties": false,
"properties": {
"cardQuery": {
"type": "string",
"description": "CGS will automatically play the Card that matches cardQuery, when the player loads a Deck in Play Mode matching deckQuery"
},
"deckQuery": {
"type": "string",
"description": "CGS will automatically play the Card that matches cardQuery, when the player loads a Deck in Play Mode matching deckQuery"
},
"position": {
"description": "Indicates the played Card's position in inches",
"oneOf": [
{
"$ref": "#/definitions/Float2"
}
]
},
"rotation": {
"type": "integer",
"description": "Indicates the played Card's rotation in degrees",
"format": "int32"
}
}
},
"SharePreference": {
"type": "string",
"description": "",
"x-enumNames": [
"Ask",
"Share",
"Individual"
],
"enum": [
"ask",
"share",
"individual"
]
},
"DeckUrl": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The name of the deck"
},
"txt": {
"type": "string",
"description": "An optional path that can be used to override the url. See @CardGameDef.json#/properties/allDecksUrlTxtRoot"
},
"url": {
"type": "string",
"description": "The url from which to download the deck",
"format": "uri"
},
"isAvailable": {
"type": "boolean",
"description": "Optionally set to false to ignore this deck url",
"default": "true"
}
}
},
"EnumDef": {
"type": "object",
"additionalProperties": false,
"properties": {
"property": {
"type": "string",
"description": "Refers to a *Property:Name* in <cardProperties>"
},
"values": {
"type": "object",
"description": "Dictionary with string key-value pairs",
"additionalProperties": {
"type": "string"
}
}
}
},
"ExtraDef": {
"type": "object",
"additionalProperties": false,
"properties": {
"group": {
"type": "string",
"description": "A group of extra cards is displayed together with this label in Play Mode",
"default": "Extras"
},
"property": {
"type": "string",
"description": "Refers to a *Property:Name* in <cardProperties>"
},
"value": {
"type": "string",
"description": "If *Card:Properties[ExtraDef:Property]* equals *ExtraDef:Value*, then that card will be moved from the main deck to this extra deck"
}
}
},
"GameBoardCard": {
"type": "object",
"additionalProperties": false,
"properties": {
"card": {
"type": "string",
"description": "When a deck is loaded in Play Mode, any card with *Card:Id* = *Card* will cause *Boards* to be put into the play area."
},
"boards": {
"type": "array",
"items": {
"$ref": "#/definitions/GameBoard"
}
}
}
},
"GameBoard": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "The id of the board"
},
"offsetMin": {
"description": "Indicates the position (in inches) of the bottom-left corner",
"oneOf": [
{
"$ref": "#/definitions/Float2"
}
]
},
"size": {
"description": "Indicates the board's width and height in inches",
"oneOf": [
{
"$ref": "#/definitions/Float2"
}
]
}
}
},
"GameBoardUrl": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "The id of the board"
},
"url": {
"type": "string",
"description": "The url from which to download the board image",
"format": "uri"
}
}
},
"CardAction": {
"type": "string",
"description": "",
"x-enumNames": [
"Move",
"Rotate",
"Tap",
"Flip",
"Discard"
],
"enum": [
"move",
"rotate",
"tap",
"flip",
"discard"
]
},
"GamePlayZone": {
"type": "object",
"additionalProperties": false,
"properties": {
"face": {
"description": "When a Card enters the Game Play Zone, the Card will display this face",
"default": "any",
"oneOf": [
{
"$ref": "#/definitions/FacePreference"
}
]
},
"defaultCardAction": {
"description": "If possible, CGS will take the defaultCardAction when a Card is double-clicked in the Game Play Zone. If null, defaults to <gameDefaulCardAction>",
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/CardAction"
}
]
},
"position": {
"description": "Indicates the Game Play Zone's position in inches",
"oneOf": [
{
"$ref": "#/definitions/Float2"
}
]
},
"rotation": {
"type": "integer",
"description": "Indicates the Game Play Zone's rotation in degrees",
"format": "int32"
},
"size": {
"description": "Indicates the Game Play Zone's width and height in inches",
"oneOf": [
{
"$ref": "#/definitions/Float2"
}
]
},
"type": {
"description": "The Game Play Zone type from area, horizontal, or vertical",
"default": "area",
"oneOf": [
{
"$ref": "#/definitions/GamePlayZoneType"
}
]
}
}
},
"FacePreference": {
"type": "string",
"description": "",
"x-enumNames": [
"Any",
"Down",
"Up"
],
"enum": [
"any",
"down",
"up"
]
},
"GamePlayZoneType": {
"type": "string",
"description": "",
"x-enumNames": [
"Area",
"Horizontal",
"Vertical"
],
"enum": [
"area",
"horizontal",
"vertical"
]
}
}
}