Skip to main content

Interface INamePlateUpdateHandler

A class representing a single nameplate. Provides mechanisms to look up the game object associated with the nameplate and allows for modification of various backing fields in number and string array data, which in turn affect aspects of the nameplate's appearance when drawn. Instances of this class are only valid for a single frame and should not be kept across frames.

Assembly: Dalamud.dll
View Source
Declaration
public interface INamePlateUpdateHandler

Properties

GameObjectId

Gets the GameObjectId of the game object associated with this nameplate.

View Source
Declaration
ulong GameObjectId { get; }

GameObject

Gets the Dalamud.Game.ClientState.Objects.Types.IGameObject associated with this nameplate, if possible. Performs an object table scan and caches the result if successful.

View Source
Declaration
IGameObject? GameObject { get; }

InfoView

Gets a read-only view of the nameplate info object data for a nameplate. Modifications to Dalamud.Game.Gui.NamePlate.NamePlateUpdateHandler fields do not affect fields in the returned view.

View Source
Declaration
INamePlateInfoView InfoView { get; }

ArrayIndex

Gets the index for this nameplate data in the backing number and string array data. This is not the same as the rendered or object index, which can be retrieved from Dalamud.Game.Gui.NamePlate.INamePlateUpdateHandler.NamePlateIndex.

View Source
Declaration
int ArrayIndex { get; }

BattleChara

Gets the Dalamud.Game.ClientState.Objects.Types.IBattleChara associated with this nameplate, if possible. Returns null if the nameplate has an associated Dalamud.Game.ClientState.Objects.Types.IGameObject, but that object cannot be assigned to Dalamud.Game.ClientState.Objects.Types.IBattleChara.

View Source
Declaration
IBattleChara? BattleChara { get; }

PlayerCharacter

Gets the Dalamud.Game.ClientState.Objects.SubKinds.IPlayerCharacter associated with this nameplate, if possible. Returns null if the nameplate has an associated Dalamud.Game.ClientState.Objects.Types.IGameObject, but that object cannot be assigned to Dalamud.Game.ClientState.Objects.SubKinds.IPlayerCharacter.

View Source
Declaration
IPlayerCharacter? PlayerCharacter { get; }

NamePlateInfoAddress

Gets the address of the nameplate info struct.

View Source
Declaration
nint NamePlateInfoAddress { get; }

NamePlateObjectAddress

Gets the address of the first entry associated with this nameplate in the NamePlate addon's int array.

View Source
Declaration
nint NamePlateObjectAddress { get; }

NamePlateKind

Gets a value indicating what kind of nameplate this is, based on the kind of object it is associated with.

View Source
Declaration
NamePlateKind NamePlateKind { get; }

UpdateFlags

Gets the update flags for this nameplate.

View Source
Declaration
int UpdateFlags { get; }

TextColor

Gets or sets the overall text color for this nameplate. If this value is changed, the appropriate update flag will be set so that the game will reflect this change immediately.

View Source
Declaration
uint TextColor { get; set; }

EdgeColor

Gets or sets the overall text edge color for this nameplate. If this value is changed, the appropriate update flag will be set so that the game will reflect this change immediately.

View Source
Declaration
uint EdgeColor { get; set; }

MarkerIconId

Gets or sets the icon ID for the nameplate's marker icon, which is the large icon used to indicate quest availability and so on. This value is read from and reset by the game every frame, not just when a nameplate changes. Setting this to 0 disables the icon.

View Source
Declaration
int MarkerIconId { get; set; }

NameIconId

Gets or sets the icon ID for the nameplate's name icon, which is the small icon shown to the left of the name. Setting this to -1 disables the icon.

View Source
Declaration
int NameIconId { get; set; }

NamePlateIndex

Gets the nameplate index, which is the index used for rendering and looking up entries in the object array. For number and string array data, Dalamud.Game.Gui.NamePlate.INamePlateUpdateHandler.ArrayIndex is used.

View Source
Declaration
int NamePlateIndex { get; }

DrawFlags

Gets the draw flags for this nameplate.

View Source
Declaration
int DrawFlags { get; }

VisibilityFlags

Gets or sets the visibility flags for this nameplate.

View Source
Declaration
int VisibilityFlags { get; set; }

IsUpdating

Gets a value indicating whether this nameplate is undergoing a major update or not. This is usually true when a nameplate has just appeared or something meaningful about the entity has changed (e.g. its job or status). This flag is reset by the game during the update process (during requested update and before draw).

View Source
Declaration
bool IsUpdating { get; }

IsPrefixTitle

Gets or sets a value indicating whether the title (when visible) will be displayed above the object's name (a prefix title) instead of below the object's name (a suffix title).

View Source
Declaration
bool IsPrefixTitle { get; set; }

DisplayTitle

Gets or sets a value indicating whether the title should be displayed at all.

View Source
Declaration
bool DisplayTitle { get; set; }

Name

Gets or sets the name for this nameplate.

View Source
Declaration
SeString Name { get; set; }

NameParts

Gets a builder which can be used to help cooperatively build a new name for this nameplate even when other plugins modifying the name are present. Specifically, this builder allows setting text and text-wrapping payloads (e.g. for setting text color) separately.

View Source
Declaration
NamePlateSimpleParts NameParts { get; }

Title

Gets or sets the title for this nameplate.

View Source
Declaration
SeString Title { get; set; }

TitleParts

Gets a builder which can be used to help cooperatively build a new title for this nameplate even when other plugins modifying the title are present. Specifically, this builder allows setting text, text-wrapping payloads (e.g. for setting text color), and opening and closing quote sequences separately.

View Source
Declaration
NamePlateQuotedParts TitleParts { get; }

FreeCompanyTag

Gets or sets the free company tag for this nameplate.

View Source
Declaration
SeString FreeCompanyTag { get; set; }

FreeCompanyTagParts

Gets a builder which can be used to help cooperatively build a new FC tag for this nameplate even when other plugins modifying the FC tag are present. Specifically, this builder allows setting text, text-wrapping payloads (e.g. for setting text color), and opening and closing quote sequences separately.

View Source
Declaration
NamePlateQuotedParts FreeCompanyTagParts { get; }

StatusPrefix

Gets or sets the status prefix for this nameplate. This prefix is used by the game to add BitmapFontIcon-based online status icons to player nameplates.

View Source
Declaration
SeString StatusPrefix { get; set; }

TargetSuffix

Gets or sets the target suffix for this nameplate. This suffix is used by the game to add the squared-letter target tags to the end of combat target nameplates.

View Source
Declaration
SeString TargetSuffix { get; set; }

LevelPrefix

Gets or sets the level prefix for this nameplate. This "Lv60" style prefix is added to enemy and friendly battle NPC nameplates to indicate the NPC level.

View Source
Declaration
SeString LevelPrefix { get; set; }

Methods

RemoveName()

Removes the contents of the name field for this nameplate. This differs from simply setting the field to an empty string because it writes a special value to memory, and other setters (except SetField variants) will refuse to overwrite this value. Therefore, fields removed this way are more likely to stay removed.

View Source
Declaration
void RemoveName()

RemoveTitle()

Removes the contents of the title field for this nameplate. This differs from simply setting the field to an empty string because it writes a special value to memory, and other setters (except SetField variants) will refuse to overwrite this value. Therefore, fields removed this way are more likely to stay removed.

View Source
Declaration
void RemoveTitle()

RemoveFreeCompanyTag()

Removes the contents of the FC tag field for this nameplate. This differs from simply setting the field to an empty string because it writes a special value to memory, and other setters (except SetField variants) will refuse to overwrite this value. Therefore, fields removed this way are more likely to stay removed.

View Source
Declaration
void RemoveFreeCompanyTag()

RemoveStatusPrefix()

Removes the contents of the status prefix field for this nameplate. This differs from simply setting the field to an empty string because it writes a special value to memory, and other setters (except SetField variants) will refuse to overwrite this value. Therefore, fields removed this way are more likely to stay removed.

View Source
Declaration
void RemoveStatusPrefix()

RemoveTargetSuffix()

Removes the contents of the target suffix field for this nameplate. This differs from simply setting the field to an empty string because it writes a special value to memory, and other setters (except SetField variants) will refuse to overwrite this value. Therefore, fields removed this way are more likely to stay removed.

View Source
Declaration
void RemoveTargetSuffix()

RemoveLevelPrefix()

Removes the contents of the level prefix field for this nameplate. This differs from simply setting the field to an empty string because it writes a special value to memory, and other setters (except SetField variants) will refuse to overwrite this value. Therefore, fields removed this way are more likely to stay removed.

View Source
Declaration
void RemoveLevelPrefix()

GetFieldAsPointer(NamePlateStringField)

Gets a pointer to the string array value in the provided field.

View Source
Declaration
byte* GetFieldAsPointer(NamePlateStringField field)
Returns

System.Byte*: A pointer to a sequence of non-null bytes.

Parameters
TypeNameDescription
Dalamud.Game.Gui.NamePlate.NamePlateStringFieldfieldThe field to read from.

GetFieldAsSpan(NamePlateStringField)

Gets a byte span containing the string array value in the provided field.

View Source
Declaration
ReadOnlySpan<byte> GetFieldAsSpan(NamePlateStringField field)
Returns

System.ReadOnlySpan<System.Byte>: A ReadOnlySpan containing a sequence of non-null bytes.

Parameters
TypeNameDescription
Dalamud.Game.Gui.NamePlate.NamePlateStringFieldfieldThe field to read from.

GetFieldAsString(NamePlateStringField)

Gets a UTF8 string copy of the string array value in the provided field.

View Source
Declaration
string GetFieldAsString(NamePlateStringField field)
Returns

System.String: A copy of the string array value as a string.

Parameters
TypeNameDescription
Dalamud.Game.Gui.NamePlate.NamePlateStringFieldfieldThe field to read from.

GetFieldAsSeString(NamePlateStringField)

Gets a parsed SeString copy of the string array value in the provided field.

View Source
Declaration
SeString GetFieldAsSeString(NamePlateStringField field)
Returns

Dalamud.Game.Text.SeStringHandling.SeString: A copy of the string array value as a parsed SeString.

Parameters
TypeNameDescription
Dalamud.Game.Gui.NamePlate.NamePlateStringFieldfieldThe field to read from.

SetField(NamePlateStringField, string)

Sets the string array value for the provided field.

View Source
Declaration
void SetField(NamePlateStringField field, string value)
Parameters
TypeNameDescription
Dalamud.Game.Gui.NamePlate.NamePlateStringFieldfieldThe field to write to.
System.StringvalueThe string to write.

SetField(NamePlateStringField, SeString)

Sets the string array value for the provided field.

View Source
Declaration
void SetField(NamePlateStringField field, SeString value)
Parameters
TypeNameDescription
Dalamud.Game.Gui.NamePlate.NamePlateStringFieldfieldThe field to write to.
Dalamud.Game.Text.SeStringHandling.SeStringvalueThe SeString to write.

SetField(NamePlateStringField, ReadOnlySpan<byte>)

Sets the string array value for the provided field. The provided byte sequence must be null-terminated.

View Source
Declaration
void SetField(NamePlateStringField field, ReadOnlySpan<byte> value)
Parameters
TypeNameDescription
Dalamud.Game.Gui.NamePlate.NamePlateStringFieldfieldThe field to write to.
System.ReadOnlySpan<System.Byte>valueThe ReadOnlySpan of bytes to write.

SetField(NamePlateStringField, byte*)

Sets the string array value for the provided field. The provided byte sequence must be null-terminated.

View Source
Declaration
void SetField(NamePlateStringField field, byte* value)
Parameters
TypeNameDescription
Dalamud.Game.Gui.NamePlate.NamePlateStringFieldfieldThe field to write to.
System.Byte*valueThe pointer to a null-terminated sequence of bytes to write.

RemoveField(NamePlateStringField)

Sets the string array value for the provided field to a fixed pointer to an empty string in unmanaged memory. Other methods may notice this fixed pointer and refuse to overwrite it, preserving the emptiness of the field.

View Source
Declaration
void RemoveField(NamePlateStringField field)
Parameters
TypeNameDescription
Dalamud.Game.Gui.NamePlate.NamePlateStringFieldfieldThe field to write to.