Quests share the dialogue database's Items table, which is why the Dialogue Editor tab is named "Quests/Items".
Use the Template class to create conversations, dialogue entries, etc. If you're writing an editor script, you can use TemplateTools to create an instance of the Template class that uses any custom fields you've defined in the Dialogue Editor's Template section. For example:
Code: Select all
var template = TemplateTools.LoadFromEditorPrefs();
Code: Select all
var template = Template.FromDefault();
To create a quest in 2.1.0 and earlier, use Template.CreateItem:
Code: Select all
var quest = template.CreateItem(aUniqueID, "My Quest");
database.items.Add(quest);
Then you'd need to add the fields that are specific to quests, such as:
Code: Select all
quest.fields.Add(new Field("Success Description", "", FieldType.Text);
It exposes Template.CreateQuest:
Code: Select all
var quest = template.CreateQuest(aUniqueID, "My Quest");
- Description
- Success Description
- Failure Description
- State
- Entry Count
- Entry # State
- Entry #
Finally, if the Dialogue Editor window is open, reset it so it picks up the changed data:
Code: Select all
if (DialogueEditorWindow.instance != null) DialogueEditorWindow.instance.Reset();