Skip to main content

Development

🚧Pardon our dust!
We are in the process of updating and expanding our documentation, and collapsing the Development FAQ pages into other parts of our documentation as part of this process. Some information may be temporarily outdated. If something seems wrong, please join our Discord and ask in #plugin-dev for assistance.

How do the services in Dalamud work?

Dalamud is composed of many services, with the Dalamud.IoC.PluginInterfaceAttribute attribute, that provide you access to game and Dalamud state. You can opt into these services by including them in the constructor of the plugin, like so,

public Plugin(
[RequiredVersion("1.0")] DalamudPluginInterface pluginInterface,
[RequiredVersion("1.0")] CommandManager commandManager)

or by including them as an appropriately-attributed static variables in a class, and then using the plugin interface you get in the constructor (it's mandatory!) to initialise said class:

public class Dalamud
{
public static void Initialize(DalamudPluginInterface pluginInterface) =>
pluginInterface.Create<Dalamud>();

[PluginService]
[RequiredVersion("1.0")]
public static DalamudPluginInterface PluginInterface { get; private set; } = null!;
[PluginService]
[RequiredVersion("1.0")]
public static CommandManager Commands { get; private set; } = null!;
}

public Plugin(DalamudPluginInterface pluginInterface)
{
Dalamud.Initialize(pluginInterface);
}

What are the currently available Dalamud services?

As of Dalamud 6.3, these are all of the currently available services. Please update this list if you spot a discrepancy!

How do I convert from world coordinates to map coordinates and vice versa?

Please consult the ffxiv-datamining documentation on MapCoordinates, which details how to convert between the various kinds of coordinates.