Data extraction + local HTML visualizations for Path of Building (PoE1, PoB Community).
npm install # once
npm run view # parse all builds, write out/index.html and open it
npm run build # same without opening
node serve.mjs # optional: serve out/ on http://localhost:8765
out/index.html is self-contained (data embedded) and opens straight from disk.
out/data.json holds the same data for other scripts.
Paths live in config.json (builds folder, PoB install dir). Only the newest version-named subfolder of the
builds folder is read (e.g. 3.30/; a 3.31/ would take over). Loose files, old/ and older version folders
are ignored.
Per build: class/ascendancy/level/bandit/pantheon, every saved PlayerStat/MinionStat, skill sets → socket
groups → gems (level, quality, colour + tags from PoB's Data/Gems.lua), item sets → slot → parsed item
(rarity, base, props, implicits/explicits with the selected variant and rolled ranges resolved, crafted/fractured
flags), tree specs (allocated nodes, mastery picks, jewel sockets, bloodline), notes. PoB loadout tags ({n} at
the end of set titles) are parsed into loadout.
Tree geometry (lib/tree.mjs) is read from PoB's local TreeData/<ver>/tree.lua, using PoB's orbit-angle maths.
Cluster-jewel nodes (ids ≥ 65536) are generated by PoB at runtime and are not in the static tree data.
Stats are whatever PoB last saved into the XML: they are only as fresh as the last time the build was opened and saved in PoB.
node fetch-sources.mjs # uses cache/ if present
node fetch-sources.mjs --refresh # re-download (new patch)
Two requests total: https://poedb.tw/us/Quest (quest-reward + quest-vendor tables per class, and the ordered quest
list) and the poe.re gem regex JSON (data.poe.re/current.json → current patch). Raw files go to cache/, the
joined result to data/gem-sources.json:
quests: quests that give or unlock gems, in game order with their act, plus "Lilly Roth (Act 6)", who sells every gem to every class from Act 6 on (the fallback).gems[name].reward/vendor[quest]: classes that can take / buy it there.regex.tokens/regex.optimization: poe.re's per-gem regex and shared multi-gem regexes.
Loadouts follow PoB's own rules (Modules/Build.lua SyncLoadouts): {id} / {id1,id2} link tags across tree, item,
skill and config sets, or identical titles; a kind with a single set matches every loadout. Skill sets that no
loadout uses are added as extra "Skill set: …" entries. The build header has a loadout dropdown, * All leveling loadouts by default (Items/Tree need a specific loadout). Only leveling entries go into *: a name containing a
whole number from 1 to 60 (link tags like {1} don't count); the others stay selectable under "Ignored".
For the gems in view (one loadout, or all loadouts together), as the build's class:
- ★ one quest reward per quest: the useful gem that would otherwise arrive the latest;
- availability: that reward if earlier, else the first vendor quest, else Lilly Roth (Act 6);
- groups: one per act (ending at the act's last useful quest), then the biggest groups are split at quest boundaries (never leaving a single gem on a side) until ~1 group per 5 gems, 5 to 8 groups; a group whose search string would exceed 250 characters spills into another group. Act boundaries win over the no-single-gem rule.
- Clicking a group in the legend, or any gem of it, copies the group's vendor search string.
pob-mcp/ is a clone of https://github.com/ianderse/pob-mcp, registered in .mcp.json for Claude Code sessions
opened in this folder. It's in XML-only mode for now. Turning on the calc engine (POB_LUA_ENABLED=true) needs a
LuaJIT interpreter (POB_CMD); that's the next step for "what-if" data (node/gem DPS impact).