Jump to content

Help Creating MCM Menu


Galadreal

Recommended Posts

Hello!

 

So, I already have a mod.

 

http://www.nexusmods.com/skyrim/mods/44410/?

 

Ta Da!! Now, I have been asked so many times if I can make it so it only affects the Hearthfire Houses. That makes me want to pull out all my hair, because had I had any foresight when I started this 6 months ago, I could have done that. As it stands, I could create duplicate cells of the original homes and then make an MCM Menu so that you could choose if you wanted to use the original cell or the new remodeled cell.

 

Before anyone says "Read a Tutorial" I have done that. I have spent the entire weekend reading tutorials. Due to an unfortunate problem I am having at the moment, my comprehension is not working very well. This is very frustrating to me, and although I do not like asking for help. Well, here I am.

 

I am not asking you to create the menu for me. Not unless you just really want to. But could someone please stupid the directions down for me. I went through the creation kit wiki and read up on scripting (and got confused) I went to the SKYUI site and read up on how to create a menu...and got confused. I followed their instructions that they had...and it did not work.

 

If someone could even point me in the direction of an MCM Menu scripting for idiots, I would appreciate it.

 

Thanks.

Link to comment
Share on other sites

Suggestion, do not make an MCM for your mod at this time. Instead, pick something simple to just play around and test with so that you can get an understanding of the scripting.

 

I will use an example of a single toggle option. It will give the player a piece of armor when selected and take away the armor when de-selected.

 

 

Download and install SkyUI http://www.nexusmods.com/skyrim/mods/3863

OPTIONAL: Download and install SkyUI Away http://www.nexusmods.com/skyrim/mods/29440
-- Read the introduction and follow the links for the SDK
-- Download and install the SDK
---- Please use a mod manager of some sort to install this because this SDK needs to be removed when you are in-game testing and playing but needs to be installed when working on your mod. Especially when compiling scripts.
Locate the ConfigMenuTemplate.psc file found in the main Skyrim directory after installing the SDK
Open ConfigMenuTemplate.psc with Notepad++
-- (or similar editor -- whatever you use I will reference it as Notepad++ within the tutorial)
-- This is the basic layout. It has the most common event wrappers in place.
Open the Creation Kit
Open the data files and check Skyrim.esm and Update.esm to load
Press OK and let the CK do its thing
When finished create a new quest record and close it
Scripts won't attach to many records when they are first made. It is best then to close and re-open the record for best results
Open the quest back up
Go to Scripts tab
Add new script
Give the script a name and extend SKI_ConfigBase
Leave the description field blank and press OK
Back on the quest record, highlight the script entry, right click, edit source
Switch to Notepad++
Easiest will be to copy the entire script to the clipboard
Switch to CK
Paste the clipboard contents into the script source window
Go to the top of the script source and delete the ScriptName line that came with the ConfigMenuTemplate.psc
Click on Build
Ensure that there are no compiler errors
Click on File then Save
In the section marked PRIVATE VARIABLES, add the following
Armor Property APieceOfArmor Auto
Click on Build
Ensure that there are no compiler errors
Click on File then Save
Exit the source script
Highlight the script file, click the Properties button
Assign any piece of armor to the property variable APieceOfArmor
Assign a text string to the inherited ModName property
Press OK
Back on the quest record, highlight the script entry, right click, edit source
Immediately after where you placed the armor property, add the following
Int OID_APieceOfArmor
Bool USE_APieceOfArmor = false
Click on Build
Ensure that there are no compiler errors
Click on File then Save
Locate the Event OnOptionSelect(int a_option) <--- this tells the script what to do after a choice has been made
-- Side Note: The first entry here will always start with an "If", the rest will be "ElseIf"
Add the following
If a_option == OID_APieceOfArmor
  USE_APieceOfArmor = !USE_APieceOfArmor
  If USE_APieceOfArmor == true
    Game.GetPlayer().AddItem(APieceOfArmor,1)
  Else
    Game.GetPlayer().RemoveItem(APieceOfArmor,1)
  EndIf
  ;...Add future toggle option entries here
EndIf
Click on Build
Ensure that there are no compiler errors
Click on File then Save
Locate the Event OnOptionHighlight(int a_option) <--- this shows text at the bottom when the entry is moused over
-- Side Note: The first entry here will always start with an "If", the rest will be "ElseIf"
Add the following
If a_option == OID_APieceOfArmor
  If USE_APieceOfArmor == false
    SetInfoText("Adds "+APieceOfArmor.GetName()+ " to the player")
  Else
    SetInfoText("Removes "+APieceOfArmor.GetName()+ " from the player")
  EndIf
;...Add future text highlights here
EndIf
Click on Build
Ensure that there are no compiler errors
Click on File then Save
Locate the Event OnPageReset(string a_page) <-- this is what offers the choice to the player
-- Side Note: The first entry here will always start with an "If", the rest will be "ElseIf"
Add the following
OID_APieceOfArmor == AddToggleOption("A piece of Armor",USE_APieceOfArmor)
Click on Build
Ensure that there are no compiler errors
Click on File then Save
Double check that properties are filled. For this example the inherited Pages property is being ignored.
OK out of all records and save the plugin.
Uninstall the SDK
Activate the plugin
Test in game

The result should be a MCM mod entry that when selected has a single page with a single toggle option. Practice with this, see if it works, then go from there.

 

Link to comment
Share on other sites

  • 7 months later...
Instead of creating an MCM menu, I would just break apart this mod into two .esp files (a full version and a hearthfires only version.) This task should be accomplished relatively easily using TES5EDIT. I do not see why someone would need to switch between these options in game.
Link to comment
Share on other sites

IpCoercion: becuase I already have several different version of the game, it is horrible to maintain all of them and make updates to all of them. vanilla houses, hearthfire houses, severin manor. general stores, non general stores. It made me want to pull out my hair. Plus people constantly asking if I had a modular version becuase they only wanted part of the houses. But the whole thing was that it is all part of 1 esp file, therefore requiring other people to open it in TESVEdit and take out the houses that they did not want. If i had a way to turn off the houses they did not want, it would be much easier.

 

But since I am done with it now, it is a moot point anyway. Mostly I wanted help making a MCM menu becuase that is the easiest way I learn, is by taking apart something to see hoiw it is done. And while YES, I know that there are others out there that I could do it for, I have had a difficult time finding one that would focus on what I need.

 

This of course is why I have not maintained the previous 3 versions like I need to, it is just too many to keep track of. I want to do that eventually, but I need a break from modding now. This thread was started over 6 months ago.

Edited by Galadreal
Link to comment
Share on other sites

I am slowly working on one, as my mind works right. But that means I got a few weeks between being able to do anything on it, breif bouts of lots of work and then nothing again. I just want to get it more refined before i release it fully. Plus i bought the Legendary Edition of Skyrim for my husband so he can beta test for me.

 

My brain has just been on the fritz for the last year, so things are harder for me to comprehend and grasp. I know i need to go back and update the older versions of the original mod, and make a Hearthfires Only version. I just don't have the energy for it right now. Hopefully soon. I also need to figure out how to fix a few glitches in AI...but once again I keep reading the tutorials and not comprehending, hopefully my brain will get it's act together soon so I can fix it up and release a very final version. And get back to work on my other mods I have in process. Including a mod for all cities, towns, shops, and inns remodel that has been in process for over a year.

Link to comment
Share on other sites

  • 4 months later...

Suggestion, do not make an MCM for your mod at this time. Instead, pick something simple to just play around and test with so that you can get an understanding of the scripting.

 

I will use an example of a single toggle option. It will give the player a piece of armor when selected and take away the armor when de-selected.

 

 

Download and install SkyUI http://www.nexusmods.com/skyrim/mods/3863

OPTIONAL: Download and install SkyUI Away http://www.nexusmods.com/skyrim/mods/29440
-- Read the introduction and follow the links for the SDK
-- Download and install the SDK
---- Please use a mod manager of some sort to install this because this SDK needs to be removed when you are in-game testing and playing but needs to be installed when working on your mod. Especially when compiling scripts.
Locate the ConfigMenuTemplate.psc file found in the main Skyrim directory after installing the SDK
Open ConfigMenuTemplate.psc with Notepad++
-- (or similar editor -- whatever you use I will reference it as Notepad++ within the tutorial)
-- This is the basic layout. It has the most common event wrappers in place.
Open the Creation Kit
Open the data files and check Skyrim.esm and Update.esm to load
Press OK and let the CK do its thing
When finished create a new quest record and close it
Scripts won't attach to many records when they are first made. It is best then to close and re-open the record for best results
Open the quest back up
Go to Scripts tab
Add new script
Give the script a name and extend SKI_ConfigBase
Leave the description field blank and press OK
Back on the quest record, highlight the script entry, right click, edit source
Switch to Notepad++
Easiest will be to copy the entire script to the clipboard
Switch to CK
Paste the clipboard contents into the script source window
Go to the top of the script source and delete the ScriptName line that came with the ConfigMenuTemplate.psc
Click on Build
Ensure that there are no compiler errors
Click on File then Save
In the section marked PRIVATE VARIABLES, add the following
Armor Property APieceOfArmor Auto
Click on Build
Ensure that there are no compiler errors
Click on File then Save
Exit the source script
Highlight the script file, click the Properties button
Assign any piece of armor to the property variable APieceOfArmor
Assign a text string to the inherited ModName property
Press OK
Back on the quest record, highlight the script entry, right click, edit source
Immediately after where you placed the armor property, add the following
Int OID_APieceOfArmor
Bool USE_APieceOfArmor = false
Click on Build
Ensure that there are no compiler errors
Click on File then Save
Locate the Event OnOptionSelect(int a_option) <--- this tells the script what to do after a choice has been made
-- Side Note: The first entry here will always start with an "If", the rest will be "ElseIf"
Add the following
If a_option == OID_APieceOfArmor
  USE_APieceOfArmor = !USE_APieceOfArmor
  If USE_APieceOfArmor == true
    Game.GetPlayer().AddItem(APieceOfArmor,1)
  Else
    Game.GetPlayer().RemoveItem(APieceOfArmor,1)
  EndIf
  ;...Add future toggle option entries here
EndIf
Click on Build
Ensure that there are no compiler errors
Click on File then Save
Locate the Event OnOptionHighlight(int a_option) <--- this shows text at the bottom when the entry is moused over
-- Side Note: The first entry here will always start with an "If", the rest will be "ElseIf"
Add the following
If a_option == OID_APieceOfArmor
  If USE_APieceOfArmor == false
    SetInfoText("Adds "+APieceOfArmor.GetName()+ " to the player")
  Else
    SetInfoText("Removes "+APieceOfArmor.GetName()+ " from the player")
  EndIf
;...Add future text highlights here
EndIf
Click on Build
Ensure that there are no compiler errors
Click on File then Save
Locate the Event OnPageReset(string a_page) <-- this is what offers the choice to the player
-- Side Note: The first entry here will always start with an "If", the rest will be "ElseIf"
Add the following
OID_APieceOfArmor == AddToggleOption("A piece of Armor",USE_APieceOfArmor)
Click on Build
Ensure that there are no compiler errors
Click on File then Save
Double check that properties are filled. For this example the inherited Pages property is being ignored.
OK out of all records and save the plugin.
Uninstall the SDK
Activate the plugin
Test in game

The result should be a MCM mod entry that when selected has a single page with a single toggle option. Practice with this, see if it works, then go from there.

 

 

You are amazing and are now directly responsible for eliminating my recent hair loss.

 

Thank you

Link to comment
Share on other sites

  • Recently Browsing   0 members

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