Coder Social home page Coder Social logo

thronesdb-json-data's Introduction

ThronesDB cards JSON data Build status

The goal of this repository is to store ThronesDB card data in a format that can be easily updated by multiple people and their changes reviewed.

Validating and formatting JSON

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.

Description of properties in schemas

Required properties are in bold.

Cycle schema

  • code - identifier of the cycle. One single lowercase word. Examples: "core", "westeros", "war".
  • name - properly formatted name of the cycle. Examples: "Core Set", "Westeros Cycle", "War of the Five Kings Cycle".
  • position - number of the cycle, counting in chronological order. For packs released outside of normal constructed play cycles (such as draft packs), the special cycle with position 0 should be used. Examples: 1 for Core Set, 4 for War of the Five Kings Cycle.
  • size - number of packs in the cycle. Examples: 1 for big boxes, 6 for regular chapter pack cycles.

Pack schema

  • code - identifier of the pack. The acronym of the pack name, with matching case, except for Core Set. Examples: "Core" for Core Set, "TKP" for The King's Peace, "WotN" for Wolves of the North.
  • cycle_code - identifier of the cycle the pack belongs to. Must refer to one of the values from cycles' "code". Examples: "core" for Core Set, "westeros" for Westeros Cycle.
  • name - properly formatted name of the pack. Examples: "Core Set", "Wolves of the North", "The King's Peace".
  • position - number of the pack within the cycle. Examples: 1 for Core Set, 1 for Taking the Black from Westeros Cycle, 3 for For Family Honor from War of the Five Kings Cycle.
  • released - date when the pack was officially released by FFG. When in doubt, look at the date of the pack release news on FFG's news page. Format of the date is YYYY-MM-DD. May be null - this value is used when the date is unknown. Examples: "2015-10-08" for Core Set, "2015-12-09" for Taking the Black, null for unreleased previewed packs.
  • size - number of different cards in the pack. May be null - this value is used when the pack is just an organizational entity, not a physical pack. Examples: 120 for Core Set, 55 for most deluxe expansions, 20 for most chapter packs, null for assorted draft cards.

Card schema

  • claim - Plots only
  • code - 5 digit card identifier. Consists of two zero-padded numbers: first two digits are the cycle position, last three are position of the card within the cycle (printed on the card).
  • cost - Play cost of the card. Relevant for all cards except agendas and titles. May be null - this value is used when the card has a special, possibly variable, cost.
  • deck_limit
  • faction_code
  • flavor
  • illustrator
  • income - Plots only
  • initiative - Plots only
  • is_intrigue - Characters only
  • is_loyal
  • is_military - Characters only
  • is_power - Characters only
  • is_unique
  • name
  • octgn_id
  • pack_code
  • position
  • quantity
  • reserve - Plots only
  • strength - Characters only
  • text
  • traits
  • type_code - Type of the card. Possible values: "agenda", "attachment", "character", "event", "location", "plot", "title"

JSON text editing tips

Full description of (very simple) JSON format can be found here, below there are a few tips most relevant to editing this repository.

Non-ASCII symbols

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.

Quotes and breaking text into multiple lines

To have text spanning multiple lines, use \n to separate them. To have quotes as part of the text, use \". For example, "flavor": "\"Winter is Coming.\"\n-Eddard Stark" results in following flavor text:

"Winter is coming."
-Eddard Stark

A Game of Thrones symbols

These can be used in a card's text section.

  • [baratheon]
  • [intrigue]
  • [greyjoy]
  • [lannister]
  • [martell]
  • [military]
  • [thenightswatch]
  • [power]
  • [stark]
  • [targaryen]
  • [tyrell]
  • [unique]

Translations

To merge new changes in default language in all locales, run the CoffeeScript script update_locales.

Pre-requisites:

  • node and npm installed
  • npm -g install coffee-script

Usage: coffee update_locales.coffee

thronesdb-json-data's People

Contributors

alsciende avatar fafranco82 avatar duketax avatar maskou avatar ystros avatar stopfstedt avatar brine avatar zacchiro avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.