Background for Skyrim SE

The DbIniFunctions Script

    The DbIniFunctions 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:

    • 14 functions


    Inheritance Tree

    No indexed scripts extend this script.

    Properties

    No properties found.

      Events

        No events found.

      Functions

      • boolfunctionGetIniBool(stringsFilePath, stringsSection, stringsKey, boolDefault=false)Global

        Getters============================================================================================

      • intfunctionGetIniInt(stringsFilePath, stringsSection, stringsKey, intDefault=0)Global
      • floatfunctionGetIniFloat(stringsFilePath, stringsSection, stringsKey, floatDefault=0.0)Global
      • stringfunctionGetIniString(stringsFilePath, stringsSection, stringsKey, stringDefault="")Global
      • boolfunctionSetIniBool(stringsFilePath, stringsSection, stringsKey, boolValue, boolbForce=false)Global

        Setters =======================================================================================================
        if bForce == true, will add the sKey to the sSection if it doesn't exist.

      • boolfunctionSetIniInt(stringsFilePath, stringsSection, stringsKey, intValue, boolbForce=false)Global
      • boolfunctionSetIniFloat(stringsFilePath, stringsSection, stringsKey, floatValue, boolbForce=false)Global
      • boolfunctionSetIniString(stringsFilePath, stringsSection, stringsKey, stringValue, boolbForce=false)Global
      • boolfunctionHasIniBool(stringsFilePath, stringsSection, stringsKey)Global

        Has functions==================================================================

      • boolfunctionHasIniInt(stringsFilePath, stringsSection, stringsKey)Global
      • boolfunctionHasIniFloat(stringsFilePath, stringsSection, stringsKey)Global
      • boolfunctionHasIniString(stringsFilePath, stringsSection, stringsKey)Global
      • stringfunctionConvertFilePathFromSEtoLE(stringsFilePath)Global

        used for the above functions
        Requires DbMiscFunctions and skse

      • voidfunctionWriteForceSetIniFunction(stringinputFilePath, stringoutputFilePath, stringfunctionName, boolonlyInisWithDefaults=true)Global

        used to write a function in your script to create an ini file for your mod.
        Let's say you have a script Data/Scripts/Source/MyScript.psc
        In the script you have a bunch of GetIni functions from this script like:
        String MyString = DbIniFunctions.GetIniString("Data/Interface/MyMod/Settings.ini", "Strings", "MyString", "My String")
        int MyInt = DbIniFunctions.GetIniInt("Data/Interface/MyMod/Settings.ini", "Main", "MyInt", 42)
        Using this function: 'WriteForceSetIniFunction("Data/Scripts/Source/MyScript.psc", "Data/Scripts/Source/MyScript.psc", "CreateIniFile")'
        Will write this function in your script:
        Function CreateIniFile()
        DbIniFunctions.SetIniString("Data/Interface/MyMod/Settings.ini", "Strings", "MyString", "My String", true)
        DbIniFunctions.SetIniInt("Data/Interface/MyMod/Settings.ini", "Main", "MyInt", 42, true)
        Endfunction
        You can then use this function to create your ini file and write all the inis in one go.
        requires skse and papyrusUtil

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