Português (BR)
uesp-eso-build-wrapper / calculateBuild
Function: calculateBuild()
calculateBuild(
input):CalculatedBuild
Calculates the Computed Character Statistics for the given build.
Each call starts from a clean engine state (previous items, buffs, CP nodes and skill bars are reset), so builds never bleed into each other.
Parameters
input
The build to calculate: character sheet, items, champion point nodes, buffs, toggle skills, skill bars and passives.
Returns
All computed stats — named keys (Health, Magicka, SpellDamage, ...) plus raw with the full 204-stat g_EsoComputedStats record, and setToggles with the set toggles that apply to this build.
Throws
If the engine has not been initialized with initEsoEngineFromData() first.
Example
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 } },
items: {
Chest: chestItemFromUespApi, // object returned by esolog.uesp.net/exportJson.php
},
});
console.log(stats.Magicka, stats.SpellDamage);
console.log(stats.setToggles); // [{ id, setId, label }, ...]