This repository is my personal playground for doing stuff with the FGO Game Data API provided by Atlas Academy
This repository is inded to be used with Node.js v22 and pnpm 9.x
pnpm install
pnpm prepare-cache
pnpm search-servant [-vc] [-t <float>] [--no-original] [--no-alt] <...queries>
Script to easily search for Servants by name.
See -h or --help for manual page.
pnpm tsx src/welfares/script.ts
Script that lists event welfare Servants that have not yet been released on the EN server.
See -h or --help for manual page.
pnpm ap-calc [-vsh]
Simple AP Calculator that calculates time to Max AP and targets based on node cost or target AP. Output is given as a table with time (24h notation) and delta until that point.
See -h or --help for manual page.
Instead of constantly redownloading the same data the pnpm prepare-cache script downloads all needed data for servants and items at once and stores it in ./data/cache. Data is transformed to match the data structures descriped in ./src/types, which avoids duplicates and removes attributes that are not used in any scripts.
data
├── freeQuestList.json (transformed free quest data)
├── itemsList.json (transformed item data)
├── scoreList.json (transformed class score and grand score data)
├── servantsList.json (transformed servant data)
├── skillsList.json (transformed skill data)
├── warsList.json (transformed war data)
└── cache
├── info.json (information cache export age and last check date)
├── EN
| ├── class_score_list.json (full list of class scores and grand scores)
| ├── nice_servant.json (niceServant (with lore) export)
| ├── nice_war.json (niceWar export)
| └── questPhase
| └── {id}_{phase}.json (basic quest phase cache)
└── JP
| ├── class_score_list.json (full list of class scores and grand scores)
├── nice_servant.json (niceServant (with lore) export)
├── nice_war.json (niceWar export)
└── questPhase
└── {id}_{phase}.json (basic quest phase cache)
Data should always be retrieved with the provided utilities in ./src/cache
prepare-cache takes the following flags:
--verbose,-v: Show debug output--force-check,-f: Force checking API for updated exports--reprocess,-r: Don't check API and reprocess cached exports (disables-f!)--update-quests,-q: Redownload all Quest Phases, even if cached files exist
