Skip to content

Commit a113e2d

Browse files
author
LocalIdentity
committed
Fix Gem quality tooltips
Not sure when they added it but a bunch of gem tooltips in PoE 1 have their own stat description that is meant to be used Also fixed an issue with cannoincal_line in which is meant to be used for the trade site and also an issue when a stat description has 2 special identifiers in a row e.g. `#|-1 "{0}% less Critical Strike Chance" canonical_line negate 1` gets treated as `canonical_line ` as the type and `negate` as the value instead of knowing to treat `canonical_line` as its own singular case PoB 2 didn't have this issue as they removed reminderText values from stat descriptions to the fix of checking for numbers in the second argument would work
1 parent a02ddd0 commit a113e2d

13 files changed

+23529
-22193
lines changed

src/Classes/SkillsTab.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ function SkillsTabClass:CreateGemSlot(index)
776776
-- Do the stats one at a time because we're not guaranteed to get the descriptions in the same order we look at them here
777777
local stats = { }
778778
stats[qual[1]] = qual[2] * 20
779-
local descriptions = self.build.data.describeStats(stats, grantedEffect.statDescriptionScope)
779+
local descriptions = self.build.data.describeStats(stats, grantedEffect.statDescriptionScope, true)
780780
-- line may be nil if the value results in no line due to not being enough quality
781781
for _, line in ipairs(descriptions) do
782782
if line then

src/Data/StatDescriptions/active_skill_gem_stat_descriptions.lua

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,20 @@ return {
759759
[30]={
760760
[1]={
761761
[1]={
762+
[1]={
763+
k="milliseconds_to_seconds_2dp",
764+
v=1
765+
},
766+
["gem_quality"]=true,
767+
limit={
768+
[1]={
769+
[1]="#",
770+
[2]="#"
771+
}
772+
},
773+
text="{0:+d} seconds to Base duration"
774+
},
775+
[2]={
762776
[1]={
763777
k="milliseconds_to_seconds_2dp",
764778
v=1
@@ -771,7 +785,7 @@ return {
771785
},
772786
text="Base duration is {0} second"
773787
},
774-
[2]={
788+
[3]={
775789
[1]={
776790
k="milliseconds_to_seconds_2dp",
777791
v=1
@@ -1733,6 +1747,10 @@ return {
17331747
k="negate",
17341748
v=1
17351749
},
1750+
[2]={
1751+
k="canonical_line",
1752+
v=true
1753+
},
17361754
limit={
17371755
[1]={
17381756
[1]="#",
@@ -3283,15 +3301,35 @@ return {
32833301
[124]={
32843302
[1]={
32853303
[1]={
3304+
["gem_quality"]=true,
32863305
limit={
32873306
[1]={
32883307
[1]=1,
32893308
[2]=1
32903309
}
32913310
},
3292-
text="Fires 1 Projectile"
3311+
text="Fires {0:+d} Projectile"
32933312
},
32943313
[2]={
3314+
["gem_quality"]=true,
3315+
limit={
3316+
[1]={
3317+
[1]=2,
3318+
[2]="#"
3319+
}
3320+
},
3321+
text="Fires {0:+d} Projectiles"
3322+
},
3323+
[3]={
3324+
limit={
3325+
[1]={
3326+
[1]=1,
3327+
[2]=1
3328+
}
3329+
},
3330+
text="Fires 1 Projectile"
3331+
},
3332+
[4]={
32953333
limit={
32963334
[1]={
32973335
[1]=2,
@@ -6066,6 +6104,16 @@ return {
60666104
[230]={
60676105
[1]={
60686106
[1]={
6107+
["gem_quality"]=true,
6108+
limit={
6109+
[1]={
6110+
[1]=1,
6111+
[2]="#"
6112+
}
6113+
},
6114+
text="{0:+d} to Maximum Hiveborn"
6115+
},
6116+
[2]={
60696117
limit={
60706118
[1]={
60716119
[1]=1,

src/Data/StatDescriptions/beam_skill_stat_descriptions.lua

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,35 @@ return {
3131
[2]={
3232
[1]={
3333
[1]={
34+
["gem_quality"]=true,
3435
limit={
3536
[1]={
3637
[1]=1,
3738
[2]=1
3839
}
3940
},
40-
text="Beam Splits towards {0} additional target"
41+
text="Beam Splits towards {0:+d} additional target"
4142
},
4243
[2]={
44+
["gem_quality"]=true,
45+
limit={
46+
[1]={
47+
[1]="#",
48+
[2]="#"
49+
}
50+
},
51+
text="Beam Splits towards {0:+d} additional targets"
52+
},
53+
[3]={
54+
limit={
55+
[1]={
56+
[1]=1,
57+
[2]=1
58+
}
59+
},
60+
text="Beam Splits towards {0} additional target"
61+
},
62+
[4]={
4363
limit={
4464
[1]={
4565
[1]="#",

src/Data/StatDescriptions/gem_stat_descriptions.lua

Lines changed: 119 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4941,15 +4941,43 @@ return {
49414941
k="milliseconds_to_seconds",
49424942
v=1
49434943
},
4944+
["gem_quality"]=true,
49444945
limit={
49454946
[1]={
49464947
[1]=1000,
49474948
[2]=1000
49484949
}
49494950
},
4950-
text="Innervation lasts {0} second"
4951+
text="Innervation lasts {0:+d} second"
49514952
},
49524953
[2]={
4954+
[1]={
4955+
k="milliseconds_to_seconds",
4956+
v=1
4957+
},
4958+
["gem_quality"]=true,
4959+
limit={
4960+
[1]={
4961+
[1]="#",
4962+
[2]="#"
4963+
}
4964+
},
4965+
text="Innervation lasts {0:+d} seconds"
4966+
},
4967+
[3]={
4968+
[1]={
4969+
k="milliseconds_to_seconds",
4970+
v=1
4971+
},
4972+
limit={
4973+
[1]={
4974+
[1]=1000,
4975+
[2]=1000
4976+
}
4977+
},
4978+
text="Innervation lasts {0} second"
4979+
},
4980+
[4]={
49534981
[1]={
49544982
k="milliseconds_to_seconds",
49554983
v=1
@@ -7181,15 +7209,39 @@ return {
71817209
[263]={
71827210
[1]={
71837211
[1]={
7212+
["gem_quality"]=true,
71847213
limit={
71857214
[1]={
71867215
[1]=1,
71877216
[2]="#"
71887217
}
71897218
},
7190-
text="Supported Skills have {0}% increased Cooldown Recovery Rate"
7219+
text="Supported Skills have {0:+d}% increased Cooldown Recovery Rate"
71917220
},
71927221
[2]={
7222+
[1]={
7223+
k="negate",
7224+
v=1
7225+
},
7226+
["gem_quality"]=true,
7227+
limit={
7228+
[1]={
7229+
[1]="#",
7230+
[2]=-1
7231+
}
7232+
},
7233+
text="Supported Skills have {0:+d}% reduced Cooldown Recovery Rate"
7234+
},
7235+
[3]={
7236+
limit={
7237+
[1]={
7238+
[1]=1,
7239+
[2]="#"
7240+
}
7241+
},
7242+
text="Supported Skills have {0}% increased Cooldown Recovery Rate"
7243+
},
7244+
[4]={
71937245
[1]={
71947246
k="negate",
71957247
v=1
@@ -10110,6 +10162,10 @@ return {
1011010162
k="negate",
1011110163
v=1
1011210164
},
10165+
[2]={
10166+
k="canonical_line",
10167+
v=true
10168+
},
1011310169
limit={
1011410170
[1]={
1011510171
[1]="#",
@@ -10240,6 +10296,16 @@ return {
1024010296
[374]={
1024110297
[1]={
1024210298
[1]={
10299+
["gem_quality"]=true,
10300+
limit={
10301+
[1]={
10302+
[1]="#",
10303+
[2]="#"
10304+
}
10305+
},
10306+
text="Killing Blows with Supported Skills cause Enemies to have {0:+d}% chance to Explode, dealing a tenth of their maximum Life as Damage of a Random Element"
10307+
},
10308+
[2]={
1024310309
limit={
1024410310
[1]={
1024510311
[1]=1,
@@ -10248,7 +10314,7 @@ return {
1024810314
},
1024910315
text="Killing Blows with Supported Skills cause Enemies to have a {0}% chance to Explode, dealing a tenth of their maximum Life as Damage of a Random Element"
1025010316
},
10251-
[2]={
10317+
[3]={
1025210318
limit={
1025310319
[1]={
1025410320
[1]=100,
@@ -10785,6 +10851,20 @@ return {
1078510851
[397]={
1078610852
[1]={
1078710853
[1]={
10854+
[1]={
10855+
k="reminderstring",
10856+
v="ReminderTextFlee"
10857+
},
10858+
["gem_quality"]=true,
10859+
limit={
10860+
[1]={
10861+
[1]=1,
10862+
[2]="#"
10863+
}
10864+
},
10865+
text="Supported Skills have {0:+d}% chance to cause Monsters to Flee on Hit"
10866+
},
10867+
[2]={
1078810868
[1]={
1078910869
k="reminderstring",
1079010870
v="ReminderTextFlee"
@@ -11500,6 +11580,16 @@ return {
1150011580
[427]={
1150111581
[1]={
1150211582
[1]={
11583+
["gem_quality"]=true,
11584+
limit={
11585+
[1]={
11586+
[1]=1,
11587+
[2]="#"
11588+
}
11589+
},
11590+
text="Kill Normal and Magic Rarity Enemies that have {0:+d}% Life or\nlower when Hit by Supported Skills"
11591+
},
11592+
[2]={
1150311593
limit={
1150411594
[1]={
1150511595
[1]=1,
@@ -13846,6 +13936,10 @@ return {
1384613936
k="reminderstring",
1384713937
v="ReminderTextUpfrontCost"
1384813938
},
13939+
[3]={
13940+
k="reminderstring",
13941+
v="ReminderTextTransfusionNearbyMinion"
13942+
},
1384913943
limit={
1385013944
[1]={
1385113945
[1]="#",
@@ -20815,6 +20909,28 @@ return {
2081520909
[776]={
2081620910
[1]={
2081720911
[1]={
20912+
[1]={
20913+
k="divide_by_ten_1dp_if_required",
20914+
v=1
20915+
},
20916+
[2]={
20917+
k="reminderstring",
20918+
v="ReminderTextPower"
20919+
},
20920+
[3]={
20921+
k="reminderstring",
20922+
v="ReminderTextSoulEaterNonAura"
20923+
},
20924+
["gem_quality"]=true,
20925+
limit={
20926+
[1]={
20927+
[1]=1,
20928+
[2]="#"
20929+
}
20930+
},
20931+
text="Consuming a Corpse with Supported Skills has {0:+d}% chance to grant a Soul per Power"
20932+
},
20933+
[2]={
2081820934
[1]={
2081920935
k="divide_by_ten_1dp_if_required",
2082020936
v=1

src/Data/StatDescriptions/minion_attack_skill_stat_descriptions.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2955,6 +2955,10 @@ return {
29552955
k="negate",
29562956
v=1
29572957
},
2958+
[2]={
2959+
k="canonical_line",
2960+
v=true
2961+
},
29582962
limit={
29592963
[1]={
29602964
[1]="#",

src/Data/StatDescriptions/minion_skill_stat_descriptions.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6202,6 +6202,10 @@ return {
62026202
k="negate",
62036203
v=1
62046204
},
6205+
[2]={
6206+
k="canonical_line",
6207+
v=true
6208+
},
62056209
limit={
62066210
[1]={
62076211
[1]="#",

src/Data/StatDescriptions/minion_spell_damage_skill_stat_descriptions.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,6 +1749,10 @@ return {
17491749
k="negate",
17501750
v=1
17511751
},
1752+
[2]={
1753+
k="canonical_line",
1754+
v=true
1755+
},
17521756
limit={
17531757
[1]={
17541758
[1]="#",

0 commit comments

Comments
 (0)