enderalse/source/scripts/_00e_cqj05_functions.psc

213 lines
5.3 KiB
Plaintext

Scriptname _00E_CQJ05_Functions extends Quest
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function AddSilence()
_00E_SilenceLongTransitionHighPriority.Add()
EndFunction
Function RemoveSilence()
_00E_SilenceLongTransitionHighPriority.Remove()
EndFunction
Function AddJesparMusic()
_00E_SilenceLongTransitionHighPriority.Remove()
_00E_Music_Special_Character_Jespar.Add()
EndFunction
Function StartSC01()
Game.DisablePlayerControls(false, false, true, false, false, false, false)
Levelsystem.LockCamera()
PlayerREF.UnequipItem(PlayerREF.GetEquippedWeapon())
CQJ05_SC01_WakeUpSC.ForceStart()
EndFunction
Function AddMusic()
_00E_Music_Special_Character_Jespar.Remove()
_00E_SilenceLongTransitionHighPriority.Remove()
_00E_Music_Special_Romance.Add()
EndFunction
Function PlayKissAnimation()
_00E_QuestFunctions.EndWerewolfModeWhenTransformed()
If Player.GetRace() == HighElfRace
fPlayerScale = PlayerREF.GetScale()
PlayerREF.SetScale(1.0)
EndIf
If PlayerREF.GetEquippedShield() != None
PlayerREF.UnequipItem(PlayerREF.GetEquippedShield(), false, true)
EndIf
PlayerREF.EquipItem(_00E_InvisibleHelmet_Armor, false, true)
Utility.Wait(0.1)
PlayerREF.RemoveItem(_00E_InvisibleHelmet_Armor, 1, true)
Game.ForceThirdPerson()
Debug.ToggleMenus()
Debug.ToggleCollisions()
AudioCategoryMAG.Mute()
AudioCategorySFX.Mute()
Game.SetPlayerAIDriven(True)
Game.DisablePlayerControls(true, true, true, false, true, true, true, true)
If PlayerREF.IsWeaponDrawn()
PlayerREF.SheatheWeapon()
EndIf
Utility.Wait(0.5)
If Player.GetSex() == 0
PlayerREF.PlayIdleWithTarget(pa_Idle_Kiss_MaleMale, _00E_MC_JesparREF)
Else
_00E_MC_JesparREF.PlayIdleWithTarget(pa_Idle_Kiss_MaleFemale, PlayerREF)
EndIf
Utility.Wait(0.5)
_00E_MC_JesparREF.SetUnconscious(True)
;_00E_MC_JesparREF.SetUnconscious(True)
PlayerREF.AddSpell(_00E_Game_abSlowTime, false)
Utility.Wait(9)
FadeOut()
EndFunction
Function FadeOut()
JesparRomance.SetValueInt(1)
FadeToBlackIMOD.Apply()
Utility.Wait(2)
FadeToBlackHoldIMOD.ApplyCrossFade(1)
Utility.Wait(1)
PlayerREF.RemoveSpell(_00E_Game_abSlowTime)
_00E_QuestFunctions.PlayerAIWalk()
_00E_MC_JesparREF.SetUnconscious(False)
PlayerREF.SetUnconscious(False)
Debug.ToggleMenus()
Debug.ToggleCollisions()
if Player.GetRace() == HighElfRace
PlayerREF.SetScale(fPlayerScale)
endif
_00E_MC_JesparREF.MoveTo(MQ13a_StarshipBedREF)
_00E_MC_JesparREF.MoveTo(CQJ05_SC01_JesparLayMarker)
PlayerREF.MoveTo(MQ13a_StarshipBedREF)
PlayerREF.UnequipAll()
_00E_MC_JesparREF.UnequipAll()
Levelsystem.SkipTimeToHour(4.0)
CQJ05_SC03_ShipDoorREF.SetOpen(False)
CQJ05_SC03_ShipDoorREF.BlockActivation(True)
Levelsystem.UnlockCamera()
_00E_QuestFunctions.RefreshFace()
EndFunction
Function FadeBack()
String facegen = "bUseFaceGenPreprocessedHeads:General"
Utility.SetINIBool(facegen, False)
Game.GetPlayer().QueueNiNodeUpdate()
Utility.SetINIBool(facegen, True)
AudioCategoryMAG.Unmute()
AudioCategorySFX.Unmute()
FadeToBlackBackIMOD.ApplyCrossFade()
_00E_QuestFunctions.PlayerAIWalkStop()
Game.SetPlayerAIDriven(False)
Game.EnablePlayerControls()
_00E_QuestFunctions.RefreshFace()
EndFunction
Function Reequip()
FadeToBlackAndBackIMOD.Apply()
Utility.Wait(3)
_00E_MC_JesparREF.SetOutfit(_00E_MC_JesparOutfit)
SetStage(20)
MQ13a.SetStage(80)
EndFunction
Function GetIntoPosition()
If PlayerREF.IsWeaponDrawn()
PlayerREF.SheatheWeapon()
EndIf
EndFunction
Function CompleteAndGiveEP()
Levelsystem.GiveEP(__Config_iRewardEXP)
If _00E_AchievementsEnabled.GetValueInt() == 1
Game.UnlockAchievement("END_COMPLETE_JESPAR_01")
EndIf
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
float fPlayerScale
float fZoomDistanceMinBefore
float fZoomDistanceMaxBefore
Quest Property MQ13a Auto
Race Property HighElfRace Auto
int Property __Config_iRewardEXP = 500 Auto
_00E_QuestFunctions Property Levelsystem Auto
Actor Property _00E_MC_JesparREF Auto
Actor Property PlayerREF Auto
Armor Property _00E_InvisibleHelmet_Armor Auto
ActorBase Property Player Auto
Scene Property CQJ05_SC01_WakeUpSC Auto
Spell Property _00E_Game_abSlowTime Auto
Idle Property pa_Idle_Kiss_MaleMale Auto
Idle Property pa_Idle_Kiss_MaleFemale Auto
GlobalVariable Property JesparRomance Auto
GlobalVariable Property _00E_AchievementsEnabled Auto
SoundCategory Property AudioCategoryMAG Auto
SoundCategory Property AudioCategorySFX Auto
MusicType Property _00E_Music_Special_Romance Auto
MusicType Property _00E_SilenceLongTransitionHighPriority Auto
MusicType Property _00E_Music_Special_Character_Jespar Auto
Outfit Property _00E_MC_JesparOutfit Auto
ImageSpaceModifier Property FadeToBlackIMOD Auto
ImageSpaceModifier Property FadeToBlackHoldIMOD Auto
ImageSpaceModifier Property FadeToBlackBackIMOD Auto
ImageSpaceModifier Property FadeToBlackAndBackIMOD Auto
ObjectReference Property MQ13a_StarshipBedREF Auto
ObjectReference Property CQJ05_SC03_ShipDoorREF Auto
ObjectReference Property CQJ05_SC01_JesparLayMarker Auto