Jump to content

Faking Wait Menu thru script


Recommended Posts

Hi guys,

 

I'm trying to fake a wait menu through script since, if I'm correct, there doesn't seem to be any Papyrus function equivalent to the console command "ShowMenu WaitSitMenu" - cant' find any in F4SE.

 

The result gives an ugly Menu message box and a rather stuttering wait in game - if I use "PassTime(Int aiHours)", the game freezes for the time duration - if I use "WaitGameTime(float afHours)", the script pauses... :(

 

Just wanted to know is anybody's found a way to call and use the .swf file in a script - or any other more elegant solution than the one I'm experiencing here?

 

Many thanks in advance :)

 

Hoamaii

Link to comment
Share on other sites

Edit:

 

After testing and retesting, Utility.WaitGameTime(float afHours) seems to be completely unreliable and inaccurate. Unlike similar function in Skyrim, it randomly stops working even though it is registered as a valid function in Utility.psc.

Link to comment
Share on other sites

@ Stonefisher:

 

Yep, that's exactly what I'm doing :D

 

Works just fine, it's only a matter of properly adjusting the FadeOutGame variables - it will look more like the sleep ISM than the wait one, but it's stil way better than using PassTime.

 

My only concern is whether or not the Game's AI updates in the hours you've waited - like you could discover after a wait of 10 hours that a settlement has been attacked while you were wating for instance!..

Link to comment
Share on other sites

You should use the default activation provided by "sleep/wait" furniture. Create a bed or chair in a new inaccessible cell. Create a script to activate the bed/chair which will bring up the menu you want.

 

Have a look at the source code for my field kits mod.

https://github.com/Scrivener07/FO4_Wasteland/blob/f39f021e3785b35034f6ff397906936035f29a70/Data/Scripts/Source/FO4_FieldKits/Fallout/FieldKits/Equipment.psc

https://youtu.be/_6YF03-4Cd8?list=PLdEgiq4kaju2LK40-csl89S91-Xb1lePp

 

I created several furniture's with the correct keywords to display each of the workbench menus. You can replicate this method by doing the same with a bed or chair for the wait or sleep menu respectively.

 

My take on it will spawn the furniture in front of the player and then tells the player to activate it through script. You can implement a chair or bed like this without the sitting animation or the furniture being visible depending on your preference.

Link to comment
Share on other sites

@Scrivener:

 

Funny you should mention that, I've been working on a mod which adds relax animations to the player, essentially using animation sequences which look way better than using furniture, and now that I'm down to polishing it, I'm thinking "it'd be cool if I could wait while playing those anims"!..

 

I was thinking about trying next to use remote furniture to trigger the Wait Vanilla prompt, see if that works better than faking wait. But my experience is furniture in Fallout 4 are not as easy to use as in Skyrim - and animations are trickier.

 

I only use a couple of furnitures in a total of some 20 or so anim options, but getting to activate the furnitures right after spawning them was a drag - I ended up spawning them in the main script, and activating the player in the furniture script init.

 

I'm not sure yet if activating a remote furniture in the middle of playing an animation would not teleport me to that furniture or/and completely mess up the animation I'm playing. Of course, I can't know for sure until I've tested that.

 

Just out of curiosity, have you managed to create a non-animated furniture? Could it be as simple as deleting the animation keyword?

Link to comment
Share on other sites

I think I mislead a little but my source will create a new furniture in front of the player with `PlaceAtMe`. I recommend placing the furniture in a remote cell and using `MoveTo` instead. Like you said, the exact position of the furniture that is moved/created in front of the player may not be 100% predicable without additional coding but I found that what you get looks good 95% of the time. Invisible furniture is something I have not tried but I know is possible. Removing the animation IS as simple as removing the keyword IIRC. Im not really sure what happens if the player activates a furniture in another cell remotely. I would honestly try the remote activate first before trying the more involved implementations.

Link to comment
Share on other sites

Yeah, I did struggle a bit with PlaceAtMe too - that's the reason why I ended up activating the player from a script attached to the furniture itself. I could never get PlaceAtMe and Activate to work together reliably in the same script.

 

I'll try the remote activation of a non animated furniture placed in a hidden cell - that used to work in Skyrim for bed for instance. Invisible furniture works just as well as long as you activate them thru scripts.

 

Anyway, so far, my faked wait manipulating GameHours and ImageSpaceModifier doesn't look that bad at all in game - except for the menu of course ;)

Link to comment
Share on other sites

Yeah, I'm aware it pauses scripts, I thought it would look ok for Wait when animations are looping in the background - but my main issue is sometimes it just does not fire at all - the script ignores that function and keeps running.

 

As far as I can see, it looks like PassTime also pauses the script AND it also freezes the game (which of course comes back to normal once the called amount of time has passed). Despite the description of that function in the Wiki, it doesn't look at all in game like the Vanilla Wait command. If you call PassTime(8.0) in your script while in game daytime, the game will freeze for a while in daytime, then abruptly resume in the middle of the night.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...