The goal of this repository is to store SWDestinyDB card data in a format that can be easily updated by multiple people and their changes reviewed.
Using python >=2.6, type in command line:
./validate.py --verbose --fix_formatting
The above script requires python package jsonschema
which can be installed using pip
via pip install -U jsonschema
.
You can also just try to follow the style existing files use when editing entries. They are all formatted and checked using the script above.
Required properties are in bold.
"AW"
for Awakenings."Awakenings"
.1
for Awakenings.null
- this value is used when the date is unknown. Examples: "2016-12-01"
for Awakenings, null
for unreleased previewed packs.null
- this value is used when the pack is just an organizational entity, not a physical set. Examples: 174
for Awakenings, null
for assorted draft cards.null
- this value is used when the card has a special, possibly variable, cost (i.e. X
values)."AW"
for Awakenings+
) sign for sides that are modified valuesX
value)MD
- Melee damageRD
- Ranged damageF
- FocusDr
- DisruptDc
- DiscardSh
- ShieldR
- ResourceSp
- Special+2RD1
.subtypes.json
file.CustomDeck
identifier which is tied to the graphic for the face of the card, last two are position of the card within the on the graphic."character"
, "upgrade"
, "support"
, "event"
, "battlefield"
Full description of (very simple) JSON format can be found here, below there are a few tips most relevant to editing this repository.
When symbols outside the regular ASCII range are needed, UTF-8 symbols come in play. These need to be escaped using \u<4 letter hexcode>
.
To get the 4-letter hexcode of a UTF-8 symbol (or look up what a particular hexcode represents), you can use a UTF-8 converter, such as this online tool.
To have text spanning multiple lines, use \n
to separate them. To have quotes as part of the text, use \"
. For example, "\"Orange and white: one of a kind.\" <cite>Poe Dameron</cite>"
results in following flavor text:
"Orange and white: one of a kind." Poe Dameron
These can be used in a card's text
section.
[melee]
[ranged]
[focus]
[discard]
[disrupt]
[shield]
[resource]
[special]
[blank]
To merge new changes in default language in all locales, run the CoffeeScript script update_locales
.
Pre-requisites:
node
and npm
installednpm -g install coffee-script
Usage: coffee update_locales.coffee [language code]
(NOTE: a folder with the language code must exists in translations
folder)