-
-
Notifications
You must be signed in to change notification settings - Fork 3
nl_mcm_module
This documents the new API functions in nl_mcm.
For the original mcm Api, see link.
Only STATE api functions are supported as part of the new api.
- DEBUG_FLAG_E
- DEBUG_FLAG_T
- DEBUG_FLAG_N
- OK
- ERROR
- ERROR_MODULE_FULL
- ERROR_MODULE_TAKEN
- ERROR_MODULE_INIT
- ERROR_MODULE_NONE
- ERROR_MCM_NONEQUEST
- ERROR_MCM_NONE
- FONT_TYPE_DEFAULT
- FONT_TYPE_PAPER
- UNSAFE_RAW_MCM
- IsMCMInitialized
- IsMCMOpen
- IsModuleRegistered
- PlayerUpdatedOptions
- QuickHotkey
- PageName
- PageOrder
- CurrentMCMID
- CurrentFont
- OPTION_FLAG_NONE
- OPTION_FLAG_DISABLED
- OPTION_FLAG_HIDDEN
- OPTION_FLAG_WITH_UNMAP
- LEFT_TO_RIGHT
- TOP_TO_BOTTOM
- CurrentVersion
- OnVersionUpdate
- OnGameReload
- OnConfigClose
- OnPageInit
- OnPageDraw
- OnDefaultST
- OnHighlightST
- OnSelectST
- OnSliderOpenST
- OnMenuOpenST
- OnColorOpenST
- OnSliderAcceptST
- OnMenuAcceptST
- OnColorAcceptST
- OnInputOpenST
- OnInputAcceptST
- OnKeyMapChangeST
- DEBUG_MSG
- RegisterModule
- RenameModule
- GetOtherModule
- UnregisterModule
- UnregisterAllModules
- FONT_PRIMARY
- FONT_SECONDARY
- FONT_SUCCESS
- FONT_DANGER
- FONT_WARNING
- FONT_INFO
- FONT_CUSTOM
- GetCommonStore
- SetCommonStore
- SetModName
- SetLandingPage
- SetSplashScreen
- SetFont
- SetPersistentMCMPreset
- AddParagraph
- SetSliderDialog
- SetMenuDialog
- ForcePageListReset
- GoToPage
- OpenMCM
- CloseMCM
- GetFullMCMPresetPath
- SaveMCMToPreset
- LoadMCMFromPreset
- GetNumMCMSavedPresets
- GetMCMSavedPresets
- DeleteMCMSavedPreset
- SetCursorFillMode
- AddHeaderOption
- AddEmptyOption
- AddTextOptionST
- AddToggleOptionST
- AddSliderOptionST
- AddMenuOptionST
- AddColorOptionST
- AddKeyMapOptionST
- AddInputOptionST
- SetOptionFlagsST
- SetTextOptionValueST
- SetToggleOptionValueST
- SetSliderOptionValueST
- SetMenuOptionValueST
- SetColorOptionValueST
- SetKeyMapOptionValueST
- SetInputOptionValueST
- SetSliderDialogStartValue
- SetSliderDialogDefaultValue
- SetSliderDialogRange
- SetSliderDialogInterval
- SetMenuDialogStartIndex
- SetMenuDialogDefaultIndex
- SetMenuDialogOptions
- SetColorDialogStartColor
- SetColorDialogDefaultColor
- SetInputDialogStartText
- SetCursorPosition
- SetInfoText
- ForcePageReset
- LoadCustomContent
- UnloadCustomContent
- ShowMessage
- GetVersion
- SaveData
- LoadData
Empty debug flag
Trace debug flag
Notification debug flag
Error return code for general success
Error return code for general errors
Error return code for max module/page limit being reached
Error return code for module/page name being taken
Error return code for the mcm not being initialized
Error return code for the mcm not containing the given module/page name
Error return code for the mcm quest editorid not being found
Error return code for the mcm quest not having a nl_mcm script attached
Default type font
Paper type font
Grab the pointer to the main mcm script.
Note: You can speed up your script by using this, but you better know what you are doing.
Get: The nl_mcm script
Check if the mcm has actually finished initializing.
Get: Get the initialized status of the mcm
Check if the mcm is open and in-focus by the user.
Get: Get the mcm open state
Check if the module is registered to a mcm.
Get: Get the module's state
Check if the user has changed any of the mcm options.
Get: Get the update state for the current session
If this hotkey is set, it allows the user to immediately open or close the mcm menu
by pressing the defined hotkey.
Get: Get the current quickhotkey for the mcm
Set: Set the new quickhotkey for the mcm
Get the current page name assigned to the module.
Get: Get the current page name assigned to the module
Set: !!!!DO NOT SET THIS PROPERTY OUTSIDE OF THE CREATION KIT!!!!
Get the current display order of the module's page name.
Get: Get the current display order of the module's page name
Set: !!!!DO NOT SET THIS PROPERTY OUTSIDE OF THE CREATION KIT!!!!
Useful to get the mcm's currently assigned mod id.
Note: Don't cache this, as it might change on gamereloads.
Get: Mcm id
Useful to check for the current font.
Get: Get the current font
See the original SkyUI API.
See the original SkyUI API.
See the original SkyUI API.
See the original SkyUI API.
See the original SkyUI API.
See the original SkyUI API.
NL_MCM's page based version of CurrentVersion.
See the original SkyUI Advanced Features.
Get: Refer to the SkyUI API
NL_MCM's page based version of OnVersionUpdate().
See the original SkyUI Advanced Features.
Flags:
- Marked as override
Params:
- new_version - Refer to the SkyUI API
NL_MCM's page based version of OnGameReload.
Does not require you to call parent.OnGameReload() as with SkyUI.
See the original SkyUI Advanced Features.
Flags:
- Marked as override
See the original SkyUI API.
Flags:
- Marked as override
NL_MCM's page based version of OnConfigInit.
See the original SkyUI API.
Flags:
- Marked as override
NL_MCM's page based version of OnPageReset.
See the original SkyUI API.
Flags:
- Marked as override
See the original SkyUI API.
Flags:
- Marked as override
Params:
- state_id - The nl_mcm advanced state id. Ignore this variable if you are not using advanced states
See the original SkyUI API.
Flags:
- Marked as override
Params:
- state_id - The nl_mcm advanced state id. Ignore this variable if you are not using advanced states
See the original SkyUI API.
Flags:
- Marked as override
Params:
- state_id - The nl_mcm advanced state id. Ignore this variable if you are not using advanced states
See the original SkyUI API.
Flags:
- Marked as override
Params:
- state_id - The nl_mcm advanced state id. Ignore this variable if you are not using advanced states
See the original SkyUI API.
Flags:
- Marked as override
Params:
- state_id - The nl_mcm advanced state id. Ignore this variable if you are not using advanced states
See the original SkyUI API.
Flags:
- Marked as override
Params:
- state_id - The nl_mcm advanced state id. Ignore this variable if you are not using advanced states
See the original SkyUI API.
Flags:
- Marked as override
Params:
- state_id - The nl_mcm advanced state id. Ignore this variable if you are not using advanced states
- f - Refer to the SkyUI API
See the original SkyUI API.
Flags:
- Marked as override
Params:
- state_id - The nl_mcm advanced state id. Ignore this variable if you are not using advanced states
- i - Refer to the SkyUI API
See the original SkyUI API.
Flags:
- Marked as override
Params:
- state_id - The nl_mcm advanced state id. Ignore this variable if you are not using advanced states
- col - Refer to the SkyUI API
See the original SkyUI API.
Flags:
- Marked as override
Params:
- state_id - The nl_mcm advanced state id. Ignore this variable if you are not using advanced states
See the original SkyUI API.
Flags:
- Marked as override
Params:
- state_id - The nl_mcm advanced state id. Ignore this variable if you are not using advanced states
- str - Refer to the SkyUI API
See the original SkyUI API.
Flags:
- Marked as override
Params:
- state_id - The nl_mcm advanced state id. Ignore this variable if you are not using advanced states
- keycode - Refer to the SkyUI API
Debug helper function for error messages.
Prints to a given debug channel in the format "NL_MCM(ModName, ScriptName, PageName): msg".
Params:
- msg - Error message
- flag - Which debug channel to use.
Use either Empty, Trace, Notifications, or combinations (just add the flags together) FLAG_T + FLAG_N
Return: The concatted error message
Register the module/page to a mcm.
Params:
- page_name - The page name to display in the mcm
- z - The z index of the module/page in the mcm page list. Lower values will appear first
- quest_editorid - The editor id of the quest containing the nl_mcm script. Defaults to the same quest as the module is attached to
Return: The error code
Rename the module's page name in the attached mcm.
Params:
- page_name - The new page name
Return: The error code
Get another module/page from the attached mcm.
Return: The nl_mcm_module script. Remember to cast this value to your own extending script type
Unregister the module/page from the attached mcm.
Return: The error code
Unregister all modules/pages from the attached mcm.
Return: The error code
Wraps a string in the FONT_PRIMARY type formatting.
Switches automatically depending on the installed UI skin.
Params:
- text - The string to wrap in color
Wraps a string in the FONT_SECONDARY type formatting.
Switches automatically depending on the installed UI skin.
Params:
- text - The string to wrap in color
Wraps a string in the FONT_SUCCESS type formatting.
Switches automatically depending on the installed UI skin.
Params:
- text - The string to wrap in color
Wraps a string in the FONT_DANGER type formatting.
Switches automatically depending on the installed UI skin.
Params:
- text - The string to wrap in color
Wraps a string in the FONT_WARNING type formatting.
Switches automatically depending on the installed UI skin.
Params:
- text - The string to wrap in color
Wraps a string in the FONT_INFO type formatting.
Switches automatically depending on the installed UI skin.
Params:
- text - The string to wrap in color
Wraps a string in a custom font type formatting.
Does not switch automatically depending on the installed UI skin.
Params:
- text - The string to wrap in color
- color - The color code, RGB format (#FFFFFF)
Get the shared common store string.
NOTE: Always lock the storage if you are planning on using SetCommonStore afterwards.
Params:
- lock - If the shared common store should lock changes from other pages
Return: The common store string
Set the shared common store string.
NOTE: This will always unlock the common store
Params:
- new_value - The new string
Set the mod page name. Can only be used before the mcm has been initialized.
Params:
- name - The mod's name
Set the mcm landing page.
Params:
- page_name - The landing page's name
Set a splash screen to use for the "" page of the mcm menu.
Params:
- path - File path of the splash screen
- x - The x position of the splash screen
- y - The y position of the splash screen
Set font type.
See: Default Color and Paper Color.
Params:
- font - The new font type
Set the preset file path that will be used to persist user settings across save games.
Params:
- preset_path - The path to the preset to save and load settings to/from
A convenience function to add a paragraph of text to the mcm page.
Text splitting occurs when the max line length is reached,or when a newline character (\n) is encountered.
NOTE: You need to use the format parameter for fonts
Params:
- text - The text to add as a paragraph to the page
- format - The format/font to wrap the text in.
- flags - The default flag of the added text options
function SetSliderDialog(float value, float range_start, float range_end, float interval, float default = 0.0)
A convenience function to set all of the slider data using only 1 function.
Params:
- value - The value the slider is set at
- range_start - The start value of the slider
- range_end - The end value of the slider
- interval - The interval at which increments/decrements are done to the value
- default - The default value of the slider
A convenience function to set all of the menu data using only 1 function.
Params:
- options - The array containig the options for the menu
- start_i - The start selection/index of the menu
- default_i - The default selection/index for the menu
Refreshes the mod's mcm page list.
Useful for situations where new pages/modules have been registered whilst the player is still in the mod's mcm menu,
which will require the page list to be refreshed.
Params:
- stay - Should the user stay on the page
Go to a given mcm page.
Params:
- page_name - The page to go to
Open the attached mcm.
Params:
- landing_page_name - If set to a valid page name, it will open the mcm at this page
Close the attached mcm.
Params:
- close_journal - If set to true, it will close the quest journal too
Gets the full path for a given preset_path
Params:
- preset_path - The local path to the stored preset
Return: The full preset path
Calls the local SaveData function on all module scripts, storing the resulting JObjects under the given file name.
Params:
- preset_path - The path to the preset to store the settings under
Calls the local LoadData function on all module scripts, using the JObjects loaded from the given file.
Params:
- preset_path - The path to the preset to load settings from
Get the number of saved presets.
Params:
- dir_path - The directory path of the presets. Defaults to current mcm menu directory
Return: Number of saved presets at given path
Get an array containing the name of all saved presets.
Params:
- default - A default string to fill the list with. Used to create a "fake exit" button for mcm menus
- dir_path - The directory path of the presets. Defaults to current mcm menu directory
Return: Saved preset names at given path
Delete a given preset from the settings folder.
Params:
- preset_path - The path to the preset to delete
See the original SkyUI API.
Params:
- a_fillMode - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_text - Refer to the SkyUI API
- a_flags - Refer to the SkyUI API
Return: Refer to the SkyUI API
See the original SkyUI API.
Return: Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_stateName - Refer to the SkyUI API
- a_text - Refer to the SkyUI API
- a_value - Refer to the SkyUI API
- a_flags - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_stateName - Refer to the SkyUI API
- a_text - Refer to the SkyUI API
- a_checked - Refer to the SkyUI API
- a_flags - Refer to the SkyUI API
function AddSliderOptionST(string a_stateName, string a_text, float a_value, string a_formatString = "{0}", int a_flags = 0)
See the original SkyUI API.
Params:
- a_stateName - Refer to the SkyUI API
- a_text - Refer to the SkyUI API
- a_value - Refer to the SkyUI API
- a_formatString - Refer to the SkyUI API
- a_flags - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_stateName - Refer to the SkyUI API
- a_text - Refer to the SkyUI API
- a_value - Refer to the SkyUI API
- a_flags - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_stateName - Refer to the SkyUI API
- a_text - Refer to the SkyUI API
- a_color - Refer to the SkyUI API
- a_flags - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_stateName - Refer to the SkyUI API
- a_text - Refer to the SkyUI API
- a_keyCode - Refer to the SkyUI API
- a_flags - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_stateName - Refer to the SkyUI API
- a_text - Refer to the SkyUI API
- a_value - Refer to the SkyUI API
- a_flags - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_flags - Refer to the SkyUI API
- a_noUpdate - Refer to the SkyUI API
- a_stateName - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_value - Refer to the SkyUI API
- a_noUpdate - Refer to the SkyUI API
- a_stateName - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_checked - Refer to the SkyUI API
- a_noUpdate - Refer to the SkyUI API
- a_stateName - Refer to the SkyUI API
function SetSliderOptionValueST(float a_value, string a_formatString = "{0}", bool a_noUpdate = false, string a_stateName = "")
See the original SkyUI API.
Params:
- a_value - Refer to the SkyUI API
- a_formatString - Refer to the SkyUI API
- a_noUpdate - Refer to the SkyUI API
- a_stateName - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_value - Refer to the SkyUI API
- a_noUpdate - Refer to the SkyUI API
- a_stateName - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_color - Refer to the SkyUI API
- a_noUpdate - Refer to the SkyUI API
- a_stateName - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_keyCode - Refer to the SkyUI API
- a_noUpdate - Refer to the SkyUI API
- a_stateName - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_value - Refer to the SkyUI API
- a_noUpdate - Refer to the SkyUI API
- a_stateName - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_value - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_value - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_minValue - Refer to the SkyUI API
- a_maxValue - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_value - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_value - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_value - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_options - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_color - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_color - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_value - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_position - Refer to the SkyUI API
See the original SkyUI API.
Params:
- a_text - Refer to the SkyUI API
See the original SkyUI API.
See the original SkyUI API.
Params:
- a_source - Refer to the SkyUI API
- a_x - Refer to the SkyUI API
- a_y - Refer to the SkyUI API
See the original SkyUI API.
bool function ShowMessage(string a_message, bool a_withCancel = true, string a_acceptLabel = "$Accept", string a_cancelLabel = "$Cancel")
See the original SkyUI API.
Params:
- a_message - Refer to the SkyUI API
- a_withCancel - Refer to the SkyUI API
- a_acceptLabel - Refer to the SkyUI API
- a_cancelLabel - Refer to the SkyUI API
Return: Refer to the SkyUI API
NL_MCM's page based version of GetVersion().
See the original SkyUI Advanced Features.
Flags:
- Marked as override
Return: Refer to the SkyUI API
Requires JContainers to function.
Function to save the page's/module's data to a MCM preset. Use jContainers to create a object type of your choice and store the data in it.
Flags:
- Marked as override
Return: Your jContainer object id
Requires JContainers to function.
Function to load the page's/module's data from a MCM preset. Use jContainers to load the object data you previously stored in SaveData().
Flags:
- Marked as override
Params:
- jObj - The jContainer object id returned from loading the preset data