To begin, clone this template repository to your own GitHub account. This will automatically bring in everything you need to get a jumpstart on development. You do not need to fork this repository unless you intend to contribute modifications to it.
Be sure to also check out the Dalamud Developer Docs for helpful information about building your own plugin. The Developer Docs includes helpful information about all sorts of things, including how to submit your newly-created plugin to the official repository. Assuming you use this template repository, the provided project build configuration and license are already chosen to make everything a breeze.
SamplePlugin assumes all the following prerequisites are met:
- XIVLauncher, FINAL FANTASY XIV, and Dalamud have all been installed and the game has been run with Dalamud at least once.
- XIVLauncher is installed to its default directories and configurations.
- If a custom path is required for Dalamud's dev directory, it must be set with the
DALAMUD_HOME
environment variable.
- If a custom path is required for Dalamud's dev directory, it must be set with the
- A .NET Core 8 SDK has been installed and configured, or is otherwise available. (In most cases, the IDE will take care of this.)
- Open up
SamplePlugin.sln
in your C# editor of choice (likely Visual Studio 2022 or JetBrains Rider). - Build the solution. By default, this will build a
Debug
build, but you can switch toRelease
in your IDE. - The resulting plugin can be found at
SamplePlugin/bin/x64/Debug/SamplePlugin.dll
(orRelease
if appropriate.)
- Launch the game and use
/xlsettings
in chat orxlsettings
in the Dalamud Console to open up the Dalamud settings.- In here, go to
Experimental
, and add the full path to theSamplePlugin.dll
to the list of Dev Plugin Locations.
- In here, go to
- Next, use
/xlplugins
(chat) orxlplugins
(console) to open up the Plugin Installer.- In here, go to
Dev Tools > Installed Dev Plugins
, and theSamplePlugin
should be visible. Enable it.
- In here, go to
- You should now be able to use
/pmycommand
(chat) orpmycommand
(console)!
Note that you only need to add it to the Dev Plugin Locations once (Step 1); it is preserved afterwards. You can disable, enable, or load your plugin on startup through the Plugin Installer.
Basically, just replace all references to SamplePlugin
in all of the files and filenames with your desired name, then start building the plugin of your dreams. You'll figure it out 😁
Dalamud will load the JSON file (by default, SamplePlugin/SamplePlugin.json
) next to your DLL and use it for metadata, including the description for your plugin in the Plugin Installer. Make sure to update this with information relevant to your plugin!