FFXIV plugin framework and API
Find a file
srkizer 87b9edb448
Add IInternal/PublicDisposableService (#1696)
* Add IInternal/PublicDisposableService

Plugins are exposed interfaces that are not inherited from
`IDisposable`, but services implementing plugin interfaces often
implement `IDisposable`. Some plugins may try to call
`IDisposable.Dispose` on everything provided, and it also is possible to
use `using` clause too eagerly while working on Dalamud itself, such as
writing `using var smth = await Service<SomeService>.GetAsync();`. Such
behaviors often lead to a difficult-to-debug errors, and making those
services either not an `IDisposable` or making `IDisposable.Dispose` do
nothing if the object has been loaded would prevent such errors. As
`ServiceManager` must be the only class dealing with construction and
disposal of services, `IInternalDisposableService` has been added to
limit who can dispose the object. `IPublicDisposableService` also has
been added to classes that can be constructed and accessed directly by
plugins; for those, `Dispose` will be ignored if the instance is a
service instance, and only `DisposeService` will respond.

In addition, `DalamudPluginInterface` and `UiBuilder` also have been
changed so that their `IDisposable.Dispose` no longer respond, and
instead, internal functions have been added to only allow disposal from
Dalamud.

* Cleanup

* Postmerge fixes

* More explanation on RunOnFrameworkThread(ClearHooks)

* Mark ReliableFileStorage public ctor obsolete

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
2024-03-16 15:58:05 +00:00
.github Add API Compatibility Checks (#1603) 2024-01-13 19:17:34 +01:00
.nuke update build.schema.json 2022-12-10 12:54:26 +01:00
api docs: replace mbplugin link with rich presence 2020-03-31 04:34:09 +09:00
build remove deprecated Nuke attribute 2022-12-10 12:36:04 +01:00
Dalamud Add IInternal/PublicDisposableService (#1696) 2024-03-16 15:58:05 +00:00
Dalamud.Boot Sanitize PDB root name from loaded modules (#1687) 2024-02-29 15:13:33 -08:00
Dalamud.Common Synchronize DalamudStartInfo between cpp and cs (#1679) 2024-02-22 20:27:07 -08:00
Dalamud.CorePlugin Add IInternal/PublicDisposableService (#1696) 2024-03-16 15:58:05 +00:00
Dalamud.Injector Sanitize PDB root name from loaded modules (#1687) 2024-02-29 15:13:33 -08:00
Dalamud.Injector.Boot Make RewriteRemoteEntryPointW report IErrorInfo, VirtualProtectEx before WriteProcessMemory 2024-02-13 08:35:51 +09:00
Dalamud.Test chore: tidy-up, move files shared between dalamud and injector into separate assembly 2023-09-30 16:11:52 +02:00
DalamudCrashHandler Synchronize DalamudStartInfo between cpp and cs (#1679) 2024-02-22 20:27:07 -08:00
docs docs: regenerate 2023-01-26 23:57:38 +01:00
lib Add INotification.RespectUiHidden 2024-03-14 13:05:46 +09:00
targets Bump DalamudPackager to 2.1.12 in .targets (#1456) 2023-10-04 02:43:39 +00:00
.editorconfig Prevent end comment aligning (Resharper/SA conflict) 2023-12-08 23:20:05 +09:00
.gitattributes Initial commit 2019-09-21 22:29:38 +09:00
.gitignore Initial commit 2019-09-21 22:29:38 +09:00
.gitmodules fix submodule target for ClientStructs 2023-01-10 22:39:41 +01:00
build.cmd Magic the magic happen 2021-07-11 16:32:32 -04:00
build.ps1 Magic the magic happen 2021-07-11 16:32:32 -04:00
build.sh Remove EnableWindowsTargeting from build.sh's run step (#1633) 2024-02-07 10:37:55 -08:00
CreateHashList.ps1 Magic the magic happen 2021-07-11 16:32:32 -04:00
Dalamud.sln Some DCH correctness 2024-02-17 21:38:43 +09:00
Dalamud.sln.DotSettings refactor: fix plugin internal style errors (#830) 2022-05-12 10:34:45 +02:00
docfx.json chore: specify csproj files directly in docfx config (#1253) 2023-06-18 07:43:06 +00:00
filterConfig.yml docs: exclude SDL2, Dalamud.Test, Dalamud.Interface.Internal, Dalamud.Game.Internal 2021-12-02 22:36:12 +01:00
global.json fix: Use SetValue for FlyText string arrays (#1532) 2023-11-18 12:17:18 -08:00
index.md docs: regenerate, include docfx config 2020-02-14 20:24:41 +09:00
LICENSE Update License to AGPL 3.0 or Later (#1373) 2023-09-19 23:11:23 +02:00
README.md chore: ci + readme fixes, make editorconfig consistent with usage in yml files (#1228) 2023-05-29 06:41:33 +00:00
sign.ps1 chore: codesigning for releases 2023-06-29 13:29:35 +02:00
stylecop.json Magic the magic happen 2021-07-11 16:32:32 -04:00

Dalamud Actions Status Discord Shield

Dalamud

Dalamud is a plugin development framework for FINAL FANTASY XIV that provides access to game data and native interoperability with the game itself to add functionality and quality-of-life.

It is meant to be used in conjunction with FFXIVQuickLauncher, which manages and launches Dalamud for you. It is generally not recommended for users to try to run Dalamud manually as there are multiple dependencies and assumed folder paths.

Hold Up!

If you are just trying to use Dalamud, you don't need to do anything on this page - please download XIVLauncher from its official page and follow the setup instructions.

Plugin development

Dalamud features a growing API for in-game plugin development with game data and chat access and overlays. Please see our Developer FAQ and the API documentation for more details.

If you need any support regarding the API or usage of Dalamud, please join our discord server.


Thanks to Mino, whose work has made this possible!

Components & Pipeline

These components are used in order to load Dalamud into a target process. Dalamud can be loaded via DLL injection, or by rewriting a process' entrypoint.

Name Purpose
Dalamud.Injector.Boot (C++) Loads the .NET Core runtime into a process via hostfxr and kicks off Dalamud.Injector
Dalamud.Injector (C#) Performs DLL injection on the target process
Dalamud.Boot (C++) Loads the .NET Core runtime into the active process and kicks off Dalamud, or rewrites a target process' entrypoint to do so
Dalamud (C#) Core API, game bindings, plugin framework
Dalamud.CorePlugin (C#) Testbed plugin that can access Dalamud internals, to prototype new Dalamud features

Branches

We are currently working from the following branches.

Name API Level Purpose .NET Version Track
master 8 Current release branch .NET 7.0.0 (November 2022) Release & Staging
v9 9 Next major version, slated for release alongside Patch 6.5 .NET 7.0.0 (November 2022) v9

Final Fantasy XIV © 2010-2021 SQUARE ENIX CO., LTD. All Rights Reserved. We are not affiliated with SQUARE ENIX CO., LTD. in any way.