Jump to content

Help about MCM script


Recommended Posts

Posted

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_ConfigBase


Event 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)
endEvent

Event 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")
endEvent

State 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")
    endEvent
endState


GlobalVariable Property PlayerIsVampire auto

Quest Property AFS4Koldun auto
Quest Property AFS4Primal auto
Quest Property AFS4Hagraven auto
Quest Property AFS2BriarArmin auto
Quest Property AFS2Werewolf auto

Faction property AFSKoldunFaction auto
Faction property AFSPrimalFaction auto
Faction property HagravenFaction auto
Faction property PlayerWerewolfFaction auto
Faction property AFSFriendForswornFaction auto
Faction property AFSShamanForswornFaction auto

Actor property Playerref auto

Spell Property VampireLord auto

int VampireOID
int VampireLordOID
int KoldunOID
int PrimalOID
int HagravenOID
int WerewolfOID
int BriarHeartOID


bool KoldunVal
bool PrimalVal
bool HagravenVal
bool BriarHeartVal
bool WerewolfVal
bool VampireLordVal
GlobalVariable Property AFSCensure  Auto  
 

Posted

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]
 

 

Posted

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.)

Posted

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...

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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