hereami Posted March 23, 2023 Share Posted March 23, 2023 (edited) Why not handle it in one single package? Stacked Travels, for example. Meaning, Branch - Stacked and multiple Travel Procedures in it, not Packages, of course. Edited March 23, 2023 by hereami Link to comment Share on other sites More sharing options...
pepperman35 Posted March 23, 2023 Author Share Posted March 23, 2023 Also, re marriage, I noticed that the game has relationships defined in plugins: spouse, mother, father, child, etc.Unfortunately, there is not a way to change them from script. And from what I gathered at the time, even marriage in Skyrim is completely script based and doesn't work with these relationships. And for the sermon (and town hall meeting) start mechanic, I made it like so: - Timer is started- NPCs are called in- Either all NPCs have taken a seat, or the timer expires.- NPCs not seated yet are moved to the church and snapped into interaction (pews).- Meeting begins / Pastor is being called. The process can be triggered from the mic on the lectern for the meeting, or by some other means - Like a scheduler event set to occur on Sundays at 9:00 game time, for the sermon.I think there is also some mechanic from the settler bell script that makes faraway NPCs run instead of walk to the church.I set mine up in a similar fashion. I put a control panel with microphone on top of the lectern, which is an activator. I use this to play the church bells and the summon congregation via the story manager event. A travel/sit package was put onto the NPC alias, and the speed was set to fast walk cause of the settlement's size. Haven't yet figured out a way to monitor if all or the majority of the NPCs are seated. I have a Bible (activator) sitting a top the lectern which I am using to call the pastor. When the pastor loads into the lectern (furniture) it kicks off his dialogue quest. He delivers his sermon then leaves. The last phase of the the sermon scene kicks off the timer which will dismiss the congregation and play a hymn. It roughly dismisses them as he clears the church building. Currently working on trying to force the player into a pew, and disable his controls. I liked the idea of immobilizing him during the sermon, sitting preferred but may have to resort to standing. Moveto forces him into the furniture easy enough but for whatever reason player controls are not disabled. Have tried a travel/sit package on the player alias to force them into the pew but have not been successful in getting him to sit. Also, I am exploring a reward for listening to the sermon. Link to comment Share on other sites More sharing options...
niston Posted March 23, 2023 Share Posted March 23, 2023 If you have an array/refcolalias of settlers to seat, you can use GetSitState() on them. Perk: Divine Inspiration, +3CHR +3END for 12 hours ingame time. I think you can block playercontrols with enableinputlayers or whatever its called. And you might have to create a sit idle that you can play on the player char. Link to comment Share on other sites More sharing options...
pepperman35 Posted March 23, 2023 Author Share Posted March 23, 2023 Thanks for the tips. Divine Inspiration sounds perfect for this scenario. I will investigated GetSitState(). I tried the following. It will disable the player controls, but the AI travel/sit package, which is placed on the player alias, does seem have any effect. InputEnableLayer myLayer = InputEnableLayer.Create()myLayer.DisablePlayerControls())game.ForceThirdPerson()game.SetPlayerAIDriven(true)Alias_Player.GetActorReference().EvaluatePackage() Link to comment Share on other sites More sharing options...
pepperman35 Posted March 26, 2023 Author Share Posted March 26, 2023 Still investigating how to implement "Divine Inspiration" and GetSitState(). Here the script to date: Scriptname Bart:SermonSceneSupportScript extends Quest ; / Script placed on the pastors dialogue quest ; ╔═════════════════════════════════════════════════╗ ; ║ Properties ║ ; ╚═════════════════════════════════════════════════╝ Quest Property FO4_SummonCongregationQuest Auto Const Mandatory GlobalVariable Property FO4_PastorSummonState Auto Const Mandatory ReferenceAlias Property Alias_FemaleWorshiper Auto Const Mandatory ReferenceAlias Property Alias_FO4_WorshipperMale01 Auto Const Mandatory ReferenceAlias Property Alias_FO4_WorshipperMale02 Auto Const Mandatory ReferenceAlias Property Alias_PastorAllen Auto Const Mandatory ReferenceAlias Property Alias_Player Auto Const Mandatory ReferenceAlias Property FemaleWorshipperOrigin Auto Const Mandatory ReferenceAlias Property MaleWorshipper01Origin Auto Const Mandatory ReferenceAlias Property MaleWorshipper02Origin Auto Const Mandatory ObjectReference Property FO4_FemaleWorshipperMarker Auto Const Mandatory ObjectReference Property FO4_WorshipperMaleMarker01 Auto Const Mandatory ObjectReference Property FO4_WorshipperMaleMarker02 Auto Const Mandatory ObjectReference Property FO4_MusicMarker01 Auto Const Mandatory ObjectReference Property FO4_PlayerPew Auto Const Mandatory Sound Property FO4_ChurchMusic01 Auto Const Mandatory InputEnableLayer Property SermonInputLayer Auto Hidden Function ForcePlayertoSit() ; After requesting a word from the Lord this function is called to place two ; invisible players into the scence for sound bytes. The function will also ; force the player into a chuch pew and disable their controls ; Move the male and female NPC worshippers into the scene and turn them invisible Alias_FemaleWorshiper.GetReference().moveto(FO4_FemaleWorshipperMarker) Alias_FemaleWorshiper.GetActorReference().SetAlpha(0.0) Alias_FO4_WorshipperMale01.GetReference().moveto(FO4_WorshipperMaleMarker01) Alias_FO4_WorshipperMale01.GetActorReference().SetAlpha(0.0) Alias_FO4_WorshipperMale02.GetReference().moveto(FO4_WorshipperMaleMarker02) Alias_FO4_WorshipperMale02.GetActorReference().SetAlpha(0.0) ; ; Move the player and force him into a church pew ; Alias_Player.GetReference().moveto(FO4_PlayerPew) ; ; Disable player controls so that he remains seated throughout the sermon ; SermonInputLayer = InputEnableLayer.Create() SermonInputLayer.DisablePlayerControls() game.ForceFirstPerson() ; Memo: Not sure if the next two lines are needed as we are forcing the player into the pew ; via moveto. Could not get the travel/sit AI package to work. game.SetPlayerAIDriven(true) Alias_Player.GetActorReference().EvaluatePackage() ; Give a little bit of time to ensure the player get loaded into the pew then block activation Utility.Wait(1.0) FO4_PlayerPew.BlockActivation(true, true) EndFunction Function DismissCongregration() ; This function is called after the pastor finishes his sermon. It serves to ; dismiss the congregration, return the invisible worshippers to their ; holding cell and returns control ; to the player ; ; Dismiss the congregration ; FO4_SummonCongregationQuest.SetStage(20) ; ; Play some church music ; FO4_ChurchMusic01.play(FO4_MusicMarker01) ; ; Return the pastor to his house ; FO4_PastorSummonState.SetValue(0 as float) Alias_PastorAllen.GetActorReference().EvaluatePackage() ; ; Return NPC stand-in workshipers to their holding cell ; Alias_FemaleWorshiper.GetReference().moveto(FemaleWorshipperOrigin.GetReference()) Alias_FemaleWorshiper.GetActorReference().SetAlpha(1.0) Alias_FO4_WorshipperMale01.GetReference().moveto(MaleWorshipper01Origin.GetReference()) Alias_FO4_WorshipperMale01.GetActorReference().SetAlpha(1.0) Alias_FO4_WorshipperMale02.GetReference().moveto(MaleWorshipper02Origin.GetReference()) Alias_FO4_WorshipperMale02.GetActorReference().SetAlpha(1.0) ;enable player controls SermonInputLayer.EnablePlayerControls() Game.SetPlayerAIDriven(false) SermonInputLayer.delete() SermonInputLayer = None FO4_PlayerPew.BlockActivation(false) EndFunction Link to comment Share on other sites More sharing options...
pepperman35 Posted April 13, 2023 Author Share Posted April 13, 2023 Re the church bells, here's a little trick I used: There are two bell sounds playing at once.I created custom sound output models for them: One is clear and loud and the other is attenuated and muffled by lowpass and/or bandpass filtering (don't remember but either one should work). The loud and clear version has a sound category assigned that gets silenced when the player is inside a fake interior. This version completely overpowers the muffled version when you're in the settlement exterior. But all the opened up buildings in Concord are fake interiors, so... when you go inside one of the buildings, the loud/clear bell sound gets silenced by the game and you only hear the attenuated/filtered version - as you would experience it when entering a real building. The game even does a little fade-in/out on the silenced categories, so it feels like a crossfade in game. For the immersion!Love the effect niston. Link to comment Share on other sites More sharing options...
Recommended Posts