1,043
edits
(Add IfHaveText, IfZoneID, IfZoneWorld, IfZoneTier, IfZoneLevel) |
(demonstrate root element) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 12: | Line 12: | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<!-- ObjectBlueprints.xml--> | <!-- ObjectBlueprints.xml--> | ||
<object Name="Snapjaw Pal" Inherits="Snapjaw"> | <objects> | ||
<object Name="Snapjaw Pal" Inherits="Snapjaw"> | |||
</object> | <part Name="ConversationScript" ConversationID="FriendlySnapjaw" /> | ||
</object> | |||
</objects> | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="xml"> | |||
<!-- Conversations.xml--> | <!-- Conversations.xml--> | ||
<conversation ID="FriendlySnapjaw"> | <conversations> | ||
<conversation ID="FriendlySnapjaw"> | |||
<start ID="Welcome"> | |||
<text>ehekehe. gn. welcom.</text> | |||
<choice Target="LibDink">Thank you.</choice> | |||
</start> | |||
<node ID="LibDink"> | |||
<text>hrffff... lib? dink?</text> | |||
<text>nyeh. heh! friemd?</text> | |||
<choice Target="End">Live and drink.</choice> | |||
</conversation> | </node> | ||
</conversation> | |||
</conversations> | |||
</syntaxhighlight> | </syntaxhighlight> | ||
(Note that the outer <code>conversations</code> tag is required.) | |||
=== XML Tags === | === XML Tags === | ||
Line 49: | Line 57: | ||
|- | |- | ||
| <code><nowiki><text></nowiki></code> | | <code><nowiki><text></nowiki></code> | ||
| Contains a block of text to display for an element, multiple of these can be defined and randomly selected from if valid. | | Contains a block of text to display for an element, multiple of these can be defined and randomly selected from if valid. <br/>Additional text nodes can be recursively defined within other text nodes, allowing groups of text to use the same conditions. <br />For backwards compatibility, delimiting the text with <code>~</code> characters will behave similarly to multiple text nodes. | ||
|- | |- | ||
| <code><nowiki><part></nowiki></code> | | <code><nowiki><part></nowiki></code> | ||
Line 224: | Line 232: | ||
==Tables== | ==Tables== | ||
Below are non-exhaustive tables of existing parts, events and | Below are non-exhaustive tables of existing parts, events, delegates, and additional XML attributes. | ||
===Parts=== | ===Parts=== | ||
Described with their function, parameters and an example where applicable. | Described with their function, parameters and an example where applicable. | ||
Line 655: | Line 664: | ||
| Predicate | | Predicate | ||
| Continue if the target has the specified tag or property. | | Continue if the target has the specified tag or property. | ||
| Yes | |||
| Yes | |||
|- | |||
| IfHaveLiquid | |||
| Predicate | |||
| Continue if the target has the specified liquid with an optional amount of drams, e.g. "water" for at least 1 dram of water, or "sludge:64" for 64 drams of sludge. | |||
| Yes | | Yes | ||
| Yes | | Yes | ||
Line 662: | Line 677: | ||
| Continue if the target is at or below the specified value. | | Continue if the target is at or below the specified value. | ||
| Yes | | Yes | ||
| Yes | |||
|- | |||
| AwardXP | |||
| Action | |||
| Gives the specified amount of XP to the target, preceding the amount with an exclamation mark will suppress the XP popup, e.g. "!5000". | |||
| No | |||
| Yes | | Yes | ||
|- | |- | ||
Line 747: | Line 768: | ||
| No | | No | ||
| No | | No | ||
|- | |||
| GiveLiquid | |||
| Action | |||
| Fills valid liquid containers of the target with specified liquid, e.g. "water" for 1 dram of water, or "sludge:64" for 64 drams of sludge. | |||
| No | |||
| Yes | |||
|- | |||
| UseLiquid | |||
| Action | |||
| Empties valid liquid containers of the target with specified liquid, e.g. "water" for 1 dram of water, or "sludge:64" for 64 drams of sludge. | |||
| No | |||
| Yes | |||
|- | |- | ||
| StartQuest | | StartQuest | ||
Line 773: | Line 806: | ||
|} | |} | ||
=== Choice ordering === | |||
The following attributes can be added to the <code><choice></code> XML tag to manipulate the order in which conversational choices are presented. By default, choices are ordered by how they appear in <code>Conversations.xml</code>. | |||
{| class="wikitable" | |||
|- | |||
! Name | |||
! Description | |||
|- | |||
| Priority | |||
| An integer priority that that specifies where a choice should appear; choices with a higher priority appear closer to the top. By default all choices are given a priority of zero unless explicitly specified, although some parts influence the priority of a choice. | |||
|- | |||
| Before | |||
| Place a choice before another choice with the specified ID, e.g., <code>Before="WaterRitualChoice"</code>. | |||
|- | |||
| After | |||
| Place a choice after another choice with the specified ID, e.g. <code>After="WaterRitualChoice"</code>. | |||
|} | |||
{{Modding Navbox}} | {{Modding Navbox}} | ||
[[Category:Modding]] | [[Category:Modding]] |