English
Getting Started
Requirements
- Node.js >= 24 (see
enginesin package.json)
Installation
bash
npm install uesp-eso-build-wrapperGame data
Game data (UespInitData) is not bundled in the npm package — the library ships only the engine scripts. You supply the data when initializing.
The canonical source is vendor/uesp-data/uesp-game-data.json, committed to the repository and regenerated from UESP SQL dumps after each ESO patch. Its _meta field records which patch it was generated from — pin or update your copy deliberately so your numbers always match a known game version.
Ways to obtain it:
Copy from the repo — download
uesp-game-data.jsonfrom the repository above and load it withfs.readFileSync.Generate it yourself — the wrapper ships a self-contained pipeline that parses the UESP MariaDB dumps directly (no external project required), using the same Node >= 24 runtime as the library:
bashnpm run db:seed -- --dir /path/to/dumps --version <patch>(Or seed a SQLite DB and use the older
npm run generate-data -- --db /path/to/local.db --version <patch>.)
Initialize the engine
Call initEsoEngineFromData() once per process, before any calculation. Subsequent calls are no-ops.
ts
import fs from 'fs';
import { initEsoEngineFromData } from 'uesp-eso-build-wrapper';
import type { UespInitData } from 'uesp-eso-build-wrapper';
const initData = JSON.parse(
fs.readFileSync('uesp-game-data.json', 'utf-8'),
) as UespInitData;
initEsoEngineFromData({ initData });Your first calculation
ts
import { calculateBuild } from 'uesp-eso-build-wrapper';
const stats = calculateBuild({
character: {
race: 'High Elf',
class: 'Sorcerer',
level: 50,
attributes: { health: 0, magicka: 64, stamina: 0 },
},
});
console.log(stats.Health); // 16000
console.log(stats.Magicka); // 19104
console.log(stats.MagickaRegen); // 514
console.log(stats.SpellDamage); // 1000The result object also carries stats.raw — all 204 stats as a plain record. See Reading the Output.
Next steps
- Character — every character-sheet field
- Items & Equipment — gear from the UESP item API
- Champion Points — CP nodes
- Buffs & Toggle Skills — named buffs and toggles
- Skills & Passives — skill bars, morphs, passives