Dreamster91 Posted September 24, 2016 Share Posted September 24, 2016 Ok so i've never had a knack for scripting, I get the idea of it and used afew scripts in house building mods but trying to make one for an mcm menu has me stumped :/ so sorry in advance if I dont keep up lol I have a mod on the nexus called Unique Dogs, that changes the textures of all the dogs in game. The next step for the mod and something I've wanted to see happen for a while is to be able to change the texture of any dog you like to whatever you like in game. so for example maybe you want meeko to be black, vigilance to be white and barbas to be pink with polkadots all independantly of each other. So ive been following Darkfox127's tutorials to get my head round it whilst referring to the MCM Quickstart page and Moonlight Tale's source code for their MCM since they've done something similar, and this is what I've come up with so far.... Scriptname DUD_Script_MCM extends SKI_ConfigBase Actor Property TrainedDog Auto TextureSet Property Dog_Vigilance Auto TextureSet Property Dog_Meeko Auto ;==================== ;OIDS (Option IDs) Int iCrates Int iLights Int iTut ;TOIDS (Toggle Options IDs) Int iVigilance ;==================== ;STRINGS String[] VigilanceList ;==================== Int IndexVigilance = 0 ;==================== Event OnConfigInit() Pages = new string[2] Pages[0] = "Page 1" Pages[1] = "Page 2" EndEvent ;==================== Event OnInit() parent.OnInit() VigilanceList = new string[2] VigilanceList[0] = "Vigilance" VigilanceList[1] = "Meeko" EndEvent ;==================== event OnPageReset(string page) If (page == "") Int Int_MCM_Image = Utility.RandomInt(1,3) If Int_MCM_Image == 1 LoadCustomContent("DreamsUniqueDogs/Barbas.dds") Return ElseIf Int_MCM_Image == 2 LoadCustomContent("DreamsUniqueDogs/Meeko.dds") Return ElseIf Int_MCM_Image == 3 LoadCustomContent("DreamsUniqueDogs/Stump.dds") Return EndIf Else UnloadCustomContent() EndIf ;==================== If (page == "Page 1") SetCursorFillMode(TOP_TO_BOTTOM) AddHeaderOption("Vigilance") AddEmptyOption() iVigilance = AddMenuOption("Coat Colour", VigilanceList[IndexVigilance]) ElseIf (page == "Page 2") SetCursorFillMode(LEFT_TO_RIGHT) AddToggleOption("Test Toggle", True) EndIf EndEvent ;==================== Event OnOptionMenuOpen(int option) If (option == iVigilance) SetMenuDialogOptions(VigilanceList) SetMenuDialogStartIndex(IndexVigilance) SetMenuDialogDefaultIndex(0) EndIf EndEvent ;==================== Event OnOptionMenuAccept(int option, int index) If (option == iVigilance) IndexVigilance = index SetMenuOptionValue(iVigilance, VigilanceList[IndexVigilance]) If IndexVigilance == 0; Vigilance Dog_Vigilance.enable() ElseIf IndexVigilance == 1; Meeko Dog_Meeko.enable() EndIf EndIf EndEvent ;==================== On trying to compile it I get - Compiling "DUD_Script_MCM"...C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\DUD_Script_MCM.psc(124,17): enable is not a function or does not existC:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\DUD_Script_MCM.psc(128,13): enable is not a function or does not existNo output generated for DUD_Script_MCM, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on DUD_Script_MCM And this is where I'm stuck..... I cant really find a tutorial that changes actor textures, the moonlight tales script is great to look through but honestly I'm not really sure what i'm looking for. If anyone can make sense of all this it would be such a huge help :) If I can learn to do this I can take all this and apply it to other mods I've been sitting on for a long time too. Thanks folks! Link to comment Share on other sites More sharing options...
FrankFamily Posted September 24, 2016 Share Posted September 24, 2016 Enable is an objectreference function, not textureset, therefore it can't compile, not sure what you want it to do there. Check the wiki for valid functions:http://www.creationkit.com/index.php?title=Category:Papyrus Link to comment Share on other sites More sharing options...
NexusComa Posted September 24, 2016 Share Posted September 24, 2016 (edited) SKI_ConfigBase ,,, ? NetImmerse Override. It can change textures on the fly in-game. Maybe something to look at ... Edited September 24, 2016 by NexusComa Link to comment Share on other sites More sharing options...
Dreamster91 Posted September 25, 2016 Author Share Posted September 25, 2016 Enable is an objectreference function, not textureset, therefore it can't compile, not sure what you want it to do there. Check the wiki for valid functions:http://www.creationkit.com/index.php?title=Category:Papyrus So Im guessing thats where I said "Dog_Vigilance.enable()" and "Dog_Meeko.enable()" in that last block of text? I took that bit from a tutorial but they were changing objects in game and not textures, guess it was daft to try and apply it to this lol ive had a look at the wiki before, still not sure what function I want to replace it with, but now I have an idea what part I need to look at I can start comparing it to other scripts to see what im doing wrong so thank you Link to comment Share on other sites More sharing options...
Dreamster91 Posted September 25, 2016 Author Share Posted September 25, 2016 SKI_ConfigBase ,,, ? NetImmerse Override. It can change textures on the fly in-game. Maybe something to look at ... SKI_ConfigBase is the thing you need to extend to to make an mcm menu, like I said scripting is something im not picking up quickly lol I forgot about NetImmerse Override, I'll keep it in mind as a backup plan but for the moment ive got my heart set on trying to firgure this out! Link to comment Share on other sites More sharing options...
Recommended Posts