M&B: Bannerlord 1.1.0
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.CampaignSystem.Conversation.ConversationManager Class Reference

Conversation Manager class.

Classes

class  TaggedString
 

Public Member Functions

int CreateConversationSentenceIndex ()
 
 ConversationManager ()
 Initializes a new instance of the ConversationManager class.
 
void StartNew (int startingToken, bool setActionsInstantly)
 
void ProcessSentence (ConversationSentenceOption conversationSentenceOption)
 Process sentence and run its consequence method.
 
void UpdateCurrentSentenceText ()
 Update Current Sentence Text.
 
bool IsConversationEnded ()
 Is Conversation Ended.
 
void ClearCurrentOptions ()
 
void AddToCurrentOptions (TextObject text, String id, bool isClickable, TextObject hintText)
 
void GetPlayerSentenceOptions ()
 Get Player Sentence Options.
 
int GetStateIndex (string str)
 Get State Index.
 
void DisableSentenceSort ()
 
void EnableSentenceSort ()
 
void AddDialogFlow (DialogFlow dialogFlow, object relatedObject=null)
 
ConversationSentence AddDialogLineMultiAgent (string id, string inputToken, string outputToken, TextObject text, ConversationSentence.OnConditionDelegate conditionDelegate, ConversationSentence.OnConsequenceDelegate consequenceDelegate, int agentIndex, int nextAgentIndex, int priority=ConversationSentence.DefaultPriority, ConversationSentence.OnClickableConditionDelegate clickableConditionDelegate=null)
 
bool IsAgentInConversation (IAgent agent)
 
void BeginConversation ()
 
void EndConversation ()
 
void DoOption (int optionIndex)
 
void DoOption (string optionID)
 
void DoConversationContinuedCallback ()
 
void DoOptionContinue ()
 
void ContinueConversation ()
 
void SetupAndStartMissionConversation (IAgent agent, IAgent mainAgent, bool setActionsInstantly)
 
void SetupAndStartMissionConversationWithMultipleAgents (IEnumerable< IAgent > agents, IAgent mainAgent)
 
void SetupAndStartMapConversation (MobileParty party, IAgent agent, IAgent mainAgent)
 
void AddConversationAgents (IEnumerable< IAgent > agents, bool setActionsInstantly)
 
bool IsConversationAgent (IAgent agent)
 
void RemoveRelatedLines (object o)
 
void OnConversationDeactivate ()
 
void OnConversationActivate ()
 
TextObject FindMatchingTextOrNull (string id, CharacterObject character)
 
IEnumerable< string > GetApplicableTagNames (CharacterObject character)
 
bool IsTagApplicable (string tagId, CharacterObject character)
 
void OpenMapConversation (ConversationCharacterData playerCharacterData, ConversationCharacterData conversationPartnerData)
 
void GetPersuasionChanceValues (out float successValue, out float critSuccessValue, out float critFailValue)
 
void GetPersuasionChances (ConversationSentenceOption conversationSentenceOption, out float successChance, out float critSuccessChance, out float critFailChance, out float failChance)
 

Static Public Member Functions

static void StartPersuasion (float goalValue, float successValue, float failValue, float criticalSuccessValue, float criticalFailValue, float initialProgress=-1f, PersuasionDifficulty difficulty=PersuasionDifficulty.Medium)
 
static void EndPersuasion ()
 
static void PersuasionCommitProgress (PersuasionOptionArgs persuasionOptionArgs)
 
static void Clear ()
 
static bool GetPersuasionIsActive ()
 
static bool GetPersuasionProgressSatisfied ()
 
static bool GetPersuasionIsFailure ()
 
static float GetPersuasionProgress ()
 
static float GetPersuasionGoalValue ()
 
static IEnumerable< Tuple< PersuasionOptionArgs, PersuasionOptionResult > > GetPersuasionChosenOptions ()
 

Public Attributes

int ActiveToken
 Active Token index.
 
List< Tuple< string, CharacterObject > > DetailedDebugLog = new List<Tuple<string, CharacterObject>>()
 Debug information text of the current sentence.
 
string CurrentFaceAnimationRecord
 Face animation record of the current sentence.
 
int LastSelectedButtonIndex
 
string LastSelectedDialog
 
ConversationAnimationManager ConversationAnimationManager
 
bool CurrentConversationIsFirst
 

Properties

string CurrentSentenceText [get]
 Text of the current sentence.
 
bool IsConversationFlowActive [get]
 
List< ConversationSentenceOptionCurOptions [get, protected set]
 Gets or sets CurOptions.
 
IReadOnlyList< IAgentConversationAgents [get]
 
IAgent OneToOneConversationAgent [get]
 
IAgent SpeakerAgent [get]
 
IAgent ListenerAgent [get]
 
bool IsConversationInProgress [get]
 
Hero OneToOneConversationHero [get]
 
CharacterObject OneToOneConversationCharacter [get]
 
IEnumerable< CharacterObjectConversationCharacters [get]
 
MobileParty ConversationParty [get]
 
bool NeedsToActivateForMapConversation [get]
 
IConversationStateHandler Handler [get, set]
 

Events

Action< ConversationSentenceConsequenceRunned
 
Action< ConversationSentenceConditionRunned
 
Action< ConversationSentenceClickableConditionRunned
 
Action ConversationSetup
 
Action ConversationBegin
 
Action ConversationEnd
 
Action ConversationEndOneShot
 
Action ConversationContinued
 

Constructor & Destructor Documentation

◆ ConversationManager()

TaleWorlds.CampaignSystem.Conversation.ConversationManager.ConversationManager ( )

Member Function Documentation

◆ CreateConversationSentenceIndex()

int TaleWorlds.CampaignSystem.Conversation.ConversationManager.CreateConversationSentenceIndex ( )

◆ StartNew()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.StartNew ( int  startingToken,
bool  setActionsInstantly 
)

◆ ProcessSentence()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.ProcessSentence ( ConversationSentenceOption  conversationSentenceOption)
Parameters
conversationSentenceOptionThe conversation sentence option.

◆ UpdateCurrentSentenceText()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.UpdateCurrentSentenceText ( )

◆ IsConversationEnded()

bool TaleWorlds.CampaignSystem.Conversation.ConversationManager.IsConversationEnded ( )
Returns
Whether conversation ended or not.

◆ ClearCurrentOptions()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.ClearCurrentOptions ( )

◆ AddToCurrentOptions()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.AddToCurrentOptions ( TextObject  text,
String  id,
bool  isClickable,
TextObject  hintText 
)

◆ GetPlayerSentenceOptions()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.GetPlayerSentenceOptions ( )

◆ GetStateIndex()

int TaleWorlds.CampaignSystem.Conversation.ConversationManager.GetStateIndex ( string  str)
Parameters
strThe str.
Returns
state index

◆ DisableSentenceSort()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.DisableSentenceSort ( )

◆ EnableSentenceSort()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.EnableSentenceSort ( )

◆ AddDialogFlow()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.AddDialogFlow ( DialogFlow  dialogFlow,
object  relatedObject = null 
)

◆ AddDialogLineMultiAgent()

ConversationSentence TaleWorlds.CampaignSystem.Conversation.ConversationManager.AddDialogLineMultiAgent ( string  id,
string  inputToken,
string  outputToken,
TextObject  text,
ConversationSentence::OnConditionDelegate  conditionDelegate,
ConversationSentence::OnConsequenceDelegate  consequenceDelegate,
int  agentIndex,
int  nextAgentIndex,
int  priority = ConversationSentence::DefaultPriority,
ConversationSentence::OnClickableConditionDelegate  clickableConditionDelegate = null 
)

◆ IsAgentInConversation()

bool TaleWorlds.CampaignSystem.Conversation.ConversationManager.IsAgentInConversation ( IAgent  agent)

◆ BeginConversation()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.BeginConversation ( )

◆ EndConversation()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.EndConversation ( )

◆ DoOption() [1/2]

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.DoOption ( int  optionIndex)

◆ DoOption() [2/2]

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.DoOption ( string  optionID)

◆ DoConversationContinuedCallback()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.DoConversationContinuedCallback ( )

◆ DoOptionContinue()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.DoOptionContinue ( )

◆ ContinueConversation()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.ContinueConversation ( )

◆ SetupAndStartMissionConversation()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.SetupAndStartMissionConversation ( IAgent  agent,
IAgent  mainAgent,
bool  setActionsInstantly 
)

◆ SetupAndStartMissionConversationWithMultipleAgents()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.SetupAndStartMissionConversationWithMultipleAgents ( IEnumerable< IAgent agents,
IAgent  mainAgent 
)

◆ SetupAndStartMapConversation()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.SetupAndStartMapConversation ( MobileParty  party,
IAgent  agent,
IAgent  mainAgent 
)

◆ AddConversationAgents()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.AddConversationAgents ( IEnumerable< IAgent agents,
bool  setActionsInstantly 
)

◆ IsConversationAgent()

bool TaleWorlds.CampaignSystem.Conversation.ConversationManager.IsConversationAgent ( IAgent  agent)

◆ RemoveRelatedLines()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.RemoveRelatedLines ( object  o)

◆ OnConversationDeactivate()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.OnConversationDeactivate ( )

◆ OnConversationActivate()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.OnConversationActivate ( )

◆ FindMatchingTextOrNull()

TextObject TaleWorlds.CampaignSystem.Conversation.ConversationManager.FindMatchingTextOrNull ( string  id,
CharacterObject  character 
)

◆ GetApplicableTagNames()

IEnumerable< string > TaleWorlds.CampaignSystem.Conversation.ConversationManager.GetApplicableTagNames ( CharacterObject  character)

◆ IsTagApplicable()

bool TaleWorlds.CampaignSystem.Conversation.ConversationManager.IsTagApplicable ( string  tagId,
CharacterObject  character 
)

◆ OpenMapConversation()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.OpenMapConversation ( ConversationCharacterData  playerCharacterData,
ConversationCharacterData  conversationPartnerData 
)

◆ StartPersuasion()

static void TaleWorlds.CampaignSystem.Conversation.ConversationManager.StartPersuasion ( float  goalValue,
float  successValue,
float  failValue,
float  criticalSuccessValue,
float  criticalFailValue,
float  initialProgress = -1f,
PersuasionDifficulty  difficulty = PersuasionDifficulty::Medium 
)
static

◆ EndPersuasion()

static void TaleWorlds.CampaignSystem.Conversation.ConversationManager.EndPersuasion ( )
static

◆ PersuasionCommitProgress()

static void TaleWorlds.CampaignSystem.Conversation.ConversationManager.PersuasionCommitProgress ( PersuasionOptionArgs  persuasionOptionArgs)
static

◆ Clear()

static void TaleWorlds.CampaignSystem.Conversation.ConversationManager.Clear ( )
static

◆ GetPersuasionChanceValues()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.GetPersuasionChanceValues ( out float  successValue,
out float  critSuccessValue,
out float  critFailValue 
)

◆ GetPersuasionIsActive()

static bool TaleWorlds.CampaignSystem.Conversation.ConversationManager.GetPersuasionIsActive ( )
static

◆ GetPersuasionProgressSatisfied()

static bool TaleWorlds.CampaignSystem.Conversation.ConversationManager.GetPersuasionProgressSatisfied ( )
static

◆ GetPersuasionIsFailure()

static bool TaleWorlds.CampaignSystem.Conversation.ConversationManager.GetPersuasionIsFailure ( )
static

◆ GetPersuasionProgress()

static float TaleWorlds.CampaignSystem.Conversation.ConversationManager.GetPersuasionProgress ( )
static

◆ GetPersuasionGoalValue()

static float TaleWorlds.CampaignSystem.Conversation.ConversationManager.GetPersuasionGoalValue ( )
static

◆ GetPersuasionChosenOptions()

static IEnumerable< Tuple< PersuasionOptionArgs, PersuasionOptionResult > > TaleWorlds.CampaignSystem.Conversation.ConversationManager.GetPersuasionChosenOptions ( )
static

◆ GetPersuasionChances()

void TaleWorlds.CampaignSystem.Conversation.ConversationManager.GetPersuasionChances ( ConversationSentenceOption  conversationSentenceOption,
out float  successChance,
out float  critSuccessChance,
out float  critFailChance,
out float  failChance 
)

Member Data Documentation

◆ ActiveToken

int TaleWorlds.CampaignSystem.Conversation.ConversationManager.ActiveToken

◆ DetailedDebugLog

List<Tuple<string, CharacterObject> > TaleWorlds.CampaignSystem.Conversation.ConversationManager.DetailedDebugLog = new List<Tuple<string, CharacterObject>>()

◆ CurrentFaceAnimationRecord

string TaleWorlds.CampaignSystem.Conversation.ConversationManager.CurrentFaceAnimationRecord

◆ LastSelectedButtonIndex

int TaleWorlds.CampaignSystem.Conversation.ConversationManager.LastSelectedButtonIndex

◆ LastSelectedDialog

string TaleWorlds.CampaignSystem.Conversation.ConversationManager.LastSelectedDialog

◆ ConversationAnimationManager

ConversationAnimationManager TaleWorlds.CampaignSystem.Conversation.ConversationManager.ConversationAnimationManager

◆ CurrentConversationIsFirst

bool TaleWorlds.CampaignSystem.Conversation.ConversationManager.CurrentConversationIsFirst

Property Documentation

◆ CurrentSentenceText

string TaleWorlds.CampaignSystem.Conversation.ConversationManager.CurrentSentenceText
get

◆ IsConversationFlowActive

bool TaleWorlds.CampaignSystem.Conversation.ConversationManager.IsConversationFlowActive
get

◆ CurOptions

List<ConversationSentenceOption> TaleWorlds.CampaignSystem.Conversation.ConversationManager.CurOptions
getprotected set

◆ ConversationAgents

IReadOnlyList<IAgent> TaleWorlds.CampaignSystem.Conversation.ConversationManager.ConversationAgents
get

◆ OneToOneConversationAgent

IAgent TaleWorlds.CampaignSystem.Conversation.ConversationManager.OneToOneConversationAgent
get

◆ SpeakerAgent

IAgent TaleWorlds.CampaignSystem.Conversation.ConversationManager.SpeakerAgent
get

◆ ListenerAgent

IAgent TaleWorlds.CampaignSystem.Conversation.ConversationManager.ListenerAgent
get

◆ IsConversationInProgress

bool TaleWorlds.CampaignSystem.Conversation.ConversationManager.IsConversationInProgress
get

◆ OneToOneConversationHero

Hero TaleWorlds.CampaignSystem.Conversation.ConversationManager.OneToOneConversationHero
get

◆ OneToOneConversationCharacter

CharacterObject TaleWorlds.CampaignSystem.Conversation.ConversationManager.OneToOneConversationCharacter
get

◆ ConversationCharacters

IEnumerable<CharacterObject> TaleWorlds.CampaignSystem.Conversation.ConversationManager.ConversationCharacters
get

◆ ConversationParty

MobileParty TaleWorlds.CampaignSystem.Conversation.ConversationManager.ConversationParty
get

◆ NeedsToActivateForMapConversation

bool TaleWorlds.CampaignSystem.Conversation.ConversationManager.NeedsToActivateForMapConversation
get

◆ Handler

IConversationStateHandler TaleWorlds.CampaignSystem.Conversation.ConversationManager.Handler
getset

Event Documentation

◆ ConsequenceRunned

Action<ConversationSentence> TaleWorlds.CampaignSystem.Conversation.ConversationManager.ConsequenceRunned

◆ ConditionRunned

Action<ConversationSentence> TaleWorlds.CampaignSystem.Conversation.ConversationManager.ConditionRunned

◆ ClickableConditionRunned

Action<ConversationSentence> TaleWorlds.CampaignSystem.Conversation.ConversationManager.ClickableConditionRunned

◆ ConversationSetup

Action TaleWorlds.CampaignSystem.Conversation.ConversationManager.ConversationSetup

◆ ConversationBegin

Action TaleWorlds.CampaignSystem.Conversation.ConversationManager.ConversationBegin

◆ ConversationEnd

Action TaleWorlds.CampaignSystem.Conversation.ConversationManager.ConversationEnd

◆ ConversationEndOneShot

Action TaleWorlds.CampaignSystem.Conversation.ConversationManager.ConversationEndOneShot

◆ ConversationContinued

Action TaleWorlds.CampaignSystem.Conversation.ConversationManager.ConversationContinued