1,043
edits
m (Remove errant text) |
(demonstrate root element) |
||
(6 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. | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 510: | Line 520: | ||
| Predicate | | Predicate | ||
| Continue if any local conversation state has been set by specified ID. | | Continue if any local conversation state has been set by specified ID. | ||
| Yes | |||
| No | |||
|- | |||
| IfHaveText | |||
| Predicate | |||
| Continue if the specified value is present within the currently displayed node text. | |||
| Yes | | Yes | ||
| No | | No | ||
Line 540: | Line 556: | ||
| Predicate | | Predicate | ||
| Continue if the speaker is led by the specified value, valid entries are "*" (anyone), "Player" or a blueprint ID. | | Continue if the speaker is led by the specified value, valid entries are "*" (anyone), "Player" or a blueprint ID. | ||
| Yes | |||
| No | |||
|- | |||
| IfZoneID | |||
| Predicate | |||
| Continue if the current zone's ID starts with the specified value, e.g. "JoppaWorld.22.14.1.0.13" for Grit Gate, "JoppaWorld.5.2" for the entire Stilt. | |||
| Yes | | Yes | ||
| No | | No | ||
Line 546: | Line 568: | ||
| Predicate | | Predicate | ||
| Continue if the current zone's name contains the specified value, e.g. "Grit Gate". | | Continue if the current zone's name contains the specified value, e.g. "Grit Gate". | ||
| Yes | |||
| No | |||
|- | |||
| IfZoneLevel | |||
| Predicate | |||
| Continue if the current zone's Z level is within the specified range, e.g. "10-15" to include the surface and 5 zones down. | |||
| Yes | |||
| No | |||
|- | |||
| IfZoneTier | |||
| Predicate | |||
| Continue if the current zone's [[Zone_tier#Regional_Zone_Tier|regional zone tier]] is within the specified range. | |||
| Yes | |||
| No | |||
|- | |||
| IfZoneWorld | |||
| Predicate | |||
| Continue if the current zone is within the specified world, e.g. "JoppaWorld". | |||
| Yes | | Yes | ||
| No | | No | ||
Line 624: | 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 631: | 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 716: | 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 742: | 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]] |