Skip to content

Commit bd27cda

Browse files
authored
Adding an example and clarifying language
1 parent d00ba4d commit bd27cda

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

docs/addingSkills.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,25 @@ This directive is used when a new skill shouldn't have a gem associated with it.
3636

3737
## Combined data
3838

39-
The most important tables constructed from the game data are the `stats` table, and the `levels` table. Taking a look at just one row in `levels`, there is a list of numbers, followed by named entries, such as `levelRequirement`, `damageEffectiveness`, etc. Each of these stats are mapped to a mod in Path of Building either via `SkillStatMap.lua`, or if the stat is specific to this particular skill (e.g. `spectral_helix_rotations_%` would only apply to Spectral Helix) in `statMap` in this same table. If a mapping exists in both places, the one local to this skill will take precedence. The corresponding mod will have `nil` in place of its normal value, and that value instead comes from this row in the `levels` table. Notice that not all of the stats have a number in the first part of the `levels` row. These extra stats are usually for booleans/flags that are always true.
39+
The most important tables constructed from the game data are the `stats` table, and the `levels` table. Taking a look at just one row in `levels`, there is a list of numbers, followed by named entries, such as `levelRequirement`, `damageEffectiveness`, etc. This list of numbers maps directly to each entry in the `stats` table. Notice that not all of the stats have a number in the first part of the `levels` row. These extra stats are usually for booleans/flags that are always true.
40+
* For example, here are the two tables for Fireball:
41+
```lua
42+
stats = {
43+
"spell_minimum_base_fire_damage",
44+
"spell_maximum_base_fire_damage",
45+
"base_chance_to_ignite_%",
46+
"fireball_base_radius_up_to_+_at_longer_ranges",
47+
"base_is_projectile",
48+
"quality_display_active_skill_ignite_damage_is_gem",
49+
},
50+
levels = {
51+
[1] = { 0.80000001192093, 1.2000000476837, 25, 0, damageEffectiveness = 2.4, critChance = 6, levelRequirement = 1, statInterpolation = { 3, 3, 1, 1, }, cost = { Mana = 6, }, },
52+
[2] = { 0.80000001192093, 1.2000000476837, 25, 0, damageEffectiveness = 2.4, critChance = 6, levelRequirement = 2, statInterpolation = { 3, 3, 1, 1, }, cost = { Mana = 6, }, },
53+
[3] = { 0.80000001192093, 1.2000000476837, 25, 1, damageEffectiveness = 2.4, critChance = 6, levelRequirement = 4, statInterpolation = { 3, 3, 1, 1, }, cost = { Mana = 7, }, },
54+
```
55+
The value for `spell_minimum_base_fire_damage` would be 0.80000001192093, the value for `base_chance_to_ignite_%` would be 25, and since `base_is_projectile` doesn't have a number, it's just a flag on the skill to properly factor in projectile mods.
56+
57+
Each of these stats are mapped to a mod in Path of Building either via `SkillStatMap.lua`, or if the stat is specific to this particular skill (e.g. `spectral_helix_rotations_%` would only apply to Spectral Helix) in `statMap` in this same table. If a mapping exists in both places, the one local to this skill will take precedence. The corresponding mod will have `nil` in place of its normal value, and that value instead comes from this row in the `levels` table.
4058

4159
Notice how these stat numbers don't really align with damage numbers in any meaningful way for active skills. The stat numbers are interpolated by the numbers in the corresponding position in the `statInterpolation` table in the same row.
4260
* 1 means take the number as-is. This is the most common interpolation

0 commit comments

Comments
 (0)