Modding:Conversations: Difference between revisions

2,732 bytes added ,  00:48, 1 June 2019
piling in the documentation - hit another share point
m (edit notice)
(piling in the documentation - hit another share point)
Line 1: Line 1:
[[Category:Modding]]
[[Category:Modding]]


(THIS PAGE IS ACTIVELY WORK IN PROGRESS BY GNARF, PLEASE REFRAIN EDITS UNTIL THIS REMOVED <3)
<h1>THIS DOCUMENTATION IS COMPLETELY IN PROGRESS AND GNARF IS COPY/PASTING OVER IT CONSTANTLY - PLEASE REFRAIN FROM WIKI EDITS UNTIL THIS NOTICE IS REMOVED THANKS!</h1>


Conversations are loaded as templates from <code>Conversations.xml</code> - The base conversations can not be extended or modified through the XML, however there are events that will allow dynamically editing conversations as they happen.
Conversations are loaded as templates from <code>Conversations.xml</code> - The base conversations can not be extended or modified through the XML, however there are events that will allow dynamically editing conversations as they happen.
Line 30: Line 30:
| colspan="1" class="confluenceTd"|string / required / "key"
| colspan="1" class="confluenceTd"|string / required / "key"
| colspan="1" class="confluenceTd"|The conversation ID used to reference this conversation template via a <code>&lt;part Name="ConversationScript" ConversationID="...."></code>
| colspan="1" class="confluenceTd"|The conversation ID used to reference this conversation template via a <code>&lt;part Name="ConversationScript" ConversationID="...."></code>
|- role="header"
! colspan="3" class="confluenceTd"|C# Properties
|- role="row"
|- role="row"
| colspan="1" class="confluenceTd"|StartNodes
| colspan="1" class="confluenceTd"|StartNodes
Line 68: Line 70:
| colspan="1" class="confluenceTd"|string / deprecated
| colspan="1" class="confluenceTd"|string / deprecated
| colspan="1" class="confluenceTd"|A seemingly unused string (on node), no code paths in base CoQ reference it
| colspan="1" class="confluenceTd"|A seemingly unused string (on node), no code paths in base CoQ reference it
|- role="header"
! colspan="3" class="confluenceTd"|Visit node triggers
|- role="row"
|- role="row"
| colspan="1" class="confluenceTd"|CompleteQuestStep
| colspan="1" class="confluenceTd"|CompleteQuestStep
Line 76: Line 80:
| colspan="1" class="confluenceTd"|string
| 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.
| colspan="1" class="confluenceTd"|A comma separated list of <code>BlueprintID</code> that will give items to the player whenever this node is entered.
|- role="header"
! colspan="3" class="confluenceTd"|Filter / Test properties for Start nodes
|- role="row"
| colspan="1" class="confluenceTd"|IfWearingBlueprint
| colspan="1" class="confluenceTd"|string
| colspan="1" class="confluenceTd"|A single <code>BlueprintID</code> that the player must have equipped to see this start node.
<code>XRLCore.Core.Game.Player.Body.HasObjectEquipped(IfWearingBlueprint)</code>
|- role="row"
| colspan="1" class="confluenceTd"|IfHasBlueprint
| colspan="1" class="confluenceTd"|string
| colspan="1" class="confluenceTd"|A single <code>BlueprintID</code> that the player must in their Inventory to see this start node.
<code>XRL.Core.XRLCore.Core.Game.Player.Body.GetPart<Parts.Inventory>().FireEvent(Event.New("HasBlueprint", "Blueprint", IfHasBlueprint))</code>
|- role="row"
| colspan="1" class="confluenceTd"|IfLevelLessOrEqual
| colspan="1" class="confluenceTd"|string (of a number)
| colspan="1" class="confluenceTd"|A string representation of the level the character must be less than or equal to to see this node.
<code>XRL.Core.XRLCore.Core.Game.Player.Body.Statistics["Level"].Value <= Convert.ToInt32(IfLevelLessOrEqual))</code>
|- role="row"
| colspan="1" class="confluenceTd"|IfHaveQuest
| colspan="1" class="confluenceTd"|string
| colspan="1" class="confluenceTd"|A string Quest ID the player must have to get this start node.
<code>XRL.Core.XRLCore.Core.Game.HasQuest(IfHaveQuest)</code>
|- role="row"
| colspan="1" class="confluenceTd"|IfNotHaveQuest
| colspan="1" class="confluenceTd"|string
| colspan="1" class="confluenceTd"|A string Quest ID the player must *NOT* have to get this start node.
<code>!XRL.Core.XRLCore.Core.Game.HasQuest(IfNotHaveQuest)</code>
|- role="row"
| colspan="1" class="confluenceTd"|IfFinishedQuest
| colspan="1" class="confluenceTd"|string
| colspan="1" class="confluenceTd"|A string Quest ID the player must have completed get this start node.
<code>XRL.Core.XRLCore.Core.Game.FinishedQuest(IfFinishedQuest)</code>
|- role="row"
| colspan="1" class="confluenceTd"|IfNotFinishedQuest
| colspan="1" class="confluenceTd"|string
| colspan="1" class="confluenceTd"|A string Quest ID the player must *NOT* have completed get this start node.
<code>!XRL.Core.XRLCore.Core.Game.FinishedQuest(IfNotFinishedQuest)</code>
|- role="row"
| colspan="1" class="confluenceTd"|IfFinishedQuestStep
| colspan="1" class="confluenceTd"|string
| colspan="1" class="confluenceTd"|A string Quest Step ID the player must have completed get this start node.
<code>XRL.Core.XRLCore.Core.Game.FinishedQuestStep(IfFinishedQuestStep)</code>
|- role="row"
| colspan="1" class="confluenceTd"|IfNotFinishedQuestStep
| colspan="1" class="confluenceTd"|string
| colspan="1" class="confluenceTd"|A string Quest Step ID the player must *NOT* have completed get this start node.
<code>!XRL.Core.XRLCore.Core.Game.FinishedQuestStep(IfNotFinishedQuestStep)</code>
|- role="row"
| colspan="1" class="confluenceTd"|IfHaveObservation
| colspan="1" class="confluenceTd"|string
| colspan="1" class="confluenceTd"|A string Observation ID the player must have to get this start node.
<code>Qud.API.JournalAPI.HasObservation(IfHaveObservation)</code>
|}
|}


             NewConversationNode.IfWearingBlueprint = Reader.GetAttribute("IfWearingBlueprint");
             if (IfHaveState == null || XRL.Core.XRLCore.Core.Game.HasGameState(IfHaveState))
             NewConversationNode.IfHasBlueprint = Reader.GetAttribute("IfHasBlueprint");
             if (IfNotHaveState == null || !XRL.Core.XRLCore.Core.Game.HasGameState(IfNotHaveState))
             NewConversationNode.IfLevelLessOrEqual = Reader.GetAttribute("IfLevelLessOrEqual");
             if (ConversationChoice.TestHaveItemWithID(IfHaveItemWithID))
 
             NewConversationNode.SpecialRequirement = Reader.GetAttribute("SpecialRequirement");
             NewConversationNode.SpecialRequirement = Reader.GetAttribute("SpecialRequirement");
            NewConversationNode.IfHaveQuest = Reader.GetAttribute("IfHaveQuest");
             NewConversationNode.IfHaveItemWithID = Reader.GetAttribute("IfHaveItemWithID");
             NewConversationNode.IfHaveItemWithID = Reader.GetAttribute("IfHaveItemWithID");
             NewConversationNode.IfHaveState = Reader.GetAttribute("IfHaveState");
             NewConversationNode.IfHaveState = Reader.GetAttribute("IfHaveState");
             NewConversationNode.IfNotHaveState = Reader.GetAttribute("IfNotHaveState");
             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.StartQuest = Reader.GetAttribute("StartQuest");
             NewConversationNode.RevealMapNoteId = Reader.GetAttribute("RevealMapNoteId");
             NewConversationNode.RevealMapNoteId = Reader.GetAttribute("RevealMapNoteId");