English
uesp-eso-build-wrapper / BuildInput
Interface: BuildInput
Complete input for calculateBuild(): character sheet plus everything the character "has" — items, Champion Points, buffs, toggle skills, skill bars and passives.
Only character is required; everything else is optional and starts empty. Each calculateBuild() call starts from a clean state — inputs never bleed between calls.
Properties
| Property | Type | Description |
|---|---|---|
activeBuffs? | string[] | Exact names of active buffs (enabled for the calculation). Ex: ["Minor Slayer", "Major Prophecy", "Major Savagery"] Uses the same name as in UESP's g_EsoBuildBuffData. |
activeWeaponBar? | 2 | 1 | Which weapon bar is active for the calculation. Affects which MainHand/OffHand items count for set bonuses and enchants. - 1 = main bar (MainHand1 / OffHand1) — default - 2 = secondary bar (MainHand2 / OffHand2) Default 1 |
autoInherentPassives? | boolean | When true, automatically injects the game's inherent passives — the ESO_FREE_PASSIVES list (Light/Medium/Heavy Armor Bonuses and Penalties, racial, craft, and a few free actives) — in addition to any explicit passiveSkills and autoPassives. Mirrors the UESP Build Editor, which loads this baseline by itself. The armor entries are gated per equipped piece (factorStatId ArmorLight/ArmorMedium/ArmorHeavy), so with no armor of that weight they contribute nothing. Use listInherentPassives() to enumerate them. Default false |
autoPassives? | boolean | When true, automatically injects the highest-rank racial passives for character.race (in addition to any explicit passiveSkills). Mirrors the UESP "Auto Purchase Racial Passives" checkbox — class passives must be passed explicitly via passiveSkills or listClassPassives(). Default false |
championPointNodes? | Record<string | number, ChampionPointNode> | Unlocked Champion Points 2 nodes. Key: numeric node ID (ESO_CPEFFECT_MATCHES rule ID or legacy abilityId). Preferred format (when buildRules.cp is loaded): description: full node text matching the CP rule regex. Ex: { 38750: { description: "Grants 1 Max Magicka per stage. Current bonus: 1000" } } Legacy format (when buildRules.cp is unavailable): currentBonus: value of "Current bonus: X" or "Current value: X%" Ex: { 141744: { currentBonus: 1000 } } Requires character.championPoints > 0. |
character | object | - |
character.attributes | object | Distributed attribute points (max 64 each, 64 total) |
character.attributes.health | number | - |
character.attributes.magicka | number | - |
character.attributes.stamina | number | - |
character.championPoints? | number | Total Champion Points (0–3600). Detailed distribution via cpData. |
character.class | string | Class. Ex: "Sorcerer", "Dragonknight", "Nightblade", "Templar" |
character.cyrodiil? | boolean | Enables Battle Spirit (Cyrodiil PvP mode) |
character.level | number | Character level: 1–50 |
character.mundusStone? | string | Active Mundus Stone. Ex: "The Thief", "The Apprentice" |
character.mundusStone2? | string | Second active Mundus Stone. Requires the "Twice-Born Star" set (5 pieces equipped). Ex: "The Apprentice" |
character.race | string | Race. Ex: "High Elf", "Nord", "Breton", "Khajiit", "Dark Elf" |
character.rulesVersion? | string | Rules version: "Live" (default) or "PTS" |
character.vampireStage? | number | Vampire stage: 0–4 |
character.werewolfStage? | number | Werewolf stage: 0 or 1 |
enchantOverrides? | Partial<Record<string, { enchantDesc: string; enchantName?: string; }>> | Custom enchantments per slot — override the item's default enchantDesc. Auto-generated by browser-export-build.js when the user swaps the enchantment in the UESP Build Editor. The calculator injects this data into g_EsoBuildEnchantData[slot] (isDefaultEnchant=false), making the engine apply the correct scale factor for small slots (Hands/Waist/Feet/Shoulders: ×0.4044). Example enchantOverrides: { Head: { enchantDesc: 'Adds up to 868 Maximum Magicka.', enchantName: 'Maximum Magicka Enchantment' }, Hands: { enchantDesc: 'Adds up to 868 Maximum Magicka.', enchantName: 'Maximum Magicka Enchantment' }, } |
items? | Partial<Record<EquipSlot, UespItemApiData>> | Equipped items. Pass the object returned by the UESP API directly. Lookup: GET https://esolog.uesp.net/exportJson.php?table=minedItem&id=<id>&level=<lv>&quality=<q> Map the desired item (from the .minedItem[] array) to the correct slot. |
passiveSkills? | number[] | Ability IDs of the passive skills the character has unlocked. The engine automatically applies each passive's effect via regex on the description text (ESO_PASSIVEEFFECT_MATCHES). Requires g_SkillsData to contain the skill data (present in uesp-game-data.json generated via npm run generate-data). IDs match the abilityId column in the UESP database. Example: High Elf's "Highborn" passive has abilityId 45284. |
skillBars? | object | Skills slotted on the character's action bars (max 6 per bar). Slotted skills enable skill line passives (e.g. Destruction Staff passives only apply if a skill from that line is on the bar). Also affects conditional set bonuses like "Adds N damage to your Class abilities". Example skillBars: { bar1: [ { skillId: 28807, morphIndex: 2 }, // Crystal Fragments (morph 2) { skillId: 24322 }, // Mages' Fury (base) ], bar2: [ { skillId: 29073, morphIndex: 1 }, // Boundless Storm (morph 1) ], } |
skillBars.bar1? | SkillSlot[] | - |
skillBars.bar2? | SkillSlot[] | - |
toggledSetBonusCounts? | Record<string, number> | Stack count per enabled toggle id. Only relevant for toggles whose SetToggle.maxTimes is not null (e.g. "Sergeant's Mail", "Rallying Cry") — the engine multiplies the effect by this count. Defaults to 0, which makes such a toggle contribute nothing — the same as the UESP editor, whose number input starts at 0. Values are clamped to the toggle's minTimes/maxTimes range, mirroring that input. Example toggledSetBonuses: ["Sergeant's Mail"], toggledSetBonusCounts: { "Sergeant's Mail": 4 }, |
toggledSetBonuses? | string[] | Keys of enabled toggle set bonuses (matching g_EsoBuildToggledSetData). Auto-exported by browser-export-build.js when the user enables a toggle. Keys are the rule's nameId (string), e.g.: - "Ansuul's Torment" → +7% damage done against monsters (base) - "Ansuul's Torment (Bonus Damage)" → +14% additional (on interrupt) - "Spectral Cloak" → +6% damage done (via Blade Cloak proc) Unknown ids (or ids whose set is not equipped) are ignored silently. |
toggleSkills? | (string | ToggleSkillInput)[] | Toggle skills to enable, optionally with a stack count. Ex: ["Emperor", { name: "Grim Focus", count: 5 }] Uses the same name as in UESP's g_EsoBuildToggledSkillData. Toggles with maxTimes need count > 0 to apply their effect; passing the plain name leaves the count at 0 and the engine discards the effect. See listAvailableToggleSkills() for the names and their maxTimes. |