Difference between revisions of "GetINIBool - Utility"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>JustinOther
(Created page with "Category:Scripting Category:Papyrus Category:SKSE '''SKSE Member of:''' UI Script {{SKSEFunction|1.04.02}} '''Member of:''' Utility Script Gets a boolean...")
 
imported>DAb
 
(2 intermediate revisions by one other user not shown)
Line 28: Line 28:
</source>
</source>
*Toggle setting:
*Toggle setting:
<source lang="papyrus">Utility.SetINIBool(!Utility.GetINIBool("bShowCompass:Interface)"
<source lang="papyrus">Utility.SetINIBool("bShowCompass:Interface", !Utility.GetINIBool("bShowCompass:Interface"))
</source>
</source>
== See Also ==
== See Also ==
*[[Utility Script]]
*[[Utility Script]]

Latest revision as of 12:39, 13 September 2018

SKSE Member of: UI Script

Minimum required SKSE Version: 1.04.02 Member of: Utility Script

Gets a boolean INI setting's value.

Syntax[edit | edit source]

Function GetINIBool(String ini) Native Global

Parameters[edit | edit source]

ini: The ini setting to get

Return Value[edit | edit source]

Returns the value of the specified boolean INI setting.

Notes[edit | edit source]

This works for Bethesda created settings only, whether in Skyrim.ini, SkyrimPrefs.ini, or YourLoadedPlugin.ini. Note that, in that order, each INI will override the setting(s) of the previous INI file(s).

Examples[edit | edit source]

Utility.GetINIBool("bEnableLogging:Papyrus") ; Get the value of "bEnableLogging" in the "[Papyrus]" section
  • Toggle setting:
Utility.SetINIBool("bShowCompass:Interface", !Utility.GetINIBool("bShowCompass:Interface"))

See Also[edit | edit source]