Class SeString
This class represents a parsed SeString.
Assembly: Dalamud.dll
public class SeString
Properties
TextArrowPayloads
Gets a list of Payloads necessary to display the arrow link marker icon in chat with the appropriate glow and coloring.
public static IEnumerable<Payload> TextArrowPayloads { get; }
Empty
Gets an empty SeString.
public static SeString Empty { get; }
Payloads
Gets the ordered list of payloads included in this SeString.
public List<Payload> Payloads { get; }
TextValue
Gets all of the raw text from a message as a single joined string.
public string TextValue { get; }
Methods
Parse(byte*, int)
Parse a binary game message into an SeString.
public static SeString Parse(byte* ptr, int len)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing parsed Payload objects for each payload in the data.
Parameters
| Type | Name | Description |
|---|---|---|
System.Byte* | ptr | Pointer to the string's data in memory. |
System.Int32 | len | Length of the string's data in memory. |
Parse(ReadOnlySpan<byte>)
Parse a binary game message into an SeString.
public static SeString Parse(ReadOnlySpan<byte> data)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing parsed Payload objects for each payload in the data.
Parameters
| Type | Name | Description |
|---|---|---|
System.ReadOnlySpan<System.Byte> | data | Binary message payload data in SE's internal format. |
Parse(byte[])
Parse a binary game message into an SeString.
public static SeString Parse(byte[] bytes)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing parsed Payload objects for each payload in the data.
Parameters
| Type | Name | Description |
|---|---|---|
System.Byte[] | bytes | Binary message payload data in SE's internal format. |
Parse(byte*)
Parse a binary game message into an SeString.
public static SeString Parse(byte* ptr)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing parsed Payload objects for each payload in the data.
Parameters
| Type | Name | Description |
|---|---|---|
System.Byte* | ptr | Pointer to the string's data in memory. Needs to be null-terminated. |
CreateItemLink(uint, bool, string?)
Creates an SeString representing an entire Payload chain that can be used to link an item in the chat log.
public static SeString CreateItemLink(uint itemId, bool isHq, string? displayNameOverride = null)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing all the payloads necessary to display an item link in the chat log.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | itemId | The id of the item to link. |
System.Boolean | isHq | Whether to link the high-quality variant of the item. |
System.String | displayNameOverride | An optional name override to display, instead of the actual item name. |
CreateItemLink(uint, ItemKind, string?)
Creates an SeString representing an entire Payload chain that can be used to link an item in the chat log.
public static SeString CreateItemLink(uint itemId, ItemKind kind = ItemKind.Normal, string? displayNameOverride = null)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing all the payloads necessary to display an item link in the chat log.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | itemId | The id of the item to link. |
| Dalamud.Utility.ItemKind | kind | The kind of item to link. |
System.String | displayNameOverride | An optional name override to display, instead of the actual item name. |
CreateItemLink(Item, bool, string?)
Creates an SeString representing an entire Payload chain that can be used to link an item in the chat log.
public static SeString CreateItemLink(Item item, bool isHq, string? displayNameOverride = null)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing all the payloads necessary to display an item link in the chat log.
Parameters
| Type | Name | Description |
|---|---|---|
Lumina.Excel.Sheets.Item | item | The Lumina Item to link. |
System.Boolean | isHq | Whether to link the high-quality variant of the item. |
System.String | displayNameOverride | An optional name override to display, instead of the actual item name. |
CreateMapLink(uint, uint, int, int)
Creates an SeString representing an entire Payload chain that can be used to link a map position in the chat log.
public static SeString CreateMapLink(uint territoryId, uint mapId, int rawX, int rawY)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing all of the payloads necessary to display a map link in the chat log.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | territoryId | The id of the TerritoryType for this map link. |
System.UInt32 | mapId | The id of the Map for this map link. |
System.Int32 | rawX | The raw x-coordinate for this link. |
System.Int32 | rawY | The raw y-coordinate for this link.. |
CreateMapLinkWithInstance(uint, uint, int?, int, int)
Creates an SeString representing an entire Payload chain that can be used to link a map position in the chat log.
public static SeString CreateMapLinkWithInstance(uint territoryId, uint mapId, int? instance, int rawX, int rawY)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing all of the payloads necessary to display a map link in the chat log.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | territoryId | The id of the TerritoryType for this map link. |
System.UInt32 | mapId | The id of the Map for this map link. |
System.Nullable<System.Int32> | instance | An optional area instance number to be included in this link. |
System.Int32 | rawX | The raw x-coordinate for this link. |
System.Int32 | rawY | The raw y-coordinate for this link.. |
CreateMapLink(uint, uint, float, float, float)
Creates an SeString representing an entire Payload chain that can be used to link a map position in the chat log.
public static SeString CreateMapLink(uint territoryId, uint mapId, float xCoord, float yCoord, float fudgeFactor = 0.05)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing all of the payloads necessary to display a map link in the chat log.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | territoryId | The id of the TerritoryType for this map link. |
System.UInt32 | mapId | The id of the Map for this map link. |
System.Single | xCoord | The human-readable x-coordinate for this link. |
System.Single | yCoord | The human-readable y-coordinate for this link. |
System.Single | fudgeFactor | An optional offset to account for rounding and truncation errors; it is best to leave this untouched in most cases. |
CreateMapLinkWithInstance(uint, uint, int?, float, float, float)
Creates an SeString representing an entire Payload chain that can be used to link a map position in the chat log.
public static SeString CreateMapLinkWithInstance(uint territoryId, uint mapId, int? instance, float xCoord, float yCoord, float fudgeFactor = 0.05)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing all of the payloads necessary to display a map link in the chat log.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | territoryId | The id of the TerritoryType for this map link. |
System.UInt32 | mapId | The id of the Map for this map link. |
System.Nullable<System.Int32> | instance | An optional area instance number to be included in this link. |
System.Single | xCoord | The human-readable x-coordinate for this link. |
System.Single | yCoord | The human-readable y-coordinate for this link. |
System.Single | fudgeFactor | An optional offset to account for rounding and truncation errors; it is best to leave this untouched in most cases. |
CreateMapLink(string, float, float, float)
Creates an SeString representing an entire Payload chain that can be used to link a map position in the chat log, matching a specified zone name. Returns null if no corresponding PlaceName was found.
public static SeString? CreateMapLink(string placeName, float xCoord, float yCoord, float fudgeFactor = 0.05)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing all of the payloads necessary to display a map link in the chat log.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | placeName | The name of the location for this link. This should be exactly the name as seen in a displayed map link in-game for the same zone. |
System.Single | xCoord | The human-readable x-coordinate for this link. |
System.Single | yCoord | The human-readable y-coordinate for this link. |
System.Single | fudgeFactor | An optional offset to account for rounding and truncation errors; it is best to leave this untouched in most cases. |
CreateMapLinkWithInstance(string, int?, float, float, float)
Creates an SeString representing an entire Payload chain that can be used to link a map position in the chat log, matching a specified zone name. Returns null if no corresponding PlaceName was found.
public static SeString? CreateMapLinkWithInstance(string placeName, int? instance, float xCoord, float yCoord, float fudgeFactor = 0.05)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing all of the payloads necessary to display a map link in the chat log.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | placeName | The name of the location for this link. This should be exactly the name as seen in a displayed map link in-game for the same zone. |
System.Nullable<System.Int32> | instance | An optional area instance number to be included in this link. |
System.Single | xCoord | The human-readable x-coordinate for this link. |
System.Single | yCoord | The human-readable y-coordinate for this link. |
System.Single | fudgeFactor | An optional offset to account for rounding and truncation errors; it is best to leave this untouched in most cases. |
CreatePartyFinderLink(uint, string, bool)
Creates an SeString representing an entire payload chain that can be used to link party finder listings in the chat log.
public static SeString CreatePartyFinderLink(uint listingId, string recruiterName, bool isCrossWorld = false)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing all the payloads necessary to display a party finder link in the chat log.
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | listingId | The listing ID of the party finder entry. |
System.String | recruiterName | The name of the recruiter. |
System.Boolean | isCrossWorld | Whether the listing is limited to the current world or not. |
CreatePartyFinderSearchConditionsLink(string)
Creates an SeString representing an entire payload chain that can be used to link the party finder search conditions.
public static SeString CreatePartyFinderSearchConditionsLink(string message)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: An SeString containing all the payloads necessary to display a link to the party finder search conditions.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | message | The text that should be displayed for the link. |
FromJson(string)
Creates a SeString from a json. (For testing - not recommended for production use.)
public static SeString? FromJson(string json)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: A SeString initialized with values from the json.
Parameters
| Type | Name | Description |
|---|---|---|
System.String | json | A serialized SeString produced by ToJson() Dalamud.Game.Text.SeStringHandling.SeString.ToJson(). |
ToJson()
Serializes the SeString to json.
public string ToJson()
Returns
System.String: An json representation of this object.
Append(SeString)
Appends the contents of one SeString to this one.
public SeString Append(SeString other)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: This object.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Text.SeStringHandling.SeString | other | The SeString to append to this one. |
Append(IEnumerable<Payload>)
Appends a list of payloads to this SeString.
public SeString Append(IEnumerable<Payload> payloads)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: This object.
Parameters
| Type | Name | Description |
|---|---|---|
System.Collections.Generic.IEnumerable<Dalamud.Game.Text.SeStringHandling.Payload> | payloads | The Payloads to append. |
Append(Payload)
Appends a single payload to this SeString.
public SeString Append(Payload payload)
Returns
Dalamud.Game.Text.SeStringHandling.SeString: This object.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.Text.SeStringHandling.Payload | payload | The payload to append. |
Encode()
Encodes the Payloads in this SeString into a binary representation suitable for use by in-game handlers, such as the chat log.
public byte[] Encode()
Returns
System.Byte[]: The binary encoded payload data.
EncodeWithNullTerminator()
Encodes the Payloads in this SeString into a binary representation suitable for use by in-game handlers, such as the chat log. Includes a null terminator at the end of the string.
public byte[] EncodeWithNullTerminator()
Returns
System.Byte[]: The binary encoded payload data.
ToString()
Get the text value of this SeString.
public override string ToString()
Returns
System.String: The TextValue property.