Jump to content

The Mod Configuration Menu


Pelinor

Recommended Posts

"What's this nutter done now?" you may ask... Well, the mod adds a new button to the Pause menu titled "Mod Configuration." When it's clicked, a menu pops up where the any mods using MCM can be configured.

 

Well, MCM has been released and The Mod Configuration Menu mod page is now up. :biggrin:

 

I will continue to give support for modders here, so don't hesitate to ask if you need new features.

Edited by Pelinor
Link to comment
Share on other sites

  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Oh wow that looks very cool. I've also always wanted to do something like that, custom widgets which other mods can configure by setting type etc, but your implementation looks much more sophisticated, gratz for pulling it off :)

 

I haven't looked at it in great detail yet (I'll do that this evening when I have the time), but if I understand correctly, mods will have to register a slot, right?

 

I don't know if you're aware that PN has a Control Panel as well, which also adds a menu option to the pause menu. Wwhen pressed it shows a fake background and initiates a dialogue menu (like CRAFT in FO3). This dialogue menu then contains top level entries for other mods, which launch classic messagebox based menus when pressed. The advantage of this solution is that mods don't have to register a slot since they can just add a topic, and existing messagebox-based menus can very easily be converted.

The disadvantages are that it's still relatively ugly (dialogue menu + messagebox..), and it depends on PN. I don't really think anyone is using that system besides PN itself even though it's around since February.

 

So with the new NVSE functions a had a bunch of ideas for letting mods add their own menu entries without depending on PN itself. This would be to select a random unused cell, where mods can add activators. When the control panel button is pressed, a script does a refwalk for activators in this cell, and adds them to a list. Then a top level menu is constructed with menuBoxEx. The entries are named after the activators, and when they are pressed the button index is used to fetch the correct activator from the list and call activate on it.

In the onActivate, the script then would launch it's custom menu quest (this was still made with the old PN control panel in mind). Some basic signaling between sub-config back to the top level script could be done via reference properties (Z angle = 1 to signal that the sub-config is done for example, X angle = 1 to signal that the top-level is present and the mod doesn't have to add inventory items for config stuff).

 

So as I said, this was just an idea, but it would allow other mods to add their menus to the PN control panel without depending on PN itself, which might give them more incentive to use it. I think the same method could be used for your MCM as well?

Link to comment
Share on other sites

Oh, I didn't know PN had a control panel like that. That would have saved me a load of sleepless nights... :blush:

 

I can understand what you're saying about people not wanting dependence on another mod. It won't be terribly difficult to allow for complete independence from MCM, so I'll probably do that tonight. I can just make more ModList entries and shift the mod-to-main script input/output to Get/SetUIFloats for menu variables. Indexing the mods could then be done with an item and formlist like you said...

 

And here I thought I was almost done with it, lol. Thanks for the input.

Link to comment
Share on other sites

Well the only thing the PN control panel was supposed to accomplish was getting rid of the countless mod added config items. Besides that it still uses those awkward message boxes, even though messageBoxEx improved them somewhat since now the button labels are interactive. Still, I would be very interested in using your mod menu since it really looks like a proper configuration interface.
Link to comment
Share on other sites

:D Thanks guys. I hope a bunch of mods will be using it soon.

 

I started working on it again once I got home and now have it running as an independent, non-master system. You just create an item (I've been using Misc. Items) and add it to a Form List using BuildRef. MCM then checks the source mod index of each item, sorts them by load order, and adds the name of the item to the next available MCM_ModList entry.

 

All your script has to do is check if GetModIndex "Your Mod" == GetUIFloat "StartMenu/MCM/_ActiveMod" to know if it should be active. I've also changed all of the MCM quest variables to XML variables used with Get/SetUIFloat. It makes for messy looking scripts, but it doesn't require a master to work.

 

It only works with <= 20 mods right now, but that's more than plenty for the time being. I'm going to get some rest right now, then I'll rewrite the parts of the doc file that need updating for the new system. I'll upload beta 2 sometime this morning.

Link to comment
Share on other sites

As promised, HERE is beta 2. Enjoy! I'd love to hear any feedback once anyone makes/tries to make a menu with it.

 

I'll now be going through all of the menu files and the scripts to clean up any junk bits left in. All of the functionality should be the same, unless there are bugs found or requests made. (Hopefully it's up to everyone's standards.)

Link to comment
Share on other sites

I found a bit of an error in the .doc file. In the "Using Lists" section, the code should actually look like this:

 

 

		elseif GetUIFloat "StartMenu/MCM/_ShowList" == 1		;4 - SHOW LIST
		SetUIFloat "StartMenu/MCM/_ShowList" 2
		if iOption == 1
			SetUIString "StartMenu/MCM/*:3/_title" "Option 1 Title"
			SetUIFloat "StartMenu/MCM/*:3/*:1/_enable" 1
			SetUIFloat "StartMenu/MCM/*:3/*:2/_enable" 1
			SetUIFloat "StartMenu/MCM/*:3/*:3/_enable" 1
			SetUIFloat "StartMenu/MCM/*:3/*:4/_enable" 1
			SetUIFloat "StartMenu/MCM/*:3/*:5/_enable" 1
			SetUIString "StartMenu/MCM/*:3/*:1/text/string" “Setting 1”
			SetUIString "StartMenu/MCM/*:3/*:2/text/string" “Setting 2”
			SetUIString "StartMenu/MCM/*:3/*:3/text/string" “Setting 3”
			SetUIString "StartMenu/MCM/*:3/*:4/text/string" “Setting 4”
			SetUIString "StartMenu/MCM/*:3/*:5/text/string" “Setting 5”

			set iTemp to iVariable1 + 1
			SetUIFloat “StartMenu/MCM/_Value” iTemp
		elseif iOption == 7
			SetUIString "StartMenu/MCM/*:3/_title" "Option 7 Title"
			SetUIFloat "StartMenu/MCM/*:3/*:1/_enable" 1
			SetUIFloat "StartMenu/MCM/*:3/*:2/_enable" 1
			SetUIFloat "StartMenu/MCM/*:3/*:3/_enable" 1
			SetUIString "StartMenu/MCM/*:3/*:1/text/string" “Setting 1”
			SetUIString "StartMenu/MCM/*:3/*:2/text/string" “Setting 2”
			SetUIString "StartMenu/MCM/*:3/*:3/text/string" “Setting 3”

			SetUIFloat “StartMenu/MCM/_Value” iVariable7
		endif
	endif

 

I'm not sure how it got to be the way it is. Actually, that whole page could be better... :pinch:

Edited by Pelinor
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...