Wiki

Clone wiki

Card Editor / Documents / DataSets / DataSets

Data Sets

A Data Set is a Document that defines the the data for a set of related cards, both through card-specific data known as Fields and the Front and Back Layouts used to define each side. It also lets you preview cards and output them to file. The Front and Back Layouts are expected to be the same for every card in the Data Set. If you have multiple types of cards that use different Layouts, then you should make a Data Set for each card type.

When designing Layouts, you have the option to bind Elements to Fields. If the Element's bound Field exactly matches the name of a Field in the Data Set, including capitalization, then the Data Set will populate the Element with data from the matching Field in card previews and image output.

To create a Data Set, click the Add Document button in the Workspace View and select "Data Set".

Data Set View

The Data Set View is divided into 3 sections: the Card Data View, the Front Layout Preview, and the Back Layout Preview.

DataSetView

Card Data View

In the Card Data View, we have:

  1. Add and Remove Card buttons
  2. Add and Remove Field buttons
  3. Import Data button
  4. Output All button
  5. Card Data Grid

CardDataView

Add Card button

The Add Card button allows you to add a Card to the Card Set. When clicked, Card Editor will prompt you to enter the new Card's Id.

Getting the new Card's Id

Card Ids must be unique in the Workspace, even between multiple Data Sets, and Card Editor will let you know if you try to add a duplicate Card.

Remove Card button

The Remove Card button removes the currently selected Card from the Data Set. This button is only enabled if a Card in the Data Set is selected. You can also use the delete key when a Card is selected to remove it.

Add Field button

The Add Field button allows you to add a Field to the Card Set. When clicked, you will be given a menu to select what type of Field to add, either Text, Image, or Color.

Add Field Menu

Card Editor will then prompt you to enter the Field's name.

Getting the new Field's name

Field names must be unique in the Data Set, but you can have two Data Sets that have Fields of the same name. Card Editor will let you know if you try to add a duplicate Field.

Remove Field button

The Remove Field button allows you to remove the currently selected Field. This button is only enabled if a Field in the Data Set is selected. There is no keyboard shortcut to delete Fields. The card Id is not a Field, so it cannot be removed.

Import Data button

The Import Data button allows you to import card data from external sources. Currently, Card Editor supports the following files:

  • CSVs (*.csv)
  • Excel 97-2003 spreadsheets (*.xls)
  • Excel workbooks (*.xlsx)

When clicked, Card Editor will open the Import Data dialog

Import Data dialog

At the top, you enter the path to the file you wish to import. You may also click the "..." button next to it to browse for the file. Below this are various import options and Field specifiers.

Subsection

The subsection defines what part of the import data to use when reading card data. This is specific to the type of file you are trying to load. In the case of Excel spreadsheets/workbooks, this is the name of the specific sheet. This option is not present when loading CSVs.

Use first row as headers

If checked, this option will tell Card Editor to assume that the first row of data are actually headers and not card data. It will use them as default names for Fields.

Id Column

The Id Column is the name of the column that should be used to generate each card's unique Id. If you have a column named "id" (ignoring capitalization), then this will automatically be selected as the Id Column, though you may change this selection at any time. There is also a blank option, which means that card Ids will automatically be generated based on the card's position in the file and the name of the Data Set you are importing.

Overwrite Existing Data

If checked, this option will overwrite all existing cards and fields in the Data Set. If unchecked, then it will attempt to add the imported data to whatever data already exists. In this case, Card Editor will only add new Fields if there is not a Field with the same name already present. Additionally, any imported card with the same Id as an existing one will be ignored.

Field Specifiers

As you select the file and change various options, the Field specifiers will update automatically. The Field Name is the name of each field that will be imported. If the "Use first row as headers" option is selected, it will automatically read these from the first row of data. Otherwise, it will generate a name. In either case, you may type in a new name if you wish.

Card Editor will also attempt to deduce the type of each Field based on the first row of actual card data. The rules for this are simple:

  1. Use Color if the data can be parsed as a color (either as Hex RGB/ARGB, decimal RGB/ARGB, or named values)
  2. Use Image if the data ends in a supported image file extension
  3. Use Text otherwise

You may also change the Field Type at any time.

Finally, each Field has an Include checkbox. If you have other metadata stored in your file that is not actually card information (such as personal notes or comments), you may uncheck the corresponding box to ignore that column for importing. Note that whatever field you've chosen as the Id Column must also be included.

Once you have chosen all of your import options, click the Import button at the bottom to load the data into your Data Set.

Output All button

The Output All button allows you to quickly output every card as image files. This button is only enabled if the Data Set has both its Front and Back layout defined. When clicked, Card Editor will ask you for a folder where it should put the final outputs. See section Outputting Cards to File for more information.

Layout Previews

Both the Front and Back Layout Preview have:

  1. Layout Selector
  2. Clear Layout button
  3. Output Preview button
  4. Preview
  5. Error Indicator

Layout Preview

Layout Selector

The Layout Selectors both displays the current selected Layout and lets you choose a new one. When clicked, Card Editor gives you a list of available Layouts to choose from. If no Layouts have been selected, then you can select any Layout in the Workspace. If either the Front or Back Layouts have been selected already, then your options for the other Layout are limited to those of the same size and bleed area. For example, if you chose a Poker card-sized layout with 1/8" bleed for the Front Layout, then your choices for a Back Layout are limited to other Poker card-sized layouts with 1/8" bleed.

Clear Layout button

The Clear Layout buttons clear out their respective Layout selections. The buttons are only enabled if a Layout has been selected.

Output Preview button

The Output Preview buttons allow you to output the corresponding Layout for the currently selected card to an image file. The buttons are only enabled if you have selected a card and the corresponding Layout. When clicked, Card Editor will ask for the name and location of the file it should save. See section Outputting Cards to File for more information.

Preview

The Preview displays a preview of the currently selected card for the corresponding Layout, excluding its bleed region. If no Layout has been selected, then no preview is shown. If a Layout has been selected but a card has not, then it will show the Layout, but any bound Elements will not appear. If both a Layout and card have been selected, then it will fill out the bound Elements with the data from their corresponding Fields.

Bear in mind that the Preview always displays in screen resolution, at 96 pixels-per-inch (PPI). If you are expecting to output at print resolution (300 PPI), then images authored for Glyphs and Image Elements at that resolution will appear incorrect in the preview. Rest assured that they will be correct in the final output.

If a CMYK Converter has been set in the Settings Window, then the preview will convert the card to an appropriate CMYK equivalent to match the printed result.

Error Indicator

The Error Indicator informs you when there are errors with the currently selected Layout. Hovering over the icon will give display a tooltip explaining the error, and how to fix it. Common errors include not have selected any Layout, or having Layouts whose sizes do not match.

Outputting Cards to File

When outputting cards to files, you will be asked to first provide the location. In the case of a single-layout output from the Output Preview buttons, you will need to provide both the folder and filename. In the case of a batch output from the Output All button, you only need to provide a folder. The default name for a card's output file is the card's Id, suffixed with a hyphen and either "front" or "back", depending on which Layout is used (e.g. "Hero001-front").

If a Layout has no bound elements, then the default file name will be the Data Set's name followed by a hyphen and "front" or "back". In addition, only one file is output for that Layout when creating batch output.

Once you've selected the locations for the output, Card Editor will ask you for the output parameters:

Output Parameters

Size and Resolution

In this section, you select the resolution of the resulting image file, and whether to include the bleed region. By default, Print Resolution (300 PPI) is selected, but you can also select Screen Resolution (96 PPI) or provide a custom output resolution.

Orientation

In this section, you can choose to rotate the resulting output in a clockwise direction. Card Editor assumes that cards should be upright for printing, so it will select 0 or 90 degrees depending on which side of the card is longer. If you are doing a batch output, you are given the option to flip the back Layout of the card, rotating it an additional 180 degrees. This may desirable for cards that are flipped for gameplay, depending on which side the card should flip on. When outputting a single card Layout, this option is not available.

Format

In this section, you can choose the output image's file format and a CMYK conversion profile. Available output image formats are:

  • Bmp
  • Jpg
  • Png
  • Tiff

Updated