Skip to content

How to Add a Card to the Game

DuncanSzabaga edited this page Nov 17, 2025 · 1 revision
Image

Step 1: Append your new card entry to the end of ./datafiles/sample.json/.

Example card entry

{
    "id": "1",                      // Unique ID for the card  **make sure to not add an existing ID
    "name": "Spectral Leap",           // Display name of the card
    "type": "movement",                // Card category (e.g. movement, attack, passive)
    "piece_restriction": "Knight",     // Which chess piece can use it (Pawn, Queen, King, Rook, Bishop, All)
    "description": "The Knight may phase through enemy pieces when moving.", 
                                       // Text shown in game
    "art_id": "spectral_leap",         // ID for the artwork asset 
    "effect": {                        // Special behavior or parameters. 
                                       // If you're unsure about it, leave it empty like "effect": {}  
        "phase_through_enemies": true,
        "cooldown_turns": 3
    }
}

Step 2: Add a sprite for the card in ./Sprites/Cards/.

  • Go to the folder and the right click to create a sprite, import a picture to the sprite.
  • Resizing is required to match with the card format, so it won't overlap with other elements.
  • 200 × 276 pixels is the ideal size for now.
Image

How to resize the sprite in GameMaker (required)

  1. Open the sprite in the Image Editor.
Image
  1. In the top menu, click Image → Resize All Frames.
Image
  1. Set the image size to 200 × 276 pixels.
    • If the editor keeps the ratio automatically, uncheck Maintain Aspect Ratio.
    • Then click Apply.
Image

Step 3: Map your art_id with the sprite in ./Scripts/PictureMapping.gml/.

  • Each card’s art_id must be linked to its corresponding sprite so the game knows which image to display.
    Follow the format below when adding your new mapping.
Image

Step 4: Test the new card in-game.

  1. Launch the game.
  2. Go to "Card Encyclopedia" and find your card.

You’re done!
Your new card is now added to the database, properly linked with its artwork, and ready to be used in-game.

Clone this wiki locally