Repository navigation
Description
What happens
The Config tab option "Augyre rotating buff" shows "Elemental Overload" by default, but the calculation actually uses Resolute Technique until you pick a value yourself. If you do pick "Elemental Overload", it is lost on save, and the reopened build is back to Resolute Technique while the dropdown still says "Elemental Overload".
Steps (derived from the code):
- New build, equip Augyre (Void Sceptre). Config tab shows "Augyre rotating buff: Elemental Overload".
- Check Calcs: Resolute Technique is active (hits cannot crit, 100% hit chance), not Elemental Overload.
- Change the dropdown to "Resolute Technique", then back to "Elemental Overload". Elemental Overload is now applied.
- Save and reopen.
Expected: what the dropdown shows is what gets applied, and it is the same after reopening.
Actual: steps 1-2 show one option and apply the other; after step 4 the build is back to Resolute Technique with "Elemental Overload" displayed.
Cause
The option has no defaultIndex:
PathOfBuilding/src/Modules/ConfigOptions.lua
Lines 1668 to 1676 in a69391d
{ var = "conditionHaveAugyre", type = "list", label = "Augyre rotating buff:", ifFlag = "Condition:HaveAugyre", list = {{val="EleOverload",label="Elemental Overload"},{val="ResTechnique",label="Resolute Technique"}}, tooltip = "This option is specific to Augyre.", apply = function(val, modList, enemyModList) if val == "EleOverload" then modList:NewMod("Condition:HaveElementalOverload", "FLAG", true, "Config", { type = "Condition", var = "Combat" }) modList:NewMod("Keystone", "LIST", "Elemental Overload", "Config") elseif val == "ResTechnique" then modList:NewMod("Condition:HaveResoluteTechnique", "FLAG", true, "Config", { type = "Condition", var = "Combat" }) modList:NewMod("Keystone", "LIST", "Resolute Technique", "Config") end end },
So a new or loaded config set starts with input.conditionHaveAugyre = nil (NewConfigSet only fills list values that have a defaultIndex):
PathOfBuilding/src/Classes/ConfigTab.lua
Lines 1289 to 1296 in a69391d
for _, varData in ipairs(varList) do if varData.var then configSet.input[varData.var] = varData.defaultState configSet.placeholder[varData.var] = varData.defaultPlaceholderState if varData.defaultIndex then configSet.input[varData.var] = varData.list[varData.defaultIndex].val end end
But the dropdown displays input or GetDefaultState(var), and the default state of a list is its first entry:
PathOfBuilding/src/Classes/ConfigTab.lua
Line 1018 in a69391d
control:SelByValue(self.configSets[self.activeConfigSetId].input[var] or self:GetDefaultState(var), "val") PathOfBuilding/src/Classes/ConfigTab.lua
Lines 686 to 687 in a69391d
elseif varData.type == "list" then self.defaultState[varData.var] = varData.list[varData.defaultIndex or 1].val
A list's apply only runs for a non-nil input (ConfigTab.lua#L1150-L1152), so with nil neither branch adds Elemental Overload. The item's own "You have Resolute Technique while you do not have Elemental Overload" then applies.
On save, any input equal to GetDefaultState is left out (ConfigTab.lua#L971), so an explicit "EleOverload" is not written. On load it comes back as nil.
Among the list options without defaultIndex, this appears to be the only one whose first entry changes the calculation. The others I checked (calc modes, "None" entries) treat nil the same as their first entry. More generally, Save skips values equal to GetDefaultState, but Load/NewConfigSet only restore defaultState/defaultIndex, so any option where those two differ loses an explicit value on reload. The numeric "0" case is #10143 / #10354.
Possible fix
Add defaultIndex = 1 to conditionHaveAugyre, so the stored input, the dropdown and the save default agree. Alternatively, have Save compare against the value NewConfigSet would restore rather than GetDefaultState.
Activity