Table of Contents

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

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

text is null.

ArgumentException

voiceRelativePath does 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

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 names 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>?

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

string

UsesEmotionAnimation

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

public bool UsesEmotionAnimation { get; init; }

Property Value

bool

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

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, as Silence(TimeSpan) does, during which the speaker plays an idle.

public static TopicResponse Idle(FormId<Idle> idleId, TimeSpan duration)

Parameters

idleId FormId<Idle>

The idle the speaker plays as the response begins.

duration TimeSpan

About how long the response lasts, MinimumSilence or longer.

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, during which the speaker's mouth does not move.

public static TopicResponse Silence(TimeSpan duration)

Parameters

duration TimeSpan

About how long the response lasts, MinimumSilence or longer.

Returns

TopicResponse

Remarks

The first silent line of a scene ended early in three of about twelve measured runs.

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