Class TopicResponse
- Namespace
- SkyrimForge
- 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 the time its text takes to read. The speaker's mouth moves during a reply whose responses are all unvoiced. A missing file throws FileNotFoundException from Create(string, DialogueTopic, Func<Actor, IEnumerable<TopicResponse>>?, Func<Actor, IEnumerable<TopicResponse>>?, bool, 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 names a missing file is logged, and the line says nothing.
Exceptions
- ArgumentNullException
textisnull.- ArgumentException
voiceRelativePathdoes not end in .fuz.
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 names 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
Remarks
An ID with no idle form plays none. An actor using furniture has not been observed to play one.
Text
The subtitle.
public string Text { get; }
Property Value
UsesEmotionAnimation
The response's Use Emotion Animation flag, as the Creation Kit names it.
public bool UsesEmotionAnimation { get; init; }
Property Value
Remarks
A scene line's speaker, happy at 100, showed the same expression with the flag set and clear.
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, as Silence(TimeSpan) does, during which the speaker plays an idle.
public static TopicResponse Idle(FormId<Idle> idleId, TimeSpan duration)
Parameters
idleIdFormId<Idle>The idle the speaker plays as the response begins.
durationTimeSpanAbout how long the response lasts, MinimumSilence or longer.
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, during which the speaker's mouth does not move.
public static TopicResponse Silence(TimeSpan duration)
Parameters
durationTimeSpanAbout how long the response lasts, MinimumSilence or longer.
Returns
Remarks
The first silent line of a scene ended early in three of about twelve measured runs.
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