Interface IGameConfig
This class represents the game's configuration.
Remarks
Accessing Dalamud.Game.Config.GameConfigSection-typed properties such as Dalamud.Plugin.Services.IGameConfig.System, directly or indirectly
via Dalamud.Plugin.Services.IGameConfig.TryGet(Dalamud.Game.Config.SystemConfigOption,System.Boolean@),
Dalamud.Plugin.Services.IGameConfig.Set(Dalamud.Game.Config.SystemConfigOption,System.Boolean), or alike will block, if the game is not done loading.
Therefore, avoid accessing configuration from your plugin constructor, especially if your plugin sets
Dalamud.Plugin.Internal.Types.PluginManifest.LoadRequiredState to 2 and Dalamud.Plugin.Internal.Types.PluginManifest.LoadSync to true.
If property access from the plugin constructor is desired, do the value retrieval asynchronously via
Dalamud.Plugin.Services.IFramework.RunOnFrameworkThread``1(System.Func<``0>); do not wait for the result right away.
Assembly: Dalamud.dll
public interface IGameConfig : IDalamudService
Properties
System
Gets the collection of config options that persist between characters.
GameConfigSection System { get; }
UiConfig
Gets the collection of config options that are character specific.
GameConfigSection UiConfig { get; }
UiControl
Gets the collection of config options that are control mode specific. (Mouse and Keyboard / Gamepad).
GameConfigSection UiControl { get; }
Methods
TryGet(SystemConfigOption, out bool)
Attempts to get a boolean config value from the System section.
bool TryGet(SystemConfigOption option, out bool value)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.SystemConfigOption | option | Option to get the value of. |
System.Boolean | value | The returned value of the config option. |
TryGet(SystemConfigOption, out uint)
Attempts to get a uint config value from the System section.
bool TryGet(SystemConfigOption option, out uint value)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.SystemConfigOption | option | Option to get the value of. |
System.UInt32 | value | The returned value of the config option. |
TryGet(SystemConfigOption, out float)
Attempts to get a float config value from the System section.
bool TryGet(SystemConfigOption option, out float value)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.SystemConfigOption | option | Option to get the value of. |
System.Single | value | The returned value of the config option. |
TryGet(SystemConfigOption, out string)
Attempts to get a string config value from the System section.
bool TryGet(SystemConfigOption option, out string value)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.SystemConfigOption | option | Option to get the value of. |
System.String | value | The returned value of the config option. |
TryGet(SystemConfigOption, out UIntConfigProperties?)
Attempts to get the properties of a UInt option from the System section.
bool TryGet(SystemConfigOption option, out UIntConfigProperties? properties)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.SystemConfigOption | option | Option to get the properties of. |
| Dalamud.Game.Config.UIntConfigProperties | properties | Details of the option: Minimum, Maximum, and Default values. |
TryGet(SystemConfigOption, out FloatConfigProperties?)
Attempts to get the properties of a Float option from the System section.
bool TryGet(SystemConfigOption option, out FloatConfigProperties? properties)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.SystemConfigOption | option | Option to get the properties of. |
| Dalamud.Game.Config.FloatConfigProperties | properties | Details of the option: Minimum, Maximum, and Default values. |
TryGet(SystemConfigOption, out PadButtonValue)
Attempts to get a string config value as a gamepad button enum value from the UiConfig section.
bool TryGet(SystemConfigOption option, out PadButtonValue value)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.SystemConfigOption | option | Option to get the value of. |
| Dalamud.Game.Config.PadButtonValue | value | The returned value of the config option. |
TryGet(SystemConfigOption, out StringConfigProperties?)
Attempts to get the properties of a String option from the System section.
bool TryGet(SystemConfigOption option, out StringConfigProperties? properties)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.SystemConfigOption | option | Option to get the properties of. |
| Dalamud.Game.Config.StringConfigProperties | properties | Details of the option: Default Value. |
TryGet(UiConfigOption, out bool)
Attempts to get a boolean config value from the UiConfig section.
bool TryGet(UiConfigOption option, out bool value)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiConfigOption | option | Option to get the value of. |
System.Boolean | value | The returned value of the config option. |
TryGet(UiConfigOption, out uint)
Attempts to get a uint config value from the UiConfig section.
bool TryGet(UiConfigOption option, out uint value)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiConfigOption | option | Option to get the value of. |
System.UInt32 | value | The returned value of the config option. |
TryGet(UiConfigOption, out float)
Attempts to get a float config value from the UiConfig section.
bool TryGet(UiConfigOption option, out float value)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiConfigOption | option | Option to get the value of. |
System.Single | value | The returned value of the config option. |
TryGet(UiConfigOption, out string)
Attempts to get a string config value from the UiConfig section.
bool TryGet(UiConfigOption option, out string value)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiConfigOption | option | Option to get the value of. |
System.String | value | The returned value of the config option. |
TryGet(UiConfigOption, out UIntConfigProperties?)
Attempts to get the properties of a UInt option from the UiConfig section.
bool TryGet(UiConfigOption option, out UIntConfigProperties? properties)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiConfigOption | option | Option to get the properties of. |
| Dalamud.Game.Config.UIntConfigProperties | properties | Details of the option: Minimum, Maximum, and Default values. |
TryGet(UiConfigOption, out FloatConfigProperties?)
Attempts to get the properties of a Float option from the UiConfig section.
bool TryGet(UiConfigOption option, out FloatConfigProperties? properties)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiConfigOption | option | Option to get the properties of. |
| Dalamud.Game.Config.FloatConfigProperties | properties | Details of the option: Minimum, Maximum, and Default values. |
TryGet(UiConfigOption, out StringConfigProperties?)
Attempts to get the properties of a String option from the UiConfig section.
bool TryGet(UiConfigOption option, out StringConfigProperties? properties)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiConfigOption | option | Option to get the properties of. |
| Dalamud.Game.Config.StringConfigProperties | properties | Details of the option: Default Value. |
TryGet(UiControlOption, out bool)
Attempts to get a boolean config value from the UiControl section.
bool TryGet(UiControlOption option, out bool value)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiControlOption | option | Option to get the value of. |
System.Boolean | value | The returned value of the config option. |
TryGet(UiControlOption, out uint)
Attempts to get a uint config value from the UiControl section.
bool TryGet(UiControlOption option, out uint value)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiControlOption | option | Option to get the value of. |
System.UInt32 | value | The returned value of the config option. |
TryGet(UiControlOption, out float)
Attempts to get a float config value from the UiControl section.
bool TryGet(UiControlOption option, out float value)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiControlOption | option | Option to get the value of. |
System.Single | value | The returned value of the config option. |
TryGet(UiControlOption, out string)
Attempts to get a string config value from the UiControl section.
bool TryGet(UiControlOption option, out string value)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiControlOption | option | Option to get the value of. |
System.String | value | The returned value of the config option. |
TryGet(UiControlOption, out UIntConfigProperties?)
Attempts to get the properties of a UInt option from the UiControl section.
bool TryGet(UiControlOption option, out UIntConfigProperties? properties)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiControlOption | option | Option to get the properties of. |
| Dalamud.Game.Config.UIntConfigProperties | properties | Details of the option: Minimum, Maximum, and Default values. |
TryGet(UiControlOption, out FloatConfigProperties?)
Attempts to get the properties of a Float option from the UiControl section.
bool TryGet(UiControlOption option, out FloatConfigProperties? properties)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiControlOption | option | Option to get the properties of. |
| Dalamud.Game.Config.FloatConfigProperties | properties | Details of the option: Minimum, Maximum, and Default values. |
TryGet(UiControlOption, out StringConfigProperties?)
Attempts to get the properties of a String option from the UiControl section.
bool TryGet(UiControlOption option, out StringConfigProperties? properties)
Returns
System.Boolean: A value representing the success.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.UiControlOption | option | Option to get the properties of. |
| Dalamud.Game.Config.StringConfigProperties | properties | Details of the option: Default Value. |
Set(SystemConfigOption, bool)
Set a boolean config option in the System config section. Note: Not all config options will be be immediately reflected in the game.
void Set(SystemConfigOption option, bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.SystemConfigOption | option | 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.
Set(SystemConfigOption, uint)
Set a unsigned integer config option in the System config section. Note: Not all config options will be be immediately reflected in the game.
void Set(SystemConfigOption option, uint value)
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Config.SystemConfigOption | option | Name of the config option. |
System.UInt32 | value | New value of the config option. |