Carreau Posted February 5, 2018 Share Posted February 5, 2018 So I have a mod I have two exclusive options. Within my script, if the user enables one, it'll check if the other option is turned on. If it is, it turns it off and forces an MCM refresh to capture the change in state. The states are changing, but not being shown in MCM. If I exit back to the game and then re-enter MCM, the switchers are correctly shown. Function OptionOneEnable(bool isEnabled) If(isEnabled) OptionOneIsEnabled = True If(OptionTwoIsEnabled) OptionTwoIsEnabled = False MCM.SetModSettingBool("TestMod", "bOptionTwo:Main", False) MCM.RefreshMenu() EndIf debug.messagebox("Option One has been enabled.") Else OptionOneIsEnabled = False EndIf EndFunction ;MCM code { "id": "bOptionOne:Main", "text": "Enable Option One", "type": "switcher", "valueOptions": { "sourceType": "ModSettingBool" }, "action": { "type": "CallFunction", "form": "TestMod.esp|FA1", "function": "OptionOneEnable", "params": ["{value}"] } },The option bools are enabled through mod settings in MCM. Option two is identically done in a separate function. This is obviously working in script, I'm just trying to figure out why MCM isn't changing.Any help is appreciated. Link to comment Share on other sites More sharing options...
wim95 Posted February 5, 2018 Share Posted February 5, 2018 I don't know how to explain it in English. Keep the small arrow next to a large. If you can confirm, please do bug report in MCM thread. Link to comment Share on other sites More sharing options...
Carreau Posted February 5, 2018 Author Share Posted February 5, 2018 Both options are in the same page (which is what Iâm guessing you meant). Itâs not a game breaking issue since the options are setting correctly and reflect their states once you close out the menu and re-enter MCM. Link to comment Share on other sites More sharing options...
wim95 Posted February 5, 2018 Share Posted February 5, 2018 I understand that both variables are on the same page. I think MCM.RefreshMenu() command sent to the wrong page, if the little arrow is somewhere in another place, not on the same page. I have this problem with my mod MoreAGOMBz. Link to comment Share on other sites More sharing options...
Carreau Posted February 6, 2018 Author Share Posted February 6, 2018 (edited) It was a case sensitivity issue. I forgot JSON doesn't like if you capitalize the T or F in true/false. It's working as intended now. Edit: for those that may stumble upon this. Whatever you pass through SetModSetting commands is exactly what the JSON sees. So formatting should be handled correctly. For bools, it has to be true and false. Not True and False or TRUE and FALSE. Iâm guilty of using capitalization for my boolean. Edited February 6, 2018 by Carreau Link to comment Share on other sites More sharing options...
Recommended Posts