ModMenus

If you liked this item, please rate it up on Steam Workshop page.

Author: Tel

Last revision: 11 Jul at 16:10 UTC

File size: 181.75 KB

On Steam Workshop

Description:
REQUIRES: IM-HarmonyIntegration

Download IM-HarmonyIntegration here: GitHub Link[github.com]

ModMenus provides a UI menu to manage the settings of other mods.

Try one of these mods to see it in action:

For Modders

ModMenus reads "JSON/Mod Menu/modmenu.json" to generate UI elements.

Supported UI elements include text, sliders, checkboxes, and dropdown menus.

type: text
{ "type": "text", "labelID": "CUSTOMAUDITION__MODMENU__EXPLAIN" }

labelID: ID for text defined in "Constants/constant.json"

type: slider
{ "type": "slider", "varID": "CustomAudition_Count", "labelID": "CUSTOMAUDITION__MODMENU__COUNT", "minValue": 1, "maxValue": 25, "defaultValue": 5 }

Slider elements output an integer as a string to an in-game variable.

varID: ID for the in-game variable storing the value
labelID: ID for text defined in "JSON/Constants/constant.json"
minValue and maxValue: Optional integers. Default range: 0 to 100
defaultValue: Optional integer. Default: midpoint of range

type: checkbox
{ "type": "checkbox", "varID": "AuditionAgeLimit_TogglePopup", "labelID": "AUDITIONAGELIMIT__MODMENU__TOGGLE", "defaultValue": false }

Checkbox elements output "1" or "0" as a string to an in-game variable, representing true or false.

varID: ID for the in-game variable storing the value
labelID: ID for text defined in "JSON/Constants/constant.json"
defaultValue: Optional boolean. Default: false

type: dropdown
{ "type": "dropdown", "varID": "AuditionAgeLimit_TogglePopup", "labelID": "AUDITIONAGELIMIT__MODMENU__TOGGLE", "itemIDList": ["YES", "NO"], "defaultValue": 0 }

Dropdown elements output an index (0, 1, 2, etc.) as a string to an in-game variable, corresponding to the selected item’s position.

varID: ID for the in-game variable storing the value
labelID: ID for text defined in "JSON/Constants/constant.json"
itemIDList: Required array of strings. Each string is the ID for text defined in "JSON/Constants/constant.json"
defaultValue: Optional integer. Default: 0

Tips
  • Retrieve values using variables.Get(varID), where varID is the element’s varID.
  • Implement null checks for variables.Get(varID) to handle cases where ModMenus is not installed.
  • To add vertical spacing, use a text element with an empty labelID ("").
  • Always define text in constant.json for translation support. If absolutely necessary, ModMenus can handle raw text from labelID or itemIDList fields.
  • For testing, add ‘"ignore": true’ to any element to exclude it from parsing.

source code[github.com]

Download
Required items:

Click the title to search on this site.


IM-HarmonyIntegration PluginSteam Workshop