Skip to main content

Class SeString

This class represents a parsed SeString.

Assembly: Dalamud.dll
View Source
Declaration
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.

View Source
Declaration
public static IEnumerable<Payload> TextArrowPayloads { get; }

Empty

Gets an empty SeString.

View Source
Declaration
public static SeString Empty { get; }

Payloads

Gets the ordered list of payloads included in this SeString.

View Source
Declaration
public List<Payload> Payloads { get; }

TextValue

Gets all of the raw text from a message as a single joined string.

View Source
Declaration
public string TextValue { get; }

Methods

Parse(byte*, int)

Parse a binary game message into an SeString.

View Source
Declaration
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
TypeNameDescription
System.Byte*ptrPointer to the string's data in memory.
System.Int32lenLength of the string's data in memory.

Parse(ReadOnlySpan<byte>)

Parse a binary game message into an SeString.

View Source
Declaration
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
TypeNameDescription
System.ReadOnlySpan<System.Byte>dataBinary message payload data in SE's internal format.

Parse(byte[])

Parse a binary game message into an SeString.

View Source
Declaration
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
TypeNameDescription
System.Byte[]bytesBinary message payload data in SE's internal format.

CreateItemLink(uint, bool, string?)

Creates an SeString representing an entire Payload chain that can be used to link an item in the chat log.

View Source
Declaration
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
TypeNameDescription
System.UInt32itemIdThe id of the item to link.
System.BooleanisHqWhether to link the high-quality variant of the item.
System.StringdisplayNameOverrideAn 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.

View Source
Declaration
public static SeString CreateItemLink(uint itemId, ItemPayload.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
TypeNameDescription
System.UInt32itemIdThe id of the item to link.
Dalamud.Game.Text.SeStringHandling.Payloads.ItemPayload.ItemKindkindThe kind of item to link.
System.StringdisplayNameOverrideAn 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.

View Source
Declaration
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
TypeNameDescription
Lumina.Excel.GeneratedSheets.ItemitemThe Lumina Item to link.
System.BooleanisHqWhether to link the high-quality variant of the item.
System.StringdisplayNameOverrideAn 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.

View Source
Declaration
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
TypeNameDescription
System.UInt32territoryIdThe id of the TerritoryType for this map link.
System.UInt32mapIdThe id of the Map for this map link.
System.Int32rawXThe raw x-coordinate for this link.
System.Int32rawYThe 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.

View Source
Declaration
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
TypeNameDescription
System.UInt32territoryIdThe id of the TerritoryType for this map link.
System.UInt32mapIdThe id of the Map for this map link.
System.Nullable<System.Int32>instanceAn optional area instance number to be included in this link.
System.Int32rawXThe raw x-coordinate for this link.
System.Int32rawYThe 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.

View Source
Declaration
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
TypeNameDescription
System.UInt32territoryIdThe id of the TerritoryType for this map link.
System.UInt32mapIdThe id of the Map for this map link.
System.SinglexCoordThe human-readable x-coordinate for this link.
System.SingleyCoordThe human-readable y-coordinate for this link.
System.SinglefudgeFactorAn 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.

View Source
Declaration
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
TypeNameDescription
System.UInt32territoryIdThe id of the TerritoryType for this map link.
System.UInt32mapIdThe id of the Map for this map link.
System.Nullable<System.Int32>instanceAn optional area instance number to be included in this link.
System.SinglexCoordThe human-readable x-coordinate for this link.
System.SingleyCoordThe human-readable y-coordinate for this link.
System.SinglefudgeFactorAn 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.

View Source
Declaration
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
TypeNameDescription
System.StringplaceNameThe 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.SinglexCoordThe human-readable x-coordinate for this link.
System.SingleyCoordThe human-readable y-coordinate for this link.
System.SinglefudgeFactorAn 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.

View Source
Declaration
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
TypeNameDescription
System.StringplaceNameThe 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>instanceAn optional area instance number to be included in this link.
System.SinglexCoordThe human-readable x-coordinate for this link.
System.SingleyCoordThe human-readable y-coordinate for this link.
System.SinglefudgeFactorAn 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.

View Source
Declaration
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
TypeNameDescription
System.UInt32listingIdThe listing ID of the party finder entry.
System.StringrecruiterNameThe name of the recruiter.
System.BooleanisCrossWorldWhether 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.

View Source
Declaration
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
TypeNameDescription
System.StringmessageThe text that should be displayed for the link.

FromJson(string)

Creates a SeString from a json. (For testing - not recommended for production use.)

View Source
Declaration
public static SeString? FromJson(string json)
Returns

Dalamud.Game.Text.SeStringHandling.SeString: A SeString initialized with values from the json.

Parameters
TypeNameDescription
System.StringjsonA serialized SeString produced by ToJson() Dalamud.Game.Text.SeStringHandling.SeString.ToJson().

ToJson()

Serializes the SeString to json.

View Source
Declaration
public string ToJson()
Returns

System.String: An json representation of this object.### Append(SeString) Appends the contents of one SeString to this one.

View Source
Declaration
public SeString Append(SeString other)
Returns

Dalamud.Game.Text.SeStringHandling.SeString: This object.

Parameters
TypeNameDescription
Dalamud.Game.Text.SeStringHandling.SeStringotherThe SeString to append to this one.

Append(IEnumerable<Payload>)

Appends a list of payloads to this SeString.

View Source
Declaration
public SeString Append(IEnumerable<Payload> payloads)
Returns

Dalamud.Game.Text.SeStringHandling.SeString: This object.

Parameters
TypeNameDescription
System.Collections.Generic.IEnumerable<Dalamud.Game.Text.SeStringHandling.Payload>payloadsThe Payloads to append.

Append(Payload)

Appends a single payload to this SeString.

View Source
Declaration
public SeString Append(Payload payload)
Returns

Dalamud.Game.Text.SeStringHandling.SeString: This object.

Parameters
TypeNameDescription
Dalamud.Game.Text.SeStringHandling.PayloadpayloadThe 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.

View Source
Declaration
public byte[] Encode()
Returns

System.Byte[]: The binary encoded payload data.### ToString() Get the text value of this SeString.

View Source
Declaration
public override string ToString()
Returns

System.String: The TextValue property.