-
-
Notifications
You must be signed in to change notification settings - Fork 87
Built In Decks
You can download decks you created from Many Decks using the download button on the deck edit page, these are in the right format to use as built-in decks.
The simplest way to make and edit decks without using Many Decks is using Make Decks, a sister editor project. Note that in general, Many Decks' editor is much easier to use, and probably preferable for most people.
Built-in decks are stored in the decks
folder (although this is configurable) and use the .deck.json5
extension.
Deck ids are lowercase-with-dashes
names unique to the deck. These must be used as the filename (alongside the extension) for the deck and must be added to the configuration to be enabled.
Decks are stored in the JSON5 format. This is a super-set of JSON (essentially JSON with comments for our purposes).
The basic format is very simple:
{
"name": "Your Deck's Name",
"calls": [...],
"responses": [...],
}
The name
is a short name for the deck that will be displayed to users.
calls
is an array of all the calls (black cards) in the deck. Each call is structured as a list of lines of text on the card, where each line of text is a series of parts.
A part can be either some text, or a slot (the underlined "blank" that players will play white cards into). Slots can have transformations applied, and both text and slots can have styles applied.
Text can be a plain string, but if it needs a style applied, it can be an object with a "text"
property and a "style"
property.
Slots can be empty objects, with optional "style"
and "transform"
properties.
"style"
can be one of:
-
"Em"
(emphasised text, i.e: italics)
"transform"
can be one of:
-
"Capitalize"
(make the first character of the response uppercase) -
"UpperCase"
(make the entire response uppercase)
Some example calls:
[
[
{
"transform": "Capitalize"
},
" + ",
{
"transform": "Capitalize"
}
],
[
" = ",
{
"transform": "Capitalize"
},
"."
]
],
[
[
"What are my parents hiding from me?"
],
[
{
"transform": "Capitalize"
},
"."
]
],
[
[
"My fellow Americans: Before this decade is out, we ",
{
text: "will",
style: "Em"
},
", have ",
{},
" on the moon."
]
],
Some things to remember:
- Every card must have at least one slot.
- No whitespace is implied between segments, it must be explicitly given.
- Each line is simply a forced line break, the lines themselves can wrap across multiple lines as needed, but two lines will never follow without a break.
responses
is an array of all the responses (white cards) in the deck. These are much simpler: each one is simply a string that is the text that will be on the card.
All responses should only be capitalized where that capitalization should be forced, and should only contain punctuation where it is an inherent part of the phrase. The strings should also use unicode for special elements, and no HTML encoding.
Examples:
-
"silence"
(no capitalisation is inherent) -
"Justin Bieber"
(names are always capitalised—at least in English) -
"GoGurt®"
(use Unicode, not HTML entities or other encoding, name of product is capitalised) -
"bees?"
(the question mark is an inherent part of the intended card) -
"pooping back and forth. Forever"
(the start isn't inherently capitalized, and the punctuation is internal, capitalisation is inherent following that internal punctuation) -
"owning and operating a Chili’s franchise"
(note the use of the unicode’
over the oft-used'
). -
"the penny whistle solo from “My Heart Will Go On”"
(use“
and”
rather than escaping"
) -
"AIDS"
(capitalisation is inherent to acronyms)