add-hero-trait
Adding Hero Trait Mods
Overview
Hero traits are implemented as mod factories in src/tli/hero/hero-trait-mods.ts. Each factory takes a level index (0-4) and returns an array of Mod objects. The trait's description in src/data/hero-trait/hero-traits.ts is the source of truth for what mods and values to produce.
When to Use
- Implementing a hero trait that isn't yet in
heroTraitModFactories - Adding calculation support for a hero trait's mechanics
Step 0: Read the Trait Description
Always start here. Look up the trait in src/data/hero-trait/hero-traits.ts and read its affix field. This determines:
More from aclinia/torchlight-of-building
adding-support-mod-parsers
Use when adding support mod parsers to convert support skill affix strings to typed SupportMod objects - guides the template-based parsing pattern (project)
26implementing-game-skill-parsers
Use when implementing skill data generation from HTML sources for game build planners - guides the parser-factory-generation pattern for extracting level-scaling values for active and passive skills (project)
26adding-mod-parsers
Use when adding new mod parsers to convert game mod strings to typed Mod objects - guides the template-based parsing pattern (project)
25add-mod-resolver
Use when adding new push* resolver functions inside resolveModsForOffenseSkill to handle mod-based combat mechanics like tangles, debuffs, or conditional damage bonuses (project)
5add-configuration
Use when adding new configuration fields to the Configuration interface for combat conditions, buff stacks, or other build parameters used in damage calculations (project)
5