Custom Picture Download URLs - Cockatrice/Cockatrice GitHub Wiki

When adding a custom download link, you'll probably need to use a few references in order to find the exact card you're looking for. Here's a list of all the current reference points we support. If there's one that you feel should be added, please open a ticket.

  • !name! → Card Name
    • Example: Polukranos, World Eater
  • !name_lower! → Card Name (lowercase)
    • Example: polukranos, world eater
  • !corrected_name! → Corrected Card Name
    • Example: FireIce (instead of "Fire // Ice")
  • !corrected_name_lower! → Corrected Card Name (lowercase)
    • Example: fireice (instead of "fire // ice")
  • !sflang! → Language shorthand for scryfall according to current language setting, languages that lack localized card images will default to English.
    • Examples: en, zhs
  • !setcode! → Three Letter Set Code
    • Example: THS
  • !setcode_lower! → Three Letter Set Code (lowercase)
    • Example: ths
  • !setname! → Set Name
    • Example: Theros
  • !setname_lower! → Set Name (lowercase)
    • Example: theros
  • !set:___! → Properties specific to to this print of the card
    Example values:
    • !set:muid! → Card ID (Gatherer Multiverse ID)
      • Example: 373549
    • !set:uuid! → Universally Unique Identifier (by Scryfall)
      • Example: 0b23cdc8-d413-4fb1-8470-474221b10fe2
    • !set:num! → Number of the card in the set, also known as the collectorsnumber
      • Example: 5
    • !set:rarity! → Printed rarity in this set
      • Examples: rare, mythic
  • !prop:___! → Properties of this card
    Example values:
    • !prop:side! → Card side, only relevant for two sided cards, defaults to front
      • Examples: front, back
    • !prop:colors! → Card colors, in uppercase shorthand
      • Examples: B, WUB
    • All other values like cmc, coloridentity, type, pt, and legality statuses are also available. See our documentation on writing custom card xml files for more information on these.

Filling values

The !set:___! and !prop:___! values support filling values with any string by adding _fill_with_ to the end. The output value will replace the fill value, character by character, right aligned. To do this use the template reference point !prop:[value]_fill_with_[fill value]!. If the output value is longer than the fill value, the template is invalidated and the next url in the list will be used instead. Example: https://example.com/!set:num_fill_with_000! will result in num=1 becoming 001 and num=99 becoming 099 while num=100 would stay the same.

The filling values feature is to be included in Cockatrice 2.8.1

Substrings of values

The !set:___! and !prop:___! values have the option to extract parts of their text by adding _substr_ at the end. After _substr_ add the index of the first character you want to include and amount of characters separated by another underscore, ie !prop:[value]_substr_[start]_[length]!. If the requested substring would extend outside the original value, the template is invalidated and the next url in the list will be used instead. This means the used value in the template will always be the same length. Example: https://example.com/!set:num_substr_2_2! will result in num=123a* becoming 3a and num=12a skipping this template.

The substr feature is to be included in Cockatrice 2.8.1


Example URLs:

  • https://api.scryfall.com/cards/!set:uuid!?format=image&face=!prop:side!
    Fetches a card from scryfall based on its scryfall id, selecting the correct cardface.
  • https://gatherer.wizards.com/Handlers/Image.ashx?type=card&multiverseid=!set:muid!
    Fetches from WOTC's website based on its multiverse id, lower quality.
  • https://api.scryfall.com/cards/!setcode_lower!/!set:num!/!sflang!?format=image&face=!prop:side!
    Searches for the setcode and setnumber together with the language, fetches an image in the currently used client language.

    The !sflang! property can also be manually exchanged for a supported language code, e.g. en or ja, to separate it from the current language setting.
    example: https://api.scryfall.com/cards/!setcode_lower!/!set:num!/fr?format=image&face=!prop:side!

  • https://api.scryfall.com/cards/!set:uuid!?format=image&face=!prop:side!&version=small
    Fetches a small image instead of a large one. Based on its scryfall id, selecting the correct cardface.

See scryfall's api documentation for more information.


Your custom URL must start with either http:// or https:// in order to properly function.

Will Work:

  • http://example.com/
  • https://example.com/

Will NOT Work:

  • example.com/
⚠️ **GitHub.com Fallback** ⚠️