ains / OPTCG Meta Card Values

Published:

Version: 4.9.1+2f62c40 updated

Summary: Aggregates every card played across the tournament meta (full standings from the Limitless API), reports usage against the decks that could actually play each card, cross-references TCGplayer pricing, says what to sell before it rotates out of Standard, and builds a costed 50-card recommendation for every leader still legal in Standard.

Copyright: 2026, ains (https://openuserjs.org/users/ains)

License: MIT

Antifeature: unspecified

OPTCG Meta Card Values

A userscript that answers the two money questions about a One Piece Card Game collection, from one
scrape of tournament data:

  • Cards — what should I sell before it rotates out of Standard?
  • Decks — what should I buy to build a given leader, and what will it cost?

It aggregates every card played across full tournament standings from the
Limitless API, cross-references TCGplayer pricing, works out which
regulation block each card belongs to, and turns that into a per-card verdict — SELL, watch,
hold or bulk — sorted so the most urgent sells are at the top. The same scrape drives a
recommended 50-card build for every leader still legal in Standard, with per-card quantities, a
running cost, and a handoff to a TCGplayer cart.

  • File: optcg-metadeck-pricer.user.js
  • Version: 4.4.0
  • Runs on: https://play.limitlesstcg.com/* and https://gumgum.gg/*

The panel reads nothing from the page it runs on — all data comes from the API and the price feed —
so it behaves identically on either site. It is on both simply so it is reachable from wherever you
happen to be looking at cards.

Why rotation drives the verdicts

A card's price peaks while it is both being played and still legal in Standard. Bandai rotates
the oldest regulation block out every April 1, and when a block leaves, the demand pool for its
cards collapses to Extra format and collectors. So the best time to sell a meta staple is while its
legality window is closing, not after.

The script encodes that as: block N leaves Standard on April 1 of 2025 + N. Block 4 is legal
"from April 1, 2026, to March 31, 2029" per
Bandai's block icon page, which pins
the base year.

Two things break that formula, and the same page defines both: block X, which never rotates at
all, and a list of individual cards whose block differs from the set they came in. Both are per-card
exceptions that override the set entirely — see per-card block exceptions.

Install

  1. Install Tampermonkey (or another userscript manager that
    supports GM_xmlhttpRequest and GM_setValue/GM_getValue).
  2. Either install from
    OpenUserJS — which wires up
    auto-update via @updateURL — or create a new script and paste in the contents of
    optcg-metadeck-pricer.user.js.
  3. Open any page on play.limitlesstcg.com or gumgum.gg. A Meta Card Values pill appears in the
    bottom-right corner.

Licensed MIT.

The script requests these grants and cross-origin connections:

Grant / connect Used for
GM_xmlhttpRequest Fetching Limitless tournament data and optcgapi.com pricing, neither of which is same-origin from both host sites
GM_setValue / GM_getValue / GM_deleteValue Caching the price index, per-tournament standings, derived decks, and the API request budget
@connect play.limitlesstcg.com Tournament index and standings
@connect optcgapi.com Pricing feed

No API key, no credentials, no writes to any site, nothing leaves the browser except plain GETs to
the public endpoints listed below.

Using it

Click the pill to open the panel; the first open triggers a load. The pill itself doubles as an
alert: the badge counts how many cards currently read SELL, and it pulses only in that state
(and never when the OS asks for reduced motion).

The panel has two tabs, both fed by the same scrape — switching between them costs no requests:

Tab For
Cards The per-card sell/hold table. The default
Decks Recommended builds per leader — see the Decks tab

Meta format and Price basis appear on both toolbars and are one setting shown twice: changing
either mirrors to the other, because "which format counts" and "market vs. lowest" should not mean
different things on the two tabs. Every other control belongs to its own tab.

The Cards toolbar, left to right:

Control What it does
Meta cards / Not in meta / All Whether to show cards seen in scraped decks, cards that weren't, or everything
Set Filter by set code, labelled with its retail name (OP16 — The Time of Battle)
Block Filter by regulation block, annotated with rotation status (Block 2 — rotates 8 months, Block X — never rotates)
Color R G U P B Y — Red, Green, Blue, Purple, Black, Yellow. A dual-colour card matches either of its colours
Type Leader / Character / Event / Stage
Rarity C, UC, R, SR, SEC, L, PR, TR — ordered as a desirability ladder, not alphabetically
Verdict Filter to a verdict bucket. Only buckets that actually occur are offered
Meta Which format's decks count toward usage (All formats, or a single format)
Show unpriced Off by default. Cards the price feed has never heard of can't be valued or ranked, so they're hidden; the summary line always says how many. Selecting the no price data verdict overrides this
Share of The denominator for the usage percentage: Same-color decks (default) or All decks — see Color share
Sort Sell priority · Rotating soonest · Highest price · Played × price · Highest share · Most played · Lowest price · Set
Price Market price, or lowest current listing — this choice feeds every filter, verdict and export
Min $ Hide anything below a price floor
Search Substring match on card name or id
⬇ CSV / Copy Export exactly what the current filters show (see Export)
Refresh Re-derive decks and fetch more tournaments (shift-click for a full cold start)

Every filter is a checkbox dropdown rather than a native multi-select, because 50-odd set codes are
unusable behind ctrl-click. Escape closes the topmost thing — the art overlay first, then dropdowns.

Table rows expand on click to show which leaders play the card, the full rotation statement, both
usage percentages, market vs. lowest price, and a TCGplayer search link. Clicking the thumbnail
instead opens full art in a lightbox without collapsing the row you were reading.

No row state is ever grey. Hover, expanded and the text-selection highlight are all low-alpha
washes of the panel's blue accent (#4c8dff at 9%, 13% and 32%), and an expanded row is marked by a
blue left edge rather than a fill. Grey was doing two incompatible jobs at these luminances — it read
as "disabled", and an intentional tint was indistinguishable from a stray selection highlight. Blue
can only be one of ours, which makes any grey you see attributable to the host page rather than to
this panel. If you edit the CSS, don't reintroduce a neutral row background.

Three things had to change to get there:

  • A tbody tr baseline pins row backgrounds to transparent. The panel is a plain child of
    the host site's <body>, not a shadow root, so a host rule matching bare table elements — zebra striping
    like tr:nth-child(even), a table reset, a utility class — lands on these rows too. That's the
    likeliest cause of a tint appearing on some rows and not others: it was the host's stripe, not
    ours. Every row-state rule is written to out-specify that baseline; a bare .omp-row would lose to
    it and render no background at all.
  • ::selection inside the panel is re-tinted blue. Summary rows aren't selectable (they're
    toggles), but the detail block is, so the highlight is restyled rather than suppressed — a stray
    selection then looks like it belongs to the panel.
  • An expanded row and its detail block share one background and highlight together, so the pair
    reads as one card rather than two stripes.

Only the first click of a rapid sequence toggles, so a double-click opens the row instead of
expanding and instantly collapsing it. The detail block stays fully selectable, and CSV/Copy is the
intended way to get text out.

Color share

A share of every deck systematically understates a mono-colour card, because most decks in the
denominator could never legally run it. A green staple in 4 of 5 green decks is an auto-include, but
against a field of 8 decks it reads as 50% — the same number as a card that is merely playable.

So the default denominator is the decks that could actually play the card: Decks played ÷ decks sharing at least one of its colours. The column reads 80% of green decks rather than a bare
percentage, since the number alone can't tell you which question it answered — and
80% of OP14 green decks when the Meta filter narrows the pool to one format. Switch Share of
to All decks for the old field-wide figure; the expanded row always shows both.

How the denominator is worked out:

  • A deck's colours are its leader's colours. That is what the deckbuilding rule keys off, so it
    decides what the deck may run. Leaders are in the price feed like any other card. If a leader is
    too new to be in the feed, the script falls back to the union of colours in the decklist — a
    superset, but it keeps the deck counted rather than dropping it.
  • A dual-colour card counts against either colour's decks. A Green/Red card is legal in a
    mono-green deck, so its denominator is the union — hence the label green or red decks.
  • A dual-colour deck counts toward both of its colours. A Black/Yellow Marshall.D.Teach deck is
    in the denominator for a mono-black card and for a mono-yellow one, since it can legally run
    either. Colour eligibility is a shared-colour test in both directions, not an exact match.
  • The denominator is scoped to the selected format. The Meta filter is applied to the deck
    pool before any colour counting, so 13 black decks means the black-or-partly-black decks in
    that format, not in the whole scrape. The label names the format when one is chosen
    (45% of OP14 black decks) so the two can't be confused — this is the usual reason a count looks
    too low. Switch Meta to All formats to widen it.
  • Cards with no colour the feed reports (a handful of records carry a shifted field, e.g.
    OP04-095 says Character; also anything absent from the feed entirely) fall back to the
    field-wide total and the plain label decks, so a missing colour never shows as 0 of 0.
  • The denominator can never be smaller than the decks the card was actually seen in — but this
    floor applies only to cards that have a colour. Flooring a colourless card would set the
    denominator equal to the numerator and report a fabricated 100% — the highest share in the
    table — for a card nothing is known about. Those fall back to the field total instead.

Highest share sorts on this percentage, so a staple of a narrow colour isn't buried under a
mediocre card from the most-played one. Played × price also uses it. Verdicts are unaffected —
they turn on whether a card is played, not how widely.

The Decks tab

A grid of every leader still legal in Standard, one card each, showing its win rate, its record,
how many scraped decks ran it, and its best placing. Leaders whose block has already rotated are left
out entirely — the tab is for deciding what to build, and a rotated leader isn't buildable.

Click one and it produces a recommended 50-card decklist from that leader's most recent decks.

Control What it does
Sort Best win rate (default) · Most played · Most games · Newest leader · Name
Color Filter by the leader's colours
Search Substring match on leader name or id
Meta format / Price basis Shared with the Cards tab (see above)

Win rate

Free, in request terms: the standings rows the script already fetches and caches carry a
record: {wins, losses, ties} per player, so win rates cost no additional API requests. They're
summed across every scraped deck for the archetype.

Ties count as half a win — (wins + ties/2) / games — which is how OP standings score them.

A leader with no record at all reads no record, not 0%. Those are different claims: a missing
record means nothing is known, while 0% means it lost every game, and showing the second for the
first would libel a leader nobody has data on. Win rates are also binned into three coarse bands
rather than a continuous gradient, because a 2-point difference on a 40-game sample isn't a
distinction worth colouring.

Win rate is the default sort, since the tab answers "what should I build" and that is a question
about which decks win rather than which are most popular. Sorting by win rate puts leaders with at
least MIN_DECKS_FOR_CONFIDENCE (4) decks first, so a single 2–0 fluke doesn't top the list ahead of
a genuinely strong archetype — the unrated leaders still appear, below the rated ones.

How the recommendation is built

The leader's decks are sorted newest-first and the most recent DECK_SAMPLE_SIZE (25) are
sampled. For every card in them the script tracks two separate numbers, and the distinction is the
whole method:

  • Inclusion rate — what fraction of those lists ran the card at all. This is what ranks cards
    and decides what makes the cut.
  • Modal copy count — among the lists that ran it, the most common number of copies. This is
    what the quantity column tells you to own.

The mode, not the mean, because you cannot buy 2.6 copies of a card. Averaging a card that half
the field runs as a 4-of and half as a 1-of yields 2.5, a number no list actually played. The mode
returns a real decision someone made. Ties break toward more copies, since under-buying a staple is
the commoner and more annoying mistake.

Cards are then taken in order until exactly 50 slots are filled — the deckbuilding limit besides
the leader — trimming the card on the boundary to fit rather than dropping it or overshooting. Every
recommendation is a legal 50.

Copy limits are observed, not assumed

Most cards cap at 4 of a card number, but not all — a card's own text can raise its ceiling. Rather
than hardcode a list of exceptions that would rot with every set, the ceiling is read from the
scraped decklists
: if real tournament lists ran 6 copies of a card, then 6 is its limit, because
those lists passed a judge. The rules are inferred from play rather than restated.

Two guards keep that honest:

  • The observed count only ever raises the ceiling, never lowers it. A card the scrape happened to
    see only as a 1-of is not thereby limited to one — it just wasn't popular. The floor stays 4.
  • A count must be corroborated by COPY_LIMIT_MIN_DECKS (2) independent decks before it raises
    the ceiling, so one mangled decklist can't invent a limit.

Corroboration rather than a numeric cap, because a cap can't tell a legal 9-of from a mangled 18 — it
just rounds the wrong answer down to the ceiling. Agreement between independent lists can. Measured
across 1,002 scraped decks, exactly one card exceeds 4: OP16-042 Prisoner of Impel Down, whose
real limit is 9.

copies 4 6 7 8 9 18
decks 1 3 2 59 33 1

The 18 is a single list that names the card on two lines of 9, which the per-deck sum double-counts;
the 9 has 33 independent lists behind it. Requiring two decks to agree lands on 9 and discards the
18 — a cap would have had to be set to exactly 9 to do the same, i.e. it would have had to already
know the answer.

For scale: 51.7% of all card slots are 4-ofs and 99.87% of distinct cards top out at 4, so this
affects one card in the current meta — but it's a card in a top archetype, and the builder would
otherwise recommend 4 where 9 is correct.

Where a card's ceiling is above 4, the quantity stepper says up to N — a stepper that runs past
4 looks like a bug unless the reason is on screen. The limit is a property of the card, so it is
computed over every scraped deck regardless of the Meta filter; otherwise the same card's ceiling
would shift as the filter moved.

A leader with fewer than 4 sampled decks is marked thin: the list is shown, because a thin
recommendation still beats none, but the sample size is stated so it isn't mistaken for a consensus.
The header always reports the sample count and how many cards were cut.

Quantities, picks and cost

Each row has a checkbox and a −/+ stepper, so the list is a starting point rather than a fixed
order — untick what you already own, adjust counts before buying. Quantities you've changed are
marked in blue, so an edited list still shows where it diverges from the recommendation.
Decrementing to 0 unticks the row automatically, and incrementing off 0 re-ticks it; the two controls
would otherwise disagree about whether you want the card. The header checkbox sweeps the cards but
deliberately leaves the leader alone — you need exactly one, and it isn't optional.

The cost total covers only ticked rows and updates as you adjust. Cards with no price are counted
separately and never as $0
, and the total says how many were excluded — a silent $0 would
understate a deck by however many unpriced cards it contains. This is the usual reason a total looks
low: the newest starter-deck cards aren't in the price feed yet.

Substitutes: what else can do this job

Every card in a recommended list has an Alts button that opens a panel of other cards that do the
same job in this deck. It lives here rather than in the Cards tab because substitutability is a
question about a deck, not about a card in isolation — you need to know what you're building before
"what can I run instead" has an answer.

Legality is judged against the leader, not the card being replaced. This matters: in a mono-red
deck, a Red/Green card's green half is unplayable, so gating on the card's own colours would offer
green substitutes that can't legally go in the deck. The leader's colours are the deck's colours, so
they're what the filter uses.

Price is reported, never required. An earlier version only offered cards that were cheaper, and
that was too narrow: it hid the upgrade you might rather buy, and returned nothing at all for a card
already sitting at the floor of its colour's price range. The price delta is still shown per row —
green for a saving, red for a premium — it just isn't why a card qualifies.

Candidates must clear hard gates on card type, leader colour, and cost/power tolerance, plus a floor
on shared effect text. Counter value is scored rather than gated, since gating it would drop swaps
that are obviously right on effect and differ only in counter — a lower counter is flagged with ▼
instead of disqualified.

Results are ranked by what players actually ran together, then effect text, then statline. A
substitute the scrape has seen in the same decklists as the original is marked N decks together
and sorts above every merely-similar card, because that's the difference between evidence and
inference. Cards matched on text alone read similar.

Each row carries a thumbnail — click for full art, same as everywhere else — because choosing
between two similar cards is largely a visual act and an id is not a card.

Swapping a card in

Swap in replaces that slot's card with the substitute, keeping the quantity and ticked state: a
swap changes which card you're buying, not how many or whether you wanted it. The new quantity is
clamped to the replacement's own copy limit, which may be lower than the card it replaces.

The swapped row is marked swapped and offers revert, which puts back exactly what the meta
recommended. The deck total, Copy deck, CSV and the TCGplayer cart all follow the swap
automatically — they read from one basket definition, so they can't disagree about what's in the list.

Two details worth knowing:

  • Swaps are stored as intent, not baked into the list. buildRecommendation stays a pure function
    of the scrape, and the swaps are re-applied on top of a fresh build on every render. So swapping the
    same slot twice replaces the first choice instead of chaining, and revert always has a fixed
    target no matter how many times you've changed your mind.
  • A swapped slot keeps the original's statistics — inclusion rate, deck count, recommended copies.
    Those describe the slot, which is what the swap inherits: "the card 82% of lists ran here, and
    you're using this instead". Showing the substitute's own inclusion rate would be a different and
    misleading number, since it isn't the card those lists were running in that slot. For the same
    reason the substitute list is always matched against the originally recommended card, so the
    list can't drift a card at a time away from what the scrape supports.

Swaps belong to the open recommendation and are cleared when you pick another leader — they named
cards in a different deck.

Getting the list out

Button Gives you
Copy deck 1xOP13-001 / 4xEB04-007 / … — one line per card, leader first, for deck simulators
⬇ CSV The recommendation as a spreadsheet
Buy on TCGplayer → Opens Mass Entry pre-filled with the ticked cards

All three respect the checkboxes and steppers, so what you copy is what you chose.

The TCGplayer handoff uses Mass Entry
in its documented format — Quantity → Card Name → [Set Code] → Card Number, e.g.
4 Usopp [OP14] OP14-022. It opens via a real link click rather than window.open, which popup
blockers treat far more kindly. If the URL would be too long to survive (URL_MAX_CHARS, 7500), the
empty Mass Entry box is opened and the lines are put on your clipboard instead of navigating to a
link that would arrive truncated. Copy deck is the guaranteed path; the cart link is the
convenience.

Set codes for Mass Entry

The set code is sent because the number alone is often ambiguous — OP01-016 has 11 products across
7 different TCGplayer set codes. Getting it right matters, and TCGplayer's codes are not simply our
codes reformatted.

The mapping was derived, not guessed: TCGplayer's entire One Piece catalogue (7,248 products) was
paged through and each card number's prefix tallied against the setCode its products actually carry.
That covered 60 prefixes and confirmed the hyphenation rule (ST31 → ST-31, EB01 → EB-01,
PRB01 → PRB-01, promos → OP-PR, boosters unchanged) for all but two:

  • EB04 and OP15 shipped as one bundled product set, so both report OP15-EB04. Neither a
    bare EB-04 nor a bare OP15 exists in their catalogue — the naive reformatting produces two codes
    that match nothing.

Anything not on the confirmed list emits no set code at all and the bracket is dropped rather than
left as an empty []. Naming no set cannot be wrong, whereas guessing EB-05 for a set that shipped
under some other code could be — and their catalogue holds plenty of forms no regex derives
(OP09 ANN, OP12 RE, LT-01, OP-DD, ST-01 PRE). Likewise, a card the price feed has no name
for sends quantity and number only, since the name would otherwise fall back to the card id and
put a number where the parser expects a name.

Whether a wrong code widens their search or zeroes it out is unverified: /massentry is a
client-rendered page that ships no script tags to read, and there is no server-side parse endpoint to
test against. That uncertainty is precisely why the code errs toward omission. Extending
TCG_KNOWN_SETS when a new set lands is a one-line edit.

Verdicts

There are four verdicts, because there are only four things you can do with a card. The verdict says
what to do; the note — hover it, or expand the row — says why.

Played means the card appeared in at least one scraped deck for the selected format. Under $1 the
sell/hold distinction is noise against shipping, so everything there is bulk regardless of play.

Verdict Condition Reading
SELL played, ≥ $1, and either ≤ 12 months left or already rotated Act first. Demand is at its peak and the window is closing — or has already shut
watch played, ≤ 24 months left, ≥ $1 Next season out. Price should hold a while yet; revisit
hold played with > 24 months left, or unplayed and ≥ $5, or any block X card ≥ $1 No action. Either plenty of legality left, or the price isn't rotation-driven at all
bulk < $1, or unplayed and < $5 Not worth listing individually
no price data absent from the price feed Check manually before discarding — this is not the same as $0

Block X short-circuits the whole table: it never rotates, so there is no deadline to sell into and
no amount of holding costs legality. Every X card ≥ $1 is hold — meta-played or not — and its note
says so. (Under $1 it is still bulk, like anything else.)

The distinctions that used to be their own labels still exist, they just live in the note where they
belong — SELL distinguishes rotates soon from already rotated, and hold distinguishes a $700
chase single from a rotated collector card from an unplayed spec. Block, Rotates and Market already
show that on the row, so the label was re-deriving what was in the next three columns.

One consequence worth knowing: in the default Meta cards view, hold and bulk no longer tell
you whether a card is unplayed — both buckets now mix played and unplayed cards. The Decks and
share columns are where you read that.

The thresholds are the constants SELL_NOW_MONTHS (12), SELL_SOON_MONTHS (24) and
PREMIUM_PRICE (40).

Sell priority sorts on an integer tier and breaks ties on price, so the most valuable card in the
most urgent bucket leads. The tier deliberately does not fold price in: bucket tiers sit 1 apart
while prices reach $700, so an unplayed chase single would otherwise outrank every urgent sell in
the table.

Data sources

Source What comes from it
play.limitlesstcg.com/api/tournaments?game=OP The recent tournament index — id, name, date, player count
play.limitlesstcg.com/api/tournaments/{id}/standings Decklists, plus each player's record and resolved deck archetype. Every entrant of every fetched event, not just a top cut
optcgapi.com/api/allSetCards/, /allSTCards/, /allPromos/ TCGplayer market price (market_price) and lowest listing (inventory_price), keyed by card id

Notes worth keeping:

  • No API key is needed. /tournaments and /tournaments/{id}/standings are open. Only
    /games/OP/decks requires one, and the script doesn't use it: standings already carry a resolved
    deck: {id, name} archetype per player, which is the only thing the categorisation rules would
    have been for. (Limitless issues keys to public-facing projects, not personal ones.)
  • Win rates and archetype grouping are free. Both record and deck ride along on the standings
    response the script already fetches and caches, so the entire Decks tab adds zero requests to a
    scrape. This is the reason it could be built at all under a 50-per-5-minute limit. The record
    counts are documented as numbers but arrive as strings in practice, so they're coerced on the way in.
  • Card identity lines up exactly with the price feed. The API returns each card as
    { count, name, set, number }; ${set}-${number} ("OP14" + "020" → OP14-020) is optcgapi's
    card_set_id, so no name matching or normalisation is involved. Measured coverage across a
    235-deck sample: 96.7% of distinct cards played resolve to a price. The misses are all ST31–ST34,
    starter decks the price feed hasn't picked up yet, and show as n/a rather than $0.
  • Decks are re-serialised into the old "3xOP12-071;4xOP15-061" string form on the way in, so card
    aggregation and everything downstream of it is unchanged. Validated against real events: every
    deck totals exactly 50 non-leader cards, and the leader is carried separately (as before) so it
    gets counted as a played card without inflating the deck.
  • The promo bulk route is /allPromos/. The published optcgapi docs say /allPromoCards/, which
    404s.
  • Set display names come from the price feed's set_name, by majority vote across the cards of a
    set. Known wart: optcgapi labels EB04 cards with the OP14/OP15 set they shipped alongside, so an
    extra-booster code can show a booster's name. Cosmetic only — nothing keys off the string, and the
    set code shown in the table always comes from the card's own id.

Rate limit and scrape scope

The API allows 50 requests per 5 minutes, advertised in the response headers
(ratelimit: "50-in-5min"; r=48; t=295 — requests left, seconds to window reset). One request per
tournament, so requests, not bandwidth, are the binding constraint. Three things follow:

  • Scope is deliberately narrow. Events with 32+ players from the last 90 days, capped at
    45 per scrape. A 7-player local isn't evidence about the meta and costs a request a 171-player
    qualifier could have used.
  • Standings are cached per tournament and never refetched. A finished event's results don't
    change, so each one is a one-time cost and coverage accumulates across sessions. This is what
    makes the limit survivable.
  • Events are fetched biggest-field-first, so if the budget runs out mid-scrape, what you bought
    is the most meta-relevant data available. Hitting the limit is not an error: the script keeps and
    uses what it has, and says so in the status line.

The request budget is tracked in userscript storage, not just memory, so reloading the page after
being throttled can't bypass the window. The script refuses a request it knows would 429 rather than
learning it from the reply.

The Meta filter is inferred

The API reports format as null for essentially every OP tournament (474 of 500 in a sample), so
the Meta dropdown derives one: the newest OP booster (OP##) referenced anywhere in the deck. A
deck containing an OP16 card can't predate OP16's legality, so this is a lower bound on the format
it was played in.

It's an inference, not a fact — a deck of purely older cards played at an OP16 event reads as the
older format. Boosters only: starter decks and extra boosters aren't format markers, and promos carry
no set number.

Picking the right price for a card id

One card id maps to many feed records, and choosing wrong badly distorts the number. Alternate arts
and parallels share the base card_set_id and are far more expensive, distinguished only by a
card_image_id suffix (OP01-006_p5). Worse, promo records also set
card_image_id === card_set_id — a Championship Perona reads as base OP01-077 at $700 — and some
carry a 0.00 price.

Candidates are ranked, best kept:

  1. Base art over variant art. This outranks source, because some ids (e.g. ST10-010) appear in the
    set feed only as pricey alternate arts while the real printing lives in the starter-deck feed.
  2. Earlier endpoint (set → starter → promo), which demotes promo reprints.
  3. Has a usable price, which skips the 0.00 rows.
  4. Cheaper — a bare decklist implies the ordinary printing.

Promo ids (P-###) are the exception and rank on price alone: there's no "ordinary" printing to
anchor on, and the unsuffixed record is often the rare winner card (P-096 base is an $89 Winner
while the participation copy is P-096_pr1 at $8). A decklist naming a promo means the common one.

Caching

Stored in userscript storage rather than localStorage, so it is shared across both host sites — a
scrape made from one is available from the other — and survives a site clearing its own data.

Cache Key TTL
Price index optcg-price-index 12 hours
Derived decks optcg-deck-cache 6 hours
Per-tournament standings optcg-standings-cache 30 days
API request budget optcg-limitless-rate 5-minute rolling window

The deck cache carries a DECK_CACHE_VERSION and a cache written by an older version is discarded
rather than read. Derived deck records gained the win/loss/tie fields in 4.1.0, and without the
version gate an existing cache would have deserialised cleanly but with those fields absent —
reporting every leader at 0% until the TTL happened to expire. Bump it whenever the deck record shape
changes; re-deriving is cheap because the standings cache is what costs requests, and that is
untouched.

Refresh re-derives decks and spends a fresh request budget on events not yet downloaded — it
deliberately keeps the standings cache, which is what makes widening coverage cheap. Press it
again later to pull more events. Shift-click Refresh forces a true cold start, discarding cached
standings too, for when an event's results were corrected upstream.

If the standings cache ever exceeds the storage quota, the oldest half is dropped and the write
retried rather than failing the run.

Export

Both ⬇ CSV (downloads optcg-meta-values-YYYY-MM-DD.csv) and Copy (to clipboard) emit the
same columns from one definition, so they can't drift apart:

Card ID, Name, Color, Type, Set, Set name, Block, Rotates on,
Months left, Rarity, Decks played, Deck share %, Same-color decks, Color share %,
Market, Lowest, Verdict

Both denominators are exported regardless of the Share of setting, so a spreadsheet can be
re-sorted either way without re-exporting.

The export covers every filtered row, not just the ones on screen. Numbers are written bare so Excel
types them itself, and the download carries a UTF-8 BOM — without it Excel mojibakes the em-dashes in
verdict labels and set names.

Maintenance: the block tables

Nothing machine-readable publishes set → block, so it's hand-maintained in the script and split by
how much is actually known. These are what you edit when new products drop.

Table Authority Currently covers
BLOCK_X_CARDS Bandai's block icon page — per-card exceptions, not a set rule 32 Super Parallel Rare card numbers → block X
BLOCK_4_CARDS Same page — cards moved up a block "regardless of reprints" 15 card numbers → block 4
SET_BLOCKS_OFFICIAL Bandai's block announcement: boosters 1–4 are Block 1, 5–8 Block 2, and so on OP01–OP16 (blocks 1–4)
SET_BLOCKS_ESTIMATED Inferred from which OP set each product shipped alongside — Bandai states no set-level rule for starter, extra or premium boosters ST01–ST32, EB01–EB04, PRB01–PRB02
PROMO_BLOCK_RANGES Printed regulation marks, as upper bounds checked in order (n <= max wins) Through P-121 → block 4; anything past that → NEWEST_BLOCK (P-135 confirmed mark 5)
PROMO_LEADER_BLOCKS Dated from the events they were handed out at P-700, P-800, P-900
NEWEST_BLOCK The newest block in circulation; the fallback for anything the tables can't place 5

Nothing is left without a block. A card the tables predate used to show ? and no rotation,
which quietly dropped the newest cards — the ones with the most runway to sell into — out of the
urgency logic entirely. Resolution now runs in five steps, and the last one always answers:

  1. CARD_BLOCK_OVERRIDES — Bandai's per-card exception lists. Checked first, because they exist
    precisely to override what the card's set would otherwise imply.
  2. SET_BLOCKS_OFFICIAL — confirmed.
  3. SET_BLOCKS_ESTIMATED — dated by what the product shipped alongside.
  4. The booster numbering rule, ceil(n / 4), for any OP set past the official table. Bandai's
    "and so on" makes OP17+ derivable rather than a guess, so a new booster needs no edit at all — it
    lands on the right block on release. A startup check warns if the rule and the table ever disagree
    over the range both cover.
  5. NEWEST_BLOCK — assumed. Wrong-but-close beats silently never-rotating.

So the only edits new products actually require are SET_BLOCKS_ESTIMATED for starter/extra/premium
sets, a PROMO_BLOCK_RANGES entry when a new mark starts, and bumping NEWEST_BLOCK when block 6
lands. A startup check also warns if NEWEST_BLOCK falls behind the tables.

Per-card block exceptions

Bandai overrides the block of individual card numbers, and those exceptions beat every set-level
table. Both lists are on the block icon page
and are revised periodically — the page prints a revision date per list, so re-check it when a new
set lands
rather than assuming the transcription is still complete. As transcribed: block X list
updated as of May 29, 2026; block ④ list as of July 23, 2025.

Without them the script was wrong in both directions, and wrong about the most valuable rows:

  • Super Parallel Rares never rotate. They "generally remain legal for use in Standard Regulation
    regardless of whether they have been reprinted", and SPRs from April 2026 on are printed with block
    X directly. Keying off their set instead put the whole list on a rotation clock and reported
    SELL on the priciest singles in the table.
  • The block ④ list is legal until March 31, 2029 despite shipping in block 1–2 products. Keyed by
    set, those cards read as rotated out in April 2026 — a false SELL three years early.

Block X is a genuine non-number, so it's carried as the string 'X' and every date calculation
routes through rotates(block); monthsToRotation returns Infinity for it, which sorts last and
compares correctly against the sell windows, so only the code that formats a month count needs to
know. An X card is always hold — no legality deadline exists to sell into — its Rotates cell reads
never, it sorts to the end of Rotating soonest, it's last in the Block filter, and its CSV
Months left is blank rather than the string Infinity (which a spreadsheet would refuse to sort
alongside the real numbers in that column).

Exceptions are matched on the bare card number, so a parallel or reprint printing
(OP01-016_p1) resolves to the same block — which is Bandai's own wording, "cards that share the
same card number". That also makes the page's third list, "updated Block Number and cards that have
been reprinted"
(OP01-016, OP04-016), a subset annotation rather than a separate rule: both are
already covered, and keying on the number handles the reprint. Nothing to encode.

Because both lists are hand-transcribed, a startup check warns if an id appears in both (the map
would silently keep whichever came last) or isn't a bare card number (it would silently never match,
making the exception a no-op).

Exception blocks count as confirmed, not estimated — they come off Bandai's published lists, so
they carry no "verify against the card" caveat.

Details that matter if you touch these:

  • The Block column shows the bare number, estimated or not. Only the OP boosters come off
    Bandai's published mapping, so a marker would flag every ST, EB, PRB and promo row — over a quarter
    of the table — which is far too common to read as a warning. The basis instead lives in the
    expanded row, which states it in full: release timing, the booster rule, the promo number, or
    assumed outright. It is not exported — the CSV carries the block itself, not how it was derived, so
    finding the rows to re-check when new products land means opening them in the panel.
  • Promos can't be keyed by set. The price feed reports set_id "P" for every promo and exposes
    no regulation mark, so a promo's block has to come from its card number. The ranges deliberately do
    not track the set whose release event handed a promo out — a promo carries its own mark, so
    (OP14 Release Event) in the feed's card name says nothing about its block.
  • The P-7xx/8xx/9xx leaders are a separate numbering space that restarted rather than continuing
    the main run, so a range check would date them wrongly (P-800 is a 2023 card and would otherwise
    read as the newest block).
  • The last promo range is open-ended, tracking NEWEST_BLOCK, so a promo numbered past anything
    listed still gets rotation urgency. Add a range when block 6 promos appear.
  • A card with an unreadable id (no parseable set prefix, or a P- with no number) also lands on
    the NEWEST_BLOCK assumption rather than being singled out. Its expanded row reads assumed, which
    is the weakest basis of the four and the one to verify against the card.

Adding a verdict? Add its key to VERDICT_ORDER too — the filter menu is built from that list, so an
unlisted verdict would be silently unfilterable. A startup check warns in the console if they drift
apart, and the menu labels are derived by probing verdictOf rather than hand-copied.

Known limits

  • The table renders at most 300 rows and always states how many were left off. Exports are not
    truncated.
  • Cards from very new starter decks aren't in the pricing dataset yet — /allSTCards/ currently
    stops at ST30, so ST31–ST36 cards have no record at all. These are hidden by default (tick
    Show unpriced, or filter to the no price data verdict, to audit them) and when shown they
    read n/a and no price data rather than $0, so they never look like bulk. On the Decks tab
    they still appear in a recommendation — they're played, and omitting them would produce an illegal
    49-card list — but they're excluded from the cost, which is stated alongside the total. They also go
    to Mass Entry as quantity plus card number, having no name to send.
  • A handful of feed records have a non-colour value in the colour field (OP04-095 says
    "Character", a shifted field). Unrecognised values are dropped rather than shown as a bogus pip.
    Such a card also has no colour denominator, so its share falls back to all decks.
  • The export follows the table: hidden unpriced rows are excluded from CSV and Copy too. Tick
    Show unpriced first if you want them in the file.
  • Deck coverage is bounded by the API request budget: 32+ player events from the last 90 days, up to
    45 per scrape, biggest field first. Press Refresh again later to pull more events — cached
    standings are kept, so each press extends coverage rather than re-buying it. The status line always
    states how many events are still available.
  • The Meta format is inferred from the newest OP booster in each deck, because the API reports no
    format for OP events. See the Meta filter is inferred.
  • Either share is a share of scraped decks for the selected format, not a published metagame
    percentage.
  • Colour share denominators get small as filters narrow: if only 3 green decks were scraped, a card
    in 2 of them reads 67% off a sample of 3. The tooltip and expanded row both give the raw
    2 of 3, which is the number to sanity-check against. The Meta format filter shrinks it the
    most, since it cuts the deck pool before colours are counted — the label names the format when one
    is selected so a small denominator is traceable to it.
  • Colour eligibility is the deckbuilding rule only — sharing a colour with the leader. It doesn't
    model whether a card is good in that deck, so a niche card's colour share is still a low
    percentage of a large denominator.
  • A recommended deck is the field's consensus, not a tuned list. It's assembled card-by-card from
    what the most lists ran, which means it carries no notion of curve, ratios or synergy — a real
    decklist is a set of interacting choices, and picking the top 50 cards independently can't
    reconstruct that. Treat it as a shopping list and a starting point.
  • Recommendation quality is bounded by how many decks were scraped for that leader. Under 4 it's
    marked thin; the sample size is always shown, and it's the first thing to check when a list
    looks wrong.
  • Win rates come from scraped events only, and a leader played mostly at events the scrape didn't
    reach will have a correspondingly small record. The record is always printed next to the percentage
    so the sample behind it is visible.
  • Mass Entry resolves the cards, so verify the cart. The script sends quantity, name, set code and
    number, but which printing TCGplayer picks — and at what price — is theirs to decide, and the cart
    total can differ from the quoted cost. The quoted cost is based on base-art pricing (see
    picking the right price); a cart that auto-selects a
    parallel will read higher.

Rating: 0