Class TopicResponse
- Namespace
- SkyrimForge.Dialogue
- Assembly
- SkyrimForge.dll
One response a speaker says, shown as a subtitle, in reply to a DialogueTopic the player chooses or in a SceneLine.
public sealed record TopicResponse : IEquatable<TopicResponse>
- Inheritance
-
TopicResponse
- Implements
- Inherited Members
Constructors
TopicResponse(string, string?)
Creates a response.
public TopicResponse(string text, string? voiceRelativePath = null)
Parameters
textstringThe subtitle.
voiceRelativePathstringThe .fuz voice file, relative to the plugin's subdirectory of VoiceDirectory. Null creates an unvoiced response, shown for about 0.045 seconds per character, from about 3 to 13 total seconds. A missing file throws FileNotFoundException from Create(string, DialogueTopic, Func<Actor, IEnumerable<TopicResponse>>?, Func<Actor, IEnumerable<TopicResponse>>?, bool, FormId<Quest>?) for a topic's fixed responses, from Create(string, string, IEnumerable<QuestStage>?, Type, IEnumerable<QuestScene>?, IEnumerable<QuestAlias>?, bool) for a scene line's fixed responses, and when the menu shows the topic for a topic's computed ones. A scene line's computed response that specifies a missing file is logged, and the line says nothing.
Exceptions
- ArgumentException
voiceRelativePathdoes not end in .fuz.- ArgumentNullException
textisnull.
Fields
VoiceDirectory
The directory, relative to the game's executable, of SkyrimForge's silent voices, with each plugin's voices in a subdirectory named for its assembly.
public const string VoiceDirectory = "Data\\Sound\\Voice\\SkyrimForge"
Field Value
Properties
Emotion
The emotion the speaker's face shows during the response, neutral by default.
public EmotionType Emotion { get; init; }
Property Value
EmotionValue
The strength of Emotion, from 0 to 100, 50 by default.
public uint EmotionValue { get; init; }
Property Value
Exceptions
- ArgumentOutOfRangeException
The value is greater than 100.
ListenerIdleId
The response's Listener Idle Animation, as the Creation Kit labels it.
public FormId<Idle>? ListenerIdleId { get; init; }
Property Value
MinimumSilence
The shortest duration Silence(TimeSpan) and Idle(FormId<Idle>, TimeSpan) accept.
public static TimeSpan MinimumSilence { get; }
Property Value
SpeakerIdleId
The idle the speaker plays as the response begins.
public FormId<Idle>? SpeakerIdleId { get; init; }
Property Value
Text
The subtitle.
public string Text { get; }
Property Value
UsesEmotionAnimation
The response's Use Emotion Animation flag, as the Creation Kit labels it.
public bool UsesEmotionAnimation { get; init; }
Property Value
VoiceRelativePath
The .fuz voice file. It is null for an unvoiced response.
public string? VoiceRelativePath { get; }
Property Value
Methods
Equals(TopicResponse?)
public bool Equals(TopicResponse? other)
Parameters
otherTopicResponse
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
Idle(FormId<Idle>, TimeSpan)
Creates a silent response lasting about duration, during which the speaker plays idleId.
public static TopicResponse Idle(FormId<Idle> idleId, TimeSpan duration)
Parameters
Returns
Remarks
In a line that also has an unvoiced response with text, the speaker's mouth does not move while that text is shown.
Exceptions
- ArgumentOutOfRangeException
durationis less than MinimumSilence.
Silence(TimeSpan)
Creates a response with no subtitle and a silent voice lasting about duration, during which the speaker's mouth does not move.
public static TopicResponse Silence(TimeSpan duration)
Parameters
durationTimeSpan
Returns
Exceptions
- ArgumentOutOfRangeException
durationis less than MinimumSilence.
ToString()
public override string ToString()
Returns
Operators
operator ==(TopicResponse?, TopicResponse?)
public static bool operator ==(TopicResponse? left, TopicResponse? right)
Parameters
leftTopicResponserightTopicResponse
Returns
implicit operator TopicResponse(string)
Converts text to an unvoiced response.
public static implicit operator TopicResponse(string text)
Parameters
textstring
Returns
operator !=(TopicResponse?, TopicResponse?)
public static bool operator !=(TopicResponse? left, TopicResponse? right)
Parameters
leftTopicResponserightTopicResponse