Modding:Conversations: Difference between revisions

307 bytes added ,  23:33, 18 February 2022
Add note about namespaces
(Add IfUnderstood and ConversationState delegates)
(Add note about namespaces)
Line 164: Line 164:
== Parts ==
== Parts ==
For more advanced or specific logic not easily reduced to a generally accessible delegate, a custom part is preferred.<br/>
For more advanced or specific logic not easily reduced to a generally accessible delegate, a custom part is preferred.<br/>
Similar to their equivalent for objects in `ObjectBlueprints.xml`, parts define custom behaviour for elements within and can be attached to most any element just like delegates.<br/>
Similar to their equivalent for objects in <code>ObjectBlueprints.xml</code>, parts define custom behaviour for elements within and can be attached to most any element just like delegates.
If you use a period within the part's name, it's assumed you are specifying your own namespace and won't be required to place your part within <code>XRL.World.Conversations.Parts</code>.
 
If you use a period within the part's name, it's assumed you are specifying your own namespace and won't be required to place your part within <code>XRL.World.Conversations.Parts</code>. You can optionally declare a <code>Namespace</code> on the root <code><nowiki><conversations></nowiki></code> element, and concatenated sub-namespaces on each <code><nowiki><conversation></nowiki></code>. It will try to find your part within those first before falling back to the default namespace.
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<conversation ID="JoppaZealot">
<conversation ID="JoppaZealot">