Simple example plugin for Dalamud.
This is not designed to be the simplest possible example, but it is also not designed to cover everything you might want to do. For more detailed questions, come ask in the Discord.
The intention is less that any of this is used directly in other projects, and more to show how similar things can be done.
SamplePlugin.sln
in your C# editor of choice (likely Visual Studio 2022 or JetBrains Rider).Debug
build, but you can switch to Release
in your IDE.SamplePlugin/obj/x64/Debug/SamplePlugin.dll
(or Release
if appropriate.)/xlsettings
in chat or xlsettings
in the Dalamud Console to open up the Dalamud settings.
Experimental
, and add the full path to the SamplePlugin.dll
to the list of Dev Plugin Locations./xlplugins
(chat) or xlplugins
(console) to open up the Plugin Installer.
Dev Tools > Installed Dev Plugins
, and the SamplePlugin
should be visible. Enable it./pmycommand
(chat) or pmycommand
(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. You'll figure it out 😁
Dalamud will load the JSON file (by default, Data/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!