Skip to content

API request: prevent Pipboy close from external mods #152

Description

@1001Bits

Context

The Heisenberg mod (Physical Interactions VR, F4VR) implements a "terminal on wrist Pipboy" feature — when activating a terminal, instead of displaying a floating projected screen, the terminal UI renders on the physical wrist Pipboy. This requires the Pipboy to stay open and visible during the entire terminal interaction.

Problem

FRIK closes the Pipboy when the player looks away (checkTurningOffByLookingAway), which happens when facing a terminal. Heisenberg currently works around this by countering FRIK every frame:

  • Clearing the AppCulled flag on ScreenNode (undoing setNodeVisibility(false))
  • Forcing PipboyRoot_NIF_ONLY scale back to 1 (undoing scale=0)
  • Re-setting INI angles (undoing turnPipBoyOnOff(false))

Feature request

Add an API function to the FRIKApi struct that lets external mods prevent FRIK from closing the Pipboy:

/**
 * Prevent FRIK from closing the Pipboy while an external mod needs it open.
 * Uses a tag system so multiple mods can request independently.
 * Pipboy stays open as long as any tag is active.
 * @return true if successful.
 */
bool (FRIK_CALL*setKeepPipboyOpen)(const char* tag, bool keep);

Implementation would skip the look-away and button close checks in Pipboy::update() while any keep-open tag is active:

// In Pipboy::update(), before close checks:
if (hasActiveKeepOpenTags()) {
    return;  // skip checkTurningOffByButton / checkTurningOffByLookingAway
}

Usage from external mod:

// Terminal opens
frikApi->setKeepPipboyOpen("Heisenberg_Terminal", true);

// Terminal closes
frikApi->setKeepPipboyOpen("Heisenberg_Terminal", false);

Heisenberg handles opening the Pipboy itself — it just needs FRIK to stop closing it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions