Skip to main content
Version: 15.x (API 15) [Current]

Class GameConfigSection

Represents a section of the game config and contains helper functions for accessing and setting values.

Assembly: Dalamud.dll​
Declaration
public class GameConfigSection

Properties​

ConfigCount​

Gets the number of config entries contained within the section. Some entries may be empty with no data.

Declaration
public uint ConfigCount { get; }

SectionName​

Gets the name of the config section.

Declaration
public string SectionName { get; }

Methods​

TryGetBool(string, out bool)​

Attempts to get a boolean config option.

Declaration
public bool TryGetBool(string name, out bool value)
Returns​

System.Boolean: A value representing the success.

Parameters​
TypeNameDescription
System.StringnameName of the config option.
System.BooleanvalueThe returned value of the config option.

TryGet(string, out bool)​

Attempts to get a boolean config option.

Declaration
public bool TryGet(string name, out bool value)
Returns​

System.Boolean: A value representing the success.

Parameters​
TypeNameDescription
System.StringnameName of the config option.
System.BooleanvalueThe returned value of the config option.

GetBool(string)​

Get a boolean config option.

Declaration
public bool GetBool(string name)
Returns​

System.Boolean: Value of the config option.

Parameters​
TypeNameDescription
System.StringnameName of the config option.
Exceptions​

Dalamud.Game.Config.ConfigOptionNotFoundException
Thrown if the config option is not found.

Set(string, bool)​

Set a boolean config option. Note: Not all config options will be be immediately reflected in the game.

Declaration
public void Set(string name, bool value)
Parameters​
TypeNameDescription
System.StringnameName of the config option.
System.BooleanvalueNew value of the config option.
Exceptions​

Dalamud.Game.Config.ConfigOptionNotFoundException
Throw if the config option is not found. System.Diagnostics.UnreachableException
Thrown if the name of the config option is found, but the struct was not.

TryGetUInt(string, out uint)​

Attempts to get an unsigned integer config value.

Declaration
public bool TryGetUInt(string name, out uint value)
Returns​

System.Boolean: A value representing the success.

Parameters​
TypeNameDescription
System.StringnameName of the config option.
System.UInt32valueThe returned value of the config option.

TryGet(string, out uint)​

Attempts to get an unsigned integer config value.

Declaration
public bool TryGet(string name, out uint value)
Returns​

System.Boolean: A value representing the success.

Parameters​
TypeNameDescription
System.StringnameName of the config option.
System.UInt32valueThe returned value of the config option.

GetUInt(string)​

Get an unsigned integer config option.

Declaration
public uint GetUInt(string name)
Returns​

System.UInt32: Value of the config option.

Parameters​
TypeNameDescription
System.StringnameName of the config option.
Exceptions​

Dalamud.Game.Config.ConfigOptionNotFoundException
Thrown if the config option is not found.

Set(string, uint)​

Set an unsigned integer config option. Note: Not all config options will be be immediately reflected in the game.

Declaration
public void Set(string name, uint value)
Parameters​
TypeNameDescription
System.StringnameName of the config option.
System.UInt32valueNew value of the config option.
Exceptions​

Dalamud.Game.Config.ConfigOptionNotFoundException
Throw if the config option is not found. System.Diagnostics.UnreachableException
Thrown if the name of the config option is found, but the struct was not.

TryGetFloat(string, out float)​

Attempts to get a float config value.

Declaration
public bool TryGetFloat(string name, out float value)
Returns​

System.Boolean: A value representing the success.

Parameters​
TypeNameDescription
System.StringnameName of the config option.
System.SinglevalueThe returned value of the config option.

TryGet(string, out float)​

Attempts to get a float config value.

Declaration
public bool TryGet(string name, out float value)
Returns​

System.Boolean: A value representing the success.

Parameters​
TypeNameDescription
System.StringnameName of the config option.
System.SinglevalueThe returned value of the config option.

GetFloat(string)​

Get a float config option.

Declaration
public float GetFloat(string name)
Returns​

System.Single: Value of the config option.

Parameters​
TypeNameDescription
System.StringnameName of the config option.
Exceptions​

Dalamud.Game.Config.ConfigOptionNotFoundException
Thrown if the config option is not found.

Set(string, float)​

Set a float config option. Note: Not all config options will be be immediately reflected in the game.

Declaration
public void Set(string name, float value)
Parameters​
TypeNameDescription
System.StringnameName of the config option.
System.SinglevalueNew value of the config option.
Exceptions​

Dalamud.Game.Config.ConfigOptionNotFoundException
Throw if the config option is not found. System.Diagnostics.UnreachableException
Thrown if the name of the config option is found, but the struct was not.

TryGetString(string, out string)​

Attempts to get a string config value.

Declaration
public bool TryGetString(string name, out string value)
Returns​

System.Boolean: A value representing the success.

Parameters​
TypeNameDescription
System.StringnameName of the config option.
System.StringvalueThe returned value of the config option.

TryGet(string, out string)​

Attempts to get a string config value.

Declaration
public bool TryGet(string name, out string value)
Returns​

System.Boolean: A value representing the success.

Parameters​
TypeNameDescription
System.StringnameName of the config option.
System.StringvalueThe returned value of the config option.

GetString(string)​

Get a string config option.

Declaration
public string GetString(string name)
Returns​

System.String: Value of the config option.

Parameters​
TypeNameDescription
System.StringnameName of the config option.
Exceptions​

Dalamud.Game.Config.ConfigOptionNotFoundException
Thrown if the config option is not found.

TryGetStringAsEnum<T>(string, out T)​

Attempts to get a string config value as an enum value.

Declaration
public bool TryGetStringAsEnum<T>(string name, out T value) where T : struct, Enum
Returns​

System.Boolean: A value representing the success.

Parameters​
TypeNameDescription
System.StringnameName of the config option.
<T>valueThe returned value of the config option.
Type Parameters​
NameDescription
TType of the enum. Name of each enum fields are compared against.

Set(string, string)​

Set a string config option. Note: Not all config options will be be immediately reflected in the game.

Declaration
public void Set(string name, string value)
Parameters​
TypeNameDescription
System.StringnameName of the config option.
System.StringvalueNew value of the config option.
Exceptions​

Dalamud.Game.Config.ConfigOptionNotFoundException
Throw if the config option is not found. System.Diagnostics.UnreachableException
Thrown if the name of the config option is found, but the struct was not.

TryGetProperties(string, out UIntConfigProperties?)​

Attempts to get the properties of a UInt option from the config section.

Declaration
public bool TryGetProperties(string name, out UIntConfigProperties? properties)
Returns​

System.Boolean: A value representing the success.

Parameters​
TypeNameDescription
System.StringnameName of the option to get the properties of.
Dalamud.Game.Config.UIntConfigPropertiespropertiesDetails of the option: Minimum, Maximum, and Default values.

TryGetProperties(string, out FloatConfigProperties?)​

Attempts to get the properties of a Float option from the config section.

Declaration
public bool TryGetProperties(string name, out FloatConfigProperties? properties)
Returns​

System.Boolean: A value representing the success.

Parameters​
TypeNameDescription
System.StringnameName of the option to get the properties of.
Dalamud.Game.Config.FloatConfigPropertiespropertiesDetails of the option: Minimum, Maximum, and Default values.

TryGetProperties(string, out StringConfigProperties?)​

Attempts to get the properties of a String option from the config section.

Declaration
public bool TryGetProperties(string name, out StringConfigProperties? properties)
Returns​

System.Boolean: A value representing the success.

Parameters​
TypeNameDescription
System.StringnameName of the option to get the properties of.
Dalamud.Game.Config.StringConfigPropertiespropertiesDetails of the option: Minimum, Maximum, and Default values.