elvisgreenchina Posted July 27, 2013 Share Posted July 27, 2013 Can someone explain to me how to code a simple GMST toggle in MCM? I tried putting it together using the quickstart guide on the GitHub website but I'm not getting anywhere. Link to comment Share on other sites More sharing options...
Pevey Posted July 27, 2013 Share Posted July 27, 2013 I'm pretty familiar with basic MCM menu scripts, but what is GMST? Link to comment Share on other sites More sharing options...
elvisgreenchina Posted July 27, 2013 Author Share Posted July 27, 2013 Sorry, I meant GLOB. It's a global value, similar to a game setting (GMST), set with an integer. For example, if you want to disable dragons, in the console, you would type set dragonsenabled to 0Where dragonsenabled is a GLOB. In Papyrus, you'd have GlobalValue property DragonsEnabled auto DragonsEnabled.SetValueInt(0)I'm not sure if I need to set them with If statements in the OnOptionSelect events or what. Link to comment Share on other sites More sharing options...
Pevey Posted July 27, 2013 Share Posted July 27, 2013 I see. Here's an example snipped from one of my scripts: scriptname _LP_ConfigQuestScript extends SKI_ConfigBase GlobalVariable Property _LP_SettingMusicSpeech Auto String[] Pages Int MusicSpeechToggle Event OnConfigInit() Pages = new String[1] Pages[0] = "Options" EndEvent Event OnPageReset(String Page) If (Page == "") LoadCustomContent("skyui/res/mcm_logo.dds", 258, 95) Return Else UnloadCustomContent() EndIf If (Page == "Options") SetCursorFillMode(TOP_TO_BOTTOM) MusicSpeechToggle = AddToggleOption("Music Increases Speechcraft", _LP_SettingMusicSpeech.GetValue() As Int) EndIf EndEvent Event OnOptionHighlight(Int Option) If (Option == MusicSpeechToggle) SetInfoText("Whether playing music increases your speechcraft skill") EndIf EndEvent Event OnOptionSelect(Int Option) If (Option == MusicSpeechToggle) If _LP_SettingMusicSpeech.GetValue() As Int == 0 _LP_SettingMusicSpeech.SetValue(1) SetToggleOptionValue(Option, 1) Else _LP_SettingMusicSpeech.SetValue(0) SetToggleOptionValue(Option, 0) EndIf EndIf EndEvent Link to comment Share on other sites More sharing options...
elvisgreenchina Posted July 27, 2013 Author Share Posted July 27, 2013 Interesting, I'll give that a whirl. Much appreciated! Link to comment Share on other sites More sharing options...
elvisgreenchina Posted July 28, 2013 Author Share Posted July 28, 2013 Do you have any idea how to make an option greyed out and unselectable under certain circumstances? Link to comment Share on other sites More sharing options...
Pevey Posted July 28, 2013 Share Posted July 28, 2013 In your AddToggleOption function, add OPTION_FLAG_DISABLED. Like this: MusicSpeechToggle = AddToggleOption("Music Increases Speechcraft", 1, OPTION_FLAG_DISABLED) Link to comment Share on other sites More sharing options...
Recommended Posts