F4llfield Posted June 25 Share Posted June 25 Hi all, I want to have in Mod Configuration menu, a button that when pressed would show ON or OFF in the MCM menu and at the same time a function would be called. From the MCM demo I don't see that possiblity. Thanks Link to comment Share on other sites More sharing options...
robotized Posted June 26 Share Posted June 26 https://www.nexusmods.com/fallout4/mods/69508?tab=description For this patch I used MCM hotkey to execute console commands and switch between two values of a Global Variable. It was my first time doing MCM menu, I looked at other mods for example. I don't know if I did it the right way, but it works. I'm sorry, I don't know how to display the text ON/OFF. 1 Link to comment Share on other sites More sharing options...
F4llfield Posted June 27 Author Share Posted June 27 Thanks for this info. The text on/off is the default used by MCM when you use a toggle switch button. But his option doesn't run a function. What I would like to do is, toggle a switch (it will by default display on or off) but at the same run a fuinction. I'm not sure it's possible. Link to comment Share on other sites More sharing options...
DieFeM Posted June 27 Share Posted June 27 I never created a mod with MCM, but out of curiosity I've downloaded the demo plugin, and checked config.json, there's an ON/OFF that calls a function: { "id": "bEnabled:Main", "text": "Mod Enabled", "type": "switcher", "help": "Controls whether the mod is enabled. (demo for ON/OFF switcher control)", "valueOptions": { "sourceType": "ModSettingBool" }, "action": { "type": "CallFunction", "form": "MCM_Demo.esp|800", "function": "DoActionDemo", "params": ["{value}"] } }, I guess MCM will replace {value} with true/false depending on the option and passes it to DoActionDemo as argument. 2 Link to comment Share on other sites More sharing options...
F4llfield Posted June 28 Author Share Posted June 28 Thanks DieFeM, I missed that when looking at the demo. That will do the trick. Thanks again. 1 Link to comment Share on other sites More sharing options...
Recommended Posts