Jump to content

MCM doesn't display multiple pages.


LagiaDOS

Recommended Posts

I'm trying to do a simple checklist with MCM of every quest in skyrim, and I've ran into a problem, I can't display multiple pages in the menu.

 

This is my code so far, can you see my mistake?

Scriptname Test_MCM extends SKI_ConfigBase


Event OnConfigInit()

	Pages = new string[2]
	Pages[0] = "Towns"
	Pages[1] = "Settlements"
	;Pages[2] = "Skyrim"

EndEvent


event OnPageReset(string page)

If (page == "Towns")
	SetCursorFillMode(LEFT_TO_RIGHT)
	AddHeaderOption ("Dragon Bridge") ;0
	AddHeaderOption ("Ivarstead") ;1
	AddToggleOption("Dragon's Mead", false) ;2
	AddToggleOption("Climb the Steps", false);3	
	AddHeaderOption ("Karthwasten") ;4
	AddToggleOption("The Straw that Broke", false);5
	AddToggleOption("End the dispute over SAnuarach Mine", false);6
	AddToggleOption("Grin and Bear it", false);7
	AddEmptyOption() ;8
	AddToggleOption("Lifting the shroud", false);9


ElseIf (page == "Settlements")
	SetCursorFillMode(LEFT_TO_RIGHT)
	AddHeaderOption ("Dragon Bridge") ;0

EndIf

EndEvent

Link to comment
Share on other sites

I don't see a problem with your script. Try setting the pages in the creation kit, instead of using onConfigInit though. That's how I always do it.

 

The tutorial I'm following only shows how to do it with onConfigInit. Mind to share a tutorial/guide on how to do it with setting pages via creation kit?

Link to comment
Share on other sites

 

Try

If  page == Pages[0]

instead of

If (page == "Towns")

 

 

I've done that and my code now looks like this

Scriptname Test_MCM extends SKI_ConfigBase


Event OnConfigInit()

	Pages = new string[2]
	Pages[0] = "Towns"
	Pages[1] = "Settlements"
	;Pages[2] = "Skyrim"

EndEvent


event OnPageReset(string page)

If page == Pages[0]
	SetCursorFillMode(LEFT_TO_RIGHT)
	AddHeaderOption ("Dragon Bridge") ;0
	AddHeaderOption ("Ivarstead") ;1
	AddToggleOption("Dragon's Mead", false) ;2
	AddToggleOption("Climb the Steps", false);3	
	AddHeaderOption ("Karthwasten") ;4
	AddToggleOption("The Straw that Broke", false);5
	AddToggleOption("End the dispute over SAnuarach Mine", false);6
	AddToggleOption("Grin and Bear it", false);7
	AddEmptyOption() ;8
	AddToggleOption("Lifting the shroud", false);9


ElseIf page == Pages[1]
	SetCursorFillMode(LEFT_TO_RIGHT)
	AddHeaderOption ("Dragon Bridge") ;0

EndIf

EndEvent



But it still doesn't work. Any idea?

 

 

EDIT: I don't know why, but in a new game it shows the second page, but in the test save I have doesn't. I guess I'll have to do a new save when I test it ¯\_(ツ)_/¯

Edited by LagiaDOS
Link to comment
Share on other sites

How about a screen shot of the problem in-game? I'm wondering if the problem isn't that the pages are not showing but rather the options themselves.

 

As I said in my edit, I have to start a new game to make the second page show. I don't know why, quirks of the engine I guess, but that seemed to be the problem. I'll guess I'll have to start a new game with every new page (as editing a page seems to work fine with an existant save), but I know I'll have to come back here for help hahah

Link to comment
Share on other sites

I did not see your edit. The reason a new page does not show is that once a quest is started everything for it is baked into the save file. MCM has a versioning system built in. You can use that to force it to update and it should show the new pages without having to start over.

Link to comment
Share on other sites

I did not see your edit. The reason a new page does not show is that once a quest is started everything for it is baked into the save file. MCM has a versioning system built in. You can use that to force it to update and it should show the new pages without having to start over.

 

Oh! That is very helpful, mind sharing how that is made?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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