Difference between revisions of "SetINIInt - Utility"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Plplecuyer
 
imported>Qazaaq
 
Line 1: Line 1:
[[Category:Scripting]]
 
[[Category:Papyrus]]
[[Category:Papyrus Debug Only Functions]]
'''Member of:''' [[Utility Script]]
'''Member of:''' [[Utility Script]]


Sets an integer INI setting's value.
Sets an integer value in the Fallout 4 [[Initialization File]]s (<code>.ini</code>).


== Syntax ==
== Syntax ==
Line 12: Line 10:


== Parameters ==
== Parameters ==
*ini: The ini setting to set
*ini: The <code>.ini</code> setting name and section. For example, <code>iSettingName:SectionName</code>.
*value: The value to give it
*value: The integer value to assign the setting.


== Return Value ==
== Return Value ==
Line 25: Line 23:


== Notes ==
== Notes ==
This function can only change the values of pre-defined ini settings in Fallout4.ini and Fallout4Prefs.ini and only during the current game session. It cannot create new settings and does not save them to an ini file. There is also no guarantee the game will ever read the value again past initial load, so changing it may have no effect.
This function can only change the values of pre-defined ini settings in Fallout4.ini and Fallout4Prefs.ini and only during the current game session.  
It cannot create new settings and does not save them to an ini file.  
There is also no guarantee the game will ever read the value again past initial load, so changing it may have no effect.


== See Also ==
== See Also ==
Line 32: Line 32:
*[[SetINIFloat - Utility]]
*[[SetINIFloat - Utility]]
*[[SetINIString - Utility]]
*[[SetINIString - Utility]]
*[[Initialization File]]
*[[Papyrus Naming Conventions]]
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Papyrus Debug Only Functions]]

Latest revision as of 22:14, 21 December 2018

Member of: Utility Script

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

Syntax[edit | edit source]

Function SetINIInt(string ini, int value) native global debugOnly

Parameters[edit | edit source]

  • ini: The .ini setting name and section. For example, iSettingName:SectionName.
  • value: The integer value to assign the setting.

Return Value[edit | edit source]

None

Examples[edit | edit source]

; Set the "iRandomSetting" in the "[CoolSettings]" section to 5
Utility.SetINIInt("iRandomSetting:CoolSettings", 5)

Notes[edit | edit source]

This function can only change the values of pre-defined ini settings in Fallout4.ini and Fallout4Prefs.ini and only during the current game session. It cannot create new settings and does not save them to an ini file. There is also no guarantee the game will ever read the value again past initial load, so changing it may have no effect.

See Also[edit | edit source]