Getting Started | Dalamud (2024)

🚧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 I get started?
    • Dalamud Plugins
    • Dalamud
    • XIVLauncher
  • Where do I ask for help?
  • How do I hot-reload my plugin?
  • How do I debug my plugin and/or the game?
  • How do I use FFXIVClientStructs in my own code?

How do I get started?

The majority of the XIVLauncher and Dalamud ecosystem is written in C# for itsusability, convenience, and robustness. It is recommended that anything you workon is also in C#, unless you're working on something with a significant amountof interoperation with native code (in which C++/CLI may be useful) or you'reexperimenting with other .NET languages.

To get started, you'll want to get the latest version of Visual Studio foundhere; the Community editionwill work fine. After doing so, you can clone any of the following projects andget to work with their Visual Studio solutions. Alternatively, you may want touse another IDE such as JetBrains Rider.

Dalamud Plugins

Plugins allow you to interact with the game and add features, modifyfunctionality, and do much more. We ask you to be respectful ofour guidelines to ensure that yourplugin is approved into the primary repository, and to minimise the risk ofaction by Square Enix. You can read more about thishere.

We recommend that you start by cloning one of the following templates, and thencustomising it to your requirements. While SamplePlugin is the most activelymaintained, the others are updated as required:

To distribute a plugin, it needs to be packaged correctly. This can be donemanually or with DalamudPackager.

When your plugin is ready for testing/release, it should be PRed over to theDalamudPluginsD17 repo.Please place testing plugins in the testing/live folder.

Dalamud

Dalamud is the core addon/plugin system. It is loaded by XIVLauncher into yourgame, and is responsible for loading your plugins and providing them with a coreset of functionality.

The Dalamud source codecan be found on GitHub.

Other assets required by Dalamud can be foundin the DalamudAssets repository.

You can find the Dalamud API documentation on this site.

XIVLauncher

XIVLauncher is a custom launcher for FFXIV that offers a number of benefits,including faster launching, saved credentials, and automatically injectingDalamud into the game.

The XIVLauncher source code can be foundon GitHub.

Where do I ask for help?

The best place to ask for help is the#dev channel of the Discord; we're a helpfulbunch and will do our best to answer your query as long as you explain whatyou've tried and looked at so far.

How do I hot-reload my plugin?

As of API 4/Dalamud 6, hot-reloading is part of Dalamud. To use it, go toDalamud Settings > Experimental > Dev Plugin Locations, and then add either thefolder that your plugin is in or the plugin itself. If you add a folder, Dalamudwill attempt to load all DLLs within the folder.

Your configuration should look something like this:Getting Started | Dalamud (1)

How do I debug my plugin and/or the game?

To debug, you'll need to attach a debugger to the game. This will usually befrom your development environment, such as Visual Studio.

However, the game has antidebug protection on by default. To turn this off, usethe Dalamud dev menu (/xldev), then go to Dalamud > Enable AntiDebug; thissetting is persisted between launches, so you do not need to turn it on eachtime.

Once you've done this, you can attach to the game with your debugger. In VisualStudio, you can go to Debug > Attach to Process (Ctrl+Alt+P), and then selectthe FF14 process. For the full debugging experience, make sure to change "Attachto" to include both Native code and Managed (.NET 4.x) code; this willensure that the debugger will work for both the game and for Dalamud plugins.

This functionality is only supported for debugging your plugins. You will notreceive support if you use it for anything else.

Detailed instructions are available here.

How do I use FFXIVClientStructs in my own code?

FFXIVClientStructs is a communalproject to provide an interface to the game's classes, data, and more to C#users and reverse engineers.

To use FFXIVClientStructs in your own code, you'll need to add a reference toit. This can be done by opening the csproj for your plugin and adding thereference with the other references:

 <Reference Include="FFXIVClientStructs">
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\FFXIVClientStructs.dll</HintPath>
</Reference>

or through right-clicking the project in VS, going to Add, and then adding anAssembly Reference to the same path. Note that you will likely need to stillopen the csproj after doing this to ensure that the path uses $(AppData) andnot the path specific to your system.

The version of FFXIVClientStructs included with Dalamud is updated withreasonable frequency, and has several patches to ensure that backwardscompatibility with existing plugins is not broken. You can bundle your ownversion if you'd like for the latest findings, but be aware that this may makeit difficult for you to maintain compatibility with new versions of the gameand/or Dalamud.

Getting Started | Dalamud (2024)

References

Top Articles
Latest Posts
Article information

Author: Wyatt Volkman LLD

Last Updated:

Views: 6293

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Wyatt Volkman LLD

Birthday: 1992-02-16

Address: Suite 851 78549 Lubowitz Well, Wardside, TX 98080-8615

Phone: +67618977178100

Job: Manufacturing Director

Hobby: Running, Mountaineering, Inline skating, Writing, Baton twirling, Computer programming, Stone skipping

Introduction: My name is Wyatt Volkman LLD, I am a handsome, rich, comfortable, lively, zealous, graceful, gifted person who loves writing and wants to share my knowledge and understanding with you.