Jump to content

Anyone know a way to exit pipboy menu via script?


stonefisher

Recommended Posts

  • 1 month later...

I'm using the above line of code in my Hitchhiker teleport mod to close my magazine menu and the Pip-Boy. The problem now is that after I teleport and the vanity camera spin finishes, I don't have any player controls at all (except for start > exit game).

 

I tried the console command DumpInputEnableLayers, but nothing was listed in the console or in Papyrus.0.log.

 

I think the exit Pip-Boy code above is still keeping player in disabled controls (menu mode?). I also think I can handle that layer (EnableControls, Reset, etc)... if I knew the name of the layer I'm stuck in and assign that layer to a property for handling.

 

Does anyone know how to identify the layer that is disabling controls? Or as OP asked... is there a better way to close the Pip-Boy by script?

 

Edit: To clarify, my menu activates OnRead(). The magazine fills the screen, then my menu appears on top of that. Although the player moves and the screen changes, I suspect that the game still thinks the magazine is open. Is there a way to close a magazine (book) by script?

Link to comment
Share on other sites

They are called PipboyMenu and BookMenu. Both have menu events, but not scripts to open/close (?): https://www.creationkit.com/fallout4/index.php?title=OnMenuOpenCloseEvent_-_ScriptObject

 

I recall an old thread where several modders looked at ContainerMenu.swf with JPEXS to try RemoveAllUnequipped. I'm not home atm to look at SWFs.

 

So the question then becomes... how do we open and close ANY menu by script? Seems obvious from original post, but I'm having a hard time finding the right search engine terms to produce useful results.

Link to comment
Share on other sites

  • 3 months later...

Necromancing for the sake of relevance, keep all info together. But simply there is no reliable, straight forward way.

 

Currently in my own work, I'm am popping up a debug messagebox telling player to exit the pipboy. I then remove the inventory menu item and start a 1 sec timer. Upon exit, the timer will fire and open the messagebox menu. Could probably do the same with menu event but this is easier.

 

So now I am considering using a holotape menu. I found this post: https://forums.nexusmods.com/index.php?/topic/4843890-help-wanted-dismissing-the-pip-boy-from-script/

 

Curious if said exploit works. Given I won't have my pc back until next week, I can't test it now. Not the point of me posting however, simply if it does work its good to keep relevant I found together in an existing thread.

 

My issue is handling starting a number of timers when certain options are selected. I will defer these to the menu events, but it's interesting to see if above exploit works. One other thing that might of helped is faking a key press for tab button, if the current script extender supported it and you could fire it at the right time.

 

@ThoraldGM there is this as well but it would seem to be more for custom menus like MCM. The lack of documentation at present doesn't help: https://www.creationkit.com/fallout4/index.php?title=UI_Script

Link to comment
Share on other sites

You could try Disable() Enable() if you can get a reference to the PipBoy or or Unequip() Equip() on the baseid worn item ?

 

I just used a similar hack to pop the player out of a workbench menu.

Link to comment
Share on other sites

Jostrus mentioned the bug I mentioned/linked above is probably patched. Still waiting on hardware to do tests.

 

As I will be using a holotape, evidentally you cannot get a hold of the Pipboy/Self. Only mentioned method was ThoraldGMs way of moving the player a unit, forcing the black screen.

 

But yes AFAIK you can't get a hold of the pipboy.

Link to comment
Share on other sites

If you get creative you can absolutely get a REF to the Pipboy:

pPlayerActor.UnequipItem(pPipBoy, abSilent = true)
ObjectReference PipboyREF = pPlayerActor.DropObject(pPipBoy, 1)
PipboyREF.Disable()
PipboyREF.Enable()
pPlayerActor.AddItem(PipboyREF, 1, abSilent = true)
pPlayerActor.EquipItem(pPipBoy, abSilent = true)

Problem is, unlike workbenches this doesn't actually kick the player out of the open menu :(

Link to comment
Share on other sites

  • Recently Browsing   0 members

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