Class Message
A message stores text for popups, journal, letters, rumours, etc.
Namespace: DaggerfallWorkshop.Game.Questing
Assembly: Assembly-CSharp.dll
Syntax
public class Message
Constructors
| Improve this Doc View SourceMessage(Quest)
Default constructor.
Declaration
public Message(Quest parentQuest)
Parameters
Type | Name | Description |
---|---|---|
Quest | parentQuest |
Message(Quest, Int32, String[])
Load message constructor.
Declaration
public Message(Quest parentQuest, int id, string[] source)
Parameters
Type | Name | Description |
---|---|---|
Quest | parentQuest | |
Int32 | id | |
String[] | source |
Properties
| Improve this Doc View SourceID
Declaration
public int ID { get; }
Property Value
Type | Description |
---|---|
Int32 |
ParentQuest
Declaration
public Quest ParentQuest { get; }
Property Value
Type | Description |
---|---|
Quest |
VariantCount
Declaration
public int VariantCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Variants
Declaration
public List<Message.MessageVariant> Variants { get; }
Property Value
Type | Description |
---|---|
List<Message.MessageVariant> |
Methods
| Improve this Doc View SourceGetSaveData()
Declaration
public Message.MessageSaveData_v1 GetSaveData()
Returns
Type | Description |
---|---|
Message.MessageSaveData_v1 |
GetTextTokens(Int32, Boolean)
Gets text tokens for this message. Will return a random variant if variant = -1 and more than one variant exists. If only a single variant then same text tokens are returned each time. It is safe to leave variant as -1 if you don't care about the variant you receive.
Declaration
public TextFile.Token[] GetTextTokens(int variant = -1, bool expandMacros = true)
Parameters
Type | Name | Description |
---|---|---|
Int32 | variant | |
Boolean | expandMacros | True to expand text macros like %foo and _foo. |
Returns
Type | Description |
---|---|
TextFile.Token[] | Array of text tokens. |
GetTextTokensByVariant(Int32, Boolean)
Gets text tokens for this message for specified variant. Will return the specified variant
Declaration
public TextFile.Token[] GetTextTokensByVariant(int variant = 0, bool expandMacros = true)
Parameters
Type | Name | Description |
---|---|---|
Int32 | variant | the variant of interest. |
Boolean | expandMacros | True to expand text macros like %foo and _foo. |
Returns
Type | Description |
---|---|
TextFile.Token[] | Array of text tokens. |
LoadMessage(Int32, String[])
Load message contents to tokens and split variants.
Declaration
public void LoadMessage(int id, string[] source)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | ID of message. |
String[] | source | Array of source lines in message. |
RestoreSaveData(Message.MessageSaveData_v1)
Declaration
public void RestoreSaveData(Message.MessageSaveData_v1 data)
Parameters
Type | Name | Description |
---|---|---|
Message.MessageSaveData_v1 | data |