Skip to main content

Prerequisites

Before installing FFXIVClientStructs, ensure your project meets these requirements:

.NET 10.0

Target framework must be .NET 10.0 or higher

Unsafe Code

Your project must allow unsafe code blocks

C# Preview

Language version set to preview for latest features

Runtime Marshalling

Disable runtime marshalling for direct interop

Installation Methods

If you’re developing a Dalamud plugin, FFXIVClientStructs is already included and initialized for you.
1

Reference the library

Simply add a reference to FFXIVClientStructs in your plugin project:
YourPlugin.csproj
<ItemGroup>
  <Reference Include="FFXIVClientStructs">
    <HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
    <Private>false</Private>
  </Reference>
</ItemGroup>
2

Start using it

Dalamud automatically initializes the library, so you can start using it immediately:
YourPlugin.cs
using FFXIVClientStructs.FFXIV.Client.System.Framework;

public class YourPlugin : IDalamudPlugin {
    public void Initialize() {
        unsafe {
            var framework = Framework.Instance();
            // Framework is already initialized!
        }
    }
}
No signature resolution initialization needed - Dalamud handles this for you!

Project Configuration Details

Required PropertyGroup Settings

Explanation
<PropertyGroup>
  <!-- Target .NET 10.0 for latest C# features -->
  <TargetFramework>net10.0</TargetFramework>
  
  <!-- Preview language features for function pointers and generators -->
  <LangVersion>preview</LangVersion>
  
  <!-- Required for pointer operations -->
  <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  
  <!-- CRITICAL: Disables automatic marshalling for direct memory mapping -->
  <DisableRuntimeMarshalling>true</DisableRuntimeMarshalling>
  
  <!-- Recommended for cleaner code -->
  <ImplicitUsings>enable</ImplicitUsings>
  <Nullable>enable</Nullable>
</PropertyGroup>

Understanding Setup Parameters

The Setup() method accepts three optional parameters:
Setup Signature
void Setup(
    void* searchBase = null,        // Pointer to FFXIV module in memory
    string? searchKey = null,        // Version key for cache lookup
    FileInfo? cacheFile = null      // Path to signature cache JSON
)
searchBase
void*
default:"null"
Pointer to a copy of the FFXIV module in memory. If null, scans the active game process. Use Dalamud’s SigScanner.SearchBase to scan an unmodified copy.
searchKey
string
default:"null"
Version identifier for cache lookups. Typically the game version (e.g., “6.58”). Must match across runs to reuse cached signatures.
cacheFile
FileInfo
default:"null"
Path to a JSON file for caching resolved signatures. Subsequent runs with the same version will load addresses from cache instead of scanning.

Verification

After installation, verify everything works:
Test.cs
using FFXIVClientStructs.FFXIV.Client.System.Framework;
using System;

unsafe {
    var framework = Framework.Instance();
    if (framework != null) {
        Console.WriteLine($"Framework found at: {(nint)framework:X}");
        Console.WriteLine($"Frame counter: {framework->FrameCounter}");
        Console.WriteLine("FFXIVClientStructs is working!");
    } else {
        Console.WriteLine("ERROR: Framework instance is null");
        Console.WriteLine("Check that you're running this while FFXIV is active");
    }
}
The game must be running for signature resolution to work. All signatures scan the active FFXIV process memory.

Troubleshooting

This usually means signature resolution failed. Check that:
  1. You called Setup(), Register(), and Resolve() in order
  2. The game is running when you initialize
  3. Your game version matches the library version
Ensure <AllowUnsafeBlocks>true</AllowUnsafeBlocks> is set in your project file and you’re using unsafe blocks or methods.
Add <DisableRuntimeMarshalling>true</DisableRuntimeMarshalling> to your project file. All FFXIVClientStructs types are unmanaged and cannot use automatic marshalling.
Use the signature cache feature with a FileInfo parameter in Setup(). The first run will be slow, but subsequent runs with the same game version will be nearly instant.

Next Steps

Quick Start Guide

Learn the basics with practical examples

Back to Introduction

Return to the overview

Build docs developers (and LLMs) love