Jump to content

MCM Help. Splitting scripts?


prideslayer

Recommended Posts

Posted

The MCM doc mentions you may need to do this, but now how/where the best way to split the script.

 

Ran into the limitation in sexouts MCM script, so I created a new quest and a new script, copied everything from one to the other, and started hackin' and slashin'.

 

What I ended up with is two 'Sexout' items in the MCM menu, one with my new submenu, one without. The one that has it doesn't show anything when clicked.

 

What I did:

 

1. Modified the GameMode block in the 2nd script, here they are.

 

Script 1:

Begin GameMode
if GetGameRestarted
	if IsModLoaded "The Mod Configuration Menu.esp"
		set iMaster to GetModIndex "The Mod Configuration Menu.esp"
		set rList to BuildRef iMaster 2790
		ListAddForm rList 00SexoutMCMItem
		set iSelf to GetModIndex "Sexout.esp"
	endif
endif
End

 

Script 2:

Begin GameMode
if GetGameRestarted
	if IsModLoaded "The Mod Configuration Menu.esp"
		set iSelf to GetModIndex "Sexout.esp"
	endif
endif
End

 

I did the above because the formlist thing isn't going to do anything as-is in the second script; you can only add an item to a formlist once.

 

Next, I split the script almost down the middle. All the submenu items starting with '3 - NEW VALUE' I cut n' pasted into the new script, and added the (seemingly) appropriate if statement to the top.

 

Start of MenuMode for script 2:

Begin MenuMode 1013
if 0 == IsModLoaded "The Mod Configuration Menu.esp"
	return
endif

if GetUIFloat "StartMenu/MCM/_ActiveMod" == iSelf
	set iOption to GetUIFloat "StartMenu/MCM/_ActiveOption"
	set fValue to GetUIFloat "StartMenu/MCM/_Value"
	set iSubMenu to GetUIFloat "StartMenu/MCM/_ActiveSubMenu"

	if GetUIFloat "StartMenu/MCM/_NewValue"			;3 - NEW VALUE
...

 

Wasn't sure if this would work or not, looks like 'not'.

 

So what's the RIGHT way to split the script up?

Posted

Not quite working. There are three quests w/ associated scripts, and two items for the two pages.

 

Pages are showing up fine in game, but they're empty when clicked.

 

For reference the only change made to the main menu script was changing this:

if GetUIFloat "StartMenu/MCM/_ActiveMod" == iSelf

 

To this:

if GetUIFloat "StartMenu/MCM/_ActiveMod" == iSelf && GetUIFloat "StartMenu/MCM/_ActiveMenu" == 1

 

As per the instructions (i think) on the last page of the MCM Guide.doc.

 

 

Posted

Nobody huh? :(

 

Didn't get anywhere with this, tried following the instructions in the DOC exactly. I took the ESM, converted to ESP, and did the following:

 

1. Added a new item, 00SexoutMCMItem2.

2. Added a new quest script, 00SexoutMCMQuest2.

3. Added a new quest, SexoutMCMQuest2, set to script from #2.

4. Put the _ActiveMenu == 1 check in the if statement in 00SexoutMCMQuest.

5. Created a new menu (copy/paste + editing) in 00SexoutMCMQuest2, with _ActiveMenu == 2.

6. Changed checks in both scripts to look for Sexout.esp rather than .esm, for testing.

 

Result: Both top level items show up in the MCM menu as expected. Both are unfortunately blank/empty when clicked on.

 

Will try again later.

 

Posted

Zippy's the local MCM guru. You might send him a PM and/or direct his attention here if you haven't already.

 

Got it figured out.

 

When the documentation says value, it means value.. as in, the monetary value of the items. 0.0.10 will have MCM tweaks aplenty!

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...