Zorkaz Posted May 30, 2021 Share Posted May 30, 2021 Can't believe it but I have no clue how to advance time with a script. Basically I want to advance the game to three days when passing through a triggerzone Link to comment Share on other sites More sharing options...
DieFeM Posted May 30, 2021 Share Posted May 30, 2021 I did a custom function for this end : Bool Function PassGameTimeHours(Int iHours) Global Game.FadeOutGame(true, true, 0.0, 2.5) GlobalVariable GameHour = Game.GetFormFromFile(0x00000038, "Fallout4.esm") As GlobalVariable Int i = iHours While i > 0 GameHour.Mod(1.0) Utility.Wait(2.5/iHours) i -= 1 EndWhile Return True EndFunction It worked right in my tests, if you find problems let me know. Link to comment Share on other sites More sharing options...
Zorkaz Posted May 31, 2021 Author Share Posted May 31, 2021 Thx Link to comment Share on other sites More sharing options...
SKKmods Posted May 31, 2021 Share Posted May 31, 2021 Note that forcing time to advance faster than the system can finish processing updates can lead to sequencing issues. Scripts running GameTime timers, AI travel packages current positon sort of thing. Which is why wait and sleep can take variable amounts of real time to pass to allow those updates to process. Link to comment Share on other sites More sharing options...
DieFeM Posted June 2, 2021 Share Posted June 2, 2021 I've just read that a plugin for F4SE that executes console commands from papyrus was recently published for Fallout 4, Console Util.So the safest way (due to the potential problems described by SKK) could be calling passtime command. ConsoleUtil.ExecuteCommand("PassTime 72");72 hours (3 days) Link to comment Share on other sites More sharing options...
niston Posted June 2, 2021 Share Posted June 2, 2021 On the subject of Timers: They do not fire during sleep/wait/fasttravel at all. Instead, they will fire once after. And if normal operation would have fired them multiple times during the timespan covered by sleep/wait/fasttravel, they will still only fire once. This may or may not be a problem, depending on use case - But if it is, it must be accounted for by the script that uses the timer. I assume if you advance the time by script, timers will fire during that manipulation, in stark difference to how sleep/wait/fasttravel works. Link to comment Share on other sites More sharing options...
Recommended Posts