Custom Content - seastan/dragncards GitHub Wiki
Note: This article is about uploading custom card designs. If you just want to upload an alt-art image, you can do that by clicking any card and selecting the alt-art menu option.
DragnCards is a unique platform in terms of online card game emulators in the fact that it is designed so that users can upload custom cards to an existing plugin and make them public for anyone to use.
To do this you need to prepare the following:
1. Online hosting of your card images
Once you have created your custom cards through a tool like Photoshop or Strange Eons, you need to host them online. DragnCards does not host any images. Even plugin authors are required to set up their own hosting of card images for their plugin.
Luckily, hosting images online is not too difficult. I recommend using AWS S3 for this purpose. There are lots of guides online for how to do this.
The key detail, regardless of the hosting service you use, is that you must obtain direct URLs to all your card images. These URLs will end in ".jpg" or ".png". An example of a hosting service that doesn't work is Google Drive, because the URLs you get for those images are not direct image URLs.
Bad URL:
Good URL:
After you have the URLs for all your images, you can move to the next step.
2. Spreadsheet of your card information
To upload your cards to DragnCards, you will need a spreadsheet of card information in the correct format. To get a template for that format, create a room for the plugin, and go to Builder->Custom Content. In the popup that appears, click "Download Example Template". This will download a file called "example-cards.tsv".
Take this file import it to Google Sheets. You can do this by creating a blank spreadsheet then File->Import. Then click "Upload", then "Browse" to find the file. It should automatically detect that it is a tab-separated file.
Your spreadsheet should look something similar to this:
This is a set of example cards generated using the plugin's card definitions. While it should serve as a good guide for inputting your own card data, ultimately the idea is to overwrite everything in this file with your own cards, deleting rows if necessary.
Note: If you have a .txt file of custom cards from DragnCards 1.0, you can convert them to a .tsv using an online tool like this one. It will still require some light editing to match the new format, but you should be able to save a lot of time by copying and pasting columns at a time.
Most of the columns should be self-explanatory. The one that might not be is the "databaseId" column. You can put whatever values you want in here (or simply leave them as they are), but there are a couple things to keep in mind. Firstly, these are the ids that the game engine will use to identify your card. So if you later update your spreadsheet and re-upload it (and update the card image as well), if you maintain the same ids across uploads, all your decks that use that card will now use the updated version. But if you change this id, your decks will break. So when uploading new cards, make sure your plugin keeps all your previous cards as well, or you may have other players coming to you complaining about why you took away their favorite card!
Secondly, the databaseId column is used to denote multi-sided cards. If two consecutive rows are given the same databaseId, and their cardBack column is "multi_sided", DragnCards will understand that each row represents a different side of the same card. You are not limited to just 2-sided cards - in fact you can can have up to 6 "sides" for a single databaseId.
Here is an example of how a sheet might look after being filled in:
Once you've finished entering in the card details in the Google sheet, export it by going File->Download->Tab Separated Values. Then switch back over to the Custom Content popup in DragnCards where you downloaded the example template and this time click "Upload Public Cards" and select your file. The list should then populate with all your cards, showing a small card image in each row, like so:
If you don't see your card images, something is wrong with your hosting. Make sure your images are visible to the public. To troubleshoot, try pasting one of your image URLs into an incognito tab and see if it's visible. If not, you may need to investigate your access settings with your hosting provider. In the case of AWS S3, you may need to ensure you have set a bucket policy that allows for PublicRead.
3. Now build a deck!
Back in the game room, go to Builder->Custom Decks. Click the icon to create a new deck. To add your custom cards to your deck, click "Public" in the right side of the panel. This will update the table to display all public cards. To filter them to just your own, type your username in the Author filter.
After you have finished building your deck, save it by clicking on the save icon . If you want your deck to be public so that other players can use it, click on the share icon
. Public decks can be loaded by users through Menu->Load->Load public custom deck.