Background for Skyrim SE

The MiscUtil Script

    The MiscUtil script is a part of Skyrim SE’s Papyrus scripting ecosystem. This script is not present in the vanilla game, but can be found in modded sources like PapyrusUtil SE - Modders Scripting Utility Functions (PapyrusUtil).

    For this script, the Papyrus index knows about:

    • 18 functions


    Inheritance Tree

    No indexed scripts extend this script.

    Properties

    No properties found.

      Events

        No events found.

      Functions

      • ObjectReference[]functionScanCellObjects(intformType, ObjectReferenceCenterOn, floatradius=0.0, KeywordHasKeyword=NONE)NativeGlobal

        Scans the current cell of the given CenterOn for an object of the given form type ID within radius and returns an array for all that
        and (optionally) also has the given keyword if changed from default none. Setting radius higher than 0.0 will restrict the
        search distance from around CenterOn, 0.0 will search entire cell the object is in.
        NOTE: Keyword searches seem a little unpredictable so be sure to test if your usage of it works before using the results.

      • Actor[]functionScanCellNPCs(ObjectReferenceCenterOn, floatradius=0.0, KeywordHasKeyword=NONE, boolIgnoreDead=true)NativeGlobal

        Scans the current cell of the given CenterOn for an actor within the given radius and returns an array for all actors that are
        currently alive and (optionally) has the given keyword if changed from default none. Setting radius higher than 0.0 will restrict the
        search distance from around CenterOn, 0.0 will search entire cell the object is in.
        NOTE: Keyword searches seem a little unpredictable so be sure to test if your usage of it works before using the results.

      • Actor[]functionScanCellNPCsByFaction(FactionFindFaction, ObjectReferenceCenterOn, floatradius=0.0, intminRank=0, intmaxRank=127, boolIgnoreDead=true)NativeGlobal

        Same as ScanCellNPCs(), however it filters the return by a given faction and (optionally) their rank in that faction.

      • voidfunctionToggleFreeCamera(boolstopTime=false)NativeGlobal

        Toggle freefly camera.

      • voidfunctionSetFreeCameraSpeed(floatspeed)NativeGlobal

        Set freefly cam speed.

      • voidfunctionSetFreeCameraState(boolenable, floatspeed=10.0)NativeGlobal

        Set current freefly cam state & set the speed if enabling

      • string[]functionFilesInFolder(stringdirectory, stringextension="")NativeGlobal

        Get an array of files in a given parent directory that have the given extension.
        directory is relative to the root Skyrim folder (where skyrim.exe is) and is non-recursive.
        directory = "." to get all files in root Skyrim folder
        directory = "data/meshes" to get all files in the /data/meshes folder
        extension = ".nif" to get all .nif mesh files.
        (default) extension="*" to get all files

      • string[]functionFoldersInFolder(stringdirectory)NativeGlobal

        Get an array of folders in a given parent directory
        Same rules and examples as above FilesInFolder apply to the directory rule here.

      • boolfunctionFileExists(stringfileName)NativeGlobal

        Check if a given file exists relative to root Skyrim directory. Example: FileExists("data/meshes/example.nif")

      • stringfunctionReadFromFile(stringfileName)NativeGlobal

        Read string from file. Do not read large files!

      • boolfunctionWriteToFile(stringfileName, stringtext, boolappend=true, booltimestamp=false)NativeGlobal

        Write string to file.

      • voidfunctionPrintConsole(stringtext)NativeGlobal

        Print text to console.

      • stringfunctionGetRaceEditorID(RaceraceForm)NativeGlobal

        Get race's editor ID.

      • stringfunctionGetActorRaceEditorID(ActoractorRef)NativeGlobal

        Get race's editor ID.

      • voidfunctionSetMenus(boolenabled)NativeGlobal

        Set HUD on / off - NOT CURRENT WORKING IN SKYRIM SPECIAL EDITION

      • floatfunctionGetNodeRotation(ObjectReferenceobj, stringnodeName, boolfirstPerson, introtationIndex)Global

        Get node rotation
        REMOVED v2.9: Useless, only does a part of the job.
        float function GetNodeRotation(ObjectReference obj, string nodeName, bool firstPerson, int rotationIndex) global native

      • voidfunctionExecuteBat(stringfileName)Global

        Bat console command.
        REMOVED v2.9: Unused.
        function ExecuteBat(string fileName) global native

      • Actor[]functionScanCellActors(ObjectReferenceCenterOn, floatradius=5000.0, KeywordHasKeyword=NONE)Global

        LEGACY v3.3 - Added Ignoredead parameter to function, aliased for backwards compatability with v3.2.

      Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.