Skip to content

Equipment Computation

DataSheetLang can derive equipment entries from item definitions and compute equipment stats deterministically.

When enabled, the tool can:

  • derive missing equipment metadata from item data (equipment ID, part, type, etc.)
  • compute a set of stats based on level, grade, power tier, and optional rank boosts
  • allow explicit overrides for any derived or computed values

This is useful for large-scale tuning: instead of hand-editing thousands of rows, you adjust tiers/formulas and recompute consistently.


Attach an equipment block to an item create operation:

items:
create:
- id: 99001
name: "Dreadspire Axe"
level: 65
rareGrade: "Unique"
combatItemType: EquipWeapon
combatItemSubType: Axe
equipment:
computed: true

computed: true enables stat computation with default inputs.


equipment:
computed: true # Optional: shorthand for compute: {}
compute: # Optional: computation parameters
formula: "standard" # Formula name (default: "standard")
powerTier: 5 # Power tier 1–16 (default: derived)
rank: 0 # Rank boost (default: 0)
override: # Optional: explicit value overrides (always win)
equipmentId: 900099001
part: Weapon
type: AXE
# Computed stats (examples; exact set depends on category)
maxAtk: 600
impact: 100
# Pass-through values (examples)
countOfSlot: 4
balance: 50
atkRate: 1.0
defRate: 1.0
impactRate: 1.0
balanceRate: 1.0

computed: true is equivalent to:

compute: {}

(with defaults).


When computation is enabled, these values are derived automatically:

ValueDerived fromOverride
equipmentId900000000 + itemIdoverride.equipmentId
partitem combatItemSubType mappingoverride.part
typeitem combatItemSubType mappingoverride.type
levelitem level(not overrideable)
gradeitem rareGrade(not overrideable)

The item combatItemSubType determines classification:

Weapons

SubTypePartType
DUALWeaponDUAL
LANCEWeaponLANCE
TWOHANDWeaponTWOHAND
AXEWeaponAXE
CIRCLEWeaponCIRCLE
BOWWeaponBOW
STAFFWeaponSTAFF
RODWeaponROD
CHAINWeaponCHAIN
BLASTERWeaponBLASTER
GAUNTLETWeaponGAUNTLET
SHURIKENWeaponSHURIKEN
GLAIVEWeaponGLAIVE

Armor

SubTypePartType
BODY_ARMOR, BODY_MAILBODYMAIL
BODY_LEATHERBODYLEATHER
BODY_ROBEBODYROBE
HAND_ARMOR, HAND_MAILHANDMAIL
HAND_LEATHERHANDLEATHER
HAND_ROBEHANDROBE
FEET_ARMOR, FEET_MAILFEETMAIL
FEET_LEATHERFEETLEATHER
FEET_ROBEFEETROBE

Accessories

SubTypePartType
RINGFINGERRING
NECKLACENECKNECKLACE
EARRINGEAREARRING
BROOCHBROOCHBROOCH
BELTBELTBELT
UNDERWEARUNDERWEARUNDERWEAR
ACCESSORYHAIRACCESSORYHAIRACCESSORYHAIR
ACCESSORYFACEACCESSORYFACEACCESSORYFACE
RELICRELICRELIC
HOLYTHINGHOLYTHINGHOLYTHING

Stat computation uses a named formula (default: "standard") with a project-specific configuration file.

  • Commands that compute stats require a --formulas <file> input.
  • The file format is stable, but the exact weights are project-controlled.
  • If you are not part of the balancing team, you typically receive this file (you don’t invent values).

Create a stat-formulas.yaml file with the required structure:

stat-formulas.yaml
sigmoid:
maximumValue: <number>
growthRate: <number>
growthSteepness: <number>
modifiers:
statBoostByGrade: <number>
statBoostByRank: <number>
statBoostByPowerTier: <number>

Notes:

  • All values are numeric.
  • Keep this file under version control (it defines your balancing rules).
  • If your project provides this file centrally, do not fork it lightly.

In YAML, you can choose a formula name:

equipment:
computed: true
compute:
formula: "standard"

If you omit it, "standard" is used.


When you combine computation and overrides:

  1. Computed values fill in computed stats
  2. Override values always win

Precedence:

final = override ?? computed

Power tiers are validated as an integer range:

  • 1–16

Power tier can come from:

  • compute.powerTier inline
  • tier mapping during bulk regeneration (recommended for large sets)

7) Bulk regeneration (recompute many items)

Section titled “7) Bulk regeneration (recompute many items)”

Regenerate equipment stats from existing XML files:

Terminal window
dsl regenerate equipment --path ./datasheets --tiers gear-tiers.yaml --formulas stat-formulas.yaml --seed 100000
OptionDescriptionDefault
--pathDataSheet directoryRequired
--tierstier mapping fileRequired
--formulasformula config fileRequired
--seedstarting equipment ID100000
--dry-runpreview without writingfalse

Maps item IDs to power tiers:

gear-tiers.yaml
tiers:
- itemIds: [13001, 13002, 13003]
powerTier: 1
- itemIds: [13101, 13102]
powerTier: 5
- range:
start: 14000
end: 14999
powerTier: 10

Debug equipment computation for a specific item:

Terminal window
dsl explain my-spec.yaml 99001 --formulas stat-formulas.yaml

Typical output includes:

  • derived values (part/type/level/grade)
  • formula name used
  • computed stats
  • final merged values

Common computation-related errors include:

  • invalid power tiers
  • missing/invalid formulas file
  • unknown formula name

See: Error codes.