Skip to content

Commit

Permalink
tweaks and fixes and option to respawn naked only ifter rob and getti…
Browse files Browse the repository at this point in the history
…ng harassed.
  • Loading branch information
mort65 committed Jul 28, 2024
1 parent c4b9e0e commit ab31113
Show file tree
Hide file tree
Showing 24 changed files with 193 additions and 91 deletions.
Binary file modified Data/interface/translations/mrt_markofarkay se_chinese.txt
Binary file not shown.
Binary file modified Data/interface/translations/mrt_markofarkay se_czech.txt
Binary file not shown.
Binary file modified Data/interface/translations/mrt_markofarkay se_english.txt
Binary file not shown.
Binary file modified Data/interface/translations/mrt_markofarkay se_french.txt
Binary file not shown.
Binary file modified Data/interface/translations/mrt_markofarkay se_german.txt
Binary file not shown.
Binary file modified Data/interface/translations/mrt_markofarkay se_italian.txt
Binary file not shown.
Binary file modified Data/interface/translations/mrt_markofarkay se_japanese.txt
Binary file not shown.
Binary file modified Data/interface/translations/mrt_markofarkay se_polish.txt
Binary file not shown.
Binary file modified Data/interface/translations/mrt_markofarkay se_russian.txt
Binary file not shown.
Binary file modified Data/interface/translations/mrt_markofarkay se_spanish.txt
Binary file not shown.
Binary file modified Data/mrt_MarkofArkay SE.bsa
Binary file not shown.
Binary file modified Data/mrt_MarkofArkay SE.esp
Binary file not shown.
1 change: 1 addition & 0 deletions Data/scripts/source/zzzmoaitemcursescript.psc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ zzzmoaitemcheckerscriptH property ItemcheckerH auto
zzzmoaitemcheckerscriptI property ItemcheckerI auto
zzzmoaitemcheckerscriptJ property ItemcheckerJ auto
ObjectReference property LostItemsChest auto
ObjectReference property PrevLostItemsChest auto
MiscObject property MarkOfArkay auto
Faction property PlayerEnemyFaction auto
Actor property PlayerRef auto
Expand Down
3 changes: 1 addition & 2 deletions Data/scripts/source/zzzmoanpcscript.psc
Original file line number Diff line number Diff line change
Expand Up @@ -982,8 +982,6 @@ Bool Function bIsHostile(Actor ActorRef)
endif
elseif ActorRef.HasKeywordString("actortypeanimal")
return false
elseif ConfigMenu.bMoralityMatters && (ActorRef.GetActorValue("Morality") > 2)
return false
endif
if (ReviveScript.Attacker && (ReviveScript.Attacker == ActorRef))
return true
Expand Down Expand Up @@ -1011,6 +1009,7 @@ Bool function bCanSteal(Actor ActorRef)

if bIsDying(ActorRef) || ActorRef.IsDisabled() || bRejected
elseif !bIsHostile(ActorRef)
elseif ConfigMenu.bMoralityMatters && (ActorRef.GetActorValue("Morality") > 2)
elseif theActorBase.isUnique()
elseif bIsFollower(ActorRef)
elseif isActorChild(ActorRef)
Expand Down
94 changes: 58 additions & 36 deletions Data/scripts/source/zzzmoarapescript.psc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ Scriptname zzzmoarapescript extends Quest

import zzzmoautilscript

FormList property BedsList auto
zzzmoa_npc_pacifier_quest_script property pacifierScript auto
zzzmoaReviveMCM property ConfigMenu auto
FormList property BedsList auto
GlobalVariable property CreatureRape auto
Form[] property Equipment auto Hidden
Quest property NPCPacifier auto
Expand All @@ -20,7 +21,6 @@ ReferenceAlias property Rapist6 auto
ReferenceAlias property Rapist7 auto
ReferenceAlias property Rapist8 auto
ReferenceAlias property Rapist9 auto
FormList property RapistsList auto
zzzmoaReviverScript property ReviveScript auto
ReferenceAlias property Victim1 auto
ReferenceAlias property Victimized01 auto
Expand All @@ -29,6 +29,8 @@ Bool property bIsBusy=False auto Hidden
Faction property calmFaction auto
Actor property playerRef auto
String property sAnimInterface Auto Hidden
Formlist Property RapistsList Auto
FormList property PrevRapists auto

event OnInit()
RegisterForModEvent("MOA_Int_PlayerLoadsGame", "On_MOA_Int_PlayerLoadsGame")
Expand Down Expand Up @@ -199,7 +201,25 @@ function Unpacify()
endif
Rapist10.Clear()
endif
(NPCPacifier As zzzmoa_npc_pacifier_quest_script).Unpacify()

int i = PrevRapists.GetSize()
while i > 0
i -= 1
act = PrevRapists.getAt(i) As actor
if act
act.RemoveFromFaction(calmFaction)
if ConfigMenu.bPUOK
ActorUtil.RemovePackageOverride(act, pacifierScript.RapistCheerPackage)
ActorUtil.RemovePackageOverride(act, pacifierScript.RapistStayPackage)
ActorUtil.RemovePackageOverride(act, pacifierScript.RapistWaitPackage)
ActorUtil.RemovePackageOverride(act, pacifierScript.RapistApproachPackage)
endif
act.EvaluatePackage()
endif
endwhile
PrevRapists.revert()

pacifierScript.Unpacify()
endfunction

Actor[] function fixActorArray(Actor[] Actors, Bool bRandomLen=False)
Expand Down Expand Up @@ -275,20 +295,21 @@ String function getInterface()
return ""
endfunction

Actor[] function getRapists(Actor Victim, Actor Attacker, Bool bReset=False)
Actor[] function getRapists(Actor Victim, Actor Attacker)
Actor[] rapists
if (!Attacker || (Attacker == None) || (Attacker.GetDistance(Victim) > 5000.0))
return rapists
endif
if bReset
Unpacify()
keepControlsDisabled(1.0, true, true, true, false, true, true, true, false, true)
endif
;if bReset
; clearRapists()
; keepControlsDisabled(1.0, true, true, true, false, true, true, true, false, true)
;endif
Bool bCreature = False
if ConfigMenu.bAllowCreatureRape
bCreature = ((sAnimInterface == "sexlab") && !Attacker.HasKeywordString("actortypenpc") && ReviveScript.SexLabInterface.IsCreaturesAllowed() && ReviveScript.SexLabInterface.AllowedCreature(Attacker.GetLeveledActorBase().GetRace()))
endif
CreatureRape.SetValueInt(bCreature As Int)
stopandconfirm(NPCPacifier)
NPCPacifier.Start()
rapists = new Actor[4]
rapists[0] = None
Expand Down Expand Up @@ -461,43 +482,44 @@ Function addRapistActor(actor rapistActor, actor victimActor, Bool bExtra = Fals
rapistActor.EvaluatePackage()
endfunction

Function storeRapist(Actor rapist)
if rapist && !PrevRapists.hasform(rapist)
PrevRapists.AddForm(rapist)
endif
endfunction

Function clearRapists()
;if aliasNotHere(Rapist1)
storeRapist(Rapist1.getActorReference())
Rapist1.Clear()
;endif
;if aliasNotHere(Rapist2)
storeRapist(Rapist2.getActorReference())
Rapist2.Clear()
;endif
;if aliasNotHere(Rapist3)
storeRapist(Rapist3.getActorReference())
Rapist3.Clear()
;endif
;if aliasNotHere(Rapist4)

storeRapist(Rapist4.getActorReference())
Rapist4.Clear()
;endif
;if aliasNotHere(Rapist5)

storeRapist(Rapist5.getActorReference())
Rapist5.Clear()
;endif
;if aliasNotHere(Rapist6)

storeRapist(Rapist6.getActorReference())
Rapist6.Clear()
;endif
;if aliasNotHere(Rapist7)

storeRapist(Rapist7.getActorReference())
Rapist7.Clear()
;endif
;if aliasNotHere(Rapist8)

storeRapist(Rapist8.getActorReference())
Rapist8.Clear()
;endif
;if aliasNotHere(Rapist9)

storeRapist(Rapist9.getActorReference())
Rapist9.Clear()
;endif
;if aliasNotHere(Rapist10)

storeRapist(Rapist10.getActorReference())
Rapist10.Clear()
;endif
endfunction

;Bool function aliasNotHere(ReferenceAlias aliasActor)
; Return aliasActor.getActorRef() && !aliasActor.getActorRef().Is3DLoaded()
;endfunction

Bool function rapePlayer(Actor[] rapists)
if (ReviveScript.moaPlayerGhostQuest.IsRunning() || !rapists || rapists.Length < 1)
return False
Expand All @@ -523,11 +545,11 @@ Bool function rapePlayer(Actor[] rapists)
PacifyNPC.SetValueInt(1)
Bool bSwim = False
bSwim = PlayerRef.IsSwimming() || (ConfigMenu.bPO3Ok && (PO3_SKSEFunctions.IsActorUnderwater(PlayerRef) || PO3_SKSEFunctions.IsActorInWater(PlayerRef)))
if bSwim || (sAnimInterface != "sexlab")
if bSwim
ObjectReference bedRef = FindBed(playerRef as ObjectReference, 2000.0)
if bedRef
playerRef.SetPosition(bedRef.GetPositionX(), bedRef.GetPositiony(), bedRef.GetPositionz() + 5.0)
elseif bSwim
else
ConfigMenu.bIsLoggingEnabled && Debug.trace("MarkOfArkay: Player Can't be raped while swimming.")
return False
endif
Expand All @@ -547,7 +569,7 @@ Bool function rapePlayer(Actor[] rapists)
NPCPacifier.Start()
keepControlsDisabled(2.0, true, true, true, false, true, true, true, false, true)
endif
(NPCPacifier As zzzmoa_npc_pacifier_quest_script).ToggleTeamMates(False)
pacifierScript.ToggleTeamMates(False)
Actor extraRapist = None
Int i = PacifiedHostiles.GetSize()
while i > 0
Expand Down Expand Up @@ -689,7 +711,7 @@ Bool function rapePlayer(Actor[] rapists)
endwhile
result = ReviveScript.FlowerGirlsInterface.Result
endif
(NPCPacifier As zzzmoa_npc_pacifier_quest_script).ToggleTeamMates(True)
pacifierScript.ToggleTeamMates(True)
Game.DisablePlayerControls(abMovement=True, abFighting=True, abCamSwitch=True, abLooking=False, abSneaking=True, abMenu=True, abActivate=True, abJournalTabs=False)
Game.SetPlayerAIDriven(False)
Game.SetPlayerAIDriven(True)
Expand Down
18 changes: 18 additions & 0 deletions Data/scripts/source/zzzmoarevivemcm.psc
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ Bool property bRecallByArkayMark=False auto Hidden ;
Bool property bRespawnCounter=False auto Hidden
Bool property bRespawnMenu=False auto Hidden
Bool property bRespawnNaked=False auto Hidden
Bool Property bRespawnNakedOnlyIfRapedOrRobbed = False Auto Hidden
Bool[] property bRespawnPointsFlags auto Hidden
Bool property bResurrectActors=False auto Hidden
Bool property bRetrySpawnWithoutLocation=True auto Hidden
Expand Down Expand Up @@ -451,6 +452,7 @@ Int oidRespawnBlackListLocation
Int oidRespawnCounter
Int oidRespawnMenu
Int oidRespawnNaked
Int oidRespawnNakedOnlyIfRapedOrRobbed
Int oidRespawnPoint0
Int oidRespawnPoint1
Int oidRespawnPoint2
Expand Down Expand Up @@ -779,6 +781,9 @@ event OnOptionDefault(Int option)
elseif (option == oidRespawnNaked)
bRespawnNaked = False
_SetToggleOptionValue(oidRespawnNaked, bRespawnNaked)
elseif (option == oidRespawnNakedOnlyIfRapedOrRobbed)
bRespawnNakedOnlyIfRapedOrRobbed = False
_SetToggleOptionValue(oidRespawnNakedOnlyIfRapedOrRobbed, bRespawnNakedOnlyIfRapedOrRobbed)
elseif (option == oidCorpseAsSoulMark)
bCorpseAsSoulMark = False
_SetToggleOptionValue(oidCorpseAsSoulMark, bCorpseAsSoulMark)
Expand Down Expand Up @@ -1389,6 +1394,8 @@ event OnOptionHighlight(Int option)
SetInfoText("$mrt_MarkofArkay_DESC_RespawnPoint9")
elseif (option == oidRespawnNaked)
SetInfoText("$mrt_MarkofArkay_DESC_RespawnNaked")
elseif (option == oidRespawnNakedOnlyIfRapedOrRobbed)
SetInfoText("$mrt_MarkofArkay_DESC_RespawnNakedOnlyIfRapedOrRobbed")
elseif (option == oidCorpseAsSoulMark)
SetInfoText("$mrt_MarkofArkay_DESC_CorpseAsSoulMark")
elseif (option == oidRespawnMenu)
Expand Down Expand Up @@ -2078,6 +2085,9 @@ event OnOptionSelect(Int option)
elseif (option == oidRespawnNaked)
bRespawnNaked = !bRespawnNaked
_SetToggleOptionValue(oidRespawnNaked, bRespawnNaked)
elseif (option == oidRespawnNakedOnlyIfRapedOrRobbed)
bRespawnNakedOnlyIfRapedOrRobbed = !bRespawnNakedOnlyIfRapedOrRobbed
_SetToggleOptionValue(oidRespawnNakedOnlyIfRapedOrRobbed, bRespawnNakedOnlyIfRapedOrRobbed)
elseif (option == oidCorpseAsSoulMark)
bCorpseAsSoulMark = !bCorpseAsSoulMark
_SetToggleOptionValue(oidCorpseAsSoulMark, bCorpseAsSoulMark)
Expand Down Expand Up @@ -3309,6 +3319,12 @@ event OnPageReset(String page)
flags = OPTION_FLAG_DISABLED
endif
oidRespawnNaked = AddToggleOption("$mrt_MarkofArkay_RespawnNaked", bRespawnNaked, flags)
if ((moaState.getValue() == 1) && (iNotTradingAftermath == 1) && bRespawnNaked)
flags = OPTION_FLAG_NONE
else
flags = OPTION_FLAG_DISABLED
endif
oidRespawnNakedOnlyIfRapedOrRobbed = AddToggleOption("$mrt_MarkofArkay_RespawnNakedOnlyIfRapedOrRobbed", bRespawnNakedOnlyIfRapedOrRobbed, flags)
oidJail = AddToggleOption("$mrt_MarkofArkay_Jail", bSendToJail, flags)
oidShowRaceMenu = AddToggleOption("$mrt_MarkofArkay_ShowRaceMenu", bShowRaceMenu, flags)
oidKillIfCantRespawn = AddToggleOption("$mrt_MarkofArkay_KillIfCantRespawn", bKillIfCantRespawn, flags)
Expand Down Expand Up @@ -5100,6 +5116,7 @@ Bool function bLoadUserSettings(String sFileName)
iNotTradingAftermath = checkInt(fiss.loadInt("iNotTradingAftermath"), 0, sGetAftermathOptions().Length - 1, 1)
iArkayCurse = checkInt(fiss.loadInt("iArkayCurse"), 0, sGetArkayCurses().Length - 1, 0)
bRespawnNaked = fiss.loadBool("bRespawnNaked")
bRespawnNakedOnlyIfRapedOrRobbed = fiss.loadBool("bRespawnNakedOnlyIfRapedOrRobbed")
bCorpseAsSoulMark = fiss.loadBool("bCorpseAsSoulMark")
bSendToJail = fiss.loadBool("bSendToJail")
bKillIfCantRespawn = fiss.loadBool("bKillIfCantRespawn")
Expand Down Expand Up @@ -5372,6 +5389,7 @@ bool function bSaveUserSettings(String sFileName)
fiss.saveInt("iNotTradingAftermath", iNotTradingAftermath)
fiss.saveInt("iArkayCurse", iArkayCurse)
fiss.saveBool("bRespawnNaked", bRespawnNaked)
fiss.saveBool("bRespawnNakedOnlyIfRapedOrRobbed", bRespawnNakedOnlyIfRapedOrRobbed)
fiss.saveBool("bCorpseAsSoulMark", bCorpseAsSoulMark)
fiss.saveBool("bSendToJail", bSendToJail)
fiss.saveBool("bKillIfCantRespawn", bKillIfCantRespawn)
Expand Down
Loading

0 comments on commit ab31113

Please sign in to comment.