Table of Contents

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

text string

The subtitle.

voiceRelativePath string

The .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

voiceRelativePath does not end in .fuz.

ArgumentNullException

text is null.

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

string

Properties

Emotion

The emotion the speaker's face shows during the response, neutral by default.

public EmotionType Emotion { get; init; }

Property Value

EmotionType

EmotionValue

The strength of Emotion, from 0 to 100, 50 by default.

public uint EmotionValue { get; init; }

Property Value

uint

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

FormId<Idle>?

MinimumSilence

The shortest duration Silence(TimeSpan) and Idle(FormId<Idle>, TimeSpan) accept.

public static TimeSpan MinimumSilence { get; }

Property Value

TimeSpan

SpeakerIdleId

The idle the speaker plays as the response begins.

public FormId<Idle>? SpeakerIdleId { get; init; }

Property Value

FormId<Idle>?

Text

The subtitle.

public string Text { get; }

Property Value

string

UsesEmotionAnimation

The response's Use Emotion Animation flag, as the Creation Kit labels it.

public bool UsesEmotionAnimation { get; init; }

Property Value

bool

VoiceRelativePath

The .fuz voice file. It is null for an unvoiced response.

public string? VoiceRelativePath { get; }

Property Value

string

Methods

Equals(TopicResponse?)

public bool Equals(TopicResponse? other)

Parameters

other TopicResponse

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

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

idleId FormId<Idle>
duration TimeSpan

Returns

TopicResponse

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

duration is 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

duration TimeSpan

Returns

TopicResponse

Exceptions

ArgumentOutOfRangeException

duration is less than MinimumSilence.

ToString()

public override string ToString()

Returns

string

Operators

operator ==(TopicResponse?, TopicResponse?)

public static bool operator ==(TopicResponse? left, TopicResponse? right)

Parameters

left TopicResponse
right TopicResponse

Returns

bool

implicit operator TopicResponse(string)

Converts text to an unvoiced response.

public static implicit operator TopicResponse(string text)

Parameters

text string

Returns

TopicResponse

operator !=(TopicResponse?, TopicResponse?)

public static bool operator !=(TopicResponse? left, TopicResponse? right)

Parameters

left TopicResponse
right TopicResponse

Returns

bool