Mod settings not showing until defaults restored

Discussion in 'Mod Discussions' started by trialq, July 14, 2014.

  1. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917


    The problem is that mod settings don't show until you restore the default settings. Then, even when you change a mod setting and save it, coming back to settings all the mod settings are hidden again. This is with all mods except the one i'm testing disabled. Local settings were deleted, and there was a problem before this installation of PA ever saw floating framework or settings manager (once upon a time I think one of these had an issue).

    The funny thing is, when hotbuild2 is enabled too, the settings of both mods show every time. I think maybe there is a problem that hotbuild avoids by doing additional stuff in the settings scene. Maybe a race condition was introduced with the new patch or it's always been like this.

    Auto factory has this problem, as does any using settings manager i tried, and instant sandbox (the only other mod I can see that doesn't use the settings manager to add settings).

    First off, can people try instant sandbox with no other mods enabled to see if you can reproduce the error?

    If you see this it means the settings have displayed as they should:
    sand00.png

    If you see this, you have reproduced the error:
    sand01.png

    Notice the lack of normal settings, but the custom setting to the left is displayed fine.
  2. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Okay, that is new. Now to figure out which version I set that up in and look for changes.
  3. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    Every mod that has settings I've tried has the issue, except hotbuild2. Didn't notice a problem a few patches ago with auto factory, and don't think I've touched the settings code since.
  4. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    It's a timing issue. I haven't traced the cause of the change, or looked at hotbuild yet.

    Workaround:

    Code:
      model.settingDefinitions(api.settings.definitions)
    
    Problem is every mod that loads settings will likely cause a re-render of the HTML. May not be an actual issue. Other options would be to add settings in global mod files, or make a patch mod that loaded last and performed the refresh once.
    trialq likes this.
  5. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Hotbuild works because

    Code:
            //Fix for PTE 
            model.settingGroups.notifySubscribers();
    
    Which may be a lighter-weight solution.

    Line added June 27; 68079 didn't touch settings, but 67998 did. It removed that very line from the display_mode handler, along with a ton of other changes, including ko-deferred.
  6. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    That's great, thanks. Your workaround worked for auto factory, hotbuild's didn't.
  7. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    All I read is : keep being lazy :p hotbuild is fine :)

Share This Page