Skip to main content

Class SignatureAttribute

The main way to use SignatureHelper. Apply this attribute to any field/property that should make use of a signature. See the field documentation for more information.

Assembly: Dalamud.dll
View Source
Declaration
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
[MeansImplicitUse(ImplicitUseKindFlags.Assign, ImplicitUseTargetFlags.Default)]
public sealed class SignatureAttribute : Attribute

Inheritance: System.Object -> System.Attribute

Properties

Signature

Gets the memory signature for this field/property.

View Source
Declaration
public string Signature { get; init; }

UseFlags

Gets the way this signature should be used. By default, this is guessed using simple heuristics, but it can be manually specified if SignatureHelper can't figure it out.

Dalamud.Utility.Signatures.SignatureUseFlags

View Source
Declaration
public SignatureUseFlags UseFlags { get; init; }

ScanType

Gets the type of scan to perform. By default, this scans the text section of the executable, but this should be set to StaticAddress for static addresses.

View Source
Declaration
public ScanType ScanType { get; init; }

DetourName

Gets the detour name if this signature is for a hook. SignatureHelper will search the type containing this field/property for a method that matches the hook's delegate type, but if it doesn't find one or finds more than one, it will fail. You can specify the name of the method here to avoid this.

View Source
Declaration
public string? DetourName { get; init; }

Offset

Gets the offset from the signature to read memory from, when Dalamud.Utility.Signatures.SignatureAttribute.UseFlags is set to Offset.

View Source
Declaration
public int Offset { get; init; }

Fallibility

Gets the fallibility of the signature. When a signature is fallible, any errors while resolving it will be logged in the Dalamud log and the field/property will not have its value set. When a signature is not fallible, any errors will be thrown as exceptions instead. If fallibility is not specified, it is inferred based on if the field/property is nullable.

View Source
Declaration
public Fallibility Fallibility { get; init; }