dizietemblesssma Posted July 23, 2022 Share Posted July 23, 2022 Here is the MCM example for a slider: { "text": "Demo Slider", "type": "slider", "help": "A standard slider with constraints. Range: 0-1, Step: 0.01.", "valueOptions": { "min": 0, "max": 1, "step": 0.01 } }but there is no indication of how I might pass the selected slider value to a function in a papyrus script, can someone please help? diziet Link to comment Share on other sites More sharing options...
PJMail Posted July 23, 2022 Share Posted July 23, 2022 (edited) You could make it directly modify a global via "sourceType": "GlobalValue", "sourceForm": "mymod.esp|xxxx" where xxxx is the (hex) formid of that global in your mod (without the load order prefix).You could then tell your mod to notice the change by also adding "action": { "type": "CallFunction", "form": "mymod.esp|xxxx", "function": "SettingsUpdated"} to call your update procedure (or just use the action to do the work directly)These live after your "step" line before the next }. Update: Remember the function won't be called until you close MCM (as the game is paused), and the keywords like "action" etc must all be lowercase. Edited July 23, 2022 by PJMail Link to comment Share on other sites More sharing options...
dizietemblesssma Posted July 26, 2022 Author Share Posted July 26, 2022 Hi, thanks for the info.I weant with using "sourceType": "PropertyValueFloat", which has worked with other MCM json files but with this one the property doesn't get updated by the slider, here si the snippet for the slider, the MCM menu shows up in game and the slider gives every appearance of working: "text": "Select the player's carryweight modifier.", "type": "slider", "help": "Choose the new carryweight modifier, steps of +/- 100", "valueOptions": { "min": -200, "max": 10000, "step": 100, "sourceType": "PropertyValueFloat", "sourceForm": "dz_F4_little_things.esp|0800", "scriptName": "dz_F4_little_things_quest_script", "propertyName": "Carry_modifier_float" }, "action": { "type": "CallFunction", "form": "dz_F4_little_things.esp|0800", "scriptName": "dz_F4_little_things_quest_script", "function": "dz_new_mod_carry" }but using a simple version of dz_new_mod_carry() that logs the value of Carry_modifier_float shows that it remains 0,Carry_modifier_float is properly set in the CK on the script:any ideas? diziet Link to comment Share on other sites More sharing options...
dizietemblesssma Posted July 26, 2022 Author Share Posted July 26, 2022 in answer to my own question it seems that the property is not set just read, so I need to pass the new setting via: "action": { "type": "CallFunction", "form": "dz_F4_little_things.esp|0800", "scriptName": "dz_F4_little_things_quest_script", "function": "dz_new_mod_carry", "params": ["{value}"] } diziet Link to comment Share on other sites More sharing options...
PJMail Posted July 27, 2022 Share Posted July 27, 2022 Globals are certainly set, so I am surprised properties are not. Good to know... Link to comment Share on other sites More sharing options...
dizietemblesssma Posted July 27, 2022 Author Share Posted July 27, 2022 I don't want to come acroos as being definitive:) It is simply my experience and I found an alternative so I stopped trying!But try as a I might I couldn't get it to work. diziet Link to comment Share on other sites More sharing options...
Recommended Posts