Jump to content

Mod Configuration Options Scroll List Not Saving


TShawKiller
  • Fixed

When modifying mod options that are past the initial scroll view, the changes made to that option are not saved properly. After going through code (in file scripts\screens\redux\modconfigurationscreen.lua), currently it looks like the idx in the spinner's OnChanged call is used to index self.options based on the current widget view index, rather than the absolute index of the option being changed. A fix I did was store the idx from the ApplyDataToWidget function to the widget and load that idx inside widget.opt.spinner.OnChange to store the selected value to the correct mod option index.

Below is code a snippet:

-- file: scripts\screens\redux\modconfigurationscreen.lua

local ModConfigurationScreen = Class(Screen, function(self, modname, client_config)
	-- ...
	local function ScrollWidgetsCtor(context, idx)
		-- ...
		widget:SetOnGainFocus(function(_)
			self.options_scroll_list:OnWidgetFocus(widget)
			widget:ApplyDescription()
		end)
      
		widget.index = idx		-- Added
		widget.opt.spinner.OnChanged = function( _, data )
			self.options[widget.index].value = data			-- Changed from: self.options[idx].value = data
			widget.opt.data.selected_value = data
			widget.opt.spinner:SetHasModification(widget.opt.data.selected_value ~= widget.opt.data.initial_value)
			widget:ApplyDescription()
			self:MakeDirty()
		end

		widget.focus_forward = widget.opt
        
		return widget
	end
	local function ApplyDataToWidget(context, widget, data, idx)
		widget.opt.data = data
		if data then
			widget.index = idx		-- Added
			-- ...
		end
		-- ...
	end
	-- ...
end)

 


Steps to Reproduce
Install a mod with more than 12 options, open the mod's option configuration screen, scroll down, change the value of one of the options towards the end of the list, click apply, reopen the mod option list and notice that the change was not saved for the option.
  • Like 2
  • Thanks 2



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

Yup, the mod configuration UI is broken. I noticed at least a couple of bugs while I was scrolling inside the menu.

Share this comment


Link to comment
Share on other sites

I received a bug report for my mod - user experience identical issue (configuration options past first few are not saved properly).

Please fix.

Share this comment


Link to comment
Share on other sites

I can confirm this as well. I'm gotten numerous reports that my character mods, with multiple config options, are having the issues stated above.

"I have both The Engineer and The Medic mods- both are doing the same thing. I change settings and click "apply" and then go back in and the settings have adjusted themselves- not even back to default, but completely different than what I put. I adjust them again, scroll down, and the settings change themselves as I scroll."

This is a quote from one of my commenters on this. They also note it was working as intended before the update. Hopefully this can be fixed soon!

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...