Cards

Cards

This document will describe how to add cards to the bot. This is from the perspective of the development side and doesn't go into details of syncing from an external place such as with the Google Drive Sync function.

The cards will be put into the $DATA_DIR/cards folder. $DATA_DIR is configured in the .env file.

Folder Structure

The general structure of the cards folder is as follows:

cards           # The main cards folder
| Series 1      # Series folder
| | BRONZE      # Type folder
| | | 1000.jpg  # Card image
| | | 1001.jpg
| | 1.json      # Card metadata file
| Series 2
| | SILVER
| | | 2000.jpg
| | 2.json

The bot when loading will search the cards folder recursively for each json, and then read them to determine what cards should be used for the bot.

Series Metadata

An example of what the metadata files could look like are as follows:

[
    {
        "id": 1,
        "name": "Series 1",
        "cards": [
            {
                "id": "1000",
                "name": "Card 1000 of Series 1",
                "type": 1,
                "path": "Series 1/BRONZE/1000.jpg"
            },
            {
                "id": "1001",
                "name": "Card 1001 of Series 1",
                "type": 1,
                "path": "Series 2/BRONZE?1001.jpg",
                "subseries": "Custom Series Name"
            }
        ]
    }
]

This file will load a series called "Series 1" with the id of 1, containing 2 cards:

Card Type

Number Name Chance Sacrifice Cost (Coins)
0 Unknown - -
1 Bronze 62% 5
2 Silver 31% 10
3 Gold 4.4% 30
4 Manga 2% 40
5 Legendary 0.6% 100

Revision #1
Created 26 July 2024 17:33:05 by Vylpes
Updated 26 July 2024 17:33:26 by Vylpes