Lightningflash31 Posted August 27, 2023 Share Posted August 27, 2023 I started to create a mod that adds a timer to some of the main quests in the game. The first quest I started to experiment with was When Freedom Calls. Basically, I want the quest to go like this: If the player doesn't enter the Museum of Freedom (which is stage 20) within 10 in game day, the quest will fail (go to stage 300). Upon the failing mission, I want all the Minutemen actors in that given mission and their AI packs to be disabled.Then in the follow up mission, I want to have all the Minutemen's dead bodies in the room you were supposed to meet them in. Now to be on the safe side, I'll make a clone of all the npcs and remove their scripts. Lastly, I want Mama Murphy to be at Corvega with the raiders in the factory for when the follow up mission starts. Now I've followed how to set up a timer using Seddon's tutorial here: Fallout 4 Creation Kit Tutorial - Timer - YouTube I've also looked to see how the game does Minutemen radiant timed quests like the kidnapped settler or settlement defense one. Despite that, I'm still stumped as to how I'm supposed to code this mission. Any help would be greatly appreciated. Thanks! Link to comment Share on other sites More sharing options...
LarannKiar Posted August 27, 2023 Share Posted August 27, 2023 I haven't tested this code but you would need something like this: ScriptName YOURSCRIPTNAME extends Quest Const Quest Property WhenFreedomCalls Auto Const Event OnQuestInit() ; your mod added quest started ; register for the OnStageSet event of When Freedom Calls RegisterForRemoteEvent(WhenFreedomCalls, OnStageSet) EndEvent Event Quest.OnStageSet(Quest akSender, int auiStageID, int auiStageItem) ; remote event received If akSender == WhenFreedomCalls ; Player entered the Museum, start game time timer If auiStageID == 20 StartTimerGameTime(240, 555) ; timer time 240 = 24 ingame hours * 10 game days, timerID = 555 is an arbitrary number EndIf EndIf EndEvent Event OnTimerGameTime(int aiTimerID) ; timer with timerID 555 expires, advance the quest to stage 300 If aiTimerID == 555 SetStage(300) EndIf EndEvent Attach the script to your quest. Link to comment Share on other sites More sharing options...
Fantafaust Posted August 27, 2023 Share Posted August 27, 2023 You'd definitely want to make a new quest for this btw, don't edit the originals. When registering for the OnStageSet, you'll probably want to add checks that the Out of Time quest is complete and When Freedom Calls isn't so you know if you NEED to start the timer. Then you'll put your specific effects under the Quest.OnStageSet(...) event, I assume under stage 300 akaElseIf auiStageID == 300 PrestonGarvey.Kill() ...etc kills MamaMurphy.MoveTo(MyCorvegaInteriorMarker) EndIf Link to comment Share on other sites More sharing options...
Recommended Posts