Skip to main content
The Client.UI namespace contains all user interface systems, including the UIModule singleton, addon windows, and agent controllers.

Core Classes

UIModule

Central UI management singleton. Struct Layout:
// Client::UI::UIModule
[StructLayout(LayoutKind.Explicit, Size = 0xFEEB0)]
public unsafe partial struct UIModule {
    [FieldOffset(0x800)] internal RaptureTextModule RaptureTextModule;
    [FieldOffset(0x60D0)] internal RaptureMacroModule RaptureMacroModule;
    [FieldOffset(0x57B80)] internal RaptureHotbarModule RaptureHotbarModule;
    [FieldOffset(0x82F78)] internal RaptureGearsetModule RaptureGearsetModule;
    [FieldOffset(0xD2260)] internal RaptureAtkModule RaptureAtkModule;
    [FieldOffset(0xFC330)] internal InfoModule InfoModule;
}
Singleton Access:
var uiModule = UIModule.Instance();
// Alternative via Framework
var framework = Framework.Instance();
var uiModule = framework->GetUIModule();
Key Methods:
  • ProcessChatBoxEntry(Utf8String*, nint, bool) - Send chat message
  • Access to sub-modules via fields
Usage Example:
var ui = UIModule.Instance();

// Send chat message
var message = new Utf8String();
message.SetString("/wave");
ui->ProcessChatBoxEntry(&message, 0, true);

RaptureAtkModule

Manages addon lifecycle, UI state, and rendering. Struct Layout:
// Client::UI::RaptureAtkModule
[StructLayout(LayoutKind.Explicit, Size = 0x2A0D0)]
public unsafe partial struct RaptureAtkModule {
    [FieldOffset(0x82E0)] public GameUIScene UIScene;
    [FieldOffset(0x82E2)] public GameUIMode UIMode;
    [FieldOffset(0x11C48)] public AgentModule AgentModule;
    [FieldOffset(0x12BD0)] public RaptureAtkUnitManager RaptureAtkUnitManager;
    [FieldOffset(0x2A008)] public uint LocalPlayerClassJobId;
    [FieldOffset(0x2A00C)] public uint LocalPlayerLevel;
}
Singleton Access:
var raptureAtk = RaptureAtkModule.Instance();
// Alternative
var ui = UIModule.Instance();
var raptureAtk = ui->GetRaptureAtkModule();
Key Methods:
  • OpenAddon(uint, uint, AtkValue*, AtkEventInterface*, ulong, ushort, int) - Open addon
  • ChangeUiMode(uint) - Change UI mode

AtkUnitBase

Base class for all addon windows. Struct Layout:
// Component::GUI::AtkUnitBase
[StructLayout(LayoutKind.Explicit, Size = 0x220)]
public unsafe partial struct AtkUnitBase {
    [FieldOffset(0x00)] public AtkEventListener AtkEventListener;
    [FieldOffset(0x08)] internal FixedSizeArray64<byte> _name;
    [FieldOffset(0xC)] public int X;
    [FieldOffset(0x10)] public int Y;
    [FieldOffset(0x182)] public ushort Width;
    [FieldOffset(0x184)] public ushort Height;
    [FieldOffset(0x18A)] public byte Alpha;
    [FieldOffset(0x18C)] public short ParentId;
    [FieldOffset(0x190)] public AtkUnitBase* ParentBase;
    [FieldOffset(0x198)] public AtkUnitBase* PrevSiblingBase;
    [FieldOffset(0x1A0)] public AtkUnitBase* NextSiblingBase;
    [FieldOffset(0x1C8)] public AtkResNode* RootNode;
    [FieldOffset(0x1D8)] public AtkComponentNode* WindowNode;
    [FieldOffset(0x1E8)] public byte Flags;
}
Key Methods:
  • Show(bool, byte) - Show the addon
  • Hide(bool, bool, uint) - Hide the addon
  • SetPosition(short, short) - Set position
  • SetSize(ushort, ushort) - Set size
  • GetNodeById(uint) - Get node by ID
Usage Example:
// Get an addon
var unitManager = RaptureAtkUnitManager.Instance();
var addon = unitManager->GetAddonByName("Inventory");

if (addon != null) {
    // Check if visible
    if (addon->IsVisible) {
        addon->Hide(true, false, 0);
    } else {
        addon->Show(true, 0);
    }
    
    // Modify position
    addon->SetPosition(100, 100);
}

Addon Examples

AddonInventory

// Client::UI::AddonInventory
[Addon("Inventory")]
[StructLayout(LayoutKind.Explicit, Size = 0x338)]
public partial struct AddonInventory {
    [FieldOffset(0x240)] public int OpenerAddonId;
    [FieldOffset(0x2C0)] public AtkAddonControl AddonControl;
    [FieldOffset(0x334)] public int TabIndex;
}

var addon = (AddonInventory*)unitManager->GetAddonByName("Inventory");
if (addon != null) {
    addon->SetTab(2); // Switch to second tab
}

AddonCharacter

var charAddon = (AddonCharacter*)unitManager->GetAddonByName("Character");
if (charAddon != null && charAddon->AtkUnitBase.IsVisible) {
    // Character window is open
}

Agent System

AgentInterface

Base class for all agents (UI controllers). Struct Layout:
// Client::UI::Agent::AgentInterface
[StructLayout(LayoutKind.Explicit, Size = 0x28)]
public unsafe partial struct AgentInterface {
    [FieldOffset(0x10)] public UIModuleInterface* UIModuleInterface;
    [FieldOffset(0x20)] public uint AddonId;
}
Key Methods (Virtual):
  • Show() - VF3: Show agent’s UI
  • Hide() - VF5: Hide agent’s UI
  • IsAgentActive() - VF6: Check if active
  • Update(uint) - VF7: Frame update
  • IsActivatable() - VF8: Check if can be activated
Usage Example:
// Get agent by ID
var agentModule = &RaptureAtkModule.Instance()->AgentModule;
var agent = agentModule->GetAgentByInternalId(AgentId.Character);

if (agent != null) {
    if (agent->IsAgentActive()) {
        agent->Hide();
    } else {
        agent->Show();
    }
}

Common Agents

AgentMap - Map and teleport UI
var agentMap = AgentMap.Instance();
if (agentMap != null) {
    agentMap->OpenMap(mapId, territoryId);
}
AgentHUD - Main HUD controller
var agentHUD = AgentHUD.Instance();
// Control HUD visibility and state
AgentInventory - Inventory management
var agentInventory = AgentInventory.Instance();

UI Modules

RaptureHotbarModule

Manages hotbar configuration and state.
var ui = UIModule.Instance();
var hotbarModule = &ui->RaptureHotbarModule;

// Access hotbar slots
for (int i = 0; i < 10; i++) {
    var slot = hotbarModule->GetSlot(0, i); // Hotbar 1, slot i
    if (slot != null && slot->CommandType != 0) {
        Console.WriteLine($"Slot {i}: Type={slot->CommandType} ID={slot->CommandId}");
    }
}

RaptureGearsetModule

Manages gearsets.
var ui = UIModule.Instance();
var gearsetModule = &ui->RaptureGearsetModule;

// Get current gearset
var currentGearset = gearsetModule->CurrentGearsetIndex;

// Equip gearset
gearsetModule->EquipGearset(5); // Equip gearset #5

RaptureMacroModule

Manages macros.
var ui = UIModule.Instance();
var macroModule = &ui->RaptureMacroModule;

// Access macro
var macro = macroModule->GetMacro(0, 0); // Individual macro 0
if (macro != null) {
    var name = macro->Name.ToString();
    var lines = macro->Lines;
}

Common UI Patterns

Finding and Manipulating Addons

var unitManager = RaptureAtkUnitManager.Instance();
var addon = unitManager->GetAddonByName("AddonName");

if (addon != null && addon->IsVisible) {
    // Addon is open and visible
    var rootNode = addon->RootNode;
    
    // Find specific node
    var node = addon->GetNodeById(5);
    if (node != null) {
        node->ToggleVisibility(true);
    }
}

Iterating All Open Addons

var unitManager = RaptureAtkUnitManager.Instance();
var loadedUnitsList = &unitManager->AtkUnitManager.AllLoadedUnitsList;

for (int i = 0; i < loadedUnitsList->Count; i++) {
    var addon = loadedUnitsList->Entries[i].Value;
    if (addon != null && addon->IsVisible) {
        var name = addon->NameString;
        Console.WriteLine($"Addon: {name} at ({addon->X}, {addon->Y})");
    }
}

Working with AtkValues

var values = stackalloc AtkValue[3];
values[0].Type = ValueType.Int;
values[0].Int = 123;
values[1].Type = ValueType.String;
values[1].String = Marshal.StringToHGlobalAnsi("Hello");
values[2].Type = ValueType.Bool;
values[2].Byte = 1;

// Use with callbacks or commands

See Also

Build docs developers (and LLMs) love