Class GameConfigSection
Represents a section of the game config and contains helper functions for accessing and setting values.
Assembly: Dalamud.dll
View Source
public class GameConfigSection
Properties
ConfigCount
Gets the number of config entries contained within the section. Some entries may be empty with no data.
View Source
public uint ConfigCount { get; }
SectionName
Gets the name of the config section.
View Source
public string SectionName { get; }
Methods
TryGetBool(string, out bool)
Attempts to get a boolean config option.
View Source
public bool TryGetBool(string name, out bool value)
Returns
System.Boolean
: A value representing the success.
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the config option. |
System.Boolean | value | The returned value of the config option. |
TryGet(string, out bool)
Attempts to get a boolean config option.
View Source
public bool TryGet(string name, out bool value)
Returns
System.Boolean
: A value representing the success.
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the config option. |
System.Boolean | value | The returned value of the config option. |
GetBool(string)
Get a boolean config option.
View Source
public bool GetBool(string name)
Returns
System.Boolean
: Value of the config option.
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name 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.
View Source
public void Set(string name, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the config option. |
System.Boolean | value | New 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.
View Source
public bool TryGetUInt(string name, out uint value)
Returns
System.Boolean
: A value representing the success.
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the config option. |
System.UInt32 | value | The returned value of the config option. |
TryGet(string, out uint)
Attempts to get an unsigned integer config value.
View Source
public bool TryGet(string name, out uint value)
Returns
System.Boolean
: A value representing the success.
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the config option. |
System.UInt32 | value | The returned value of the config option. |
GetUInt(string)
Get an unsigned integer config option.
View Source
public uint GetUInt(string name)
Returns
System.UInt32
: Value of the config option.
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name 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.
View Source
public void Set(string name, uint value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the config option. |
System.UInt32 | value | New 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.
View Source
public bool TryGetFloat(string name, out float value)
Returns
System.Boolean
: A value representing the success.