[HOWTO] How To: Get content of state quest isn't in
Posted: Tue Mar 25, 2025 3:58 pm
Under normal uses, you'll call Quest.GetContentList() to get the quest content (dialogue , journal, or HUD) for the quest's current state.
If you need to get the quest content for a state that the quest isn't currently in, you can get it manually:
If you need to get the quest content for a state that the quest isn't currently in, you can get it manually:
Code: Select all
// We'll accumulate the content in this list:
var contentList = new List<QuestContent>();
// Get the main quest info for the Active quest state:
var mainStateInfo = quest.GetStateInfo(QuestState.Active);
AddToContentList(contentList, mainStateInfo.GetContentList(QuestContentCategory.Journal));
// Get each node's Active quest state content:
for (int i = 0; i < quest.nodeList.Count; i++)
{
var node = nodeList[i];
var nodeStateInfo = QuestStateInfo.GetStateInfo(node.stateInfoList, QuestNodeState.Active);
var nodeContentList = nodeStateInfo.GetContentList(category);
AddToContentList(contentList, nodeContentList);
}