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
public interface INamePlateUpdateHandler
Properties
GameObjectId
Gets the GameObjectId of the game object associated with this nameplate.
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.
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.
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.
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.
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.
IPlayerCharacter? PlayerCharacter { get; }
NamePlateInfoAddress
Gets the address of the nameplate info struct.
nint NamePlateInfoAddress { get; }
NamePlateObjectAddress
Gets the address of the first entry associated with this nameplate in the NamePlate addon's int array.
nint NamePlateObjectAddress { get; }
NamePlateKind
Gets a value indicating what kind of nameplate this is, based on the kind of object it is associated with.
NamePlateKind NamePlateKind { get; }
UpdateFlags
Gets the update flags for this nameplate.
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.
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.
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.
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.
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.
int NamePlateIndex { get; }
DrawFlags
Gets the draw flags for this nameplate.
int DrawFlags { get; }
VisibilityFlags
Gets or sets the visibility flags for this nameplate.
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).
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).
bool IsPrefixTitle { get; set; }
DisplayTitle
Gets or sets a value indicating whether the title should be displayed at all.
bool DisplayTitle { get; set; }
Name
Gets or sets the name for this nameplate.
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.
NamePlateSimpleParts NameParts { get; }
Title
Gets or sets the title for this nameplate.
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.
NamePlateQuotedParts TitleParts { get; }
FreeCompanyTag
Gets or sets the free company tag for this nameplate.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
void RemoveLevelPrefix()
GetFieldAsPointer(NamePlateStringField)
Gets a pointer to the string array value in the provided field.
byte* GetFieldAsPointer(NamePlateStringField field)
Returns
System.Byte*: A pointer to a sequence of non-null bytes.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Gui.NamePlate.NamePlateStringField | field | The field to read from. |
GetFieldAsSpan(NamePlateStringField)
Gets a byte span containing the string array value in the provided field.
ReadOnlySpan<byte> GetFieldAsSpan(NamePlateStringField field)
Returns
System.ReadOnlySpan<System.Byte>: A ReadOnlySpan containing a sequence of non-null bytes.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Gui.NamePlate.NamePlateStringField | field | The field to read from. |
GetFieldAsString(NamePlateStringField)
Gets a UTF8 string copy of the string array value in the provided field.
string GetFieldAsString(NamePlateStringField field)
Returns
System.String: A copy of the string array value as a string.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Gui.NamePlate.NamePlateStringField | field | The field to read from. |
GetFieldAsSeString(NamePlateStringField)
Gets a parsed SeString copy of the string array value in the provided field.
SeString GetFieldAsSeString(NamePlateStringField field)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: A copy of the string array value as a parsed SeString.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Gui.NamePlate.NamePlateStringField | field | The field to read from. |
SetField(NamePlateStringField, string)
Sets the string array value for the provided field.
void SetField(NamePlateStringField field, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Gui.NamePlate.NamePlateStringField | field | The field to write to. |
System.String | value | The string to write. |
SetField(NamePlateStringField, SeString)
Sets the string array value for the provided field.
void SetField(NamePlateStringField field, SeString value)
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Gui.NamePlate.NamePlateStringField | field | The field to write to. |
| Dalamud.Game.Text.SeStringHandling.SeString | value | The SeString to write. |
SetField(NamePlateStringField, ReadOnlySpan<byte>)
Sets the string array value for the provided field. The provided byte sequence must be null-terminated.
void SetField(NamePlateStringField field, ReadOnlySpan<byte> value)
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Gui.NamePlate.NamePlateStringField | field | The field to write to. |
System.ReadOnlySpan<System.Byte> | value | The 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.
void SetField(NamePlateStringField field, byte* value)
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Gui.NamePlate.NamePlateStringField | field | The field to write to. |
System.Byte* | value | The 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.
void RemoveField(NamePlateStringField field)
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Gui.NamePlate.NamePlateStringField | field | The field to write to. |