TSV Documentation - seastan/dragncards GitHub Wiki

A TSV file is a tab-separated-value file. It is meant for holding columnar data, much like a CSV (comma-separated-value) file. However, since commas frequently appear in actual card text, we use tabs as delimiters between columns instead of commas.

Most spreadsheet applications like Google Sheets or Microsoft Excel offer an option for exporting directly to a .tsv file.

A DragnCards plugin can be built using a single .tsv file containing all the card info, or it can be built using multiple .tsv files containing different subsets of the card pool. Note that if using multiple files, the headers (the first row in the file that acts as a title for each column) must match.

Required Columns

Every .tsv must have at least the following columns:

  • databaseId
  • name
    • The name of the card.
  • imageUrl
    • The url for the card image.
    • Must end in .jpg or .png.
    • Can either be the full url for a card (https://dragncards-lotrlcg.s3.amazonaws.com/cards/English/51223bd0-ffd1-11df-a976-0801200c9001.jpg) or the tail end of the url 51223bd0-ffd1-11df-a976-0801200c9001.jpg if you have provided a gameDef.imageUrlPrefix
  • cardBack
    • The id for the card back, which must be present in gameDef.cardBacks
    • If you provide a value of multi_sided instead of a card back id, it will combine this card with the neighboring rows in the .tsv that all share the same databaseId (those rows must also put multi_sided for their cardBack column)
    • The first occurrence of a given databaseId in the .tsv will be labelled as the "A" side. The next instance of the same databaseId (which only occurs for multi_sided cards) will be labelled "B", and then "C", and so on. Up to 8 sides are possible for a single card.
  • type
    • The type of card. Must be present in gameDef.cardTypes.

Other columns

The remaining columns are up to you. You can add any number of columns describing various aspects of the card. These properties will be granted to the card when loaded into a game. Note that all data types are treated as strings by default. You can override this by using gameDef.faceProperties.

Examples

Here are some examples of card databases, which you can clone and modify. The required columns have been highlighted in orange.