Welcome to the AFK Mods bug tracker. In order to report an issue, you need to have a VALIDATED account to post one. Once you have followed the link the registration email sent you, please select a project from the drop down menu below. Select “Open New Issue” and fill out the form with as many details as possible.

Please also consider sending your bug report to Bethesda if you are reporting on an issue with Skyrim Special Edition, Fallout 4, or Starfield. Doing so will help everyone on all platforms.

Issue Data
Status: Closed
Issue Type: Bug Report
Project: Unofficial Fallout 4 Patch
Component: Fallout 4: Vanilla
Category: Placed References
Assigned To: Sclerocephalus
Platform: All
Severity: Very Low
Votes: 0
Watching: N/A
Opened By BlackPete on Apr 26, 2021 9:20 pm
Last Edited By Sclerocephalus on May 1, 2021 9:10 pm
Closed By Sclerocephalus on May 5, 2021 10:52 am
Resolution: Fixed
Comment: Fixed for UFO4P 2.1.3

Issue #30553: Floating bobby pin box (0019D9E2) in Vault 81

 
Moved from Issue #30533:
Vault 81, player dorm, bobby pin box floats above bed about 2 feet: 19D9E2

Related Issues: 30533  

Comments

2 comment(s) [Closed]
BlackPete said:
 
This is due to the bobby pin box missing its proper enabled parent setting. According to information in the Creation Kit, it (like the box it sits on) wasn't supposed to be enabled after the player room in Vault 81 becomes available (if they assist Dr. Penske in the quest 'Hole in the Wall').
See comment below.

Comment #1 Apr 26, 2021 10:04 pm  Edited by BlackPete on Apr 27, 2021 3:18 pm
Sclerocephalus said:
 
I replied to this issue elsewhere, but post it here again for general reference:

The bobby pin boxes are scripted. They aren't any objects that you can pick up normally, like a screwdriver for example. If they could be picked up, you would have the box in your inventory. No pins though, and that's not intended. What the devs wanted is that the box disappears and a random number of pins is added to your inventory - and that needs to be scripted. So they made the box an activator. The activate message reads "pick up", leading the player into thinking that this is an object he can pick up when it actually isn't. Once activated, the script disables the box and adds the pins to your inventory. So far, so good.

Now, if you add an enable parent, the script can no longer disable the box, throws an error on the log and everything stops working. To handle that, UFO4P removes the enable parent and adds the "UFO4P_EnableDisableOnLoad" script which has the enable parent as a script property. The script checks the enable state of the enable marker and then enables or disables the object it is running on accordingly. That is, the object still behaves as if it had an enable parent, but it actually doesn't have one any longer. [NB: This script is also used on vault-tec lunch boxes. They cannot be picked up either and run a script too to handle that - and just like with the bobby pin boxes, this will no longer work with an enable parent].

Now things are working again, as long as the enable parent is not enabled or disabled while the player is in the same cell. This is because scripts react to specific events in your game. Whenever one of these events occurs, the engine sends a notification to the references that are touched by this event and the script's event handler starts running. Two such events are OnLoad and OnUnload. OnLoad is sent to a reference when it is fully loaded, and OnUnload is sent when it has started unloading. Now I can add OnLoad() and OnUnload() events to my script (the so-called event handlers) and let them do stuff whenever these events occur. This holds for all scripts in the game; no script is running just because it exists. It either needs to be called by another script or to react to an event to start doing stuff. UFO4P_EnableDisableOnLoad reacts to an OnLoad() event. That is, it basically assumes that the enable state of the enable parent only changes while the area is not loaded. In fact, this is true in most cases, because the game doesn't want to risk enabling or disabling stuff while the player can see it, so most quest scripts wait with flipping the enable state of an enable parent until the player has left the area, or they are doing it before he has arrived. In this specific case however, the quest script does not wait and disables the enable parent while the player is still in the same cell (it can do that safely because the player is not around when the marker is disabled). To make the bobby pin box fix work perfectly, UFO4P_EnableDisableOnLoad would have to change its enable state in the same moment as the enable marker changes its enable state - but it can't do that because it doesn't know when that happens. There is no way to know because there are no events existing that fire when an object changes its enable state.

Thus, this is a case where a perfect fix is impossible. I'd propose therefore to move the box on top of an item that doesn't get disabled. If there isn't one, just place it on the floor. When we leave it in its original position it will either end up floating (with the UFO4P fix) or non-functional (without the UFO4P fix).

Comment #2 Apr 27, 2021 10:04 am  Edited by Sclerocephalus on Apr 27, 2021 10:07 am
Showing Comments 1 - 2 of 2