Skip to content

Commit

Permalink
Update to V1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SCLeoX committed Jan 17, 2021
1 parent 59deebb commit 5c81b87
Show file tree
Hide file tree
Showing 11 changed files with 365 additions and 60 deletions.
2 changes: 1 addition & 1 deletion dhrArcadiaRef.psc
Expand Up @@ -5,6 +5,6 @@ dhrCore Property dhr Auto
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, Bool abPowerAttack, Bool abSneakAttack, Bool abBashAttack, Bool abHitBlocked)
If akAggressor == dhr.zadQuest.PlayerRef && dhr.dhr_trainingQuest.internalStage != 0
Debug.Notification("Arcadia shocks you with the training belt.")
dhr.ShockPlayer(60, False)
dhr.ShockPlayer(60, respectHpDrainReservationRatio = False, vaginalShock = True, analShock = True)
EndIf
EndEvent
184 changes: 181 additions & 3 deletions dhrConfigMenu.psc
Expand Up @@ -84,9 +84,11 @@ Event OnPageReset(String currentPage)
EndIf
ElseIf currentPage == "Skills"
dhr.dhr_vaginalHeatResistanceSkill.MCMReset(self)
dhr.dhr_vaginalColdResistanceSkill.MCMReset(self)
dhr.dhr_analHeatResistanceSkill.MCMReset(self)
dhr.dhr_vaginalColdResistanceSkill.MCMReset(self)
dhr.dhr_analColdResistanceSkill.MCMReset(self)
dhr.dhr_vaginalShockResistanceSkill.MCMReset(self)
dhr.dhr_analShockResistanceSkill.MCMReset(self)
ElseIf currentPage == "Training Quest"
AddHeaderOption("General")
AddEmptyOption()
Expand Down Expand Up @@ -138,7 +140,9 @@ Event OnPageReset(String currentPage)
AddTemperatureOptionST("OptionExpGainingThreshold", False, "EXP gaining threshold", dhr.expGainingThreshold)
AddSliderOptionST("OptionExpGainingMultiplier", "EXP gaining multiplier", dhr.expGainingMultiplier, "x{1}")
AddTemperatureOptionST("OptionSkillEffectiveness", False, "Skill effectiveness", dhr.skillEffectiveness)
AddEmptyOption()
AddToggleOptionST("OptionDisableSkillLevelCap", "Disable level cap", dhr.dhr_disableSkillLevelCap.GetValueInt())
AddSliderOptionST("OptionResistancePercentagePerSkillLevel", "Resistance % per level", dhr.resistancePercentagePerSkillLevel, "{1}%")
AddSliderOptionST("OptionMaxResistancePercentagePerOrifice", "Max resistance % per orifice", dhr.maxResistancePercentagePerOrifice, "{1}%")

AddHeaderOption("Volume")
AddEmptyOption()
Expand All @@ -157,6 +161,10 @@ Event OnPageReset(String currentPage)

AddHeaderOption("Training Quest")
AddEmptyOption()

AddSliderOptionST("OptionTrainingCheckupWaitingTime", "Checkup waiting time", dhr.trainingCheckupWaitingTimeHours, "{1} hours")
AddSliderOptionST("OptionTimedTrialMultiplier", "Timed trial multiplier", dhr.trainingTimedTrialMultiplier, "x{1}")

AddTemperatureOptionST("OptionTrainingBaseTemperatureDiff", False, "Base temperature difference", dhr.trainingBaseTemperatureDiff)
AddTemperatureOptionST("OptionTrainingStressTemperatureAdditionalDiff", False, "Stress additional temperature difference", dhr.trainingStressTemperatureAdditionalDiff)

Expand All @@ -179,10 +187,14 @@ Event OnPageReset(String currentPage)
AddSliderOptionST("OptionTrainingRandomVibrationProbability", "Random vibration probability", dhr.trainingRandomVibrationProbability, "{3}")
AddEmptyOption()

AddSliderOptionST("OptionTrainingExpGainingMultiplier", "EXP gaining multiplier when training", dhr.trainingExpGainingMultiplier, "x{1}")
AddEmptyOption()

AddHeaderOption("Miscellaneous")
AddEmptyOption()
AddSliderOptionST("OptionInitialShowNotificationCountdown", "Temperature notification countdown", dhr.initialShowNotificationCountdown, "{0}")
AddToggleOptionST("OptionEnableDebugDialogue", "Enable debug dialogue", dhr_enableDebugDialogue.GetValueInt())
AddToggleOptionST("OptionRemoveLockedPlugsUponUnequipping", "Remove locked plugs upon unequipping", dhr.removeLockedPlugsUponUnequipping)
ElseIf currentPage == "About"
AddHeaderOption("Devious Heatrise")
AddEmptyOption()
Expand All @@ -205,9 +217,11 @@ EndEvent

Event OnOptionHighlight(Int option)
dhr.dhr_vaginalHeatResistanceSkill.MCMOnHighlight(self, option)
dhr.dhr_vaginalColdResistanceSkill.MCMOnHighlight(self, option)
dhr.dhr_analHeatResistanceSkill.MCMOnHighlight(self, option)
dhr.dhr_vaginalColdResistanceSkill.MCMOnHighlight(self, option)
dhr.dhr_analColdResistanceSkill.MCMOnHighlight(self, option)
dhr.dhr_vaginalShockResistanceSkill.MCMOnHighlight(self, option)
dhr.dhr_analShockResistanceSkill.MCMOnHighlight(self, option)

Int giftPlugId = trainingQuestGiftPlugIds.Find(option)
If giftPlugId >= 0
Expand Down Expand Up @@ -266,10 +280,64 @@ State OptionEnableDebugDialogue
EndEvent
EndState

State OptionRemoveLockedPlugsUponUnequipping
Event OnSelectST()
dhr.removeLockedPlugsUponUnequipping = !dhr.removeLockedPlugsUponUnequipping
SetToggleOptionValueST(dhr.removeLockedPlugsUponUnequipping)
EndEvent
Event OnDefaultST()
dhr.removeLockedPlugsUponUnequipping = True
SetToggleOptionValueST(True)
EndEvent
Event OnHighlightST()
SetInfoText("Whether to remove the plug when unequipping a plug that has not been unlocked (not gifted by Arcadia). It is not recommended to disable this unless you want to skip the entire training quest.")
EndEvent
EndState



; Training Quest

State OptionTrainingCheckupWaitingTime
Event OnSliderOpenST()
SetSliderDialogStartValue(dhr.trainingCheckupWaitingTimeHours)
SetSliderDialogDefaultValue(48)
SetSliderDialogRange(2, 100)
SetSliderDialogInterval(0.1)
EndEvent
Event OnSliderAcceptST(Float value)
dhr.trainingCheckupWaitingTimeHours = value
SetSliderOptionValueST(value, "{1} hours")
EndEvent
Event OnDefaultST()
dhr.trainingCheckupWaitingTimeHours = 48
SetSliderOptionValueST(48, "{1} hours")
EndEvent
Event OnHighlightST()
SetInfoText("Minimum number of hours to wait between two checkups. Changing this will not affect the timer that is already running. NOTE: Due to limitations of Skyrim, the dialogue with Arcadia will continue to say 48 hours even if this value is changed.")
EndEvent
EndState

State OptionTimedTrialMultiplier
Event OnSliderOpenST()
SetSliderDialogStartValue(dhr.trainingTimedTrialMultiplier)
SetSliderDialogDefaultValue(1)
SetSliderDialogRange(0.1, 5)
SetSliderDialogInterval(0.1)
EndEvent
Event OnSliderAcceptST(Float value)
dhr.trainingTimedTrialMultiplier = value
SetSliderOptionValueST(value, "x{1}")
EndEvent
Event OnDefaultST()
dhr.trainingTimedTrialMultiplier = 1
SetSliderOptionValueST(1, "x{1}")
EndEvent
Event OnHighlightST()
SetInfoText("The multiplier for the time of all timed trials (teasing vibrations, random shocks, sleep deprivation, etc.). NOTE: Due to limitations of Skyrim, the dialogue with Arcadia will not reflect this multiplier. For example if you set this to x0.5, and choose the trial \"teasing vibration for 6 hours\", in actuality, you will only be teased for 3 hours.")
EndEvent
EndState

State OptionTrainingBaseTemperatureDiff
Event OnSliderOpenST()
OnTemperatureSliderOpenST(False, dhr.trainingBaseTemperatureDiff, 15, 0, 50)
Expand Down Expand Up @@ -534,6 +602,26 @@ State OptionTrainingRandomVibrationProbability
EndEvent
EndState

State OptionTrainingExpGainingMultiplier
Event OnSliderOpenST()
SetSliderDialogStartValue(dhr.trainingExpGainingMultiplier)
SetSliderDialogDefaultValue(2)
SetSliderDialogRange(0, 5)
SetSliderDialogInterval(0.1)
EndEvent
Event OnSliderAcceptST(Float value)
dhr.trainingExpGainingMultiplier = value
SetSliderOptionValueST(value, "x{1}")
EndEvent
Event OnDefaultST()
dhr.trainingExpGainingMultiplier = 2
SetSliderOptionValueST(dhr.trainingExpGainingMultiplier, "x{1}")
EndEvent
Event OnHighlightST()
SetInfoText("Additional multiplicative multiplier for EXP gaining rate when using the training plugs. (For example, if you set the regular EXP gaining multiplier to 2 and this to 3, you will get 2x EXP when not training, but 6x EXP when using the training plugs.)")
EndEvent
EndState

; Volume

State OptionVibrationSoundVolumeUseDD
Expand Down Expand Up @@ -668,6 +756,96 @@ State OptionSkillEffectiveness
EndEvent
EndState

Function ReEnableSkillLevelCap()
If ShowMessage("You are about to re-enable skill level cap. If your current level is higher than what is allowed at current transcend level, your level might be lost. Are you sure you want to continue?")
dhr.dhr_disableSkillLevelCap.SetValueInt(0)
EndIf
EndFunction

Function UpdateSkillsReadyToTranscendIndicator()
dhr.dhr_analHeatResistanceSkill.UpdateState()
dhr.dhr_vaginalHeatResistanceSkill.UpdateState()
dhr.dhr_analColdResistanceSkill.UpdateState()
dhr.dhr_vaginalColdResistanceSkill.UpdateState()
dhr.dhr_analShockResistanceSkill.UpdateState()
dhr.dhr_vaginalShockResistanceSkill.UpdateState()
EndFunction

State OptionDisableSkillLevelCap
Event OnSelectST()
If dhr.dhr_disableSkillLevelCap.GetValueInt()
ReEnableSkillLevelCap()
Else
dhr.dhr_disableSkillLevelCap.SetValueInt(1)
EndIf
SetToggleOptionValueST(dhr.dhr_disableSkillLevelCap.GetValueInt())
UpdateSkillsReadyToTranscendIndicator()
EndEvent
Event OnDefaultST()
If dhr.dhr_disableSkillLevelCap.GetValueInt()
ReEnableSkillLevelCap()
SetToggleOptionValueST(False)
UpdateSkillsReadyToTranscendIndicator()
EndIf
EndEvent
Event OnHighlightST()
SetInfoText("Whether to disable level cap (which can be increased via transcending). Level cap is a way of making the mod more replayable within the same save file. It is not recommended to change this setting.")
EndEvent
EndState

Function UpdateSkillsSpells()
dhr.dhr_analHeatResistanceSkill.UpdateSpell()
dhr.dhr_vaginalHeatResistanceSkill.UpdateSpell()
dhr.dhr_analColdResistanceSkill.UpdateSpell()
dhr.dhr_vaginalColdResistanceSkill.UpdateSpell()
dhr.dhr_analShockResistanceSkill.UpdateSpell()
dhr.dhr_vaginalShockResistanceSkill.UpdateSpell()
EndFunction

State OptionResistancePercentagePerSkillLevel
Event OnSliderOpenST()
SetSliderDialogStartValue(dhr.resistancePercentagePerSkillLevel)
SetSliderDialogDefaultValue(1)
SetSliderDialogRange(0, 10)
SetSliderDialogInterval(0.1)
EndEvent
Event OnSliderAcceptST(Float value)
dhr.resistancePercentagePerSkillLevel = value
SetSliderOptionValueST(value, "{1}%")
UpdateSkillsSpells()
EndEvent
Event OnDefaultST()
dhr.resistancePercentagePerSkillLevel = 1
SetSliderOptionValueST(dhr.resistancePercentagePerSkillLevel, "{1}%")
UpdateSkillsSpells()
EndEvent
Event OnHighlightST()
SetInfoText("For each level of temperature/shock tolerance skill, how much elemental resistance (for combat) should the player character gain.")
EndEvent
EndState

State OptionMaxResistancePercentagePerOrifice
Event OnSliderOpenST()
SetSliderDialogStartValue(dhr.maxResistancePercentagePerOrifice)
SetSliderDialogDefaultValue(40)
SetSliderDialogRange(0, 100)
SetSliderDialogInterval(0.1)
EndEvent
Event OnSliderAcceptST(Float value)
dhr.maxResistancePercentagePerOrifice = value
SetSliderOptionValueST(value, "{1}%")
UpdateSkillsSpells()
EndEvent
Event OnDefaultST()
dhr.maxResistancePercentagePerOrifice = 40
SetSliderOptionValueST(dhr.maxResistancePercentagePerOrifice, "{1}%")
UpdateSkillsSpells()
EndEvent
Event OnHighlightST()
SetInfoText("How much elemental resistance (for combat) can a temperature/shock tolerance skill give for each orifice.")
EndEvent
EndState

; Stamina Drain

State OptionStaminaDrainThreshold
Expand Down
47 changes: 40 additions & 7 deletions dhrCore.psc
Expand Up @@ -43,6 +43,9 @@ GlobalVariable Property dhr_msgShowEnableTortureMode Auto
GlobalVariable Property dhr_msgShowTortureInProgress Auto
GlobalVariable Property dhr_msgShowEdgingInProgress Auto

; Other global variables
GlobalVariable Property dhr_disableSkillLevelCap Auto


; Keywords
Keyword Property dhr_heatingPlug Auto
Expand Down Expand Up @@ -72,7 +75,7 @@ dhrTrainingBeltScript Property currentTrainingBelt Auto
Float Property bodyTemperature = 36.5 AutoReadOnly
Float Property fastDeltaRatioPerTick = 0.6 AutoReadOnly
Float Property fastDeltaClearThreshold = 4.0 AutoReadOnly
String Property MOD_VERSION = "V1.0" AutoReadOnly
String Property MOD_VERSION = "V1.1" AutoReadOnly
Int Property MIGRATION_VERSION = 1 AutoReadOnly


Expand All @@ -81,6 +84,8 @@ dhrSkill Property dhr_analHeatResistanceSkill Auto
dhrSkill Property dhr_analColdResistanceSkill Auto
dhrSkill Property dhr_vaginalHeatResistanceSkill Auto
dhrSkill Property dhr_vaginalColdResistanceSkill Auto
dhrSkill Property dhr_vaginalShockResistanceSkill Auto
dhrSkill Property dhr_analShockResistanceSkill Auto


; Devices
Expand Down Expand Up @@ -123,6 +128,9 @@ Float Property staminaDrainReservationRatio = 0.1 Auto
Float Property expGainingThreshold = 10.0 Auto
Float Property expGainingMultiplier = 1.0 Auto

Float Property resistancePercentagePerSkillLevel = 1.0 Auto
Float Property maxResistancePercentagePerOrifice = 40.0 Auto

Bool Property vibrationSoundVolumeUseDD = True Auto
Float Property vibrationSoundVolumeOverride = 1.0 Auto
Bool Property moanSoundVolumeUseDD = True Auto
Expand All @@ -149,12 +157,17 @@ Float Property trainingEdgingVibrationIntensityMax = 1.0 Auto
Float Property trainingTeasingVibrationIntensityMin = 0.15 Auto
Float Property trainingTeasingVibrationIntensityMax = 0.30 Auto

Float Property trainingCheckupWaitingTimeHours = 48.0 Auto
Float Property trainingTimedTrialMultiplier = 1.0 Auto

Float Property trainingRandomVibrationProbability = 0.05 Auto
Float Property trainingExpGainingMultiplier = 2.0 Auto

Bool Property frostfallFreezingPreventPassOut = True Auto
Float Property frostfallExposurePerTempDiffPerTick = 0.2 Auto

Float Property initialShowNotificationCountdown = 100.0 Auto
Bool Property removeLockedPlugsUponUnequipping = True Auto

; The following two properties are for dealing with the training quest.

Expand Down Expand Up @@ -237,7 +250,7 @@ Event OnSleepStart(Float afSleepStartTime, Float afDesiredSleepEndTime)
Else
; Failed to start vibrations? It is ok, we can shock the player instead :D
Debug.MessageBox("As soon as you closed your eyes, the soulgems let out an extremely powerful electric shock, waking you up completely.")
ShockPlayer(40, True)
ShockPlayer(40, respectHpDrainReservationRatio = True, vaginalShock = True, analShock = True)
EndIf
; Interrupt sleep.
zadQuest.PlayerRef.MoveTo(zadQuest.PlayerRef)
Expand All @@ -261,8 +274,8 @@ EndEvent

; Drains the actor value to current - amount
Function DrainActorValueBy(Actor player, String actorValueName, Float amount, Float reservationRatio)
Float maxValue = player.GetActorValueMax(actorValueName)
Float currentValue = player.GetActorValue(actorValueName)
Float maxValue = currentValue / player.GetActorValuePercentage(actorValueName)
Float shouldBe = currentValue - amount
If shouldBe < maxValue * reservationRatio
; If lower than reserved value, bump the value up
Expand All @@ -277,8 +290,8 @@ EndFunction

; Drains the actor value to maxValue - amount
Function DrainActorValueToBy(Actor player, String actorValueName, Float amount, Float reservationRatio)
Float maxValue = player.GetActorValueMax(actorValueName)
Float currentValue = player.GetActorValue(actorValueName)
Float maxValue = currentValue / player.GetActorValuePercentage(actorValueName)
Float shouldBe = maxValue - amount
If shouldBe < maxValue * reservationRatio
; If lower than reserved value, bump the value up
Expand Down Expand Up @@ -388,17 +401,28 @@ Float Function MapPlugTemperature(Float actualTemperature, Bool isVaginal)
Return temperature
EndFunction

Function ShockPlayer(Float amount, Bool respectHpDrainReservationRatio)
Function ShockPlayer(Float amount, Bool respectHpDrainReservationRatio, Bool vaginalShock, Bool analShock)
Actor player = zadQuest.PlayerRef
If amount < 20
If vaginalShock && analShock
amount -= (dhr_vaginalShockResistanceSkill.level + dhr_analShockResistanceSkill.level) / 2
ElseIf vaginalShock
amount -= dhr_vaginalShockResistanceSkill.level
ElseIf analShock
amount -= dhr_analShockResistanceSkill.level
EndIf
If amount < 0
Debug.Notification("The plugs within you let out a weak electrical shock!")
Debug.Notification("Your shock resistance skills have completed neutralized the damage.")
amount = 0
ElseIf amount < 20
Debug.Notification("The plugs within you let out a painful electrical shock!")
ElseIf amount < 40
Debug.Notification("The plugs within you let out a very painful electrical shock!")
Else
Debug.Notification("The plugs within you let out an extremely painful electrical shock!")
EndIf
; Somehow this creates two threads and the two effects will run at the same time.
If shockCauseFallOver
If shockCauseFallOver && amount > 0
SendModEvent("dhr_shockPlayerEffect_1") ; Trip the player
EndIf
SendModEvent("dhr_shockPlayerEffect_2") ; Shock effect
Expand All @@ -407,6 +431,15 @@ Function ShockPlayer(Float amount, Bool respectHpDrainReservationRatio)
Else
DrainActorValueBy(player, "Health", amount, 0.0)
EndIf
If vaginalShock && analShock
; Split the experience
dhr_vaginalShockResistanceSkill.AddExp(amount / 20)
dhr_analShockResistanceSkill.AddExp(amount / 20)
ElseIf vaginalShock
dhr_vaginalShockResistanceSkill.AddExp(amount / 10)
ElseIf analShock
dhr_analShockResistanceSkill.AddExp(amount / 10)
EndIf
EndFunction

Event ShockPlayerEffect_1(String eventName, String strArg, Float numArg, Form sender)
Expand Down

0 comments on commit 5c81b87

Please sign in to comment.