the Sim Settlements forums!

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

MCM advice needed

diziet

Active Member
Messages
541
I've posted in the F4 modders forum, I had some interesting responses but I still have a problem so I thought I'd try here:
I have used textFromStringProperty thus in my config.json:
{
"id": "speedmult_display",
"type": "text",
"help": "Displays the resultant speed multiplier.",
"textFromStringProperty": {
"form": "dz_F4_little_things.esp|0800",
"scriptName": "dz_F4_little_things_quest_script",
"propertyName": "multiplier_display"
}
},

the property 'multiplier_display' is a string that includes the current speedmult actorvalue.

the following function:
Function OnMCMSettingChange(string modName, string id)
If (modName == "dz_F4_little_things") ; if you registered with OnMCMSettingChange|MCM_Demo this should always be true
If (id == "change_speedmult")
debug.trace("DF4LT: change_speedmult value was changed!")
MCM.RefreshMenu()
EndIf
EndIf
debug.trace("DF4LT: MCM setting changed")
MCM.RefreshMenu()
EndFunction

fires when I change the speedmult value in my MCM menu, but the MCM.RefreshMenu line doesn't update the display of "id": "speedmult_display"
if I exit the menu to the game and go back then the updated value of 'multiplier_display is shown.

Does anyone know if I can get this to work?

diziet
 
I had a similar issue to this a little while back. I was group conditions in a menu to change text output if the user selected a button control. (message saying exit the menu) The action was to call a quest script function. The function changed some vars and called MCM.RefreshMenu() but the menu wasn't updated. Just like you said, if you exit the menu and re-enter, the update is displayed. I also found you could select another menu and return and it would be updated as well. I originally had the source as PropertyValueBool I also tried changing to ModSettingBool but the behavior was the same.

In a chat with m8tr, I was told he had this issue as well. The only solution is to find another method, I guess... :(
 
Well a) it's not just me, and b) it doesn't mean I'm going mad:) (although it doesn't mean I'm not mad either..)

diziet
 
although it doesn't mean I'm not mad either..
I was a little of both as well. :crazy

In the end, I scrapped my idea of using GroupControl to control the text displayed and hide a Button control. I added some code to my script so the player could hit the button as many times as they wanted and only the first click would register until MCM was exited.

Is there a reason you are not using a slider control? You could point it to a float property, global variable or ModSettingFloat.
 
I'm using a slider control to choose an amount to 'player.modav' the other control was to show the result. I thought about a slider control to just show the desired result and have the backend logic work out the required 'modav' but I want the player to be able to choose to to set the 'modav' amount back to 0 which would be tricky if the game itself had changed the actorvalue in the meantime and the player didn't now know what the unmodified value should be:)

diziet
 
Top