Background for Fallout 4

The Utility Script

    The Utility script is a part of Fallout 4’s Papyrus scripting ecosystem. It is included with the base game, and is extended/modified by modded sources such as Fallout 4 Script Extender (F4SE).

    For this script, the Papyrus index knows about:

    • 32 functions


    Inheritance Tree

    No indexed scripts extend this script.

    Structs

    The Papyrus Index is still under construction. Structs have not been implemented yet.

      Properties

      No properties found.

        Events

          No events found.

        Functions

        • varfunctionCallGlobalFunction(stringasScriptName, stringasFuncName, var[]aParams)NativeGlobal

          Calls a global function synchronously and returns whatever that function does.

        • voidfunctionCallGlobalFunctionNoWait(stringasScriptName, stringasFuncName, var[]aParams)NativeGlobal

          Calls a global function asynchronously. Script execution continues immediately without waiting for the global function you called to finish (or even start).

        • stringfunctionGameTimeToString(floatafGameTime)NativeGlobal

          Converts the passed-in game time (in game days passed) to a string detailing the date and time it represents. The resulting format is: "MM/DD/YYYY HH:MM" and uses a 24-hour clock.

        • floatfunctionGetCurrentGameTime()NativeGlobal

          Obtains the current game time in terms of game days passed (same as the global variable)

        • floatfunctionGetCurrentRealTime()NativeGlobal

          Gets the number of real-world seconds that have elapsed since the game has launched. This time does not count time the game has been alt-tabbed, or other cases where the game has been frozen (i.e. during a save or load, time in a menu is counted). This function is most useful for timing a long operation.

        • intfunctionGetCurrentStackID()NativeGlobalDebugOnly

          Obtains the stack ID of the currently running stack where this function is called.

        • boolfunctionIsInMenuMode()NativeGlobal

          Obtains whether the game is currently in "menu mode" or not. Menu mode is basically defined as whenever the game is paused, usually because some menu is showing. Dialogue does not pause the game, and so does not put the game into "menu mode".

        • intfunctionRandomInt(intaiMin=0, intaiMax=100)NativeGlobal

          Generates a random integer between the minimum and maximum values (inclusive).

        • floatfunctionRandomFloat(floatafMin=0.0, floatafMax=1.0)NativeGlobal

          Generates a random floating point number between the minimum and maximum values (inclusive).

        • voidfunctionSetINIFloat(stringini, floatvalue)NativeGlobalDebugOnly

          Sets a float value in the Fallout 4 Initialization Files (.ini).

        • voidfunctionSetINIInt(stringini, intvalue)NativeGlobalDebugOnly

          Sets an integer value in the Fallout 4 Initialization Files (.ini).

        • voidfunctionSetINIBool(stringini, boolvalue)NativeGlobalDebugOnly

          Sets a boolean value in the Fallout 4 Initialization Files (.ini).

        • voidfunctionSetINIString(stringini, stringvalue)NativeGlobalDebugOnly

          Sets a string value in the Fallout 4 Initialization Files (.ini).

        • voidfunctionWait(floatafSeconds)NativeGlobal

          Pauses the script for at least the specified amount of time. This function is latent. Time will not be counted while the player is in a menu.

        • voidfunctionWaitGameTime(floatafHours)NativeGlobal

          Pauses the script for at least the specified amount of game time. This function is latent.

        • voidfunctionWaitMenuMode(floatafSeconds)NativeGlobal

          Pauses the script for at least the specified amount of time. This function is latent. Time will be counted while the player is in a menu.

        • stringfunctionCaptureFrameRate(intnumFrames)NativeGlobalDebugOnly

          Gets you a string describing the frame rate for a certain number of frames
          (String will be no longer than 1K characters long, separated by commas)

        • voidfunctionEnterTestData(stringastestType, stringastestMatter, stringastestDetails, stringastestResultContext, stringastestResult)NativeGlobalDebugOnly

          Sends the passed in test data to the tests website.

        • voidfunctionPostStartUpTimes()NativeGlobalDebugOnly

          Sends the start up times to the tests website.

        • voidfunctionStartFrameRateCapture()NativeGlobalDebugOnly

          Starts or ends a frame rate capture -- then you can get the min or max since
          frame capture started at any time

        • voidfunctionEndFrameRateCapture()NativeGlobalDebugOnly
        • floatfunctionGetAverageFrameRate()NativeGlobalDebugOnly
        • floatfunctionGetMinFrameRate()NativeGlobalDebugOnly
        • floatfunctionGetMaxFrameRate()NativeGlobalDebugOnly
        • stringfunctionGetCurrentMemory()NativeGlobalDebugOnly

          Memory tracking functions - only available if memory tracking is turned on

        • intfunctionGetBudgetCount()NativeGlobalDebugOnly
        • stringfunctionGetCurrentBudget(intaiBudgetNumber)NativeGlobalDebugOnly
        • stringfunctionGetBudgetLimit(intaiBudgetNumber)NativeGlobalDebugOnly
        • boolfunctionOverBudget(intaiBudgetNumber)NativeGlobalDebugOnly
        • stringfunctionGetBudgetName(intaiBudgetNumber)NativeGlobalDebugOnly
        • var[]functionVarToVarArray(varv)NativeGlobal

          Converts Var to Var[]

        • varfunctionVarArrayToVar(var[]v)NativeGlobal

          Converts Var[] to Var

        Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.