Jump to content

Recommended Posts

28 minutes ago, Sleepy_Soul said:

I came across another development that's making me think it's working, but something is blocking the actual dialogue event from firing.

Yes the current checks on the initiative system are very strict and sensible, when they detect that the player should not be interrupted in his activities it abort itself but currently it's a bit too much sensible and I should soften it and probably also change that phrase (mcg aborted itself...etc) into generic hellos for immersion. I have a very long list of bugs to be addressed :P

Link to comment

With great releases come big bug lists ? But we appreciate your work thus far anghelo92!

 

In order to ease debugging woes, would it be possible to change the aborted phrase into something more descriptive such as 'Initiative Interrupted Due to Combat / Player Busy/ etc.'? Having a means to see what the mod is actually doing behind the scenes can be immensely helpful.

Link to comment
15 hours ago, anghelos92 said:

Thanks i will look into them, about the sex animations that stop being called by mcg, i have a theory: is possible that you started a new game with the same name for your player character as the one you had in previous mcg versions? I know that this seems absurd but fallout 4 system make "save groups" based on player character names e.i. you can "select character" when loading a save to see all the saves related to a single character. It's possible that the game saw the new game when you saved as linked to the old saves if you PC has the same name of your old saves, this way fo4 could expect a script version that is no more in 2.6.0. but this is just a theory

You are correct. I did name my character the same as the old save game character. I did an experiment. I made another new game with a different name and a different profile in mod organizer 2. I started the game initiated a violate scene first. Then tried to start an MCG scene and the same thing still issue still occurred. It still gives me the options and never progresses to the animations. 

 

These are the only three errors that popped up in the log this time. 

 


    [AnghelosHotkeyHandler (8A03C4CF)].MCGv2:AnghelosHotkeyControllerScript.OnControlDown() - "C:\Users\AppData\Local\Temp\PapyrusTemp\MCGv2\AnghelosHotkeyControllerScript.psc" Line 34
[06/08/2019 - 10:30:27PM] error: Cannot call HasKeyword() on a None object, aborting function call

 

 

[AnghelosHotkeyHandler (8A03C4CF)].MCGv2:AnghelosHotkeyControllerScript.OnControlUp() - "C:\Users\AppData\Local\Temp\PapyrusTemp\MCGv2\AnghelosHotkeyControllerScript.psc" Line 47
[06/08/2019 - 10:30:27PM] warning: Assigning None to a non-object variable named "::temp48

 


    [AnghelosHotkeyHandler (8A03C4CF)].MCGv2:AnghelosHotkeyControllerScript.OnControlUp() - "C:\Users\\AppData\Local\Temp\PapyrusTemp\MCGv2\AnghelosHotkeyControllerScript.psc" Line 47
[06/08/2019 - 10:30:27PM] error: Cannot check for a None keyword

 

 

 

 

 

Thank you for the idea.

Link to comment
On 6/7/2019 at 2:49 PM, anghelos92 said:

The results you gathered are just what the other users reported in the past, unfortunately nothing has changed about this, regarding surrender you can actually manually surrender to enemies if your life is higher than 50% using the MCG Option Hotkey. Also reading your suggested solution I can say that is not possible to implement in the actual MCG Defeat System but you are lucky because there is a great mod for AAF that handle player defeat not On Entering Bleeding Out like MCG but on reaching a certain HP level, that mod is AAF Violate, I suggest to check it out, of course if you install it make sure that you disable MCG Defeat System.

Hey man, you are an absolute sport, you don't even had to give me a solution but you did. You are awesome. Thanks a bunch ma dood. 

Link to comment
12 hours ago, anghelos92 said:

Yes the current checks on the initiative system are very strict and sensible, when they detect that the player should not be interrupted in his activities it abort itself but currently it's a bit too much sensible and I should soften it and probably also change that phrase (mcg aborted itself...etc) into generic hellos for immersion. I have a very long list of bugs to be addressed :P

By the way, it would be nice to be able to completely disable all pop-up messages - well, going to some NPC masturbate, and the hell with it.

Link to comment
10 minutes ago, Misstress Sophia said:

Hi,

I started a new game with your mod installed and everything works fine so far but the enslavement is buggy.I have a enslavement collar in my inventory but when i hit the enslave button nothing happens. i thougth you migth wanted to know :)

 

thanks for your time

Can you provide more info, i.e. what actor were you trying to enslave and also follow the bug template report, else i cannot replicate the problem and i cannot help you!

It seems from user reports that some times my script are just ignored by the Virtual Machine, I double checked them and there are no critical errors. I am trying to verify if some mods overload the papyrus and block mine, even if this should not happen. First suspect so far is Sim Settlement Conqueror, I am working on it and i cannot confirm this.

Link to comment

2.6.0

Maybe this will help. I have had no problem enslaving.

I took one unique, non-cloned. She only responded to rapes. This was a scripted follower (Heather - may she forgive me...)

Got her to about 2.0, the she "broke". Rape command was accepted, but nothing after. No fade to black, no animation.

Tried making a save, loading it, and reloading the game. Still broken.

Tried AAF Wizard - that worked OK. MCG Rape still hung though.

I was only able to fix this slave by rolling back to a save before the problem started.

Side note: Heather maintained all her dialogues and her name Her weapon is gone though.. She still sells to me.

Link to comment
27 minutes ago, fred200 said:

2.6.0

Maybe this will help. I have had no problem enslaving.

I took one unique, non-cloned. She only responded to rapes. This was a scripted follower (Heather - may she forgive me...)

Got her to about 2.0, the she "broke". Rape command was accepted, but nothing after. No fade to black, no animation.

Tried making a save, loading it, and reloading the game. Still broken.

Tried AAF Wizard - that worked OK. MCG Rape still hung though.

I was only able to fix this slave by rolling back to a save before the problem started.

Side note: Heather maintained all her dialogues and her name Her weapon is gone though.. She still sells to me.

I have pinpointed the script that fails, it's the AnghelosSexControllerScript... It's the biggest in MCG and responsible for all player sex calling, 48 Kylobytes, maybe that could be part of the problem, even if I saw vanilla script as big as 64 KB giving no problem...but I guess could be worth to try to split it into two. Enslavement uses a function in that script for a check so when that fail also enslavement cannot proceed. It would be interesting to see if the random npc sex still works when that script fails because random sex has its own script for aaf calling...

 

Edit: >>> If there are modders among you i post the source code of that script here in this spoiler, maybe i just forgot something, I am an amateur coder after all! WARNING: VERY VERY LONG SPOILER. Note that on compiling i have no errors.

Spoiler

Scriptname MCGv2:AnghelosSexControllerScript extends Quest

 

Actor Property Playerref auto
Keyword property AnghelosIsForeplaying Auto
Keyword property ActorTypeNPC Auto
Keyword property AnghelosIsKissing Auto
Quest Property AnghelosMain Auto
Message Property AnghelosSexSetAnimation Auto
Message Property AnghelosSexSetRole Auto
GlobalVariable Property AnghelosSexAnimationDuration Auto Const
SPELL Property AnghelosSubmitSpell Auto
ReferenceAlias Property AnghelosSubmittedAlias Auto
ReferenceAlias Property Enemy1 auto
ReferenceAlias Property Enemy2 auto
ReferenceAlias Property Enemy3 auto
ReferenceAlias Property AnghelosAggressorBackup auto
ReferenceAlias Property PlayerFollower auto
Quest Property AnghelosOrgyFinder Auto
GlobalVariable Property AnghelosSexSubmissive Auto
GlobalVariable Property AnghelosSexAggressive auto
ReferenceAlias Property friend1 auto
ReferenceAlias Property friend2 auto
ReferenceAlias Property AnghelosOrgy1 auto
ReferenceAlias Property AnghelosOrgy2 auto
ReferenceAlias Property client auto
miscobject property caps001 auto
Keyword Property AnghelosIsRaping auto const
Keyword Property AnghelosResetSurrender auto const
Keyword Property AnghelosIsSurrendering auto const
Keyword Property AnghelosAfterRapeKeyword auto const
quest property anghelosrespawnquest auto const
Perk Property BlackWidow01 Auto Const
Perk Property BlackWidow02 Auto Const
Perk Property BlackWidow03 Auto Const
Perk Property LadyKiller01 Auto Const
Perk Property LadyKiller02 Auto Const
Perk Property LadyKiller03 Auto Const
message property AnghelosOrgyOptions auto const
perk property anghelosFurnitureselectorperk auto const
globalvariable property AnghelosDruggedToggle auto const
globalvariable property AnghelosDruggedChance auto const
globalvariable property AnghelosTimePeace auto
globalvariable property AnghelosRapedTimePeace auto
Potion[] Property Drugs Auto Const
Message property AnghelosSexTypeCreatureMessage auto const
Message property AnghelosSexSetAnimationComplete auto const
Message property AnghelosSexStartingMessage auto const
referencealias property AnghelosSexFollowerAlias auto
magiceffect property AnghelosSexCooldownEffect auto const
Spell property AnghelosSexCooldownSpell auto const
formlist property AnghelosEnslaveRaceBlacklist auto const
keyword property AnghelosIsRentingBed auto const
quest property anghelosspyspell auto const
globalvariable property anghelossexcrimetoggle auto const
quest property angheloscalmquest auto const
quest property anghelossurrenderquest auto const
keyword property ActorTypeHuman auto const
referencealias property anghelosOfficialAnimalAlias auto
keyword property AnghelosIsPunished auto const
keyword property anghelosismasturbating auto const
globalvariable property anghelosprostitutioncoeff auto const
quest property MQ101 auto const
globalvariable property angao auto const
keyword property anghelosisprostitutedoing auto const
keyword property anghelosisprostitutedone auto const
formlist property AnghelosEnslaveBlackListLight auto const
globalvariable property AnghelosCheatEnslave auto const
keyword property AnghelosLoverCook auto const
Potion property chickenNoodleSoup auto const
keyword property AnghelosHarassDefeatMark auto const
quest property AnghelosInitiativeQuest auto const
spell property AnghelosPauseInitiativespell auto const
referencealias property anghelossexfemale1 auto const
referencealias property anghelossexfemale2 auto const
referencealias property anghelossexmalealias auto const
spell property angheloscheckfemalespell1 auto const
spell property angheloscheckfemalespell2 auto const
spell property AnghelosCheckMaleSpell auto const
globalvariable property AnghelosGenderOverride auto
globalvariable property AnghelosForceStrapon auto const


globalvariable property xFPEbaseChance auto
AAF:AAF_API AAF_API
Bool AAFMissionControl


Actor Victim
bool isMCG
int PlayerSexAction
float startingConceptionChance

Event OnQuestInit()
    self.sexRegister()
EndEvent

event onquestshutdown()
    processshut1()
Endevent

bool Function checkEnslavement(race racetarget)
    If AnghelosCheatEnslave.getvalue() == 1 && AnghelosEnslaveRaceBlacklist.hasform(racetarget as form)
        return false
    Elseif AnghelosCheatEnslave.getvalue() == 1 && AnghelosEnslaveBlackListLight.hasform(racetarget as form)
        return false
    Else
        return true
    endif
EndFunction

Bool Function checkRace(actor second2)
    
    Return true
EndFunction

Function SetVictim(actor victim1)
    Victim = victim1
    isMCG = true
EndFunction

Function Masturbate()
    CallSex(playerref,none,none,none,playerref,0,1)
EndFunction

Function DrugPlayer()
    If Victim == playerRef && AnghelosDruggedToggle.getvalue() == 1
        int chance2 = Utility.RandomInt(1,100)
        If (chance2 < AnghelosDruggedChance.getvalue()) || playerref.haskeyword(AnghelosIsSurrendering) || playerref.haskeyword(AnghelosAfterRapeKeyword)
            int indexD = Utility.RandomInt(0, 3)
            Playerref.AddItem(Drugs[IndexD], 1, true)
            Playerref.EquipItem(Drugs[IndexD], false, true)
        EndIf
    EndIf
EndFunction

Function OrgyProstitute(Actor client1)
    While !AnghelosOrgyFinder.IsRunning()
        AnghelosOrgyFinder.Start()
        Utility.wait(1)
    EndWhile
    actor[] actors3
    actor victim2 = none
    int p = 2
    actor c1 = Client.GetReference() as actor
    if c1 
        p += 1
    EndIf
    If p == 3
        actors3 = new actor[3]
        actors3[2] = c1
        AnghelosSexSubmissive.Mod(2)
        int earning
        If playerref.hasperk(LadyKiller03) || playerref.hasperk(BlackWidow03)
            earning = 80
        ElseIf playerref.hasperk(LadyKiller02) || playerref.hasperk(BlackWidow02)
            earning = 55
        ElseIf playerref.hasperk(LadyKiller01) || playerref.hasperk(BlackWidow01)
            earning = 40
        EndIf
        int earning2 = (earning * anghelosprostitutioncoeff.getvalue()) as int
        PlayerREF.AddItem(caps001, earning2)
        Debug.Notification("It seems that your client wants a threesome...")
    Else
        actors3 = new actor[2]
        victim2 = playerREF
    EndIf
    actors3[0] = PlayerREF
    actors3[1] = client1

    CallSex(actors3[0], actors3[1], actors3[2], none, playerref)
    p = 2
    client.clear()
    AnghelosOrgyFinder.Stop()
    victim2 = none
EndFunction

Function AddRemoveOrgy(actor aktarget)
    actor of1 = AnghelosOrgy1.GetRef() as actor
    actor of2 = AnghelosOrgy2.GetRef() as actor
    If aktarget == of1 
        AnghelosOrgy1.Clear()
    ElseIf aktarget == of2
        AnghelosOrgy2.Clear()
    ElseIf aktarget != of1 && aktarget != of2 && of1 == none
        AnghelosOrgy1.ForceRefTo(aktarget)
    ElseIf aktarget != of1 && aktarget != of2 && of2 == none
        AnghelosOrgy2.ForceRefTo(aktarget)
    Else
        Debug.MessageBox("You can have only a maximum number of 2 actors tagged for an orgy")
    EndIf
EndFunction

Function StartOrgy(actor interacting)
int choice77 = AnghelosOrgyOptions.show()
If choice77 == 1
    While !AnghelosOrgyFinder.IsRunning()
        AnghelosOrgyFinder.Start()
        Utility.wait(1)
    EndWhile
    actor[] actors4
    int o = 1
    actor f1 = friend1.GetReference() as actor
    actor f2 = friend2.GetReference() as actor

    if f1
        o += 1
    endIf
    If f2
        o += 1
    EndIf

    if o == 3
        actors4 = new actor[3]
        actors4[2] = f2
    Elseif o == 2
        actors4 = new actor[2]
        Debug.Messagebox("Only one actor tagged for orgy, so no orgy will happen and it will count as couple sex")
    Elseif o == 1
        Debug.Messagebox("Something went wrong, it appers you are trying to start an orgy with only yourself")
    EndIf
    int ChooseP = AnghelosSexSetRole.Show()
        If chooseP == 1
            actors4[0] = f1
            actors4[1] = PlayerREF
            AnghelosSexAggressive.Mod(2)
        Else
            actors4[0] = PlayerREF
            actors4[1] = f1
            AnghelosSexSubmissive.Mod(2)
        EndIf
    CallSex(actors4[0], actors4[1], actors4[2], none, actors4[0])
    o = 1
    friend1.clear()
    friend2.clear()
    AnghelosOrgy1.clear()
    AnghelosOrgy2.clear()
    AnghelosOrgyFinder.Stop()
ElseIf choice77 == 2
    addremoveorgy(interacting)
ElseIf choice77 == 3
    AnghelosOrgy1.clear()
    AnghelosOrgy2.clear()
EndIf
EndFunction    

Function PlayerRaped(actor aggressor, actor akfollower)
    actor[] actors1
    actor[] actors2
    actor victim1 = none
    int i = 2
    actor due = Enemy2.GetReference() as actor
    if due && aggressor.HasKeyword(ActorTypeHuman)
        i += 1
    EndIf    
    If i == 3 
        actors1 = new actor[3]
        actors1[2] = due
        AnghelosSexSubmissive.Mod(3)
    Else
        actors1 = new actor[2]
        victim1 = playerREF
    EndIf
    actors1[0] = PlayerREF
    actors1[1] = aggressor
    
    CallSex(actors1[0], actors1[1], actors1[2], none, PlayerRef)
    
    i = 1
    actor cfollower = akfollower
    If cfollower == none
        cfollower = Playerfollower.GetReference() as actor
    endif
    If cfollower && cfollower.haskeyword(actortypeHuman)
        int f = 1
        actor uno = Enemy1.getReference() as actor
        actor tre = Enemy3.getReference() as actor
        If uno
            f += 1
        EndIf
        If tre
            f += 1
        EndIf        
        If f == 3
            actors2 = new actor[3]
            actors2[1] = uno
            actors2[2] = tre
        ElseIf f== 2
            actors2 = new actor[2]
            actors2[1] = uno
        Else
            actors2 = new actor[1]
        EndIf
            actors2[0] = cfollower

        NPCsex(actors2[0], actors2[1],actors2[2])
        
        f = 1
    EndIf
    Enemy1.clear()
    Enemy2.clear()
    Enemy3.clear()
    AnghelosAggressorBackup.Clear()
    AnghelosOrgyFinder.Stop()
    victim1 = none
EndFunction

Function NPCsex(actor firstN, actor secondN, actor thirdN)
    If Game.IsPluginInstalled("AAF.esm")
        AAF:AAF_API.GetAPI().ChangeSetting("troubleshooting_level", "0")
        AAF:AAF_API:SceneSettings Settings2 = AAF_API.GetSceneSettings()
        Actor[] actorsN
        If secondN == none
            actorsN = new actor[1]
            actorsN[0] = firstN
        ElseIf thirdN == none
            actorsN = new actor[2]
            actorsN[0] = firstN
            actorsN[1] = secondN
            settings2.includeTags = "Leito,SavageCabbage"
            if AnghelosGenderOverride.getvalue() == 0
;                xMale = Game.GetFormFromFile(0x0121BB, "AAF.esm") as keyword
;                xFemale = Game.GetFormFromFile(0x0121BC, "AAF.esm") as keyword    
                actorsN[0].addkeyword(xFemale)
                actorsN[1].addkeyword(xMale)
                angheloscheckfemalespell1.cast(secondN, secondN)
            Elseif AnghelosGenderOverride.getvalue() == 1 && AnghelosForceStrapon.getvalue() == 1
                AnghelosCheckMaleSpell.cast(firstN, firstN)
                angheloscheckfemalespell1.cast(secondN, secondN)
            ElseIf AnghelosGenderOverride.getvalue() == 2
                AAF:AAF_API.GetAPI().ChangeSetting("ignore_animation_genders", "true")
                AnghelosCheckMaleSpell.cast(firstN, firstN)
                angheloscheckfemalespell1.cast(secondN, secondN)
            endIf
        ElseIf thirdN != none
            actorsN = new actor[3]
            actorsN[0] = firstN
            actorsN[1] = secondN
            actorsN[2] = thirdN
            settings2.includeTags = "Leito,SavageCabbage"
            if AnghelosGenderOverride.getvalue() == 0
;                keyword xMale = Game.GetFormFromFile(0x0121BB, "AAF.esm") as keyword
;                keyword xFemale = Game.GetFormFromFile(0x0121BC, "AAF.esm") as keyword    
                actorsN[0].addkeyword(xFemale)
                actorsN[1].addkeyword(xMale)
                actorsN[2].addkeyword(xMale)
                angheloscheckfemalespell1.cast(secondN, secondN)
                angheloscheckfemalespell2.cast(ThirdN, ThirdN)
;            Elseif AnghelosGenderOverride.getvalue() == 1
;                AnghelosCheckMaleSpell.cast(firstN, firstN)
;                angheloscheckfemalespell1.cast(secondN, secondN)
;                angheloscheckfemalespell2.cast(ThirdN, ThirdN)
            ElseIf AnghelosGenderOverride.getvalue() == 2
                AAF:AAF_API.GetAPI().ChangeSetting("ignore_animation_genders", "true")
;                AnghelosCheckMaleSpell.cast(firstN, firstN)
;                angheloscheckfemalespell1.cast(secondN, secondN)
;                angheloscheckfemalespell2.cast(ThirdN, ThirdN)
            endif
        EndIf
        settings2.preventFurniture = true
        settings2.usePackages = false
        settings2.excludeTags = "Pose"
        settings2.isNPCControlled = true
        settings2.meta = "MagnoCumGaudio.esp,Consensual" 
        if angao.getvalue() == 1
            settings2.skipWalk = true
        endif
        AAF:AAF_API.GetAPI().StartScene(actorsN, settings2)
    EndIf
EndFunction

Function QuickRape(Actor secondR, bool isSubmitted=false)
    If issubmitted==true
        Playerref.addkeyword(AnghelosIsRaping)
        AnghelosSubmittedAlias.ForceRefTo(SecondR)
        secondR.DispelSpell(AnghelosSubmitSpell)
    endif
    int positionE = 0
    Actor[] Actors
    If secondR.hasKeyword(ActorTypeHuman)
        Int position = AnghelosSexSetAnimation.show()
        if position == 0
            PositionE = 2
        ElseIf position == 1
            PositionE = 3
        ElseIf position == 2
            PositionE = 4
        ElseIf position == 3
            PositionE = 5
        ElseIf position == 4
            PositionE = 6
        ElseIf position == 5
            PositionE = 7
        EndIf
    EndIf
    Actors = new Actor[2]
    Actors[0] = playerref
    Actors[1] = SecondR
    If secondR.hasKeyword(ActorTypeHuman)
        int Role = AnghelosSexSetRole.show()
        If Role == 1
            Actors[0] = SecondR
            Actors[1] = playerref
        EndIf
    EndIf
    CallSex(actors[0], actors[1], none, none, secondR, positionE)
EndFunction

Function QuickSex(Actor Lover)
If !lover.hasmagiceffect(AnghelosSexCooldownEffect)
    int positionL = 0
    actor victimL
    Actor[] ActorsL
    If Lover.hasKeyword(ActorTypeHuman)
        positionL = AnghelosSexSetAnimationComplete.show()
    EndIf
    ActorsL = new Actor[2]
    ActorsL[0] = playerref
    ActorsL[1] = Lover
    If Lover.hasKeyword(ActorTypeHuman)
        int Role = AnghelosSexSetRole.show()
        If Role == 1
            ActorsL[0] = Lover
            ActorsL[1] = playerref
        EndIf
    EndIf
    If Lover == anghelosOfficialAnimalAlias.getreference() as actor
        int typeL = AnghelosSexTypeCreatureMessage.show()
        if typeL == 0
            victimL = playerref
        ElseIf TypeL == 2
            victimL = Lover
        EndIf
    EndIf
    int StartL = AnghelosSexStartingMessage.show()
    if StartL == 0
        CallSex(actorsL[0], actorsL[1], none, none, none, positionL)
    Elseif StartL == 1
        DelaySex(Lover, actorsL[0], actorsL[1], none, none, none, positionL, 0)
    Elseif StartL == 2
        AbortSex()
    EndIf
Else
    Debug.Notification("This Lover is in cooldown and refuses to do sex")
EndIf    
EndFunction

Actor follower33
Actor first33
actor second33
actor third33
actor victim33
int tag33 = 0
int special33 = 0
objectreference place33

Function DelaySex(actor followerD, actor firstD, actor secondD, actor thirdD, objectreference placeD, actor victimD, int tagD, int specialD)
    first33 = FirstD
    second33 = SecondD
    third33 = ThirdD
    victim33 = VictimD
    tag33 = TagD
    special33 = SpecialD
    place33 = PlaceD
    follower33 = followerD
    AnghelosSexFollowerAlias.forcerefto(followerD)
    If SpecialD == 2
    ElseIf SpecialD != 2 && FollowerD.HasKeyword(ActorTypeHuman)
        playerref.addperk(anghelosFurnitureselectorperk)
    EndIf
    playerref.dispelspell(AnghelosPauseInitiativespell)
EndFunction


Function AskStartSex()
    int StartS = AnghelosSexStartingMessage.show()
    if StartS == 0 && playerref.haskeyword(Anghelosisprostitutedone) == false
        CallSexDelayed()
    Elseif StartS == 0 && playerref.haskeyword(Anghelosisprostitutedone)
        (AnghelosMain as anghelosdialoguecontrollerscript).ProcessProstitutionReal(AnghelosSexFollowerAlias.getreference() as actor)
    Elseif StartS == 2
        AbortSex(1)
    EndIf
EndFunction

Function CallSexDelayed(objectreference place34= none)
    CallSex(first33, second33, third33, place34, victim33, tag33, special33)
EndFunction

Function CallSex(Actor First, Actor Second=none, Actor Third=none, objectreference Place=none, Actor Victim69=none, int Tag69=0, int Special=0)
    AnghelosPauseInitiativespell.cast(playerref, playerref)
    AbortSex()
    If Game.IsPluginInstalled("AAF.esm")
        AAF:AAF_API.GetAPI().ChangeSetting("troubleshooting_level", "0")
        Actor[] actors1
        If second == none
            actors1 = new actor[1]
            actors1[0] = First
        ElseIf third == none
            actors1 = new actor[2]
            actors1[0] = First
            actors1[1] = Second
            if AnghelosGenderOverride.getvalue() == 0
;                keyword xMale = Game.GetFormFromFile(0x0121BB, "AAF.esm") as keyword
;                keyword xFemale = Game.GetFormFromFile(0x0121BC, "AAF.esm") as keyword    
                actors1[0].addkeyword(xFemale)
                actors1[1].addkeyword(xMale)
                angheloscheckfemalespell1.cast(second, second)
            ElseIf AnghelosGenderOverride.getvalue() == 1 && AnghelosForceStrapon.getvalue() == 1
                AnghelosCheckMaleSpell.cast(First, First)
                angheloscheckfemalespell1.cast(second, second)
            ElseIf AnghelosGenderOverride.getvalue() == 2
                AAF:AAF_API.GetAPI().ChangeSetting("ignore_animation_genders", "true")
                AnghelosCheckMaleSpell.cast(First, First)
                angheloscheckfemalespell1.cast(second, second)
            endIf
        ElseIf third != none
            actors1 = new actor[3]
            actors1[0] = First
            actors1[1] = Second
            actors1[2] = Third
            if AnghelosGenderOverride.getvalue() == 0
;                keyword xMale = Game.GetFormFromFile(0x0121BB, "AAF.esm") as keyword
;                keyword xFemale = Game.GetFormFromFile(0x0121BC, "AAF.esm") as keyword    
                actors1[0].addkeyword(xFemale)
                actors1[1].addkeyword(xMale)
                actors1[2].addkeyword(xMale)
                angheloscheckfemalespell1.cast(second, second)
                angheloscheckfemalespell2.cast(Third, Third)
;            ElseIf AnghelosGenderOverride.getvalue() == 1
;                AnghelosCheckMaleSpell.cast(First, First)
;                angheloscheckfemalespell1.cast(second, second)
;                angheloscheckfemalespell2.cast(Third, Third)
            ElseIf AnghelosGenderOverride.getvalue() == 2
                AAF:AAF_API.GetAPI().ChangeSetting("ignore_animation_genders", "true")
;                AnghelosCheckMaleSpell.cast(First, First)
;                angheloscheckfemalespell1.cast(second, second)
;                angheloscheckfemalespell2.cast(Third, Third)
            endIf
        EndIf
        SetVictim(victim69)
        
        
        AAF:AAF_API:SceneSettings Settings1 = AAF_API.GetSceneSettings()
        settings1.duration = AnghelosSexAnimationDuration.getvalue()
        settings1.preventFurniture = true
        settings1.isNPCControlled = true
        if angao.getvalue() == 1
            settings1.skipWalk = true
        endif

        string incTag
        string excTag
        If third == none
            If tag69 == 0
                incTag= none
                excTag= "Pose"
            ElseIf tag69 == 1
                incTag="kissing,hugging"
                excTag="Aggressive,Pose"
                settings1.startEquipmentSet = "MCGKiss"
                playerref.AddKeyword(AnghelosIsKissing)
            ElseIf tag69 == 2
                incTag="Cuddle,Dancing,HandJob,HandToHand,HandToNipples,HandToMouth,HandToVagina,HandToPenis,HandToAnus,HandToStrapOn,HandToEither,HandToStick,PenisToHand,PenisToNipples,StrapOnToHand,StrapOnToNipples"
                excTag="Aggressive,Pose"
                playerref.addkeyword(AnghelosIsForeplaying)
            ElseIf tag69 == 3
                incTag="BlowJob,69,PenisToMouth,StrapOnToMouth"
                excTag="Aggressive,Pose"
            ElseIf tag69 == 4
                incTag="FromFront,Missionary,CowGirl,PenisToVagina,PenisToPenis,PenisToStrapOn,PenisToEither,PenisToStick,StrapOnToVagina,StrapOnToPenis,StrapOnToEither,StrapOnToStick"
                excTag="Aggressive,Pose"
            ElseIf tag69 == 5
                incTag="PenisToAnus,PenisToEither,StrapOnToAnus,StrapOnToEither,FromBehind,Doggy,FromSide,PenisToPenis,PenisToStrapOn,PenisToStick"
                excTag="Aggressive,Pose"
            ElseIf tag69 == 6
                incTag="Aggressive"
                excTag="Pose"
            ElseIf tag69 == 7
                incTag=none
                excTag="Pose"    
                settings1.preventFurniture = false
                settings1.scanRadius = 256
                settings1.furniturePreference = 100        
            EndIf
            settings1.includeTags = incTag
            settings1.excludeTags = excTag
            If place != none
                settings1.preventFurniture = false
                settings1.locationObject = Place
                settings1.includeTags = none
                settings1.excludeTags = "Pose"
            endIf
        EndIf
        If first.haskeyword(actortypeHuman) == 0 || Second.haskeyword(actortypeHuman) == 0
            settings1.includeTags = none
            settings1.excludeTags = "Pose"
        EndIf
        if special == 1 ; masturbation
            settings1.includeTags ="Masturbation"
            settings1.excludeTags ="Pose"
            playerref.addkeyword(anghelosismasturbating)
        endif
        if victim69 == none
            settings1.meta = "MagnoCumGaudio.esp,Consensual" 
        ElseIf victim69 == playerref
            settings1.meta = "MagnoCumGaudio.esp,NonConsensual,PlayerRaped"
        ElseIf victim69 != none && victim69 != playerref
            settings1.meta = "MagnoCumGaudio.esp,NonConsensual,PlayerRapist"
        EndIf        
        If playerref.haskeyword(AnghelosIsForeplaying) || playerref.haskeyword(AnghelosisKissing)
            Anghelossexfemale1.clear()
            Anghelossexfemale2.clear()
            Anghelossexmalealias.clear()
        EndIf
        AAF:AAF_API.GetAPI().StartScene(actors1, settings1)
    Else
        If playerref == first
            Game.FadeOutGame(true, true, 0.0, 3.0, true)
            Utility.Wait(3.2)
            DrugPlayer()
            string name1 = playerref.getdisplayname()
            string name2 = second.getdisplayname()
            string name3 = third.getdisplayname()
            string nameV = victim69.getdisplayname()
            If nameV == name1 && name3 == ""
                Debug.Messagebox(nameV + " is fucked very hard by " + name2)
            ElseIf nameV == name1 && name3 != ""
                Debug.Messagebox(nameV + " is fucked very hard by " + name2 + " with the help of " + name3)
            ElseIf name3 == ""
                Debug.Messagebox(name1 + " is fucking with " + name2)
            ElseIf name3 != ""
                Debug.Messagebox(name1 + " is fucking with " + name2 + " and with " + name3)
            ElseIf nameV == name2 && name3 == ""
                Debug.Messagebox(nameV + " is fucked very hard by " + name1)
            ElseIf nameV == name2 && name3 != ""
                Debug.Messagebox(nameV + " is fucked very hard by " + name1 + " with the help of " + name3)
            EndIf
            Game.FadeOutGame(false, true, 0.0, 3.0, true)
            Utility.Wait(3.1)
            EventEmulated(Second,Third, Victim69)
        ElseIf playerref == second
            Game.FadeOutGame(true, true, 0.0, 3.0, true)
            Utility.Wait(3.2)
            DrugPlayer()
            string name1 = playerref.getdisplayname()
            string name2 = first.getdisplayname()
            string name3 = third.getdisplayname()
            string nameV = victim69.getdisplayname()
            If nameV == name1 && name3 == ""
                Debug.Messagebox(nameV + " is fucked very hard by " + name2)
            ElseIf nameV == name1 && name3 != ""
                Debug.Messagebox(nameV + " is fucked very hard by " + name2 + " with the help of " + name3)
            ElseIf name3 == ""
                Debug.Messagebox(name1 + " is fucking with " + name2)
            ElseIf name3 != ""
                Debug.Messagebox(name1 + " is fucking with " + name2 + " and with " + name3)
            ElseIf nameV == name2 && name3 == ""
                Debug.Messagebox(nameV + " is fucked very hard by " + name1)
            ElseIf nameV == name2 && name3 != ""
                Debug.Messagebox(nameV + " is fucked very hard by " + name1 + " with the help of " + name3)
            EndIf
            Game.FadeOutGame(false, true, 0.0, 3.0, true)
            Utility.Wait(3.1)
            EventEmulated(First,Third, Victim69)
        ElseIf playerref == third    
            Game.FadeOutGame(true, true, 0.0, 3.0, true)
            Utility.Wait(3.2)
            DrugPlayer()
            string name1 = playerref.getdisplayname()
            string name2 = first.getdisplayname()
            string name3 = second.getdisplayname()
            string nameV = victim69.getdisplayname()
            If nameV == name1 && name3 == ""
                Debug.Messagebox(nameV + " is fucked very hard by " + name2)
            ElseIf nameV == name1 && name3 != ""
                Debug.Messagebox(nameV + " is fucked very hard by " + name2 + " with the help of " + name3)
            ElseIf name3 == ""
                Debug.Messagebox(name1 + " is fucking with " + name2)
            ElseIf name3 != ""
                Debug.Messagebox(name1 + " is fucking with " + name2 + " and with " + name3)
            ElseIf nameV == name2 && name3 == ""
                Debug.Messagebox(nameV + " is fucked very hard by " + name1)
            ElseIf nameV == name2 && name3 != ""
                Debug.Messagebox(nameV + " is fucked very hard by " + name1 + " with the help of " + name3)
            EndIf
            Game.FadeOutGame(false, true, 0.0, 3.0, true)
            Utility.Wait(3.1)
            EventEmulated(First,Second, Victim69)
        EndIf
    EndIf
EndFunction 

Function AbortSex(int complete=0)
    AnghelosSexFollowerAlias.clear()
    AnghelosOrgy1.clear()
    AnghelosOrgy2.clear()
    playerref.RemovePerk(anghelosFurnitureselectorperk)
    first33 = none
    second33 = none
    third33 = none
    victim33 = none
    tag33 = 0
    special33 = 0
    place33 = none
    follower33 = none
    if complete == 1
        playerref.removekeyword(anghelosisforeplaying)
        playerref.removekeyword(anghelosiskissing)
        playerref.removekeyword(anghelosismasturbating)
        playerref.removekeyword(anghelosisprostitutedoing)
        playerref.removekeyword(anghelosisprostitutedone)
        playerref.removekeyword(anghelosisrentingbed)
        playerref.removekeyword(AnghelosLoverCook)
        playerref.dispelspell(AnghelosPauseInitiativespell)
    endif
EndFunction

Function EventEmulated(Actor Second, Actor Third=none, Actor Victim69=none, bool isgonewrong=false)
    playerref.RemovePerk(anghelosFurnitureselectorperk)
    AnghelosSexFollowerAlias.clear()
    AnghelosOrgy1.clear()
    AnghelosOrgy2.clear()
    If isgonewrong
;        DrugPlayer()
        playerref.setghost()
        Game.FadeOutGame(true, true, 0.0, 3.0, true)
        Utility.Wait(3.2)
        string name1 = playerref.getdisplayname()
        string name2 = second.getdisplayname()
        string name3 = third.getdisplayname()
        string nameV = victim69.getdisplayname()
        If nameV == name1 && name3 == ""
            Debug.Messagebox(nameV + " is fucked very hard by " + name2)
        ElseIf nameV == name1 && name3 != ""
            Debug.Messagebox(nameV + " is fucked very hard by " + name2 + " with the help of " + name3)
        ElseIf name3 == ""
            Debug.Messagebox(name1 + " is fucking with " + name2)
        ElseIf name3 != ""
            Debug.Messagebox(name1 + " is fucking with " + name2 + " and with " + name3)
        ElseIf nameV == name2 && name3 == ""
            Debug.Messagebox(nameV + " is fucked very hard by " + name1)
        ElseIf nameV == name2 && name3 != ""
            Debug.Messagebox(nameV + " is fucked very hard by " + name1 + " with the help of " + name3)
        EndIf
        Game.FadeOutGame(false, true, 0.0, 3.0, true)
        Utility.Wait(3.1)
        playerref.setghost(false)
    EndIf
    first33 = none
    second33 = none
    third33 = none
    victim33 = none
    tag33 = 0
    special33 = 0
    place33 = none
    follower33 = none
    If Playerref.hasKeyword(AnghelosIsKissing) == false && MQ101.iscompleted() ;&& Second.Isinfaction(PlayerSpouse) == false
        If  second == none && Playerref.haskeyword(anghelosismasturbating)
            (AnghelosMain as AnghelosLustControllerScript).Wear(none,none,victim69)
            playerref.removekeyword(AnghelosIsForeplaying)
            playerref.removekeyword(anghelosismasturbating)
        ElseIf  second == none && Playerref.haskeyword(anghelosismasturbating) == false
            debug.notification("MCG will not recognize masturbation from other mods, no stats changed")
        ElseIf Playerref.haskeyword(AnghelosIsForeplaying)
            (AnghelosMain as AnghelosLustControllerScript).Wear(none,none,victim69)
            playerref.removekeyword(AnghelosIsForeplaying)
        Else
            (AnghelosMain as AnghelosLustControllerScript).Wear(Second, Third, Victim69)
        EndIf
    Else
        playerref.removeKeyword(AnghelosIsKissing)
    Endif
    Victim = none
    isMCG = false

    If playerref.haskeyword(AnghelosIsRaping)
        playerref.removeKeyword(AnghelosIsRaping)
        AnghelosSubmitSpell.Cast(Second, Second)
        AnghelosSubmittedAlias.Clear()
    EndIf
    
    If PlayerREF.haskeyword(AnghelosAfterRapeKeyword)
        PlayerREF.removeKeyword(AnghelosAfterRapeKeyword)
        (AnghelosRespawnQuest as AnghelosDefeatScript).AfterRape()
    EndIf
    
    If PlayerREF.haskeyword(AnghelosIsSurrendering)
        PlayerREF.removeKeyword(AnghelosIsSurrendering)
        (AnghelosRespawnQuest as AnghelosDefeatScript).AfterSurrender()
    EndIf

    If PlayerREF.haskeyword(AnghelosResetSurrender)
        PlayerREF.removeKeyword(AnghelosResetSurrender)
        Int SurrTime = ((AnghelosTimePeace.GetValue() as int) * 2)
        Int RapeTime = ((AnghelosRapedTimePeace.GetValue() as int) *2)
        Debug.MessageBox("Offering your body again you extended your grace time period, now you have " + RapeTime + " seconds of free pass if you were raped or " + SurrTime + " seconds if you did surrender. Don't do any violent action!")
    EndIf        
    
    If playerref.haskeyword(AnghelosIsRentingBed)
        playerref.removekeyword(AnghelosIsRentingBed)
        (Anghelosmain as anghelosquestrewardscript).AfterRentingBed()
    EndIf

    if playerref.haskeyword(AnghelosIsPunished)
        playerref.removekeyword(AnghelosIsPunished)
    endif
    
    if playerref.haskeyword(AnghelosLoverCook)
        playerref.removekeyword(AnghelosLoverCook)
        Playerref.additem(chickenNoodleSoup, 6)
    EndIf
    
    if playerref.haskeyword(AnghelosHarassDefeatMark)
        playerref.removekeyword(AnghelosHarassDefeatMark)
        (AnghelosInitiativeQuest as AnghelosInitiativeDialogueScript).HarassAfterDefeat()
    EndIf
    restoreChanceFPE()
    playerref.dispelspell(AnghelosPauseInitiativespell)
EndFunction

keyword xMale
keyword xFemale
Armor xStrapon
keyword xAAFBusy 
keyword xAAFLocked
Function SexRegister()
    AAF_API = Game.GetFormFromFile(0x00000F99, "AAF.esm") as AAF:AAF_API
        If !AAF_API

        Else
        self.RegisterForCustomEvent(AAF_API, "OnAnimationStop")
        self.RegisterForCustomEvent(AAF_API, "OnAnimationStart")
        self.RegisterForCustomEvent(AAF_API, "OnSceneInit")
        self.RegisterForCustomEvent(AAF_API, "OnSceneEnd")
        xMale = Game.GetFormFromFile(0x0121BB, "AAF.esm") as keyword
        xFemale = Game.GetFormFromFile(0x0121BC, "AAF.esm") as keyword
        xAAFBusy = Game.GetFormFromFile(0x00915A, "AAF.esm") as keyword
        xAAFLocked = Game.GetFormFromFile(0x017CEA, "AAF.esm") as keyword
        xStrapon = Game.GetFormFromFile(0x00173B, "VIO_Strap-On.esp") as armor
        Endif
    If Game.IsPluginInstalled("FP_FamilyPlanningEnhanced.esp")
        xFPEbasechance = Game.GetFormFromFile(0x000F9B, "FP_FamilyPlanningEnhanced.esp") as globalvariable
        startingConceptionChance = xFPEbasechance.getvalue()
    EndIf
EnDFunction

function processshut1()
    self.unRegisterForCustomEvent(AAF_API, "OnAnimationStop")
    self.UnRegisterForCustomEvent(AAF_API, "OnAnimationStart")
    self.unRegisterForCustomEvent(AAF_API, "OnSceneInit")
    self.unRegisterForCustomEvent(AAF_API, "OnSceneEnd")
endfunction

function restoreChanceFPE()
    If Game.IsPluginInstalled("FP_FamilyPlanningEnhanced.esp")
        utility.wait(3)
        xFPEbasechance.setvalue(startingConceptionChance )
    EndIf
EndFunction

Event AAF:AAF_API.OnSceneEnd(AAF:AAF_API akSender, Var[] akArgs)
    If (akArgs[0] as int == 0)
        Actor[] akargs1 = Utility.VarToVarArray(akArgs[1]) as Actor[]
;        keyword xMale = Game.GetFormFromFile(0x0121BB, "AAF.esm") as keyword
;        keyword xFemale = Game.GetFormFromFile(0x0121BC, "AAF.esm") as keyword
;        Armor xStrapon = Game.GetFormFromFile(0x00173B, "VIO_Strap-On.esp") as armor
        int I = 0
        bool playerfound = false
        While I < akargs1.length
            akargs1.removekeyword(xMale)
            akargs1.removekeyword(xFemale)
            akargs1.removekeyword(xAAFBusy)
            akargs1.removekeyword(xAAFLocked)
            akargs1.unequipitem(xStrapon, false, true)
            akargs1.removeitem(xStrapon, -1, true)
            if akArgs1 == playerref
                playerFound = true
            EndIf
            I += 1
        EndWhile
        if playerfound == true && AAFMissionControl == true
            AnghelosSpySpell.stop()
            Actor second1
            Actor third1
            bool playerRole = 0    
            If akArgs1[0] as Actor == PlayerREf
                Second1 = akArgs1[1] as Actor
                Third1    = akArgs1[2] as Actor
            ElseIf akArgs1[1] as Actor == PlayerREF
                Second1 = akArgs1[0] as Actor
                Third1 = akArgs1[2] as Actor
                playerRole = 1
            Else
                Second1 = akArgs1[0] as Actor
                Third1 = akArgs1[1] as Actor
                playerRole = 1
            EndIf
            if second1 == playerRef || third1 == playerref
                second1 = none
                third1 =  none
            elseIf second1 == third1
                third1 = none
            EndIf
            String[] aTags = LL_FourPlay.StringSplit(akargs[4], ",")
            String[] aTags1 = Utility.VarToVarArray(akArgs[3]) as String[]
            If isMCG == false
                Int L = 0
                String TagCheck = ""
                bool TagFound = false
                While (L < aTags.length) && TagFound == False
                    If (aTags[L] == "PlayerRaped" || aTags[L] == "PlayerRapist" || aTags[L] == "Consensual")
                        tagCheck = aTags
                        TagFound = True
                    endif
                    i += 1
                EndWhile
                If tagCheck == "PlayerRaped"
                    SetVictim(playerref)
                ElseIf tagCheck == "PlayerRapist"
                    SetVictim(second1)
                ElseIf tagCheck == "Consensual"
                    SetVictim(none)
                EndIf
                If TagFound == false && second1 != none
                    Int M = 0
                    bool TagFound1 = false
                    While M < aTags1.length && TagFound1 == False
                        If (aTags1[M] == "Aggressive")
                            TagFound1 = True
                        EndIf
                        L += 1
                    EndWhile 
                    If playerRole == 0 && TagFound1 == true
                        Victim = playerref
                    ElseIf playerRole == 1 && TagFound1 == true        
                        Victim = second1
                    Else
                        Victim = none
                    EndIf
                EndIf
            Else
                isMCG = false
            EndIf    
            isMCG = false
            EventEmulated(Second1, Third1, Victim)
        Elseif playerfound == true && AAFMissionControl == false
            AnghelosSpySpell.stop()
        EndIf
    Else
        Actor[] akargs1 = Utility.VarToVarArray(akArgs[1]) as Actor[]
;        keyword xMale = Game.GetFormFromFile(0x0121BB, "AAF.esm") as keyword
;        keyword xFemale = Game.GetFormFromFile(0x0121BC, "AAF.esm") as keyword
;        Armor xStrapon = Game.GetFormFromFile(0x00173B, "VIO_Strap-On.esp") as armor
        int I = 0
        bool playerfound = false
        While I < akargs1.length
            akargs1.removekeyword(xMale)
            akargs1.removekeyword(xFemale)
            akargs1.removekeyword(xAAFBusy)
            akargs1.removekeyword(xAAFLocked)
            akargs1.unequipitem(xStrapon, false, true)
            akargs1.removeitem(xStrapon, -1, true)
            if akArgs1 == playerref
                playerFound = true
            EndIf
            I += 1
        EndWhile
        if playerfound == true && AAFMissionControl == true
            AnghelosSpySpell.stop()
            Actor second1
            Actor third1
            bool playerRole = 0    
            If akArgs1[0] as Actor == PlayerREf
                Second1 = akArgs1[1] as Actor
                Third1    = akArgs1[2] as Actor
            ElseIf akArgs1[1] as Actor == PlayerREF
                Second1 = akArgs1[0] as Actor
                Third1 = akArgs1[2] as Actor
                playerRole = 1
            Else
                Second1 = akArgs1[0] as Actor
                Third1 = akArgs1[1] as Actor
                playerRole = 1
            EndIf
            if second1 == playerRef || third1 == playerref
                second1 = none
                third1 =  none
            elseIf second1 == third1
                third1 = none
            EndIf
            String[] aTags = LL_FourPlay.StringSplit(akargs[4], ",")
            If isMCG == false
                Int L = 0
                String TagCheck = ""
                bool TagFound = false
                While (L < aTags.length) && TagFound == False
                    If (aTags[L] == "PlayerRaped" || aTags[L] == "PlayerRapist" || aTags[L] == "Consensual")
                        tagCheck = aTags
                        TagFound = True
                    endif
                    i += 1
                EndWhile
                If tagCheck == "PlayerRaped"
                    SetVictim(playerref)
                ElseIf tagCheck == "PlayerRapist"
                    SetVictim(second1)
                ElseIf tagCheck == "Consensual"
                    SetVictim(none)
                EndIf
                If TagFound == false && second1 != none
                    String[] aTags1 = Utility.VarToVarArray(akArgs[3]) as String[]
                    Int M = 0
                    bool TagFound1 = false
                    While M <= aTags1.length && TagFound1 == False
                        If (aTags1[M] == "Aggressive")
                            TagFound1 = True
                        EndIf
                        L += 1
                    EndWhile 
                    If playerRole == 0 && TagFound1 == true
                        Victim = playerref
                    ElseIf playerRole == 1 && TagFound1 == true        
                        Victim = second1
                    Else
                        Victim = none
                    EndIf
                EndIf
            Else
                isMCG = false
            EndIf    
            isMCG = false
            EventEmulated(Second1, Third1, Victim, true)
        ElseIf playerfound == true && AAFMissionControl == false
            AnghelosSpySpell.stop()
        EndIf
    EndIf
    RegisterForCustomEvent(AAF_API, "OnSceneEnd")
EndEvent

Event AAF:AAF_API.OnSceneInit(AAF:AAF_API akSender, Var[] akArgs)
    If (akArgs[0] as int != 0)
        String aTags1 = akargs[3] as string
        If aTags1 == "MagnoCumGaudio.esp,NonConsensual,PlayerRaped" || aTags1 == "MagnoCumGaudio.esp,NonConsensual,PlayerRapist" ||aTags1 == "MagnoCumGaudio.esp,Consensual"
            AAF:AAF_API.GetAPI().ChangeSetting("ignore_animation_genders", "false")
        endif        
        Anghelossexfemale1.clear()
        Anghelossexfemale2.clear()
        Anghelossexmalealias.clear()
        Actor[] akargs1 = Utility.VarToVarArray(akArgs[2]) as Actor[]
;        keyword xMale = Game.GetFormFromFile(0x0121BB, "AAF.esm") as keyword
;        keyword xFemale = Game.GetFormFromFile(0x0121BC, "AAF.esm") as keyword
;        Armor xStrapon = Game.GetFormFromFile(0x00173B, "VIO_Strap-On.esp") as armor
        int I = 0
        bool playerfound1 = false
        While I < akargs1.length
            akargs1.removekeyword(xMale)
            akargs1.removekeyword(xFemale)
            akargs1.removekeyword(xAAFBusy)
            akargs1.removekeyword(xAAFLocked)
            akargs1.unequipitem(xStrapon, false, true)
            akargs1.removeitem(xStrapon, -1, true)
            if akArgs1 == playerref
                playerFound1 = true
            EndIf
            I += 1
        EndWhile
        if playerfound1 == true
            AAFMissionControl = false
            AnghelosSpySpell.stop()
            Actor second1
            Actor third1
            If akArgs1[0] as Actor == PlayerREf
                Second1 = akArgs1[1] as Actor
                Third1    = akArgs1[2] as Actor
            ElseIf akArgs1[1] as Actor == PlayerREF
                Second1 = akArgs1[0] as Actor
                Third1 = akArgs1[2] as Actor
            Else
                Second1 = akArgs1[0] as Actor
                Third1 = akArgs1[1] as Actor
            EndIf
            if second1 == playerRef || third1 == playerref
                second1 = none
                third1 =  none
            elseIf second1 == third1
                third1 = none
            EndIf
            String[] aTags = LL_FourPlay.StringSplit(akargs[3], ",")
            If isMCG == false
                Int L = 0
                String TagCheck = ""
                bool TagFound = false
                While (L < aTags.length) && TagFound == False
                    If (aTags[L] == "PlayerRaped" || aTags[L] == "PlayerRapist" || aTags[L] == "Consensual")
                        tagCheck = aTags
                        TagFound = True
                    endif
                    i += 1
                EndWhile
                If tagCheck == "PlayerRaped"
                    SetVictim(playerref)
                ElseIf tagCheck == "PlayerRapist"
                    SetVictim(second1)
                ElseIf tagCheck == "Consensual"
                    SetVictim(none)
                EndIf
            EndIf
            EventEmulated(Second1, Third1, Victim, true)
        EndIf
    ElseIf (akArgs[0] as int == 0)
        String aTags1 = akargs[5] as string
        if (AnghelosGenderOverride.getvalue() == 0 && (aTags1 == "MagnoCumGaudio.esp,NonConsensual,PlayerRaped" || aTags1 == "MagnoCumGaudio.esp,NonConsensual,PlayerRapist" ||aTags1 == "MagnoCumGaudio.esp,Consensual"))
;            Armor xStrapon = Game.GetFormFromFile(0x00173B, "VIO_Strap-On.esp") as armor
            If playerref == (Anghelossexfemale1.getreference() as actor) && playerref.getactorbase().getsex() == 1
                (akArgs[2] as Actor).equipitem(xStrapon,false, true)
            Else
                (Anghelossexfemale1.getreference() as actor).equipitem(xStrapon,false, true)
            EndIf
            (Anghelossexfemale2.getreference() as actor).equipitem(xStrapon,false, true)    
        ElseIf (AnghelosGenderOverride.getvalue() == 1 && Anghelossexmalealias.getreference() != none && AnghelosForceStrapon.getvalue() == 1 && (aTags1 == "MagnoCumGaudio.esp,NonConsensual,PlayerRaped" || aTags1 == "MagnoCumGaudio.esp,NonConsensual,PlayerRapist" ||aTags1 == "MagnoCumGaudio.esp,Consensual"))
;            Armor xStrapon = Game.GetFormFromFile(0x00173B, "VIO_Strap-On.esp") as armor
            If playerref == (Anghelossexfemale1.getreference() as actor) && playerref.getactorbase().getsex() == 1
                (akArgs[2] as Actor).equipitem(xStrapon,false, true)
            Else
                (Anghelossexfemale1.getreference() as actor).equipitem(xStrapon,false, true)
            EndIf
            (Anghelossexfemale2.getreference() as actor).equipitem(xStrapon,false, true)    
        ElseIf (AnghelosGenderOverride.getvalue() == 2 && Anghelossexmalealias.getreference() != none && AnghelosForceStrapon.getvalue() == 1 && (aTags1 == "MagnoCumGaudio.esp,NonConsensual,PlayerRaped" || aTags1 == "MagnoCumGaudio.esp,NonConsensual,PlayerRapist" ||aTags1 == "MagnoCumGaudio.esp,Consensual"))
;            Armor xStrapon = Game.GetFormFromFile(0x00173B, "VIO_Strap-On.esp") as armor
            If playerref == (Anghelossexfemale1.getreference() as actor) && playerref.getactorbase().getsex() == 1
                (akArgs[2] as Actor).equipitem(xStrapon,false, true)
            Else
                (Anghelossexfemale1.getreference() as actor).equipitem(xStrapon,false, true)
            EndIf
            (Anghelossexfemale2.getreference() as actor).equipitem(xStrapon,false, true)
        endif
        Anghelossexfemale1.clear()
        Anghelossexfemale2.clear()
        Anghelossexmalealias.clear()
        If aTags1 == "MagnoCumGaudio.esp,NonConsensual,PlayerRaped" || aTags1 == "MagnoCumGaudio.esp,NonConsensual,PlayerRapist" ||aTags1 == "MagnoCumGaudio.esp,Consensual"
            AAF:AAF_API.GetAPI().ChangeSetting("ignore_animation_genders", "false")
        endif    
        Actor[] akArgs2 = Utility.VarToVarArray(akArgs[1]) as Actor[]
        int I = 0
        bool playerfound1 = false
        While I < akArgs2.length && playerfound1 == false
            if akArgs2 == playerref
                playerFound1 = true
            EndIf
            I += 1
        EndWhile
        if playerfound1 == true
            AAFMissionControl = true
            String[] aTags = LL_FourPlay.StringSplit(akargs[5], ",")
            If isMCG == false
                Actor second1
                Actor third1    
                If akArgs2[0] as Actor == PlayerREf
                    Second1 = akArgs2[1] as Actor
                    Third1    = akArgs2[2] as Actor
                ElseIf akArgs2[1] as Actor == PlayerREF
                    Second1 = akArgs2[0] as Actor
                    Third1 = akArgs2[2] as Actor
                Else
                    Second1 = akArgs2[0] as Actor
                    Third1 = akArgs2[1] as Actor
                EndIf
                if second1 == playerRef || third1 == playerref
                    second1 = none
                    third1 =  none
                elseIf second1 == third1
                    third1 = none
                EndIf
                Int L = 0
                String TagCheck = ""
                bool TagFound = false
                While (L < aTags.length) && TagFound == False
                    If (aTags[L] == "PlayerRaped" || aTags[L] == "PlayerRapist" || aTags[L] == "Consensual")
                        tagCheck = aTags
                        TagFound = True
                    endif
                    i += 1
                EndWhile
                If tagCheck == "PlayerRaped"
                    SetVictim(playerref)
                ElseIf tagCheck == "PlayerRapist"
                    SetVictim(second1)
                ElseIf tagCheck == "Consensual"
                    SetVictim(none)
                EndIf
            EndIf
        EndIf
    EndIf
    RegisterForCustomEvent(AAF_API, "OnSceneInit")
EndEvent

Event AAF:AAF_API.OnAnimationStart(AAF:AAF_API akSender, Var[] akArgs)
    If    (akArgs[0] as int == 0)
        Actor[] akArgs1 = Utility.VarToVarArray(akArgs[1]) as Actor[]
        int I = 0
        bool playerfound2 = false
        While I < akargs1.length && playerfound2 == false
            if akArgs1 == playerref
                playerFound2 = true
            EndIf
            I += 1
        EndWhile
    ;    If  akArgs1[0] as Actor == PlayerREF || akArgs1[1]  as Actor == PlayerREF || akArgs1[2] as Actor == PlayerREF
        if playerfound2 == true
            (AnghelosMain as anghelosrelatioshipcontrollerscript).SaveActors(akArgs1)            
            string[] atags2 = Utility.VarToVarArray(akArgs[3]) as String[]
            int IL = 0
            bool IsFound = false
            While IL < atags2.length && isFound == false
                If atags2[IL] == "pose"
                    isFound = true
                    playerref.addkeyword(AnghelosIsKissing)
                EndIf
                IL += 1
            EndWhile
            
            DrugPlayer()
            If Game.IsPluginInstalled("FP_FamilyPlanningEnhanced.esp")
                xFPEbasechance = Game.GetFormFromFile(0x000F9B, "FP_FamilyPlanningEnhanced.esp") as globalvariable
                startingConceptionChance = xFPEbasechance.getvalue()
            Else
                startingConceptionChance = 0
            EndIf
            If playerref.haskeyword(anghelosiskissing) || playerref.haskeyword(Anghelosisforeplaying)
                xFPEbasechance.setvalue(0)
            EndIf    
            
            if playerref.HasKeyword(anghelosiskissing) == false && AnghelosSexCrimeToggle.GetValue() == 1 && AnghelosCalmQuest.IsRunning() == false && anghelossurrenderquest.IsRunning() == false && playerref.haskeyword(AnghelosIsPunished) == 0
                AnghelosSpySpell.start()
            endIf
            if playerref.haskeyword(anghelosismasturbating) == false
                (anghelosMain as AnghelosRelatioshipControllerScript).CheckBadBehaviour(akArgs1)
            endif
        EndIf
    Else
        Actor[] akArgs1 = Utility.VarToVarArray(akArgs[2]) as Actor[]
        int I = 0
        bool playerfound2 = false
        While I < akargs1.length && playerfound2 == false
            if akArgs1 == playerref
                playerFound2 = true
            EndIf
            I += 1
        EndWhile
        if playerfound2 == true
            DrugPlayer()
            (anghelosMain as AnghelosRelatioshipControllerScript).CheckBadBehaviour(akArgs1)
        EndIf
    EndIf
    RegisterForCustomEvent(AAF_API, "OnAnimationStart")
EndEvent

Event AAF:AAF_API.OnAnimationStop(AAF:AAF_API akSender, Var[] akArgs)
    If (akArgs[0] as int == 0)
        Actor[] akArgs1 = Utility.VarToVarArray(akArgs[1]) as Actor[]
        int I = 0
        bool playerfound3 = false
        While I < akargs1.length && playerfound3 == false
            if akArgs1 == playerref
                playerFound3 = true
            EndIf
            I += 1
        EndWhile
        if playerfound3 == true
            AnghelosSpySpell.stop()
        EndIf
    EndIf
    RegisterForCustomEvent(AAF_API, "OnAnimationStop")
EndEvent

Function Playerdance()
    Debug.messagebox("Something tried to call the obsolete player dance function")
EndFunction

Function NpcDance(Actor akspeaker)
    Debug.messagebox("Something tried to call the obsolete npc dance function")
EndFunction

Function playerkiss(Actor first, actor second)
    If Game.IsPluginInstalled("AAF.esm")
        AnghelosPauseInitiativespell.cast(playerref,playerref)
        AAF:AAF_API.GetAPI().ChangeSetting("troubleshooting_level", "0")
;        if angao.getvalue() == 1
;            AAF:AAF_API.GetAPI().ChangeSetting("ignore_animation_genders", "true")
;        endif
        playerref.addkeyword(AnghelosIsKissing)
        Actor[] bacianti = new Actor[2]
        bacianti[0] = first
        bacianti[1] = second
        if AnghelosGenderOverride.getvalue() == 0
;            xMale = Game.GetFormFromFile(0x0121BB, "AAF.esm") as keyword
;            xFemale = Game.GetFormFromFile(0x0121BC, "AAF.esm") as keyword    
            bacianti[0].addkeyword(xFemale)
            bacianti[1].addkeyword(xMale)
        ElseIf AnghelosGenderOverride.getvalue() == 2
            AAF:AAF_API.GetAPI().ChangeSetting("ignore_animation_genders", "true")
        endIf
        AAF:AAF_API:SceneSettings SettingsKiss = AAF_API.GetSceneSettings()
        if angao.getvalue() == 1
            settingsKiss.skipWalk = true
        endif
        SettingsKiss.preventFurniture = true
        SettingsKiss.includeTags = "Kissing"
        settingsKiss.excludeTags ="Pose"
        settingsKiss.isNPCControlled = true
        SettingsKiss.startEquipmentSet = "MCGKiss"
        settingsKiss.meta = "MagnoCumGaudio.esp,Consensual" 
        AAF:AAF_API.GetAPI().StartScene(bacianti, settingsKiss)
    Else
        Game.FadeOutGame(true, true, 0.0, 3.0, true)
        Utility.Wait(3.2)
        Game.FadeOutGame(false, true, 0.0, 3.0, true)
        Debug.Messagebox(second.getdisplayname() + " kissed " + first.getdisplayname())
    EndIf
EndFunction
Function playerHug(Actor target)
    If Game.IsPluginInstalled("AAF.esm")
        AnghelosPauseInitiativespell.cast(playerref,playerref)
        AAF:AAF_API.GetAPI().ChangeSetting("troubleshooting_level", "0")
;        if angao.getvalue() == 1
;            AAF:AAF_API.GetAPI().ChangeSetting("ignore_animation_genders", "true")
;        endif
        playerref.addkeyword(AnghelosIsKissing)
        Actor[] bacianti1 = new Actor[2]
        bacianti1[0] = playerref
        bacianti1[1] = target
        if AnghelosGenderOverride.getvalue() == 0
;            xMale = Game.GetFormFromFile(0x0121BB, "AAF.esm") as keyword
;            xFemale = Game.GetFormFromFile(0x0121BC, "AAF.esm") as keyword    
            bacianti1[0].addkeyword(xFemale)
            bacianti1[1].addkeyword(xMale)
        ElseIf AnghelosGenderOverride.getvalue() == 2
            AAF:AAF_API.GetAPI().ChangeSetting("ignore_animation_genders", "true")
        endIf
        AAF:AAF_API:SceneSettings SettingsKiss1 = AAF_API.GetSceneSettings()
        if angao.getvalue() == 1
            settingsKiss1.skipWalk = true
        endif
        SettingsKiss1.preventFurniture = true
        SettingsKiss1.includeTags = "Hugging"
        settingsKiss1.excludeTags ="Pose"
        settingsKiss1.isNPCControlled = true
        SettingsKiss1.startEquipmentSet = "MCGHug"
        settingsKiss1.meta = "MagnoCumGaudio.esp,Consensual" 
        AAF:AAF_API.GetAPI().StartScene(bacianti1, settingsKiss1)
    Else
        Game.FadeOutGame(true, true, 0.0, 3.0, true)
        Utility.Wait(3.2)
        Game.FadeOutGame(false, true, 0.0, 3.0, true)
        Debug.Messagebox("You hug " + target.getdisplayname())
    EndIf
EndFunction

 

Link to comment
5 minutes ago, fred200 said:

Us mod addicts run the loose mod anyway.  Just a script name will suffice...

Notepad++ with Papyrus syntax highlighting is de rigueur also...

:D fantastic, folder MCGv2, file AnghelosSexControllerScript.psc

Link to comment
13 minutes ago, fred200 said:

Just a short example of what Notepad++ will do for you: (this may well be old news to you)

 

2019-06-09.png.2366d3f8da93b0a4eeca7eb7600067b1.png

Actually i didn't use any language highlight, I was just too lazy to set a custom highlight since my notepad++ version has no papyrus highlight in the defaults. That's a great suggestion!

Link to comment

Hello @anghelos92  been playing with latest version today... everything worked at start of game of a fresh game install and mods.  I manually installed your files for MCG 2.6.0.  But now, about 3 hours in,  Everything works except... key for masturbation... disarms to fists, 2nd hit asks if I want to masturbate (the Chararcter!) … click yes.. nothing happens.  And the approaches have stopped working as well, and any assaults elsewise, my infamy should be recognized but it isn't... I have uninstalled, re-installed, restart the mod, restart the NPC initiative, everything functions on MCM, the menus, I can get people to follow... but, the actual mechanic seems frozen.. I have changed load order up, down... to the end, to the top of my other gameplay mods... my other mods work fine... it is just this one stalling.  I am not saying it is the mod... I may be doing something wrong I don't see... so if there is easy way or others have already seen this, I apologize for bothering you.

 

John

Link to comment
1 hour ago, MrCruelJohn said:

Hello @anghelos92  been playing with latest version today... everything worked at start of game of a fresh game install and mods.  I manually installed your files for MCG 2.6.0.  But now, about 3 hours in,  Everything works except... key for masturbation... disarms to fists, 2nd hit asks if I want to masturbate (the Chararcter!) … click yes.. nothing happens.  And the approaches have stopped working as well, and any assaults elsewise, my infamy should be recognized but it isn't... I have uninstalled, re-installed, restart the mod, restart the NPC initiative, everything functions on MCM, the menus, I can get people to follow... but, the actual mechanic seems frozen.. I have changed load order up, down... to the end, to the top of my other gameplay mods... my other mods work fine... it is just this one stalling.  I am not saying it is the mod... I may be doing something wrong I don't see... so if there is easy way or others have already seen this, I apologize for bothering you.

 

John

No unfortunately nothing that can be done right now, there is a script that seems to fail, with update 2.6.0 all of my scripts grown in size, probably one or two have surpassed a critical size and or are sometimes skipped by virtual machine (i don't know the reason)

At the moment it is confirmed that sometimes fail:

 

-script for sex calling (enslavement needs also some functions from this)

 

-wear calculations (but the script of the wear actually works because the sexual stats are updated l, if the player has sex, except wear)

 

There is something that blocks my script, i don't know if it's another mod or some papyrus mechanic that i don't know! 

I am working on it, tomorrow i have some free time and i will conduct more tests and do more fixes

Link to comment
1 hour ago, anghelos92 said:

No unfortunately nothing that can be done right now, there is a script that seems to fail, with update 2.6.0 all of my scripts grown in size, probably one or two have surpassed a critical size and or are sometimes skipped by virtual machine (i don't know the reason)

At the moment it is confirmed that sometimes fail:

 

-script for sex calling (enslavement needs also some functions from this)

 

-wear calculations (but the script of the wear actually works because the sexual stats are updated l, if the player has sex, except wear)

 

There is something that blocks my script, i don't know if it's another mod or some papyrus mechanic that i don't know! 

I am working on it, tomorrow i have some free time and i will conduct more tests and do more fixes

 

I would definitely say something with script size.  The game locks up also if I exit straight to desktop instead of going to main menu.  This is something I encountered with conqueror SS … not sure what happened... :)

 

Thanks for your help.  I had posted last time and it worked beautifully... that my PC was a meat bag in the settlements!  I know you will find figure it out, brother.

 

For now, I have to uninstall because I have 100 lust and nothing triggers the mechanism I have sex to eliminate that!   :) .. the debuffs killing me at the moment!

 

John

 

EDIT:  I am doing a fresh install and will only do vanilla with AAF stuff and MCG... then add others to see if it is AAF related... I will let you know what I find out... I will load Sanctuary with people to give plenty of opportunity to test.  Then rigoursly find it.. I just hope it is not a standard mod like CBBE, etc.. 

Link to comment
20 minutes ago, MrCruelJohn said:

 

I would definitely say something with script size.  The game locks up also if I exit straight to desktop instead of going to main menu.  This is something I encountered with conqueror SS … not sure what happened... :)

 

Thanks for your help.  I had posted last time and it worked beautifully... that my PC was a meat bag in the settlements!  I know you will find figure it out, brother.

 

For now, I have to uninstall because I have 100 lust and nothing triggers the mechanism I have sex to eliminate that!   :) .. the debuffs killing me at the moment!

 

John

 

EDIT:  I am doing a fresh install and will only do vanilla with AAF stuff and MCG... then add others to see if it is AAF related... I will let you know what I find out... I will load Sanctuary with people to give plenty of opportunity to test.  Then rigoursly find it.. I just hope it is not a standard mod like CBBE, etc.. 

I don't think it's AAF related, i think it's just my script that it is too big atm, i am working on it...we'll see!

Link to comment
1 minute ago, anghelos92 said:

I don't think it's AAF related, i think it's just my script that it is too big atm, i am working on it...we'll see!

No, I meant another AAF related mod - prostitution, RSE II, sexual harassment, etc... It will be a good base game for me to try out and see what I find... so it will be ready for your update!  :)

 

yours being broken now just makes my RP not what it can be soon... so it is worth it for me to test and "help if I can" (Nora). 

John

Link to comment
7 minutes ago, fred200 said:

I have to say I don't think the size of your script matters at all.

Minimize code executed per activation and minimize how often it runs.

How it is packaged should not matter. Your specific problem sounds like a deadlock, or a semaphore being held and not released.

A good read (from 2012 Skyrim) that still applies is:

http://www.gamesas.com/best-practices-papyrus-t291375.html

 

Thanks i will give it a look! :)

Link to comment
12 hours ago, anghelos92 said:

There is something that blocks my script, i don't know if it's another mod or some papyrus mechanic that i don't know! 

I am working on it, tomorrow i have some free time and i will conduct more tests and do more fixes

I'd just like to add in that I've also been having similar problems as well. 

 

Approach has been non-existent, and cannot initiate sex with lover as well, and because of that my character's lust level is high and cannot be resolved. As a result, my stats are low.

 

If I use AAF SEU, my lust still doesn't get affected, so it seems I'm stuck at this phase for now.

Link to comment
14 minutes ago, kujoe said:

I'd just like to add in that I've also been having similar problems as well. 

 

Approach has been non-existent, and cannot initiate sex with lover as well, and because of that my character's lust level is high and cannot be resolved. As a result, my stats are low.

 

If I use AAF SEU, my lust still doesn't get affected, so it seems I'm stuck at this phase for now.

Yes thanks for reporting, the anghelossexcontrollerscript which is the interface between MCG and AAF and that also controls a parte check for enslavment is currently failing, probably it enters a low priority state because VM block it for the too many calls, i will spoit it into two. For the moment you can either disable MCG or disable the lust system so that at next timer it will be reset to 0 or anyway it will stop the lust effects from being.

 

Edit:>>> just for statistics, do you have sim settlements conqueror installed?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use