For builders
Developers: the TCG data
Palpedia TCG is built on a verified local snapshot of the official card list plus a set of content datasets. This page documents paths, schemas and the importer that keeps them fresh.
Main dataset
data/catalogs/palworld-tcg-catalog.json
A single JSON served statically; every page reads it through scripts/pages/tcg-hub/tcg-data.mjs.
Top-level structure
| Field | Contents |
|---|---|
| schemaVersion | Snapshot schema version. |
| source | Provenance: official API and capture date. |
| summary | Counts and domains: cards, products, cardTypes, colors, elements, aptitudes, rarities, expansions. |
| filters | Master tables for the explorer filters (cost, keyword…). |
| products | The 4 products: code, name, type, date, image.local. |
| textIcons | Token → local icon map for formatCardText (ACT@, [③], Quick@…). |
| elementImages | Local icons per element. |
| records | The 242 cards (schema in the next table). |
records[] schema
| Field | Contents |
|---|---|
| card_number | Printed identifier, e.g. EBP01-001 (parallels add a rarity suffix). |
| card_name | Official English name. |
| card_kind | Pal | Structure | Gear | Soul | Event. |
| rare | Rarity code (C, U, R, RR, SR, SP, SSP, OSR…). |
| expansion | EBP01 | ETD01 | ETD02 | PR2026. |
| color | Red | Blue | Green | Purple | Colorless. |
| cost / power / attack | Cost in souls, Power (or Durability on Structures) and Strike. Numeric strings. |
| text | Official English rules text with icon tokens (ACT@, [③]); render it with formatCardText. |
| lucky | Lucky Pal marker (☆) or empty. |
| icons[] | Card icons (e.g. Quick). |
| image.local | Verified local artwork path (with bytes and sha256). |
Content datasets
Classic scripts in data/
English editorial content served as classic scripts (file://-safe): they assign a window.* global and load before each page's module.
The four globals
| File | Global and schema |
|---|---|
| data/palworld-tcg-rules-en.js | PalpediaTcgRulesEn = {sections:[{id,title,intro,blocks:[{heading?,body}]}], glossary:[{term,kind,definition}]}. |
| data/palworld-tcg-guides-en.js | PalpediaTcgGuidesEn = [{slug,title,excerpt,minutes,sections:[{heading,body}]}] (10 guides). |
| data/palworld-tcg-news.js | PalpediaTcgNews = [{date,title,body,tag}], ISO dates for sorting. |
| data/palworld-tcg-events.js | PalpediaTcgEvents = [{type,name,region,dates,venue,city,country,details?,url?}]; type: "note" marks informational entries. |
The pages that consume them: tcg/rules.html, tcg/guides.html + tcg/guide.html, tcg/news.html and tcg/events.html.
Maintenance
The official importer
scripts/import-palworld-tcg.mjs regenerates or validates the snapshot against Bushiroad's official API.
Usage
node scripts/import-palworld-tcg.mjs --write # downloads cards and images and rewrites the catalog node scripts/import-palworld-tcg.mjs --verify # validates the local catalog and its assets (bytes + sha256)
--write walks the official API, downloads every image (cards, products, text icons and elements) with its SHA-256 hash and rewrites data/catalogs/palworld-tcg-catalog.json. --verify does not touch the network: it checks that the local JSON is complete and that every referenced asset exists and matches its hash. After updating, the repository tests (node --test tests/) verify the pages' contract.
Full data provenance lives in data/README.md.