Modding

=Modding=

Quests
Building own quests the easy way: Use the flowchart program form Obsidian, which is not public. The hard way: write your xml by hand.

The Structure of Quests is externalised as xml files. To build valid xml files use the 2 xsd files quest.xsd and conversation.xsd and an xsd validator like this one https://github.com/amouat/xsd-validator

Quests are 2 parted. The Conversation with the Questgiver or an attached Gameobject (Item, NPC, …) and the Quest. The Conversation is saved in .conversation files in […]/game/PillarsOfEternity_Data/data/conversations. To each Conversation is a Stringtable file needed, which contains the texts for the NPC and your reactions. These are saved in […]/game/PillarsOfEternity_Data/data/localised/[language]/text/conversations. These Files are combined by the filename and the  tag. Every state of the conversation displays the corresponding text from the stringtable file.

The other part are the Questfile itself. They are saved in .quest files in […]/game/PillarsOfEternity_Data/data/quests. The Text for the questlog is also saved in a stringtable file in […]/game/PillarsOfEternity_Data/data/localised/[language]/text/quests. They are combined by the same filename and also the  tag, but its more complex. The questlog distincts between:

That's the core. Now some basic questions.

How does the game start a quest?
With the script function StartQuest(String) in the OnEnterScripts Tag of a TalkNode.

Example:    

How to set the Questgiver?
Therefor you need the Name of the ingame NPC. Option a: Open game console and enter FindCharacter Obtion b: Use IE Mod, open game console, open object browser with tt, navigate to top and find the name NPC_xxxxx

You need the name for this block in the conversation file. The Guid could be any valid Guid (0-9a-f, grouped 8-4-4-4-12) but it must be the same in all  tags in the conversation file or PoE can not find the character which should say the Content of the Talknode.   27a22234-d1a7-4bfe-8a95-b773e529928e NPC_Chapel_Priest  

How to advance the Quest?
Call one of TriggerQuestAddendum, TriggerQuestEndState (to go to the next state), TriggerTalkEvent and maybe others. [Documentation needed]

Example:   </ScriptCall> </OnExitScripts>

How to remember certain things?
Call SetGlobalValue(String, Int32) with parameter 'variable name' and 'value'.

<OnExitScripts>  </ScriptCall> </OnExitScripts>

What can I do besides display text?
You can call all methods in the Scripts class, and check all states with all methods in the Conditionals class. [Documentation needed]

How to let a party member interact with the conversation?
With a CharacterMapping entry for the companion he could be referenced in a talk node as speaker. For the companion names and guid see the documentation in the conversation.xsd file.

TODO is it possible to use Hirelings as Speaker?