25
edits
m (incremental changes just checking formatting / to share) |
(WIP a bit more) |
||
Line 5: | Line 5: | ||
== Conversation Object Parts == | == Conversation Object Parts == | ||
In order to be conversable, an object should use the CovnersationScript part and attach a conversation template | In order to be conversable, an object should use the <code>CovnersationScript</code> part and attach a <code>ConversationID</code> which references a conversation template from Conversations.xml. | ||
'''Snippet of ObjectBlueprints.xml that links Mehmet's Conversation to "JoppaMehmet"''' | '''Snippet of ObjectBlueprints.xml that links Mehmet's Conversation to "JoppaMehmet"''' | ||
Line 14: | Line 14: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Conversation | == Conversation Classes and XML properties == | ||
The xml file for conversation consists of a single <conversations> node with multiple <conversation> nodes underneath. It does not currently support extending the base game dialog via <code>Load="Merge"</code> or the other similar tricks used for many of the XMLs. Creating a Conversation.xml file for your mod would be done when you want to add a new specific conversation / template to be used in the game. | The xml file for conversation consists of a single <conversations> node with multiple <conversation> nodes underneath. It does not currently support extending the base game dialog via <code>Load="Merge"</code> or the other similar tricks used for many of the XMLs. Creating a Conversation.xml file for your mod would be done when you want to add a new specific conversation / template to be used in the game. | ||
=== Nodes: <conversation> Deserialized: XRL.World.Conversation === | |||
{| class="wrapped wikitable tablesorter tablesorter-default stickyTableHeaders" role="grid" resolved="" style="padding: 0px;" | |||
|- | |||
! colspan="1" class="confluenceTd"|property | |||
! colspan="1" class="confluenceTd"|details | |||
! colspan="1" class="confluenceTd"|Description | |||
|- role="row" | |||
| colspan="1" class="confluenceTd"|ID | |||
| colspan="1" class="confluenceTd"|string / required / "key" | |||
| colspan="1" class="confluenceTd"|The conversation ID used to reference this conversation template via a <code><part Name="ConversationScript" ConversationID="...."></code> | |||
|- role="row" | |||
| colspan="1" class="confluenceTd"|StartNodes | |||
| colspan="1" class="confluenceTd"|List<ConversationNode> | |||
| colspan="1" class="confluenceTd"|C# only. Represents the children <code><node ID="Start"></code> (of which there can be multiple) | |||
|- role="row" | |||
| colspan="1" class="confluenceTd"|NodesByID | |||
| colspan="1" class="confluenceTd"|Dictionary<string, ConversationNode> | |||
| colspan="1" class="confluenceTd"|C# only. Represents the children <code><node></code> that are not "Start" - the "Start" node will be added here when conversation begins and it is chosen. | |||
|} | |||
Conversation's have children <code><node></code> nodes: | |||
=== Nodes: <node> - Deserialized: XRL.World.ConversationNode === | |||
{| class="wrapped wikitable tablesorter tablesorter-default stickyTableHeaders" role="grid" resolved="" style="padding: 0px;" | |||
|- | |||
! colspan="1" class="confluenceTd"|property | |||
! colspan="1" class="confluenceTd"|details | |||
! colspan="1" class="confluenceTd"|Description | |||
|- role="row" | |||
| colspan="1" class="confluenceTd"|ID | |||
| colspan="1" class="confluenceTd"|string / required / "key" | |||
| colspan="1" class="confluenceTd"|The node ID used in other "GotoID" properties, etc. Can contain multiple "Start" nodes, one of which will be selected given the other boolean filter parameters. | |||
|- role="row" | |||
| colspan="1" class="confluenceTd"|Filter | |||
| colspan="1" class="confluenceTd"|string / deprecated | |||
| colspan="1" class="confluenceTd"|A potentailly unused property, it seems to have no code paths calling it | |||
|- role="row" | |||
| colspan="1" class="confluenceTd"|GiveOneItem | |||
| colspan="1" class="confluenceTd"|string / deprecated | |||
| colspan="1" class="confluenceTd"|A seemingly unused string (on node), no code paths in base CoQ reference it | |||
|- role="row" | |||
| colspan="1" class="confluenceTd"|TakeItem | |||
| colspan="1" class="confluenceTd"|string / deprecated | |||
| colspan="1" class="confluenceTd"|A seemingly unused string (on node), no code paths in base CoQ reference it | |||
|- role="row" | |||
| colspan="1" class="confluenceTd"|ClearOwner | |||
| colspan="1" class="confluenceTd"|string / deprecated | |||
| colspan="1" class="confluenceTd"|A seemingly unused string (on node), no code paths in base CoQ reference it | |||
|- role="row" | |||
| colspan="1" class="confluenceTd"|CompleteQuestStep | |||
| colspan="1" class="confluenceTd"|string | |||
| colspan="1" class="confluenceTd"|A comma separated list of <code>QuestID~StepID</code> that will Complete the given quest step when the node is entered (awarding XP, etc) | |||
|- role="row" | |||
| colspan="1" class="confluenceTd"|GiveItem | |||
| colspan="1" class="confluenceTd"|string | |||
| colspan="1" class="confluenceTd"|A comma separated list of <code>BlueprintID</code> that will give items to the player whenever this node is entered. | |||
|} | |||
NewConversationNode.IfWearingBlueprint = Reader.GetAttribute("IfWearingBlueprint"); | |||
NewConversationNode.IfHasBlueprint = Reader.GetAttribute("IfHasBlueprint"); | |||
NewConversationNode.IfLevelLessOrEqual = Reader.GetAttribute("IfLevelLessOrEqual"); | |||
NewConversationNode.SpecialRequirement = Reader.GetAttribute("SpecialRequirement"); | |||
NewConversationNode.IfHaveQuest = Reader.GetAttribute("IfHaveQuest"); | |||
NewConversationNode.IfHaveItemWithID = Reader.GetAttribute("IfHaveItemWithID"); | |||
NewConversationNode.IfHaveState = Reader.GetAttribute("IfHaveState"); | |||
NewConversationNode.IfNotHaveState = Reader.GetAttribute("IfNotHaveState"); | |||
NewConversationNode.IfNotHaveQuest = Reader.GetAttribute("IfNotHaveQuest"); | |||
NewConversationNode.IfFinishedQuest = Reader.GetAttribute("IfFinishedQuest"); | |||
NewConversationNode.IfHaveObservation = Reader.GetAttribute("IfHaveObservation"); | |||
NewConversationNode.IfFinishedQuestStep = Reader.GetAttribute("IfFinishedQuestStep"); | |||
NewConversationNode.IfNotFinishedQuest = Reader.GetAttribute("IfNotFinishedQuest"); | |||
NewConversationNode.IfNotFinishedQuestStep = Reader.GetAttribute("IfNotFinishedQuestStep"); | |||
NewConversationNode.StartQuest = Reader.GetAttribute("StartQuest"); | |||
NewConversationNode.RevealMapNoteId = Reader.GetAttribute("RevealMapNoteId"); | |||
NewConversationNode.TradeNote = (Reader.GetAttribute("TradeNote") == "show"); | |||
string sClosable = Reader.GetAttribute("Closable"); | |||
if (sClosable != null && sClosable == "false") NewConversationNode.bCloseable = false; | |||
'''Snippet of Conversation.xml with Mehmet's script''' | '''Snippet of Conversation.xml with Mehmet's script''' |