What are Affinity Publisher and Tabletop Simulator?
Affinity Publisher is part of the Serif Affinity suite, a competitor of Adobe and similar graphic design tools. Publisher is the direct rival to Adobe InDesign and helps with creating printing ready files – like magazines, flyers or other ad-material. But it also can be used to create board game rules, booklets and cards, as it is designed to handle exact sizes including print margins, bleeding and converting the output to manufacturing ready PDFs. The main reason for choosing Affinity Publisher is the very low one-time price compared to Adobe products (around 80 Euro for a standalone license of Publisher, with sometimes 50% off during special promotions and a complete pack including Photo and Designer, also helpful programs on their own).
Tabletop Simulator (TTS) is a tool to create and play board games in a virtual environment similar to sitting around a table. If you are familiar with 3D-shooter-games, you will directly know half of the controls. There are many competitors out there, but TTS is the current standard product that allows for most customization and has the biggest user base (see also the article about Tabletopia vs. Tabletop Simulator). The only downside is a one time payment of around 20 Euro/USD (sometimes 50% off during holidays and even cheaper in a 4 player license pack to gift to friends).
How to create cards with Affinity Publisher
First of all, you have to create the master page. This includes setting up the document to the exact card size you need. For example, make the document size 63 mm x 88 mm @ 300 dpi. Most manufacturers need a bleed of 3-5 mm (overprint in case there is some shifting within the printer) and a safe area (margin inside the card) of 3-5 mm. You will get all of these from your manufacturer. For importing cards into Tabletop Simulator, we do not need any bleed, but even if you include it right from the start, Publisher allows to not export the bleed area with a simple checkmark.
It is recommended to create different Master Pages for each different card design. If you have multiple card designs with a lot of cards, it might be helpful to create multiple documents, one for each card design.
As soon as the base sizes are set, import the base image for your card design into the master page (the background image) and at text boxes on top of the master page with all the different texts you want to have on top of the picture design. Set all font names, font sizes and sample text to your card with the most text and arrange everything as needed.
If you should have multiple cards with recurring text or images, you can copy these parts to different master pages: For example, if you often have cards with either a fire or a water symbol, this could be a Master Page named “Water”, which allows to easily make this a “water card” by simply assigning the Water master page to the page later on.
Now create as many pages as you have cards, assign all the master pages appropriately and change the text on each page to the card content (could also be automated using Affinity Data Merge Manager by importing from a CSV/Excel file, but I wanted to manually create each card).
As soon as you have all cards ready as single pages, you can already export them. You can easily export them as single JPG or PNG files to use with the Game Crafter (include bleed and full resolution JPG or use PNG) or export them as a PDF with each card on a page for manufacturers (make sure to set the correct PDF CMYK color space before exporting). Or export the cards as JPG with no bleed as “Screenshots” or to import to Tabletopia.
To export the cards for Tabletop Simulator, we need them as JPGs (make sure to use RGB, as CMYK-JPGs will crash TTS and will be a lot larger). Use the full resolution for now and export all cards into a sub-folder of your choice. Simply type any name and Publisher will automatically name all files the same with the number of the card as a suffix (…_1, …_2, and so on).
Tabletop Simulator card imports
TTS uses a special format to import cards with all cards per deck in a single file. This file can hold a maximum of 10 cards in 7 rows, so overall 10 cards per file (Tip: If your deck has more than 70 cards, simply merge multiple decks). Also, the whole file should only have a maximum of 4096×4096 pixels, otherwise TTS cannot handle the file anymore.
This means, we need to decide first, which resolution and how many cards we need. In my case, the cards have small text on them, so I decided to use the highest possible resolution with the most cards possible. If your game only has pictures, you can also use smaller resolutions.
Create a new Affinity Publisher file
If you used the Poker Size example, the exported JPG cards should have a standard pixel size of 745 px by 1040 px. If you use the full size, you can only put 5 x 745 cards side by side until you reach the limit of TTS (in this case 3725 pixels) with 3 rows of cards. As we want to import all 70 cards in one file, use a smaller resolution as you like, as long as the aspect ration of the cards stays the same and you can fit 10 cards side by side (so a maximum of 408 pixels on card width, which would result in 570 pixels height). In that case, we would set the width of the file to 4080 px and the height to 3990 px (7 rows x 570 pixels) @ 300 dpi. No bleed or margins are required on this file, turn off facing pages. Save this file as something like “TTS_Autofill” or similar.
Now select the “Data Merge Layout Tool” (should be on the left toolbar in Publisher) and create a box that covers the whole document size (4080 px by 3990 px). In the top toolbar, set the following settings:
Gutter 0px, Rows 7, Columns 10, Record Offset 0. The cell width: 408 px and cell height: 570 px should be automatically filled to this (if not, check your document or data merge layout sizes).
Within the Data Merge Layout Layer, we create one picture frame on the very top left in the exact size of one cell (408 px by 570 px). This should replicate the frame automatically to all other cells (visible in the preview on the left).
We need to leave Affinity Publisher for a moment and create a CSV-file (comma separated values file) of all the card pictures we exported earlier. As we only need to import one picture per line and no other values, we simply need to create the full path to each picture in every line, nothing else. To create such a file, you can use the following command in a cmd-window on Windows (after navigating to the correct folder with “cd C:\Foldername”):
dir /B /S > C:\AllCards.csv
After you created the file, open it with a text-editor (for example Notepad) and add a first line named “@PicLink” (You can name that whatever you like, but the @ needs to be there as a reference name for the column). You can also manually create such a csv-file by simply adding all card picture paths and the Column Name yourself. I just found that it is easier to get all the picture paths easier this way. Depending on your sort order in Windows you also might want to manually get the pictures named _1, _2, and so on to the front of the file (sometimes they are sorted together with _11, _12, …).
Sample File content:
@PiCLink C:\Game Folder\ExportedCards\ActionCards_1.jpg C:\Game Folder\ExportedCards\ActionCards_2.jpg C:\Game Folder\ExportedCards\ActionCards_3.jpg C:\Game Folder\ExportedCards\ActionCards_4.jpg ...
Now go back to Affinity, click on “Document > Data Merge Manager” and select the “Add Data Merge Source” icon (looking like a new sheet of paper in the lower left corner). Select your newly generated CSV file, then select the checkbox next to “Preview with record” and close it for now or move it to the side.
Then click on “View > Studios > Fields” (on PC/Windows, Mac seems to have that under “Windows” or similar). This will open a new window with the available fields. Select the picture frame layer within your data merge layer and then double-click on the “Fields > Date Merge – Your.csv > PicLink” line. This will link the picture frame layer with the PicLink reference from the CSV.
By now you already should see a preview of your first card populated in all of the cells! Congratulations! If not, make sure that you followed all steps above. Publisher should automatically put the cards in into the correct size, even if you exported them at a higher resolution earlier, as long as the ratio fits. If something looks off (for example some larger white lines appear), you need to recalculate your pixel sizes or check if the picture frame is exactly positioned.
The final step is to go back to the “Data Merge Manager” (under “Document”) and click on “Generate”. This will take a moment and generate the complete new file. This file can be exported as a JPG. Keep the exact size, but you can play around with the JPG quality (in most cases, 70-80% is fine and reduces file size massively, in some cases you can even go down to 50%, depending on how small your text is and how the graphics look like). Simply discard this new file as soon as you have exported it, you can generate a new one whenever you like.
Whenever you change any of the cards, simply export the cards into the same directory (using the same export name without numbers will simply overwrite the existing files), then load the TTS_Autofill file, open the Data Merge Manager and click on Generate. As long as you do not change the JPG location, it will grab the correct files and generate your TTS file automatically. If you add or remove cards, simply add/remove them in the CSV file.
Within TTS, you can simply load the file as a card deck, specify the number of cards and click on import. Just make sure the back image has the same pixel sizes as one of your front images.
If you add more than 70 pictures in the CSV file, Publisher will simply create multiple pages after you generate the TTS file. You can export all pages at the same time and then import all files as a separate deck.
You can also point to non-existing files in the CSV file (for example “C:\Empty.jpg”) and Publisher will ignore this file, but keep the spot empty. With this you can easily fill complete decks of cards and then resume with the second deck of cards at the correct position.