Delzaron Posted January 7, 2016 Posted January 7, 2016 Hi I made an MCM script for AFS, which is what it is... But I need to add a censure option : if you check it, some sex scenes will be censired, replaced by some scenes (Like Ethrane, Katalia and the wolf, and the shaman ceremony) So I need to add a new page, for the censure, but I dont know how to made it. My script is like this for now... Thanks in advance ! Scriptname AFS_MCMScript extends SKI_ConfigBaseEvent OnPageReset(string page) {Called when a new page is selected, including the initial empty page} SetCursorFillMode(TOP_TO_BOTTOM) if playerref.isinfaction(AFSKoldunFaction) == true KoldunVal = true elseif playerref.isinfaction(AFSPrimalFaction) == true PrimalVal = true elseif playerref.isinfaction(HagravenFaction) == true HagravenVal = true elseif playerref.isinfaction(playerwerewolfFaction) == true WerewolfVal = true elseif playerref.isinfaction(AFSShamanForswornFaction) == true BriarHeartVal = true else KoldunVal = False PrimalVal = False HagravenVal = False WerewolfVal = False BriarHeartVal = false endif KoldunOID = AddToggleOption("Be a Koldun : use it if you already chosen a shaman way", KoldunVal) PrimalOID = AddToggleOption("Be a Primal Shaman : use it if you already chosen a shaman way", PrimalVal) HagravenOID = AddToggleOption("Be an Hagraven : use it if you already chosen a shaman way", HagravenVal) WerewolfOID = AddToggleOption("Be a Werewolf : use it if you alrady finished Vulkos Trial quest", WerewolfVal) BriarHeartOID = AddToggleOption("Be a Briarheart : use it if you already chosen a shaman way", BriarHeartVal); VampireLordVal = Game.getPlayer().hasSpell(VampireLord); VampireLordOID = AddToggleOption("Vampire Lord", VampireLordVal)endEventEvent OnOptionSelect(int option) {called when a non-interactive option has been selected} GotoState("busy") if (option == KoldunOID) SetToggleOptionValue(KoldunOID, !KoldunVal) if (KoldunVal == false) afs4Koldun.start() Playerref.addtofaction(AFSFriendForswornFaction) Playerref.addtofaction(AFSShamanForswornFaction) endif KoldunVal = !KoldunVal elseif (option == PrimalOID) SetToggleOptionValue(PrimalOID, !PrimalVal) if (PrimalVal == false) afs4Primal.start() Playerref.addtofaction(AFSFriendForswornFaction) Playerref.addtofaction(AFSShamanForswornFaction) endif elseif (option == HagravenOID) SetToggleOptionValue(HagravenOID, !HagravenVal) if (HagravenVal == false) afs4Hagraven.start() Playerref.addtofaction(AFSFriendForswornFaction) Playerref.addtofaction(AFSShamanForswornFaction) endif elseif (option == WerewolfOID) SetToggleOptionValue(WerewolfOID, !WerewolfVal) if (WerewolfVal == false) afs2Werewolf.start() Playerref.addtofaction(AFSFriendForswornFaction) endif elseif (option == BriarHeartOID) SetToggleOptionValue(BriarHeartOID, !BriarHeartVal) if (BriarHeartVal == false) AFS2BriarArmin.start() Playerref.addtofaction(AFSFriendForswornFaction) Playerref.addtofaction(AFSShamanForswornFaction) endif EndIf GotoState("ready")endEventState busy Event OnPageReset(string page) SetCursorFillMode(TOP_TO_BOTTOM) AddHeaderOption("Scripts from previous usage of this menu") AddHeaderOption("haven't finished running, please exit and") AddHeaderOption("wait a few seconds") endEvent Event OnOptionHighlight(int option) SetInfoText("Please unpause the game and allow the scripted changes to occur, the MCM menu will be unresponsive untill you do") endEventendStateGlobalVariable Property PlayerIsVampire autoQuest Property AFS4Koldun autoQuest Property AFS4Primal autoQuest Property AFS4Hagraven autoQuest Property AFS2BriarArmin autoQuest Property AFS2Werewolf autoFaction property AFSKoldunFaction autoFaction property AFSPrimalFaction autoFaction property HagravenFaction autoFaction property PlayerWerewolfFaction autoFaction property AFSFriendForswornFaction autoFaction property AFSShamanForswornFaction autoActor property Playerref autoSpell Property VampireLord autoint VampireOIDint VampireLordOIDint KoldunOIDint PrimalOIDint HagravenOIDint WerewolfOIDint BriarHeartOIDbool KoldunValbool PrimalValbool HagravenValbool BriarHeartValbool WerewolfValbool VampireLordValGlobalVariable Property AFSCensure Auto
Guest Posted January 7, 2016 Posted January 7, 2016 I am going to look to your code, and try to understand what exactly you are trying to do. Please, next time don't forget to put your code between: [spoiler] [code] ...here your code... [/code] [/spoiler]
Guest Posted January 7, 2016 Posted January 7, 2016 OK, looking at yout MCM page, I can see that there is only one, generic, unspecified page. And in this page you have a few CheckBoxes with your options. Then every time you check or uncheck the option, you execute some code like: If (this was the option checked or unchecked) -> start a scene -> Add player to some factions And there is also a really strange "gotostate" that may interfere with the states of SkyUI. If you can tell me what you wish to have, then I can create the script for you. (Please notice that I have no idea about what the AFS mod is.)
Delzaron Posted January 7, 2016 Author Posted January 7, 2016 Ok... I wish to make a little table, with two columns, maybe with titles : One for the factions debug options, as I already have in the script The other for the consure option : checked, it will replace the sex script by a now sex scene (like, if value = 0 -> sex, elseIf value = 1, scene) I already tried to make a several pages MCM script, but it failed miserabily...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.