Skip to content

Cyberpunk TCG card data ​

Ruleset and calculator scripts get Cyberpunk TCG cards as plain objects straight from the card catalog. This page lists every field on those objects and in the catalog globals, with a real example and a few recipes.

Where the cards show up:

  • Card rules receive one card as their first argument.
  • Deck and deck set rules receive cardsById, an object keyed by card ref that holds every card in the deck (it can hold more).
  • Calculators receive cardsById as their second argument.

See the ruleset script API and the calculator script API for the full function signatures.

Card keys and deck refs ​

A Cyberpunk TCG card in the catalog is a card identity: one playable card with all of its printings (Nova Rare and Iconic alternates, starter deck and promo reprints) listed under printings. Two kinds of id matter:

  • The identity id, card.id: cp- plus a hash, like cp-01f71059135ee373ac32.
  • A printing id: the short set code and the collector number, like wnc-071. An alternate art has its own number in the same set (wnc-150).

Each printing's rarity and artist are in printing.metadata ({ "rarity": "iconic_legend", "artist": "Pandart Studio" }).

Decks store printing ids. cardsById is keyed by the deck's refs, and each one points to its identity, so two printings of the same card in one deck resolve to the same object:

  • Count copies of "the same card" by card.id, not by ref.
  • To read the printing a ref points to, find it in the list: card.printings.find((p) => p.id === ref).
  • ctx.globals.aliases[ref] gives the identity id for any printing id, when globals are available.

A card rule gets the identity card itself, so card.id is always the identity id.

The game fields describe the card's default printing (game.defaultPrintingId): the Retail base set printing when there is one. That matters for per-printing fields such as rarity, setCode and artist; printingRarities lists the rarity of every printing.

Guard against a missing card before reading from it: cardsById[ref] can be undefined when the catalog doesn't know a ref.

Card fields ​

Every card, in every game, has these top-level fields:

PropertyTypeDescription
idstringCatalog id of the card identity ("01DE012" in LoR, "pikachu-ex--1f29b66b68bc" in Pokémon).
slug?stringThe card's public URL segment (#2189, ADL §64): a frozen English slug, identical in every locale. Equals id for a game whose readable slugs are off (readableCardSlugsEnabled in @turny/game-adapters) or a card that has no readable slug yet. Pokémon keeps its <name>--<hash12> id as its slug; LoR's switch stays off for good, so its URLs stay its card codes. A page whose route param already equals slug renders; any other known key (the id, a history slug, an alias) redirects to it, so a card whose slug equals its id never redirects to itself.

The catalog export (#2193) writes it only for a switched-on game and only when it differs from id, so an absent slug means the id: always read it through cardSlugOf (@turny/game-adapters).
namestringDisplay name in the catalog locale.
setCodestringSet of the card, or of its default printing ("set1", "sv2", "OGN").
collectible?booleanFalse for cards that can't go in a deck (LoR tokens and level-ups).
assets?CardCatalogCardAssetContract[]Images of the card's default printing.
printings?CardPrintingContract[]Every printing of the identity, default printing first (only some on a partial card, see partialPrintings). Absent in LoR.
printingCount?numberLean list files (#1323), which omit printings, partial cards (see partialPrintings) and per-identity core files (#1522): how many printings the full card has. Absent on full cards and in games without printings.
printingSetCodes?string[]Lean list files (#1323), partial cards and per-identity core files: the distinct set codes across the full card's printings, in printing order. Absent on full cards.
printingsFile?stringPer-identity core files (#1522) only: the card's printings file (identities/<id>.printings.<hash8>.json, relative to the locale directory, see cardCatalogIdentityPrintingsFileName), in place of printings. Absent when the printings are inline in the core file.
partialPrintings?booleanTrue on a partial card (the featured-cards bundle, #1330): printings holds only some of the identity's printings (its default printing plus the ones the featured content references), while printingCount / printingSetCodes summarize all of them. Absent on full and list cards.
hasImage?booleanFalse when none of the card's printings has an image in this language. Absent means it has one.
languages?CardLanguageEntry[]Catalog locales that hold real text for this card (#2552). A locale whose entry is only fallback text is absent. Absent on older exports and in single-locale games.
game?TGameDataGame-specific fields; see the per-game *CardGameData type.

Each entry of languages (CardLanguageEntry):

PropertyTypeDescription
localestringCatalog locale ("zh-tw", "de_de"), not an app locale.
statusCardLanguageStatusWhere the text comes from: official (printed) or unofficial (a translation).

Values of a language entry's status (CardLanguageStatus):

MemberValueDescription
Official"official"Printed in this language by the publisher.
Unofficial"unofficial"Real text the publisher did not print in this language: a reconstruction or a translation.

Printings ​

Each entry of printings (CardPrintingContract):

PropertyTypeDescription
idstringPrinting id; deck refs use it ("sv2-11" for Pokémon, "ogn-030-298" for Riftbound).
setCodestringSet the printing belongs to ("sv2", "OGN").
number?stringCollector number within the set.
language?stringLanguage of the printing, when it is not the catalog's own.
releaseDate?stringRelease date as the source gives it ("2023/06/09").
assets?CardCatalogCardAssetContract[]This printing's own images.
variants?CardVariantContract[]Treatments of this printing (foil, alternate art, …).
metadata?JsonObjectExtra per-printing data (rarity, artist, store ids); game-specific.

Each entry of a printing's variants:

PropertyTypeDescription
idstringVariant id, usually <printing id>:<kind> ("ogn-030-298:normal").
kind?stringTreatment kind ("normal", "foil", "alternate_art"); values are per game.
label?stringDisplay label, when the kind alone is not enough.
metadata?JsonObjectExtra per-variant data; game-specific.

Each entry of assets (on the card and on each printing):

PropertyTypeDescription
kindCardAssetKindWhat the image shows: "card" (framed render), "full" (full art), "icon", "banner", "slice", "portrait", …
urlstringImage URL.
format?CardAssetFormatImage format ("webp"), when known.
width?numberWidth in pixels, when known.
height?numberHeight in pixels, when known.
metadata?JsonObjectExtra per-asset data; game-specific.

Game fields (card.game) ​

Everything specific to Cyberpunk TCG lives on card.game. Classification values (cardType, color, rarity) are lower-case tokens you can compare directly; look them up in the globals for display names. Legends print no Eddie cost and Programs print no Power, so cost and power can be null.

PropertyTypeDescription
cardTypeCyberpunkCardTypeCard type: "legend", "unit", "gear" or "program".
colorCyberpunkColorThe card's single colour, which is also its RAM colour (CR §3.20.1.2).
rarityCyberpunkRarityRarity of the default printing ("rare", "nova_rare", …).
printingRarities?CyberpunkRarity[]Every printing's rarity, distinct, in enum order: the chase treatments (Nova Rare, Iconic) usually print as alternates, so featured-card scoring reads this rather than rarity. Non-render (image ingest ignores it).
subtitlestring | nullPrinted subtitle ("Streetkid" on "V: Streetkid"), or null. Name plus subtitle identifies a card for copy limits (CR §7.3.3); Legend uniqueness reads the name alone (CR §7.3.1).
tagsstring[]Classifications (tags) printed on the card, at least one (["Merc"], ["Arasaka", "Cyberware"]).
keywordsstring[]Keyword markers found in the rules text as {Marker} tokens, lower-kebab ({Go Solo} becomes "go-solo"): play, attack, call, defeated, spend, blocker, quick, go-solo, adrenaline.
costnumber | nullEddie cost; null for the Legends printed without one (rendered –).
powernumber | nullPower; null when the card prints none (Programs).
ramnumberRAM value (0..6) in the card's color (CR §3.20). A Legend's RAM raises the deck's RAM limit in its colour; every other card must fit within that limit.
sellablebooleanTrue when the card carries the sell tag (can be sold for 1 Eddie).
legalitiesCyberpunkCardLegalitiesLegality per format ({ standard: "legal" }, "banned", or "not_legal"). A missing format counts as legal.
isProvisional?booleanTrue while every printing of the card is in a set whose curated release date is still in the future (as of catalog generation): such a card is not_legal in Standard. Absent once any printing has released, or when the set carries no release date. Same meaning as Pokémon's and Riftbound's isProvisional. Viewer-independent (ADL §42).
defaultPrintingIdstringId of the default printing ("wnc-005a", <shortSet>-<collectorNumber>): the Retail base-set printing when there is one, else the earliest printing in curated set order. Deck refs default to it.
setCodestringShort set code of the default printing ("wnc").
collectorNumberstringCollector number of the default printing, lower-case ("005a").
artist?stringArtist of the default printing.
text?stringRules text in the catalog locale. Keyword markers stay {Marker} tokens ({Blocker}) and €$ stands for Eddies. Absent when the card prints none.

Globals (ctx.globals) ​

The catalog's globals are lookup tables for the values on a card (color: "green" resolves through ctx.globals.colors.green), the keyword glossary and the printing alias map.

When globals are available

Globals are passed to ruleset scripts as ctx.globals (the last argument). Calculators may not receive ctx at all, and a ruleset can run without it too. Always check ctx && ctx.globals before using them and fall back to the raw value.

PropertyTypeDescription
colorsRecord<string, CyberpunkCatalogLookupEntry>Colours by game.color value ("red").
typesRecord<string, CyberpunkCatalogLookupEntry>Card types by game.cardType value ("unit").
raritiesRecord<string, CyberpunkCatalogLookupEntry>Rarities by game.rarity value ("nova_rare").
tagsRecord<string, CyberpunkCatalogLookupEntry>Classifications by tag, as printed ("Arasaka").
setsRecord<string, CyberpunkCatalogSetLookupEntry>Sets by short set code ("wnc").
formatsRecord<string, CyberpunkCatalogLookupEntry>Formats by game.legalities key ("standard").
keywords?Record<string, CyberpunkCatalogKeywordEntry>Keyword glossary by game.keywords id ("go-solo").
aliasesRecord<string, string>Printing or variant id → identity id; identity ids map to themselves.

Lookup entries ​

Every table except keywords and aliases maps a key to an entry with these fields:

PropertyTypeDescription
labelstringDisplay name ("Red", "Nova Rare").
ordernumberSort position in filters and lists, lowest first.
metadataRef{ key: string; }Anchor an operator override is matched on ("cyberpunk.globals.colors.red").

Set entries ​

Entries of sets add:

PropertyTypeDescription
sourceSetCodestringThe upstream's set code ("welcometonightcityretail").
releaseDate?stringCurated release date (YYYY-MM-DD); absent when the set has none.

Keyword entries ​

Each entry of keywords:

PropertyTypeDescription
labelstringDisplay name ("Go Solo").
descriptionstringReminder text: what the keyword does.
kind"trigger" | "effect""trigger" for a when-this-happens marker (play, attack), "effect" for a static ability (blocker, go-solo).
ordernumberSort position in the glossary, lowest first.
metadataRef{ key: string; }Operator-override anchor: a published card_globals_overrides row (namespace: "keywords", key: <id>) patches this entry (#2087).

Example card ​

Goro Takemura, Vengeful Bodyguard, trimmed to two printings with one image each:

json
{
  "id": "cp-01f71059135ee373ac32",
  "slug": "goro-takemura-vengeful-bodyguard",
  "name": "Goro Takemura: Vengeful Bodyguard",
  "setCode": "wnc",
  "collectible": true,
  "assets": [
    {
      "kind": "card",
      "url": "https://cdn.turny.gg/cards/cyberpunk/assets/cp-01f71059135ee373ac32-card-cea4dbcf6f6f90aed7cf9bb361e01af8be9f28f122fa2362cce48e5d1484e296.webp"
    }
  ],
  "printings": [
    {
      "id": "wnc-071",
      "setCode": "wnc",
      "number": "071",
      "releaseDate": "2026-11-06",
      "variants": [
        {
          "id": "wnc-071:normal",
          "kind": "normal"
        }
      ],
      "metadata": {
        "rarity": "rare",
        "artist": "Daniel Valaisis"
      }
    },
    {
      "id": "wnc-150",
      "setCode": "wnc",
      "number": "150",
      "releaseDate": "2026-11-06",
      "assets": [
        {
          "kind": "card",
          "url": "https://cdn.turny.gg/cards/cyberpunk/assets/wnc-150-card-cf0a3113ac21b526b5cde56be16b00656616341bdaa4988d5842e215ebf36a0a.webp"
        }
      ],
      "variants": [
        {
          "id": "wnc-150:iconic",
          "kind": "iconic"
        }
      ],
      "metadata": {
        "rarity": "iconic_legend",
        "artist": "Pandart Studio"
      }
    }
  ],
  "hasImage": true,
  "game": {
    "cardType": "legend",
    "color": "green",
    "rarity": "rare",
    "printingRarities": ["rare", "nova_rare", "iconic_legend"],
    "subtitle": "Vengeful Bodyguard",
    "tags": ["Arasaka", "Corpo"],
    "keywords": ["spend", "blocker", "quick"],
    "cost": null,
    "power": null,
    "ram": 2,
    "sellable": true,
    "legalities": {
      "standard": "legal"
    },
    "defaultPrintingId": "wnc-071",
    "setCode": "wnc",
    "collectorNumber": "071",
    "artist": "Daniel Valaisis",
    "text": "{Quick} 1 €$, {Spend} Give a friendly Unit with cost 4 or less {Blocker} this turn. If you control a value-pair of Gigs, also give it +1 power this turn.\nWhen a friendly Unit uses {Blocker}, you may discard 1. If you do, draw 1."
  }
}

Common recipes ​

js
// Calculator: main-deck copies at each Eddie cost, 6+ grouped.
export default function compute(pile, cardsById) {
  const buckets = [0, 0, 0, 0, 0, 0, 0];

  Object.keys(pile).forEach((ref) => {
    const game = (cardsById[ref] && cardsById[ref].game) || {};

    if (typeof game.cost !== "number") {
      return; // Legends print no Eddie cost.
    }

    buckets[Math.min(game.cost, 6)] += pile[ref];
  });

  return {
    widgets: [
      {
        kind: "histogram",
        label: "Eddie curve",
        buckets: buckets,
        labels: ["0", "1", "2", "3", "4", "5", "6+"],
      },
    ],
  };
}
js
// Calculator: copies per colour.
export default function compute(pile, cardsById) {
  const counts = {};

  Object.keys(pile).forEach((ref) => {
    const game = (cardsById[ref] && cardsById[ref].game) || {};
    const color = game.color || "other";

    counts[color] = (counts[color] || 0) + pile[ref];
  });

  return {
    widgets: [
      {
        kind: "donut",
        label: "Colours",
        segments: Object.keys(counts).map((color) => ({
          label: color,
          value: counts[color],
        })),
      },
    ],
  };
}
js
// Card rule: not banned in Standard. A card with no entry counts as legal.
export default function validateCard(card) {
  const legalities = (card.game && card.game.legalities) || {};

  if (legalities.standard !== "banned") {
    return true;
  }

  return {
    valid: false,
    issues: [{ message: card.name + " is banned in Standard." }],
  };
}
js
// Card rule: green cards only. Uses the colour's display name when globals exist.
export default function validateCard(card, ctx) {
  const game = card.game || {};

  if (game.color === "green") {
    return true;
  }

  const globals = ctx && ctx.globals;
  const green =
    globals && globals.colors && globals.colors.green
      ? globals.colors.green.label
      : "green";

  return {
    valid: false,
    issues: [{ message: card.name + " is not a " + green + " card." }],
  };
}

Turny.gg documentation