Background for Skyrim SE

The DbMiscFunctions Script

    The DbMiscFunctions 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 Dylbills Papyrus Functions (Dylbills PE).

    For this script, the Papyrus index knows about:

    • 269 functions


    Inheritance Tree

    No indexed scripts extend this script.

    Properties

    No properties found.

      Events

        No events found.

      Functions

      • voidfunctionMoveToLocalOffset(ObjectReferenceRefToMove, ObjectReferenceCenterRef, floatAngle, floatDistance, floatafZOffset=0.0, boolabMatchRotation=true)Global

        Like MoveTo, but can specifify local angle / distance offset.
        If angle == 0.0, moves object in front of CenterRef by Distance
        If angle == 90.0 moves object the right of CenterRef by Distance
        If angle == -90, moves object to the left of centerRef by Distance
        If angle == 180, moves object behind centerRef by Distance ect.
        Example: MoveToLocalOffset(MyRef, Game.GetPlayer(), 90.0, 500.0) moves MyRef 500 units to the right of the player.
        No requirements

      • ObjectReferencefunctionPlaceAndMoveToLocalOffset(ObjectReferencePlaceAtMeRef, FormakFormToPlace, intaiCount=1, boolabForcePersist=false, boolabInitiallyDisabled=false, floatAngle=0.0, floatDistance=100.0, floatafZOffset=0.0, boolabMatchRotation=true)Global

        PlaceAtMe but moves placed ref using MoveToLocalOffset function. PlaceAtMeRef is centerRef, new placed ref is RefToMove.

      • voidfunctionApplyHavokImpulseLocal(ObjectReferenceRef, floatAngle, floatafZ, floatafMagnitude)Global

        Apply Havok Impulse from left / right angle + Z direction. No requirements.
        Examples:
        ApplyHavokImpulseLocal(MyRef, 0, 5, 10) applies havok impulse so the ref flies forward and up
        ApplyHavokImpulseLocal(MyRef, 90, -5, 10) applies havok impulse so the ref flies to the right and down

      • stringfunctionGetSkyrimVersionFullString()Global

        Get the full Version Text displayed in the journal menu e.g "1.5.97.0.8 (SKSE64 2.0.20 rel 65)"
        The Journal Menu system page must be open for this function to work.
        Use RegisterForMenu("Journal Menu") and the OnMenuOpen event to ensure the Journal Menu is open.
        Or, if your mod has an MCM, this will work when the MCM Menu is open, so use OnConfigOpen in your MCM script.
        requires skse

      • stringfunctionGetSkyrimVersion()Global

        Get the Skyrim Version Text displayed in the journal menu, e.g "1.5.97"
        The Journal Menu system page must be open for this function to work.
        Use RegisterForMenu("Journal Menu") and the OnMenuOpen event to ensure the Journal Menu is open.
        Or, if your mod has an MCM, this will work when the MCM Menu is open, so use OnConfigOpen in your MCM script.
        requires skse

      • stringfunctionGetSKSEVersion()Global

        requires skse

      • boolfunctionToggleCreationKitMarkers(boolShowMarkers=true, ObjectReferenceMoveToRef=NONE)Global

        show or hide creation kit markers in Game
        If ShowMarkers == true, shows them, otherwise hides them.
        If moveToRef == None (default), moves player to either whiterun or markarth fast travel markers.
        Must move player to new area after changing bShowMarkers ini so cells reload to display markers.
        no requirements

      • voidfunctionEnableRefsInCell(CellakCell, intformTypeFilter=0)Global

        Enable all the object refs in akCell that match formTypeFilter.
        If formTypeFilter is 0 (default) enable all refs in the cell.
        Requires skse.

      • voidfunctionDisableRefsInCell(CellakCell, intformTypeFilter=0)Global

        Disable all the object refs in akCell that match formTypeFilter.
        If formTypeFilter is 0 (default) disable all refs in the cell.
        Requires skse.

      • ObjectReferencefunctionCreateXMarkerRef(boolPersistentRef=false, ObjectReferencePlaceAtMeRef=NONE)Global

        create new xMarker ObjectReference
        if PlaceAtMeRef == none (default) places new marker at the player.
        no requirements

      • voidfunctionUnequipAllItems(ActorakActor, boolabPreventEquip=false, boolabSilent=true, floatdelay=0.1)Global

        unequip all items on actor with delay in between.
        requires skse and po3's papyrus extender

      • voidfunctionRemoveAllItems(ObjectReferenceRef, ObjectReferenceotherContainer=NONE, boolabSilent=true, floatdelay=0.01, boolabNoEquipped=false, boolabNoFavorited=false, boolabNoQuestItem=true)Global

        remove all items from ref which must be a container or actor to optional otherContainer
        requires skse and papyrus extender and SSE
        use Form[] Items = PO3_SKSEFunctions.AddAllInventoryItemsToArray(Ref, abNoEquipped, abNoFavorited, abNoQuestItem) for LE

      • voidfunctionDropAllItems(ObjectReferenceRef, booldropIndividual=false, floatdelay=0.01)Global

        Drop all items from ref, Ref must be a container or actor.
        If dropIndividual is true, drops multiple of the same item time individually so they don't stack. If false, items are dropped stacked.
        Requires SKSE

      • voidfunctionDropIndividualItems(ObjectReferenceRef, FormItem, intNumOfItems=0, floatdelay=0.01)Global

        Drop the NumofItems from ref individually so they don't stack.
        If NumofItems == 0, drops all of the item from ref.
        No requirements

      • voidfunctionUnlockShout(ShoutakShout)Global

        add shout to player if necessary and unlock all words of power.
        requires skse

      • voidfunctionUnlockEquippedShout()Global

        requires skse

      • boolfunctionLocationOrParentsHasKeyword(LocationakLocation, KeywordakKeyword)Global

        check if location or any of it's parents has the keyword
        Requires Papyrus Extender && SKSE

      • stringfunctionGetStringIfNull(strings, stringnullString="ull")Global

        no requirements.

      • stringfunctionGetFormName(FormakForm, stringnullString="ull", stringNoNameString="o name")Global

        requires skse. Get name of form. Checks for ObjectReference. return default nullString if not found.

      • boolfunctionModHasFormType(stringmodName, inttype)Global

        Returns true if the Mod has at least 1 form of type
        Requires papyrus extender and skse

      • boolfunctionakFormHasKeywordString(FormakForm, stringakString)Global

        Like HasKeywordString but returns true if multiple esp's have keyWords with the same name added.
        Requires SKSE

      • boolfunctionFormHasKeywordInFormList(FormakForm, FormListakList, boolAllKeywords=false)Global

        If AllKeywords == false (default) returns true if the akForm has any keyword in the akList formlist.
        If allKeywords == true, only returns true if the akForm has all keywords in the akList.
        No requirements

      • boolfunctionFormHasKeywordInArray(FormakForm, Keyword[]akList, boolAllKeywords=false)Global

        If AllKeywords == false (default) returns true if the akForm has any keyword in the akList array.
        If allKeywords == true, only returns true if the akForm has all keywords in the akList.
        No requirements

      • boolfunctionFormHasKeywordInStorageUtilList(FormakForm, FormObjKey, stringListKeyName, boolAllKeywords=false)Global

        If AllKeywords == false (default) returns true if the akForm has any keyword in the StorageUtil Form list.
        If allKeywords == true, only returns true if the akForm has all keywords in the List.
        Requires skse and PapyrusUtil

      • boolfunctionFormHasKeywordInJsonUtilList(FormakForm, stringJsonFilePath, stringListKeyName, boolAllKeywords=false)Global

        If AllKeywords == false (default) returns true if the akForm has any keyword in the JsonUtil Form list.
        If allKeywords == true, only returns true if the akForm has all keywords in the List.
        Requires skse and PapyrusUtil

      • voidfunctionCopykeywordsToForm(FormA, FormB)Global

        Copy keywords from form A onto form B.
        Requires skse and papyrus extender

      • boolfunctionIsNumber(stringakString, boolAllowForDecimals=true, boolAllowNegativeNumbers=true)Global

        Requires SKSE

      • intfunctionClampInt(inti, intMin, intMax)Global
      • floatfunctionClampFloat(floatf, floatMin, floatMax)Global
      • boolfunctionIsIntInRange(intI, intMin, intMax)Global
      • boolfunctionIsFloatInRange(floatf, floatMin, floatMax)Global
      • boolfunctionIsStringIndexBetween(strings, intIndex, stringStartKey, stringEndKey)Global

        is the index in string s between the StartKey and EndKey.
        Example:
        String s = "() (Some String)"
        Bool b = DbMiscFunctions.IsStringIndexBetween(s, 4, "(", ")") ;true
        Bool bb = DbMiscFunctions.IsStringIndexBetween(s, 2, "(", ")") ;false
        Bool bbb = DbMiscFunctions.IsStringIndexBetween(s, 0, "(", ")") ;false
        requires skse

      • stringfunctionConvertIntToHex(inti, intminDigits=8)Global

        requires skse. Convert int to hex string.
        if result string length is less than minDigits,
        adds 0's to the start for positive numbers, or f's to the start for negative numbers.
        default is 8 (for form IDs)

      • intfunctionConvertHexToInt(stringhex, boolTreatAsNegative=false)Global

        requires skse
        If TreatAsNegative == true, returns hex as negative number.
        Example:
        ConvertHexToInt("FD4", true) returns -44
        ConvertHexToInt("FD4", false) returns 4052
        Note that if the hex is 8 digits in length (such as form IDs) and starts with "F" it is always treated as negative natively by papyrus.

      • stringfunctionGetFormIDHex(FormakForm)Global

        For convenience. Returns the akForm ID as a hex string.
        requires SKSE.

      • intfunctionIntPow(intx, inty)Global

        like Math.Pow, calculates x to the y power, but uses only integers which is more accurate if not needing floats.
        Only works for positive y values.

      • intfunctionIntSqrt(inti)Global

        returns floor of the square root of i.

      • intfunctionIntAbs(inti)Global

        returns absolute value of i.

      • intfunctionRoundAsInt(floatf)Global

        rounds the float input and returns int
        5.4 returns 5
        5.5 returns 6

      • floatfunctionRoundAsFloat(floatf)Global

        rounds the float input and returns float
        5.4 returns 5.0
        5.5 returns 6.0

      • floatfunctionRoundDownToDec(floatf, intDecimalPlaces=0)Global

        rounds the float down to the specified decimal places
        Example:
        RoundDownToDec(1.2345, 2) returns 1.23
        RoundDownToDec(4.5678, 3) return 4.567
        not 100% accurate, limited by string as float conversion.
        Example: RoundDownToDec(100.78945, 2) returns 100.779999999

      • stringfunctionRoundDownToDecString(floatf, intDecimalPlaces=0)Global

        Same as RoundDownToDec but returns string instead of float. In this case RoundDownToDecString(100.78945, 2) returns "100.78"

      • intfunctionCountDecimalPlaces(floatf)Global

        requires skse

      • float[]functionSplitAsFloat(strings, intMax=-1, stringDivider="|")Global

        requires SKSE. Splits string by divider and returns as float array.

      • int[]functionSplitAsInt(strings, intMax=-1, stringDivider="|")Global

        requires SKSE. Splits string by divider and returns as int array.

      • string[]functionSortStringArray(string[]akArray, boolAscending=true, boolDirect=true)Global

        Sort========================================================================================
        if Direct == true, sorts the passed in akArray directly
        if Direct == false, Passed in array is unaffected and returns new array (that is akArray sorted).
        if Direct == false requires skse to create the new array.

      • string[]functionCopyStringArray(string[]akArray)Global

        requires skse.

      • stringfunctionJoinStringArray(string[]akArray, stringDivider="|", boolIgnoreDuplicates=false)Global

        Opposite of StringUtil.Split. Convert string array to single string, elements separated by divider.
        If IgnoreDuplicates == true, only adds an element to the string once

      • stringfunctionJoinFloatArray(float[]akArray, stringDivider="|", boolIgnoreDuplicates=false)Global

        If IgnoreDuplicates == true, only adds an element to the string once

      • stringfunctionJoinIntArray(int[]akArray, stringDivider="|", boolIgnoreDuplicates=false)Global

        If IgnoreDuplicates == true, only adds an element to the string once

      • voidfunctionPrintT(strings1="", strings2="", strings3="", strings4="", strings5="", strings6="", strings7="", strings8="", strings9="", strings10="", strings11="", strings12="", strings13="", strings14="", strings15="", strings16="", strings17="", strings18="", strings19="", strings20="", stringDivider="", intaiSeverity=0)Global

        Trace
        No requirements.

      • voidfunctionPrintTU(stringasUserLog="", strings1="", strings2="", strings3="", strings4="", strings5="", strings6="", strings7="", strings8="", strings9="", strings10="", strings11="", strings12="", strings13="", strings14="", strings15="", strings16="", strings17="", strings18="", strings19="", strings20="", stringDivider="", intaiSeverity=0)Global

        TraceUser
        No requirements.

      • voidfunctionPrintN(strings1="", strings2="", strings3="", strings4="", strings5="", strings6="", strings7="", strings8="", strings9="", strings10="", strings11="", strings12="", strings13="", strings14="", strings15="", strings16="", strings17="", strings18="", strings19="", strings20="", stringDivider="")Global

        Notification
        No requirements.

      • voidfunctionPrintM(strings1="", strings2="", strings3="", strings4="", strings5="", strings6="", strings7="", strings8="", strings9="", strings10="", strings11="", strings12="", strings13="", strings14="", strings15="", strings16="", strings17="", strings18="", strings19="", strings20="", stringDivider="")Global

        MessageBox
        No requirements.

      • voidfunctionPrintEvm(strings1="", strings2="", strings3="", strings4="", strings5="", strings6="", strings7="", strings8="", strings9="", strings10="", strings11="", strings12="", strings13="", strings14="", strings15="", strings16="", strings17="", strings18="", strings19="", strings20="", stringDivider="")Global

        ExtendedVanillaMenus.MessageBox
        requires ExtendedVanillaMenus and skse

      • voidfunctionPrintF(stringFilePath, strings1="", strings2="", strings3="", strings4="", strings5="", strings6="", strings7="", strings8="", strings9="", strings10="", strings11="", strings12="", strings13="", strings14="", strings15="", strings16="", strings17="", strings18="", strings19="", strings20="", stringDivider="")Global

        WriteToFile
        requires PapyrusUtil and skse

      • stringfunctionJoinStrings(strings1="", strings2="", strings3="", strings4="", strings5="", strings6="", strings7="", strings8="", strings9="", strings10="", strings11="", strings12="", strings13="", strings14="", strings15="", strings16="", strings17="", strings18="", strings19="", strings20="", stringDivider="")Global

        Join up to 20 strings into a single string seperated by the Divider
        Stops joining at the first empty "" string it finds.
        no requirements

      • stringfunctionJoinAllStrings(strings1="", strings2="", strings3="", strings4="", strings5="", strings6="", strings7="", strings8="", strings9="", strings10="", strings11="", strings12="", strings13="", strings14="", strings15="", strings16="", strings17="", strings18="", strings19="", strings20="", stringDivider="")Global

        Join all 20 strings into a single string seperated by the Divider
        no requirements

      • int[]functionGetScreenResolution()Global

        get the current screen resolution.
        [0] = X or width
        [1] = Y or height
        requires skse

      • int[]functionGetGameActorSoulLevels()Global

        Get game settings for soul levels
        no requirements

      • string[]functionGetGameSoulLevelNames()Global

        Get game setting soul level names
        no requirements

      • intfunctionGetActorSoulSize(ActorakActor)Global

        Get the actor soul size. 0 = petty, 1 = lesser, 2 = Common, 3 = Greater, 4 = Grand, 5 = Black (for NPCs)
        No requirements

      • stringfunctionGetActorSoulSizeString(ActorakActor, stringsBlackSize="lack")Global

        Get actor soul size as string.
        no requirements

      • boolfunctionActorHasFormEquiped(ActorakActor, FormakForm)Global

        the IsEquipped function doesn't work for spells, hence the need for this function.
        no requirements

      • boolfunctionCanInteractWith(ObjectReferenceref, boolcheckAshPile=true)Global

        requires skse and DbSkseFunctions.psc version 6.7 or greater

      • boolfunctionIsActorNPC(ActorakActor)Global

        Is the akActor an NPC?
        no requirements

      • boolfunctionIsActorMoving(ActorakActor)Global

        Returns true if akActor is moving.
        I've only tested on NPC humanoid actors. Not sure if it works for other types.
        No requirements

      • FormfunctionGetRandomFormFromRef(ObjectReferenceRef, int[]TypeArrayFilter=NONE, FormListListFilter=NONE, boolTypeFilterHasType=true, boolakListHasForm=true)Global

        Get random form from Ref's inventory.
        If TypeArrayFilter != none, filters for form types in TypeArrayFilter. If TypeFilterHasType == true (default) only allows for types in the TypeArrayFilter. If false, only allows for types NOT in the TypeArrayFilter.
        If ListFilter != none, filters for base forms in the ListFilter formlist. If akListHasForm == true (default) only allows for forms in the ListFilter formlist. If false, only allows for forms NOT in the formlist.
        Requires SKSE

      • FormfunctionGetRandomFormFromRefA(ObjectReferenceRef, int[]TypeArrayFilter=NONE, Form[]ListFilter=NONE, boolTypeFilterHasType=true, boolakListHasForm=true)Global

        Get random form from Ref's inventory.
        If TypeArrayFilter != none, filters for form types in TypeArrayFilter. If TypeFilterHasType == true (default) only allows for types in the TypeArrayFilter. If false, only allows for types NOT in the TypeArrayFilter.
        If ListFilter != none, filters for base forms in the ListFilter form array. If akListHasForm == true (default) only allows for forms in the ListFilter form array. If false, only allows for forms NOT in the form array.
        Requires SKSE

      • FormfunctionGetRandomFormFromRefS(ObjectReferenceRef, int[]TypeArrayFilter=NONE, FormObjKey=NONE, stringListKeyName="", boolTypeFilterHasType=true, boolakListHasForm=true)Global

        Get random form from Ref's inventory.
        If TypeArrayFilter != none, filters for form types in TypeArrayFilter. If TypeFilterHasType == true (default) only allows for types in the TypeArrayFilter. If false, only allows for types NOT in the TypeArrayFilter.
        If ListKeyName != none, filters for base forms in the StorageUtil Formlist defined by the ObjKey and ListKeyName. If akListHasForm == true (default) only allows for forms in the StorageUtil Formlist. If false, only allows for forms NOT in the StorageUtil Formlist.
        Requires SKSE and PapyrusUtil

      • FormfunctionGetRandomFormFromRefJ(ObjectReferenceRef, int[]TypeArrayFilter=NONE, stringJsonFilePath="", stringListKeyName="", boolTypeFilterHasType=true, boolakListHasForm=true)Global

        Get random form from Ref's inventory.
        If TypeArrayFilter != none, filters for form types in TypeArrayFilter. If TypeFilterHasType == true (default) only allows for types in the TypeArrayFilter. If false, only allows for types NOT in the TypeArrayFilter.
        If JsonFilePath != none && ListKeyName != none, filters for base forms in the JsonUtil Formlist defined by the JsonFilePath and ListKeyName. If akListHasForm == true (default) only allows for forms in the JsonUtil Formlist. If false, only allows for forms NOT in the JsonUtil Formlist.
        Requires SKSE and PapyrusUtil.

      • voidfunctionSortActorArrayByName(Actor[]akArray, boolAscending=true)Global

        requires skse. Sort Actors in akArray by their display name.

      • voidfunctionSortObjectRefArrayByName(ObjectReference[]akArray, boolAscending=true)Global

        requires skse. Sort ObjectReferences in akArray by their display name.

      • voidfunctionSortFormArrayByName(Form[]akArray, boolAscending=true)Global

        requires skse. Sort Forms in akArray by their name.

      • string[]functionGetActorNames(Actor[]akArray)Global

        requires skse, put all actor names of actors in akArray to a string array and return.

      • string[]functionGetObjectRefNames(ObjectReference[]akArray)Global

        requires skse, put all ObjectReference names of ObjectReferences in akArray to a string array and return.

      • string[]functionGetFormNames(Form[]akArray)Global

        requires skse, put all Form names of Forms in akArray to a string array and return.

      • string[]functionGetFormNamesFromList(FormListakList)Global

        requires skse, put all Form names of Forms in akList to a string array and return.

      • stringfunctionFormNamesInFormListToString(FormListakList, stringdivider="n", stringnullName="ull")Global

        requires skse, put all Form names of Forms in akList to a single string seperated by divider. Default new line.

      • Form[]functionFormlistToArray(FormListakList)Global

        Requires skse. Add all forms in akList to new form array.

      • voidfunctionAddFormArrayFormsToList(Form[]akArray, FormListakList)Global

        Add all forms in akArray to akList

      • floatfunctionSecondsToMinutes(floatseconds)Global

        no requirements

      • floatfunctionSecondsToHours(floatseconds)Global

        no requirements

      • floatfunctionMinutesToSeconds(floatminutes)Global

        no requirements

      • floatfunctionMinutesToHours(floatminutes)Global

        no requirements

      • floatfunctionHoursToSeconds(floatHours)Global

        no requirements

      • floatfunctionHoursToMinutes(floatHours)Global

        no requirements

      • floatfunctionGetRealSecondsPassed()Global
      • floatfunctionGetRealMinutesPassed()Global
      • boolfunctionWaitWhileKeyIsPressed(intkeyCode, floatsecondsToWait)Global

        wait while the keyCode is pressed.
        If the key is released before the secondsToWait time has elapsed, returns false.
        If the secondsToWait time elapses and the keyCode is still pressed, returns true.
        Requires skse

      • boolfunctionWaitWhileKeyIsPressed_interval(intkeyCode, intwaitCount, floatwaitInterval=0.01)Global

        Like WaitWhileKeyIsPressed but this is an interval wait version.
        Wait while the keyCode is pressed.
        Returns true if the entire waitCount finishes.
        Returns false if the key was released before the waitCount is finished.
        The wait interval should be a small value (default is 0.01) for this function to be accurate.
        Requires skse

      • voidfunctionRegisterFormForKeys(FormakForm, intmin=1, intMax=281)Global

        requires skse, register for all keys between min and max. Default is 1 to 281, or all keys.

      • voidfunctionRegisterAliasForKeys(AliasakAlias, intmin=1, intMax=281)Global
      • voidfunctionRegisterActiveMagicEffectForKeys(ActiveMagicEffectakActiveMagicEffect, intmin=1, intMax=281)Global
      • int[]functionGetAllKeysPressed()Global

        requires skse

      • boolfunctionHotkeysPressed(int[]hotkeys, boolonlyTheseKeys=true)Global

        Are all the hotkeys pressed?
        If onlyTheseKeys is true, (default), returns true only if all the hotkeys are pressed and no other keys are pressed.
        requires skse.

      • voidfunctionSwapStrings(string[]akArray, intIndexA, intIndexB)Global

        Swap==============================================================================
        Swap the element at IndexA with the element at IndexB in the akArray
        The V functions (V for validate) will first clamp the indexes between 0 and the last available index in the akArray first before swapping.
        If you know for sure that the indexes are in bounds, use Swap as it's faster. If you don't know for sure, use SwapV or you might get none entries.

      • voidfunctionSwapStringsV(string[]akArray, intIndexA, intIndexB)Global

        validate indexes first.

      • voidfunctionSwapBools(bool[]akArray, intIndexA, intIndexB)Global
      • voidfunctionSwapBoolsV(bool[]akArray, intIndexA, intIndexB)Global

        validate indexes first.

      • voidfunctionSwapInts(int[]akArray, intIndexA, intIndexB)Global
      • voidfunctionSwapIntsV(int[]akArray, intIndexA, intIndexB)Global

        validate indexes first.

      • voidfunctionSwapFloats(float[]akArray, intIndexA, intIndexB)Global
      • voidfunctionSwapFloatsV(float[]akArray, intIndexA, intIndexB)Global

        validate indexes first.

      • voidfunctionSwapActors(Actor[]akArray, intIndexA, intIndexB)Global
      • voidfunctionSwapActorsV(Actor[]akArray, intIndexA, intIndexB)Global

        validate indexes first.

      • voidfunctionSwapObjectReferences(ObjectReference[]akArray, intIndexA, intIndexB)Global
      • voidfunctionSwapObjectReferencesV(ObjectReference[]akArray, intIndexA, intIndexB)Global

        validate indexes first.

      • voidfunctionSwapForms(Form[]akArray, intIndexA, intIndexB)Global
      • voidfunctionSwapFormsV(Form[]akArray, intIndexA, intIndexB)Global

        validate indexes first.

      • intfunctionJsonIntListPluck(stringFileName, stringKeyName, intindex, intdefault=0)Global
      • floatfunctionJsonFloatListPluck(stringFileName, stringKeyName, intindex, floatdefault=0.0)Global
      • stringfunctionJsonStringListPluck(stringFileName, stringKeyName, intindex, stringdefault="")Global
      • FormfunctionJsonFormListPluck(stringFileName, stringKeyName, intindex, Formdefault=NONE)Global
      • intfunctionJsonintListShift(stringFileName, stringKeyName, intdefault=0)Global
      • floatfunctionJsonFloatListShift(stringFileName, stringKeyName, floatdefault=0.0)Global
      • stringfunctionJsonStringListShift(stringFileName, stringKeyName, stringdefault="")Global
      • FormfunctionJsonFormListShift(stringFileName, stringKeyName, Formdefault=NONE)Global
      • intfunctionJsonIntListPop(stringFileName, stringKeyName, intdefault=0)Global
      • floatfunctionJsonFloatListPop(stringFileName, stringKeyName, floatdefault=0.0)Global
      • stringfunctionJsonStringListPop(stringFileName, stringKeyName, stringdefault="")Global
      • FormfunctionJsonFormListPop(stringFileName, stringKeyName, Formdefault=NONE)Global
      • voidfunctionJsonIntListRemoveAllDuplicates(stringFileName, stringKeyName, boolAcending=true)Global

        remove all duplicates in Json int / float / string / form lists, leaving only 1 of each element in the list.
        If asceding == true (default) removes duplicate entries from the start of the list first,
        Else removes duplicates from end of list first. ======================================================================================

      • voidfunctionJsonFloatListRemoveAllDuplicates(stringFileName, stringKeyName, boolAcending=true)Global
      • voidfunctionJsonStringListRemoveAllDuplicates(stringFileName, stringKeyName, boolAcending=true)Global
      • voidfunctionJsonFormListRemoveAllDuplicates(stringFileName, stringKeyName, boolAcending=true)Global
      • stringfunctionJsonJoinIntList(stringFileName, stringKeyName, stringDivider="|")Global

        Opposite of String.Split()
        Join all elements in Json Int List to a single string seperated by divider. =================================================================================

      • stringfunctionJsonJoinFloatList(stringFileName, stringKeyName, stringDivider="|")Global
      • stringfunctionJsonJoinStringList(stringFileName, stringKeyName, stringDivider="|")Global
      • stringfunctionGetFormTypeString(intType, stringsFilePath="ata/interface/DbMiscFunctions/DbFormTypeStrings.txt")Global

        requires skse and papyrusUtil. Get the string for a form type int.
        Exampe: FormTypeToString(SomeMiscObj.GetType()) returns "Misc"
        can specify another file other than "Data/interface/DbFormTypeStrings.txt" if desired

      • string[]functionGetFormTypeStrings(stringsFilePath="ata/interface/DbMiscFunctions/DbFormTypeStrings.txt", intstartIndex=0, intendIndex=134)

        requires skse and papyrusUtil.
        Get form type strings within a range.

      • stringfunctionGetKeyCodeString(intkeyCode, stringsFilePath="ata/interface/DbMiscFunctions/DbKeyCodeStrings.txt")Global

        requires skse and papyrusUtil. Get the string for keycode.
        Exampe: GetKeyCodeString(28) returns "Enter"
        can specify another file other than "Data/interface/DbKeyCodeStrings.txt" if desired

      • stringfunctionGetKeyCodeStrings(int[]keys, stringstartBracket="", stringendBracket="", stringdivider="n", boolincludeInts=true)Global

        requires skse

      • string[]functionGetKeyCodeStringsInRange(intminKey=1, intmaxKey=281, stringstartBracket="", stringendBracket="", boolincludeInts=true)Global

        requires skse

      • stringfunctionGetModOriginFromHexID(stringFormID)Global

        Return mod name string that the FormID comes from. e.g "Skyrim.esm"
        assumes FormID is 8 digits long.
        Requires skse

      • stringfunctionGetModOriginName(FormakForm)Global

        Return mod name string that the akForm comes from. e.g "Skyrim.esm"
        Requires skse

      • intfunctionGetActorFormType(FormF)Global

        get common form types without SKSE =======================================================================
        These functions mimic the main Categories in the creation kit.
        GetActorFormType corresponds to the Actor category. GetAudioFormType corresponds to the Audo category ect.
        Note, can pass in ObjectReference's and it will auto get baseObject and return type.

      • intfunctionGetAudioFormType(FormF)Global
      • intfunctionGetCharacterFormType(FormF)Global
      • intfunctionGetItemFormType(FormF)Global
      • intfunctionGetMagicFormType(FormF)Global
      • intfunctionGetMiscFormType(FormF)Global
      • intfunctionGetSpecialEffectFormType(FormF)Global
      • intfunctionGetWorldDataFormType(FormF)Global
      • intfunctionGetWorldObjectFormType(FormF)Global
      • intfunctionGetInventoryItemFormType(FormF)Global

        for base item types in player inventory

      • intfunctionGetFormTypeAll(FormF)Global

        includes all of the above form types

      • stringfunctionGetActorFormTypeString(FormF, string[]TypeStrings=NONE)Global

        Same as above but returns strings instead of ints==============================================================================
        If TypeStrings == none, returns the ScriptName of type. Can pass in string array to return different strings for translations.

      • stringfunctionGetAudioFormTypeString(FormF, string[]TypeStrings=NONE)Global
      • stringfunctionGetCharacterFormTypeString(FormF, string[]TypeStrings=NONE)Global
      • stringfunctionGetItemFormTypeString(FormF, string[]TypeStrings=NONE)Global
      • stringfunctionGetMagicFormTypeString(FormF, string[]TypeStrings=NONE)Global
      • stringfunctionGetMiscFormTypeString(FormF, string[]TypeStrings=NONE)Global
      • stringfunctionGetSpecialEffectFormTypeString(FormF, string[]TypeStrings=NONE)Global
      • stringfunctionGetWorldDataFormTypeString(FormF, string[]TypeStrings=NONE)Global
      • stringfunctionGetWorldObjectFormTypeString(FormF, string[]TypeStrings=NONE)Global
      • stringfunctionGetInventoryItemFormTypeString(FormF, string[]TypeStrings=NONE)Global

        for base item types in player inventory

      • stringfunctionGetFormTypeStringAll(FormF, string[]TypeStrings=NONE)Global

        includes all of the above types.

      • voidfunctionDisableThenEnablePlayerControls(floatDelay=1.0)Global

        Useful for force closing the inventory menu, or forcing the player to sheathe their weapon.
        No requirements

      • voidfunctionUpdateActor(ActorakActor, FormakForm)Global

        add and remove akForm from actor silently.
        This is useful for instance after changing an actors speed via akActor.SetAv("SpeedMult", 110)
        Or after changing armor model paths, or on the player after changing item names if in the inventory or container menu, will display visually the name change.
        No requirements

      • voidfunctionrefreshMenus()Global

        used to update menus while they are open.
        Example, changing a map marker property (name, icon or visibility) while the map menu is open

      • voidfunctionSwapEquipment(ActorA, ActorB)Global

        requires SKSE and Papyrus Extender
        swap all worn equipment between actor A and B.

      • voidfunctionSetActorValues(ActorakActor, string[]ActorValues, float[]Values)Global

        Set all ActorValues to Values on akActor
        no requirements

      • voidfunctionModActorValues(ActorakActor, string[]ActorValues, float[]Values)Global

        Mod all ActorValues with Values on akActor
        no requirements

      • float[]functionGetActorValues(ActorakActor, string[]ActorValues, DynamicArraysDArrays=NONE)Global

        return all actor values in ActorValueStrings to float array.
        if DArrays == none, requires skse. Can pass in DynamicArrays form to not use skse.

      • string[]functionGetActorValueStrings(ActorakActor, string[]ActorValues, string[]ActorValueStrings=NONE, DynamicArraysDArrays=NONE)Global

        same as GetActorValues but returns for instance "Health = 100.0" in string array instead of float values
        if ActorValueStrings == none, uses ActorValues for strings.
        can specify ActorValueStrings for translations. Indexes in ActorValues and ActorValuesStrings should match.
        if DArrays == none, requires skse. Can pass in DynamicArrays form to not use skse.

      • stringfunctionsGetActorValueStrings(ActorakActor, string[]ActorValues, string[]ActorValueStrings=NONE, stringDivider="|")Global

        same as GetActorValueStrings but puts all values in a single string divided by Divider.
        if ActorValueStrings == none, uses ActorValues for strings.
        can specify ActorValueStrings for translations. Indexes in ActorValues and ActorValuesStrings should match.
        no requirements

      • float[]functionGetBaseActorValues(ActorakActor, string[]ActorValues, DynamicArraysDArrays=NONE)Global

        return all Base actor values in ActorValueStrings to float array.
        if DArrays == none, requires skse. Can pass in DynamicArrays form to not use skse.

      • string[]functionGetBaseActorValueStrings(ActorakActor, string[]ActorValues, string[]ActorValueStrings=NONE, DynamicArraysDArrays=NONE)Global

        same as GetBaseActorValues but returns for instance "Health = 100.0" in string array instead of float values
        if ActorValueStrings == none, uses ActorValues for strings.
        can specify ActorValueStrings for translations. Indexes in ActorValues and ActorValuesStrings should match.
        if DArrays == none, requires skse. Can pass in DynamicArrays form to not use skse.

      • stringfunctionsGetBaseActorValueStrings(ActorakActor, string[]ActorValues, string[]ActorValueStrings=NONE, stringDivider="|")Global

        same as GetBaseActorValueStrings but puts all values in a single string divided by Divider.
        if ActorValueStrings == none, uses ActorValues for strings.
        can specify ActorValueStrings for translations. Indexes in ActorValues and ActorValuesStrings should match.
        no requirements

      • float[]functionGetActorValuesFromFile(ActorakActor, stringfilePath="ata/interface/DbMiscFunctions/DbActorValues.txt")Global

        return actor values of akActor from actor values in file to float array.
        can specify your own file path. Look at the structure of DbActorValues.txt to make another file.
        requires skse and papyrusUtil.

      • string[]functionGetActorValueStringsFromFile(ActorakActor, stringfilePath="ata/interface/DbMiscFunctions/DbActorValues.txt")Global

        same as GetActorValuesFromFile but returns for instance "Health = 100.0" in string array instead of float values
        can specify your own file path. Look at the structure of DbActorValues.txt to make another file.
        requires skse and papyrusUtil.

      • stringfunctionsGetActorValueStringsFromFile(ActorakActor, stringDivider="|", stringfilePath="ata/interface/DbMiscFunctions/DbActorValues.txt")Global

        same as GetActorValueStringsFromFile but puts all the values in a single string seperated by Divider
        can specify your own file path. Look at the structure of DbActorValues.txt to make another file.
        requires skse and papyrusUtil.

      • float[]functionGetBaseActorValuesFromFile(ActorakActor, stringfilePath="ata/interface/DbMiscFunctions/DbActorValues.txt")Global

        return all Base actor values in file to float array.
        can specify your own file path. Look at the structure of DbActorValues.txt to make another file.
        requires skse and papyrusUtil.

      • string[]functionGetBaseActorValueStringsFromFile(ActorakActor, stringfilePath="ata/interface/DbMiscFunctions/DbActorValues.txt")Global

        same as GetBaseActorValuesFromFile but returns for instance "Health = 100.0" in string array instead of float values
        can specify your own file path. Look at the structure of DbActorValues.txt to make another file.
        requires skse and papyrusUtil.

      • stringfunctionsGetBaseActorValueStringsFromFile(ActorakActor, stringDivider="|", stringfilePath="ata/interface/DbMiscFunctions/DbActorValues.txt")Global

        same as GetBaseActorValueStringsFromFile but puts all the values in a single string seperated by Divider
        can specify your own file path. Look at the structure of DbActorValues.txt to make another file.
        requires skse and papyrusUtil.

      • voidfunctionAttachPapyrusScript(stringakScript, ObjectReferenceRef)Global

        Attach the akScript to the Ref.
        Mostly for LE as on SE you can use the No Esp mod instead
        if ref == none, attachs akScript to the player
        requires skse and consoleUtil or DbSkseFunctions.
        DbSkseFunctions (included with this mod) only works on SE and AE

      • voidfunctionOpenMenu(stringmenuName)Global

        menuName must match a valid menu name in UI.psc
        requires skse

      • voidfunctionCloseMenu(stringmenuName)Global
      • stringfunctionGetStringBetweenOuterCharacters(strings, intstartIndex=0, stringleftChar="", stringrightChar="")Global

        get the string between leftChar (outer) and rightChar (outer) strings.
        leftChar and rightChar should both be a single character string.
        For instance:
        string sExample = "(A, (B + (C)), D)"
        GetStringBetweenOuterCharacters(sExample) ;returns "A, (B + (C)), D"
        GetStringBetweenOuterCharacters(sExample, 1) ;returns "B + (C)"
        requires skse

      • intfunctionfindNthInstanceInString(strings, stringtoFind, intnthInstance=-1, intstartIndex=0)Global

        find the index of the nth instance of string toFind in string s
        if nthInstance == -1 (default), finds the last instance in string s
        requires skse

      • intfunctionFindLastStringIndex(strings, stringToFind)Global

        Finds the last index of String ToFind in string s
        Example: FindLastStringIndex("The dog is the coolest dog in the world", "The") returns 30, the last instance of "the"
        Requires skse.

      • intfunctionFindWholeWordString(strings, stringToFind, intStartIndex=0)Global

        returns the index of the first character of toFind inside string s
        returns -1 if toFind is not part of the string or if startIndex is invalid or if the characters preceding and following ToFind in s are not whitespace
        Example
        FindWholeWordString("TestString", "String") returns -1
        FindWholeWordString("Test String", "String") returns 5

      • boolfunctionIsCharWhiteSpace(stringC)Global

        returns true if the single character string C is whitespace.
        requires skse

      • stringfunctionFindNextWordInString(strings, intstartIndex=0)Global

        find next word in string. (Next string of non white space) from startIndex
        Examples:
        String A = FindNextWordInString("This is some text ") ;A = "This"
        String B = FindNextWordInString("This is some text ", 12) ;B = "text"
        String C = FindNextWordInString("This is some text ", 9) ;C = "ome"
        requires skse

      • stringfunctionRFindNextWordInString(strings, intstartIndex=-1)Global

        same as above but in reverse
        if startIndex is -1, startIndex is string length
        requires skse

      • intfunctionFindNextNonWhiteSpaceCharIndexInString(strings, intstartIndex=0)Global

        requires skse

      • intfunctionRFindNextNonWhiteSpaceCharIndexInString(strings, intstartIndex=-1)Global

        same as above but in reverse
        if startIndex is -1, startIndex is string length
        requires skse

      • intfunctionFindNextWhiteSpaceCharIndexInString(strings, intstartIndex=0)Global

        requires skse

      • intfunctionRFindNextWhiteSpaceCharIndexInString(strings, intstartIndex=-1)Global

        same as above but in reverse
        if startIndex is -1, startIndex is string length
        requires skse

      • stringfunctionFindNextNonWhiteSpaceCharInString(strings, intstartIndex=0)Global

        requires skse

      • stringfunctionRFindNextNonWhiteSpaceCharInString(strings, intstartIndex=-1)Global

        same as above but in reverse
        if startIndex is -1, startIndex is string length
        requires skse

      • stringfunctionFindNextWhiteSpaceCharInString(strings, intstartIndex=0)Global

        requires skse

      • stringfunctionRFindNextWhiteSpaceCharInString(strings, intstartIndex=-1)Global

        same as above but in reverse
        if startIndex is -1, startIndex is string length
        requires skse

      • intfunctionRFindInString()
      • stringfunctionRemoveWhiteSpaces(strings, boolIncludeSpaces=true, boolIncludeTabs=true, boolIncludeNewLines=true)Global

        requires skse

      • intfunctionCountWhiteSpaces(strings, boolIncludeSpaces=true, boolIncludeTabs=true, boolIncludeNewLines=true)Global

        Requires skse

      • intfunctionCountStringsInString(strings, stringToFind, boolWholeWordsOnly=false)Global

        Count the number of String ToFind that occures in String s.
        If WholeWordsOnly == true, only counts where the string ToFind occures is surrounded by whiteSpace.
        requires skse

      • int[]functionGetPositionsOfStringInStrings(strings, stringToFind, boolWholeWordsOnly=false)Global
      • stringfunctionCreateRandomWord(intWordLength, stringletters="cdfghjklmnpqrstvwxyz", stringvowels="eiou", stringpairs="t gr ea ie ei pr qw fr cr tr vr br pl cl ")Global
      • stringfunctionGetRandomWordFromString(strings, stringDivider="")Global
      • stringfunctionGetRandomWordsFromString(strings, intnumOfWords, stringDivider="")Global
      • string[]functionGetRandomWordsFromStringA(strings, intnumOfWords, stringDivider="")Global
      • stringfunctionGetLoremipsumNoPunctuation()Global
      • stringfunctionGetLoremipsum()Global
      • stringfunctionRemoveDuplicateStrings(stringTargetStr, stringSearchStr)Global

        remove all SearchStr instances from TragetStr except for the first instance
        requires skse

      • stringfunctionRemoveAllDuplicateStrings(stringTargetStr, stringDivider="|", boolIncludeDividersInResult=true)Global

        Remove All Duplicate strings separated by Divider. Example:
        RemoveAllDuplicateStrings("TestString||TestString||Hmmm||TestString|| Test String ||Hmm||TestString") returns "TestString||Hmmm|| Test String ||"
        RemoveAllDuplicateStrings("TestString||TestString||Hmmm||TestString|| Test String ||Hmm||TestString", IncludeDividersInResult = false) returns "TestStringHmmm Test String "
        requires skse

      • stringfunctionStringReplace(stringTargetStr, stringSearchStr, stringReplaceStr, intCount=0, intStartIndex=0)Global

        Replace instances of the SearchStr with the ReplaceStr in the TargetStr
        Default count = 0 which means replace all instances. Otherwise only replace the Count number.
        Example:
        String MyString = "A Yes, B Yes, C Yes"
        String MyStringB = StringReplace(MyString, "Yes", "No")
        String MyStringC = StringReplace(MyString, "Yes", "No", 2)
        MyStringB == "A No, B No, C No"
        MyStringC == "A No, B No, C Yes"
        Requires SKSE

      • stringfunctionStringInsert(stringTargetStr, stringInsertStr, intCharPosition=-1)Global

        insert the InsertStr to the TargetStr at the CharPosition and return new string.
        if CharPosition == -1, appends the InsertStr to the end of TargetStr

      • stringfunctionStringRemoveCharAt(strings, intIndex)Global

        Remove a single character in String s at Index
        Requires skse

      • intfunctionStringRFind(strings, stringtoFind)Global

        Find the last index of the string toFind in string s.
        returns -1 if not found.
        requires skse

      • stringfunctionStringRemoveNonPrintableCharacters(strings)Global

        Remove Non printable characters from string
        Requires skse.

      • stringfunctionStringRemovePrintableCharacters(strings)Global

        Remove Non printable characters from string
        Requires skse.

      • stringfunctionAddPrefixToString(strings, stringPrefix, boolOnlyIfNotPresent=true)Global

        Add prefix to string s and return new string
        If OnlyIfNotPresent == true (default) only adds the prefix if it's not already present.
        Requires skse

      • string[]functionAddPrefixToStrings(string[]s, stringPrefix, boolOnlyIfNotPresent=true)Global

        Same as above but adds to all strings in array
        Requires skse

      • stringfunctionRemovePrefixFromString(strings, stringPrefix)Global

        Remove prefix from string s, if it exists and return new string, or return s if not present
        Requires skse

      • string[]functionRemovePrefixFromStrings(string[]s, stringPrefix)Global

        Same as above but removes from all strings in array
        Requires skse

      • stringfunctionAddSuffixToString(strings, stringSuffix, boolOnlyIfNotPresent=true)Global

        Add suffix to string s and return new string
        If OnlyIfNotPresent == true (default) only adds the suffix if it's not already present.
        Requires skse

      • string[]functionAddSuffixToStrings(string[]s, stringSuffix, boolOnlyIfNotPresent=true)Global

        Same as above but adds to all strings in array
        Requires skse

      • stringfunctionRemoveSuffixFromString(strings, stringSuffix)Global

        Remove suffix from string s, if it exists and return new string, or return s if not present
        Requires skse

      • string[]functionRemoveSuffixFromStrings(string[]s, stringSuffix)Global

        Same as above but removes from all strings in array
        Requires skse

      • voidfunctionAddPrefixToFormName(FormakForm, stringPrefix, boolOnlyIfNotPresent=true)Global

        Add prefix to akForm's name
        If OnlyIfNotPresent == true (default) only adds the prefix if it's not already present.
        Requires skse

      • voidfunctionAddPrefixToFormNames(Form[]akForms, stringPrefix, boolOnlyIfNotPresent=true)Global

        Same as above but adds to all form names in array
        Requires skse

      • voidfunctionRemovePrefixFromFormName(FormakForm, stringPrefix)Global

        Remove prefix from akForm's name if it exists
        Requires skse

      • voidfunctionRemovePrefixFromFormNames(Form[]akForms, stringPrefix, boolOnlyIfNotPresent=true)Global

        Same as above but removes from all form names in array
        Requires skse

      • voidfunctionAddSuffixToFormName(FormakForm, stringSuffix, boolOnlyIfNotPresent=true)Global

        Add Suffix to akForm's name
        If OnlyIfNotPresent == true (default) only adds the Suffix if it's not already present.
        Requires skse

      • voidfunctionAddSuffixToFormNames(Form[]akForms, stringSuffix, boolOnlyIfNotPresent=true)Global

        Same as above but adds to all form names in array
        Requires skse

      • voidfunctionRemoveSuffixFromFormName(FormakForm, stringSuffix)Global

        Remove Suffix from akForm's name if it exists
        Requires skse

      • voidfunctionRemoveSuffixFromFormNames(Form[]akForms, stringSuffix, boolOnlyIfNotPresent=true)Global

        Same as above but removes from all form names in array
        Requires skse

      • boolfunctionStringHasPrefix(strings, stringPrefix)Global

        Does the string have the Prefix?
        Requires skse

      • boolfunctionStringHasSuffix(strings, stringSuffix)Global

        Does the string have the Suffix?
        Requires skse

      • stringfunctionGetStringFromFile(stringStringKey, stringFileContents="", stringFilePath="", stringStartKey="", stringEndKey="", stringDefault="", intStartIndex=0)Global

        GetStringFromFile get custom string from external file or string
        finds first string between Startkey and EndKey after StringKey.
        similar to localization but no need to worry about nesting strings in a translation file this way.
        Example: Let's say you have a file Data/interface/MyStrings.txt that contains:
        MyStringA = [My String A]
        MyStringB = [My String B]

        String MyStringB = GetStringFromFile("MyStringB", FilePath = "Data/interface/MyStrings.txt") ;Returns "My String B"

        To search a string instead of a file path, you can do this:
        String MyStrings
        MyStrings = MiscUtil.ReadFromFile("Data/interface/MyStrings.txt")
        String MyStringB = GetStringFromFile("MyStringB", MyStrings) ;Returns "My String B"
        Note, if using the function this way, don't store MyStrings in the script, outside of events or functions. Storing large strings can cause CTD on game load.
        If storing this way, be sure to clear the string by doing: MyStrings = "" after it's finished being used.

        This method will be better for performance if you need to get a lot of strings from your file, as it won't use MiscUtil.ReadFromFile everytime you use the function.

        StringKeys contained in the file must be unique.

        If the stringkey wasn't found and the Default is "", it returns the stringKey
        Let's say you have:
        Some Custom Message = [Some Custome Message]
        in the "Data/interface/MyStrings.txt file"

        You can do:
        debug.notification(GetStringFromFile("Some Custom Message", FilePath = "Data/interface/MyStrings.txt"))
        And it will still show "Some Custom Message" if something went wrong and it wasn't found in the file
        You can specify a default if you want something else to return if the stringKey wasn't found.

        Requires PapyrusUtil && SKSE

      • intfunctionGetIntFromFile(stringStringKey, stringFileContents="", stringFilePath="", stringStartKey="", stringEndKey="", intDefault=-1, intStartIndex=0)Global

        same as GetStringFromFile but returns value as int.

      • floatfunctionGetFloatFromFile(stringStringKey, stringFileContents="", stringFilePath="", stringStartKey="", stringEndKey="", floatDefault=-1, intStartIndex=0)Global

        same as GetStringFromFile but returns value as float.

      • string[]functionGetAllStringsFromFile(stringFileContents="", stringFilePath="", stringRangeStart="", stringRangeEnd="", stringStartKey="", stringEndKey="", string[]Default=NONE)Global

        Save All strings in the StartKey and Endkey brackets, between the RangeStart and RangeEnd strings from the FileContents or FilePath to a string array.
        Example: you have a file Data/interface/MyStrings.txt that contains:
        MyStringA = [My String A]
        MyStringB = [My String B]

        String[] MyStrings = GetAllStringsFromFile("Data/interface/MyStrings.txt")
        MyStrings[0] will equal "My String A" and MyStrings[1] will equal "My String B"

        to specify a range to search you can do this:

        File contains:

        StringsA
        MyStringA = [My String A]
        MyStringB = [My String B]
        StringsAEnd
        MyStringC = [My String C]

        Using String[] MyStrings = GetAllStringsFromFile(FilePath = "Data/interface/MyStrings.txt", "StringsA", "StringsAEnd")
        Only My String A and My String B are saved to the array.

        If RangeStart is "", starts search at the beginning of the file. If RangeEnd is "", stops searching at the end of the file.

        requires SKSE and PapyrusUtil

      • int[]functionGetAllIntsFromFile(stringFileContents="", stringFilePath="", stringRangeStart="", stringRangeEnd="", stringStartKey="", stringEndKey="", int[]Default=NONE)Global

        Same as GetAllStringsFromFile but saves values as ints to int array
        requires SKSE and PapyrusUtil

      • float[]functionGetAllFloatsFromFile(stringFileContents="", stringFilePath="", stringRangeStart="", stringRangeEnd="", stringStartKey="", stringEndKey="", float[]Default=NONE)Global

        Same as GetAllStringsFromFile but saves values as floats to float array
        requires SKSE and PapyrusUtil

      • boolfunctionPrintStringKeysToFile(stringFilePathToSearch, stringFilePathToPrintTo, stringStartKey="", stringEndKey="", stringFinishedMsg="one Printing")Global

        PrintStringKeysToFile Finds and Prints all GetString / int / floatFromString StringKeys, from FilePathToSearch to FilePathToPrintTo
        To speed up the process of making your StringKeys.txt file.
        You can write GetStringFromFile() functions in your .psc file, and when you're finished with your script, have this function print the string keys to another .txt file.

        Example, if in MyScript.psc you have:
        Debug.Notification(GetStringFromFile("My Message A"))
        Debug.Notification(GetStringFromFile("My Message B"))
        Use the function:

        PrintStringKeysToFile("Data/Scripts/Source/MyScript.psc", "Data/interface/MyStrings.txt")

        In the MyStrings.txt file it will write:

        "My Message A" = ["My Message A"]
        "My Message B" = ["My Message B"]

        note that the quotes are included. You'll want to get rid of them by pressing ctrl H in your text editor and replace all " with nothing so it looks like:

        My Message A = [My Message A]
        My Message B = [My Message B]

        Otherwise the GetStringFromFile functions won't work correctly when reading from your .txt file.

        Requires SKSE and PapyrusUtil

      • voidfunctionPrintContainerItemsToFile(ObjectReferenceakContainer, stringFilePath, stringConfirmMessage="")Global

        Print all items in a container to the FilePath with the mod they come from included.
        Requires SKSE

      • voidfunctionWriteIDsInFormListToFile(FormListakList, stringFilePath, boolIncludeNames=false, boolReplaceIdStartWith0x=true)Global

        Write form ID's of forms in akList to file. If ReplaceIdStartWith0x == true (default), replaces first two characters of ID with 0x.
        Requires skse and PapyrusUtil

      • voidfunctionWriteIDsInFormArrayToFile(Form[]akList, stringFilePath, boolIncludeNames=false, boolReplaceIdStartWith0x=true)Global

        Write form ID's of forms in akList to file. If ReplaceIdStartWith0x == true (default), replaces first two characters of ID with 0x.
        Requires skse and PapyrusUtil

      • voidfunctionWriteIDsInStorageUtilListToFile(FormObjKey, stringListKeyName, stringFilePath, boolIncludeNames=false, boolReplaceIdStartWith0x=true)Global

        Write form ID's of forms in storageutil formlist to file. If ReplaceIdStartWith0x == true (default), replaces first two characters of ID with 0x.
        Requires skse and PapyrusUtil

      • voidfunctionWriteIDsInJsonUtilListToFile(stringJsonFilePath, stringListKeyName, stringFilePath, boolIncludeNames=false, boolReplaceIdStartWith0x=true)Global

        Write form ID's of forms in JsonUtil formlist to file. If ReplaceIdStartWith0x == true (default), replaces first two characters of ID with 0x.
        Requires skse and PapyrusUtil

      • voidfunctionWriteAnimationVariableBoolsToFile(ObjectReferenceakRef, stringOutputFilePath, stringVariablesSourceFilePath="ata/interface/DbMiscFunctions/DbAnimationVariableBools.txt")Global

        Write bool animation variables of akRef found in DbAnimationVariableBools.txt to OutputFilePath.
        Can specify a different VariablesSourceFilePath if desired.
        Default variables found in DbAnimationVariableBools.txt are from https://www.creationkit.com/index.php?title=List_of_Animation_Variables
        Requires skse and papyrusutil

      • voidfunctionWriteAnimationVariableIntsToFile(ObjectReferenceakRef, stringOutputFilePath, stringVariablesSourceFilePath="ata/interface/DbMiscFunctions/DbAnimationVariableInts.txt")Global

        Write int animation variables of akRef found in DbAnimationVariableInts.txt to OutputFilePath.
        Can specify a different VariablesSourceFilePath if desired.
        Default variables found in DbAnimationVariableInts.txt are from https://www.creationkit.com/index.php?title=List_of_Animation_Variables
        Requires skse and papyrusutil

      • voidfunctionWriteAnimationVariableFloatsToFile(ObjectReferenceakRef, stringOutputFilePath, stringVariablesSourceFilePath="ata/interface/DbMiscFunctions/DbAnimationVariableFloats.txt")Global

        Write Float animation variables of akRef found in DbAnimationVariableFloats.txt to OutputFilePath.
        Can specify a different VariablesSourceFilePath if desired.
        Default variables found in DbAnimationVariableFloats.txt are from https://www.creationkit.com/index.php?title=List_of_Animation_Variables
        Requires skse and papyrusutil

      • voidfunctionWriteAllAnimationVariablesToFile(ObjectReferenceakRef, stringOutputFilePath, stringBoolVariablesSourceFilePath="ata/interface/DbMiscFunctions/DbAnimationVariableBools.txt", stringIntVariablesSourceFilePath="ata/interface/DbMiscFunctions/DbAnimationVariableInts.txt", stringFloatVariablesSourceFilePath="ata/interface/DbMiscFunctions/DbAnimationVariableFloats.txt")Global

        Requires skse and papyrusutil

      • voidfunctionRegisterFormForAnimationEvents(FormakForm, ObjectReferenceakSender, string[]AnimationEvents)Global

        register the akForm to recieve all AnimationEvents from the akSender
        no requirements

      • voidfunctionRegisterAliasForAnimationEvents(AliasakAlias, ObjectReferenceakSender, string[]AnimationEvents)Global

        register the akAlias to recieve all AnimationEvents from the akSender
        no requirements

      • voidfunctionRegisterActiveMagicEffectForAnimationEvents(ActiveMagicEffectakActiveMagicEffect, ObjectReferenceakSender, string[]AnimationEvents)Global

        register the akActiveMagicEffect to recieve all AnimationEvents from the akSender
        no requirements

      • voidfunctionRegisterFormForAnimationEventsFromFile(FormakForm, ObjectReferenceakSender, stringFilePath="ata/interface/DbMiscFunctions/DbAnimationEvents.txt")Global

        Register the akForm to recieve all Animation Events from akSender found in File specified by FilePath.
        Events in the file should be separated by new line.
        Requires SKSE and PapyrusUtil

      • voidfunctionRegisterAliasForAnimationEventsFromFile(AliasakAlias, ObjectReferenceakSender, stringFilePath="ata/interface/DbMiscFunctions/DbAnimationEvents.txt")Global

        Register the akAlias to recieve all Animation Events from akSender found in File specified by FilePath.
        Events in the file should be separated by new line.
        Requires SKSE and PapyrusUtil

      • voidfunctionRegisterActiveMagicEffectForAnimationEventsFromFile(ActiveMagicEffectakActiveMagicEffect, ObjectReferenceakSender, stringFilePath="ata/interface/DbMiscFunctions/DbAnimationEvents.txt")Global

        Register the akActiveMagicEffect to recieve all Animation Events from akSender found in File specified by FilePath.
        Events in the file should be separated by new line.
        Requires SKSE and PapyrusUtil

      • voidfunctionRegisterFormForMenus(FormakForm, string[]Menus)Global

        register the akForm for all Menus in string array.
        Requires SKSE

      • voidfunctionRegisterAliasForMenus(AliasakAlias, string[]Menus)Global

        register the akAlias for all Menus in string array.
        Requires SKSE

      • voidfunctionRegisterActiveMagicEffectForMenus(ActiveMagicEffectakActiveMagicEffect, string[]Menus)Global

        register the akActiveMagicEffect for all Menus in string array.
        Requires SKSE

      • voidfunctionRegisterFormForMenusFromFile(FormakForm, stringFilePath="ata/interface/DbMiscFunctions/DbMenus.txt")Global

        Register the akForm for all menus found in File specified by FilePath.
        Events in the file should be separated by new line.
        Requires SKSE and PapyrusUtil

      • voidfunctionRegisterAliasForMenusFromFile(AliasakAlias, stringFilePath="ata/interface/DbMiscFunctions/DbMenus.txt")Global

        Register the akAlias for all menus found in File specified by FilePath.
        Events in the file should be separated by new line.
        Requires SKSE and PapyrusUtil

      • voidfunctionRegisterActiveMagicEffectForMenusFromFile(ActiveMagicEffectakActiveMagicEffect, stringFilePath="ata/interface/DbMiscFunctions/DbMenus.txt")Global

        Register the ActiveMagicEffect for all menus found in File specified by FilePath.
        Events in the file should be separated by new line.
        Requires SKSE and PapyrusUtil

      • voidfunctionWriteAllPscDataInFolderToFile(stringSearchFolderPath, stringTargetFilePath, stringDivider="n", stringDoneMessage="one Writing")Global

        Write all data info to TargetFilePath from all .psc files in SearchFolderPath. Writes ScriptNames, Function Names, Event Names, Function Definitions and Event Definitions.
        requires skse and papyrus util.

      • stringfunctionGetPscEventNamesFromFile(stringSourceFilePath, stringDivider="n", intStartIndex=0)Global
      • stringfunctionGetPscFunctionNamesFromFile(stringSourceFilePath, stringDivider="n", intStartIndex=0)Global
      • stringfunctionGetPscDataNamesFromFile(stringSourceFilePath, stringNameType, stringDivider="n", intStartIndex=0)Global
      • stringfunctionGetPscEventDefinitionsFromFile(stringSourceFilePath, stringDivider="n", intStartIndex=0)Global
      • stringfunctionGetPscFunctionDefinitionsFromFile(stringSourceFilePath, stringDivider="n", intStartIndex=0)Global
      • boolfunctionIsIndexInBlockComment(strings, intindex, stringblockCommentStart="/", stringblockCommentEnd=";")Global

        is the index in string s between a block comment start and end
        requires skse

      • stringfunctionGetPscDataDefinitionsFromFile(stringSourceFilePath, stringNameType, stringDivider="n", intStartIndex=0)Global
      • voidfunctionWriteJsonSaveAndLoadFunctionsToFile(stringSourceFilePath, stringDestinationFilePath="", boolGlobalVariablesToggle=true, boolFloatsToggle=true, boolStringsToggle=true, boolIntsToggle=true, boolBoolsToggle=true, boolGlobalVariableArraysToggle=true, boolFloatArraysToggle=true, boolStringArraysToggle=true, boolIntArraysToggle=true, boolBoolArraysToggle=true, intMessages=0, stringConfirmMessage="one Writing Json Functions", boolUsePropertiesAsDefaults=true)Global

        Search the SournceFilePath for String / Int / Float / Global variables, if their toggles are enabled, (outside of any events or functions)
        and write Json Save and Load functions to DestinationFilePath for said variables.
        If DestinationFilePath == "" it will write the functions to the SourceFilePath.
        Set Messages int to 0 to display ConfirmMessage notification when finished, set to 1 to display messagebox.
        requires skse and PapyrusUtil

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