Interface IDialogueBranch
- Namespace
- SkyrimForge.Dialogue
- Assembly
- SkyrimForge.dll
A dialogue branch created by IDialogueBranchFactory.
public interface IDialogueBranch
Remarks
Call members on the game's thread.
Properties
ChosenTopics
The topics of the branch the player chose in the open conversation, or in the last one once it has ended, in the order chosen.
IReadOnlyList<DialogueTopic> ChosenTopics { get; }
Property Value
Remarks
It is emptied as a conversation with the speaker opens, and as a save starts loading or a new game begins.
OnConversationEnd
Raised on the game's thread once a conversation in which the branch showed a topic ends.
IGameEvent<ConversationEndEventArgs> OnConversationEnd { get; }
Property Value
Methods
ForgetSaidTopics()
Forgets every topic of the branch the player has chosen, with every speaker.
void ForgetSaidTopics()
Remarks
A topic whose IsSaidOnce is true is shown again once no conversation with the speaker is open.
Hide()
Hides every topic of the branch, after the next reply if a conversation is open.
void Hide()
Show(QuestReferenceAlias, Func<bool>?)
Shows the branch in conversations with the actor that fills speaker,
and hides the branch while the alias is empty or condition returns false.
void Show(QuestReferenceAlias speaker, Func<bool>? condition = null)
Parameters
speakerQuestReferenceAliasconditionFunc<bool>
Remarks
condition is called on each frame while no conversation with the current speaker is open.
The alias replaces any earlier speaker, and remains in place when a save starts loading or a new game begins.
Exceptions
- ArgumentNullException
speakerisnull.
Show(Func<Actor, bool>)
Shows the branch in conversations with each actor speakerFilter accepts, one conversation at a time.
void Show(Func<Actor, bool> speakerFilter)
Parameters
Remarks
speakerFilter is called for the actor under the crosshair at once, and then each time the crosshair lands on an actor,
except during a conversation with the current speaker.
It is also called for the current speaker on each frame the crosshair is on that actor, and once as a conversation ends.
The filter replaces any earlier speaker, and remains in place when a save starts loading or a new game begins.
A conversation the actor starts, such as a force greet, shows the branch only if the crosshair last landed on that actor.
Exceptions
- ArgumentNullException
speakerFilterisnull.
Show(Func<Actor?>)
Shows the branch in conversations with the actor getSpeaker returns, and hides the branch while it returns null.
void Show(Func<Actor?> getSpeaker)
Parameters
Remarks
getSpeaker is called on each frame while no conversation with the current speaker is open.
The function replaces any earlier speaker, and remains in place when a save starts loading or a new game begins.
Exceptions
- ArgumentNullException
getSpeakerisnull.
Show<TSpeaker>(TSpeaker)
Shows the branch in conversations with speaker only, replacing any earlier speaker.
void Show<TSpeaker>(TSpeaker speaker) where TSpeaker : IActor
Parameters
speakerTSpeaker
Type Parameters
TSpeaker
Remarks
A call during a conversation with the speaker shows the topics after the next reply. A save starting to load or a new game beginning hides the branch. The branch clears its speaker in its own OnSaveLoaded handler, subscribed when the branch is created, so subscribe a handler that calls this after creating the branch.