@poe2-toolkit/rune-extractor
v0.1.0
Published
Builds Path of Exile 2 rune / soul-core data straight from the official GGPK / patch server. Code only - ships no game data or art.
Downloads
94
Maintainers
Readme
@poe2-toolkit/rune-extractor
Builds Path of Exile 2 rune / soul-core data straight from the official GGPK / patch server, in a flat shape a build front-end can consume.
It mirrors @poe2-toolkit/item-extractor and
@poe2-toolkit/gem-extractor: source-agnostic, built on a
@poe2-toolkit/ggpk source, returning formatted data rather than
writing into the package. Runes have no icon of their own, so this package
produces data only - no icon pipeline.
Code only. This package ships no game data and no art. Everything it produces is read from the patch server at run time and handed back to you.
Install
npm install @poe2-toolkit/rune-extractor @poe2-toolkit/ggpkNode 18+. ESM only. TypeScript types are included.
The contract
The library returns formatted data. It performs no I/O of its own beyond what the source serves, and it never writes to disk.
import { createCdnSource } from '@poe2-toolkit/ggpk';
import { extractRunes } from '@poe2-toolkit/rune-extractor';
const source = await createCdnSource({
patch: '4.5.4.1',
tablesDir: './tables/English',
cacheDir: './.cache',
});
const { data } = await extractRunes(source);
patchis whatever version the patch server currently serves; a stale version 404s, so pass the one you actually want to extract.
extractRunes(source) returns a RuneBundle whose data (RuneData) maps each
rune's display name to its levelRequirement and rendered effects. The single
step is exported too: buildRunes(source).
CLI: write the data to disk
poe2-rune-extract \
--patch 4.5.4.1 \
--tables ./tables/English \
--cache ./.cache \
--out ./out/runesAll four flags are required. It writes runes.json.
How it works
- Soul cores carry only numeric
(stat id, value)pairs. The package joinsSoulCores->SoulCoreStats->Statsand renders each pair to text with the stat-description engine from@poe2-toolkit/ggpk(GGG's ownstat_descriptions.csd, read straight from the GGPK). - Each effect line is prefixed with the equipment slot it applies to, from
SoulCoreStatCategories(e.g.All Equipment: +9 to Dexterity,Martial Weapon: Adds 4 to 6 Fire Damage). [DNT]dev placeholders are dropped; aRequiredLevelof 0 becomesnull.
Attributions and legal
This is an unofficial, fan-made project, not affiliated with, endorsed by, or sponsored by Grinding Gear Games. "Path of Exile 2" is a trademark of Grinding Gear Games, and all game content, data, and art are their property. This package ships code only and stores nothing derived from the game. Thank you to Grinding Gear Games for making Path of Exile 2.
GGPK access is provided by @poe2-toolkit/ggpk, which builds on
pathofexile-dat (MIT, © SnosMe).
Full attribution is in the repository NOTICE.
License
MIT - see LICENSE.
