Sharlayan.Lite 9.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Sharlayan.Lite --version 9.2.0
                    
NuGet\Install-Package Sharlayan.Lite -Version 9.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sharlayan.Lite" Version="9.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sharlayan.Lite" Version="9.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Sharlayan.Lite" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Sharlayan.Lite --version 9.2.0
                    
#r "nuget: Sharlayan.Lite, 9.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Sharlayan.Lite@9.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Sharlayan.Lite&version=9.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Sharlayan.Lite&version=9.2.0
                    
Install as a Cake Tool

Sharlayan.Lite

This fork is a lightweight version of the original library with memory search, ChatLog, and dialogue UI readers.

Supported targets: .NET Framework 4.6.2 and 4.8, plus .NET 6, 7, 8, and 10.

Nuget Package list

Package repo description
Sharlayan.Lite Nuget Sharlayan.Lite Main library

How do I use it and what comes back?

  • .NET CLI: dotnet add package Sharlayan.Lite --version 9.2.0
  • Nuget Package Manager: Install-Package Sharlayan.Lite -Version 9.2.0
  • PackageReference: <PackageReference Include="Sharlayan.Lite" Version="9.2.0" />

That's the basic of it. For actual instantiation it works as follows:

using Sharlayan;
using Sharlayan.Enums;
using Sharlayan.Models;
using Sharlayan.Models.Resources;

// DX11
Process[] processes = Process.GetProcessesByName("ffxiv_dx11");
if (processes.Length > 0)
{
    GameLanguage gameLanguage = GameLanguage.English;
    Process process = processes[0];
    ProcessModel processModel = new ProcessModel {
        Process = process
    };
    SharlayanConfiguration configuration = new SharlayanConfiguration {
        ProcessModel = processModel,
        GameLanguage = gameLanguage,
        ResourceMode = ResourceMode.RemotePreferred,
        ResourceCacheDirectory = Path.Combine(
            Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
            "MyApp")
    };
    MemoryHandler memoryHandler = SharlayanMemoryManager.Instance.AddHandler(configuration);
}

ResourceMode defaults to EmbeddedOnly, so existing consumers do not start network requests merely by updating the package. RemotePreferred validates Hermes v2 remote bytes first, then falls back to the last verified cache and finally the package's embedded manifest. Initialization uses one manifest revision for both the CHATLOG signature/structure and standard Talk offsets. The default latest pointer is https://hermes.sapphosound.com/v2/latest.json, under the Hermes v2 public base https://hermes.sapphosound.com/v2/.

The memory module is now instantiated and is ready to read data. When switch processes you should call:

SharlayanMemoryManager.Instance.RemoveHandler(processModel);

Reading

The instantiated memory handler for the process comes with it's own reader, or you can create your own.

Using Predefined

MemoryHandler memoryHandler = SharlayanMemoryManager.Instance.GetHandler(processModel);
XResult result = memoryHandler.Reader.GetX();

ChatLog Reading

using Sharlayan;

// For chatlog you must locally store previous array offsets and indexes in order to pull the correct log from the last time you read it.
int _previousArrayIndex = 0;
int _previousOffset = 0;

var readResult = memoryHandler.Reader.GetChatLog(_previousArrayIndex, _previousOffset);

var chatLogItems = readResult.ChatLogItems;

_previousArrayIndex = readResult.PreviousArrayIndex;
_previousOffset = readResult.PreviousOffset;

// The result is the following class
public class ChatLogResult
{
    public ChatLogResult()
    {
        ChatLogItems = new ConcurrentQueue<ChatLogItem>();
    }

    public ConcurrentQueue<ChatLogItem> ChatLogItems { get; set; }
    public int PreviousArrayIndex { get; set; }
    public int PreviousOffset { get; set; }
}

Standard NPC Talk Reading

if (memoryHandler.Reader.CanGetTalk()) {
    TalkResult talk = memoryHandler.Reader.GetTalk();
    if (talk.IsAvailable) {
        Console.WriteLine($"{talk.Source} (visible={talk.IsVisible}): {talk.Name}: {talk.Text}");
    }
}

GetTalk() returns the visible standard Talk addon first (Source=Current, IsVisible=true) and falls back to FCS LastTalkName/LastTalkText (Source=Last, IsVisible=false) when no stable current Talk is available. Use GetCurrentTalk() or GetLastTalk() when the distinction is part of the caller's policy. Applications consuming the last value should baseline the first value after attach before treating changes as new dialogue.

BattleTalk Reading

if (memoryHandler.Reader.CanGetBattleTalk()) {
    BattleTalkResult battleTalk = memoryHandler.Reader.GetBattleTalk();
    if (battleTalk.IsAvailable && battleTalk.IsVisible) {
        Console.WriteLine($"{battleTalk.Sequence}: {battleTalk.Name}: {battleTalk.Text}");
    }
}

The optional capability returns false when the selected Hermes manifest does not contain its resource. BattleTalkResult.Sequence increases for each stable visible generation observed during the handler lifetime, including the same name/text pair after a stable hidden state.

The selected resource can be inspected through memoryHandler.ResourceInfo, including its source, revision, FCS/generator commits, validation status, resolved location count, and fallback reason.

Roll your own app?

If you want to scan application-specific signatures, register them explicitly after the built-in Hermes v2 initialization. Do not modify a verified Hermes cache file.

SharlayanConfiguration configuration = new SharlayanConfiguration {
    ProcessModel = new ProcessModel {
        Process = Process.GetProcessesByName("ffxiv_dx11").FirstOrDefault(),
    },
};
MemoryHandler memoryHandler = new MemoryHandler(configuration);
// it be default will pull in the memory signatures from the local file, backup from API (GitHub)
memoryHandler.Scanner.Locations.Clear(); // these are resolved MemoryLocation

var signatures = new List<Signature>();
// typical signature
signatures.Add(new Signature
{
	Key = "SOMETHING",
	Value = "0123456789ABCDEF",
	Offset = 0
});
// pointer path based (no signature)
signatures.Add(new Signature
{
	Key = "SOMETHING2",
	PointerPath = new List<long>
	{
		0x0123456789
	}
});
// Aseembly Signature Based
signatures.Add(new Signature
{
	Key = "SOMETING3",
	Value = "0123456789ABCDEF0123456789ABCDEF",
	ASMSignature = true,
	PointerPath = new List<long>
	{
		0L, // ASM assumes first pointer is always 0
		144L
	}
});

memoryHandler.Scanner.LoadOffsets(signatures);

Once this is complete you can reference this when reading like so:

var somethingMap = memoryHandler.GetByteArray(memoryHandler.Scanner.Locations["SOMETHING"], 8);
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.2.1 95 7/28/2026
9.2.0 105 7/26/2026
9.1.4 103 7/25/2026
9.1.3 113 7/25/2026 9.1.3 is deprecated because it has critical bugs.
9.1.2 117 7/25/2026 9.1.2 is deprecated because it has critical bugs.
8.0.1 350 7/17/2024