Modding:Conversations: Difference between revisions
Add note of recursive text |
Added IfZoneHaveObject to table of delegates |
||
(5 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 57: | Line 65: | ||
=== Merging === | === Merging === | ||
If multiple elements with the same <code>ID</code> are defined within the same scope, a merge will occur by default where the properties of the | If multiple elements with the same <code>ID</code> are defined within the same scope, a merge will occur by default where the properties of the latter element overwrite those of the former.<br /> | ||
If an explicit ID isn't defined, one will be created based on other attributes.<br/> | If an explicit ID isn't defined, one will be created based on other attributes.<br/> | ||
You can alter the conflict behavior of an element by setting a <code>Load</code> attribute with valid values of: "Merge", "Replace", "Add", or "Remove". | You can alter the conflict behavior of an element by setting a <code>Load</code> attribute with valid values of: "Merge", "Replace", "Add", or "Remove". | ||
Line 548: | 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 | |||
|- | |||
| IfZoneHaveObject | |||
| Predicate | |||
| Continue if an object with a blueprint ID matching the specified value is present in the current zone. | |||
| Yes | | Yes | ||
| No | | No | ||
Line 770: | Line 784: | ||
| Action | | 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. | | 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 | |||
|- | |||
| Notify | |||
| Action | |||
| Triggers a <code>GenericNotifyEvent</code> on the target object and game systems. | |||
| No | | No | ||
| Yes | | Yes | ||
Line 818: | Line 838: | ||
{{Modding Navbox}} | {{Modding Navbox}} | ||
[[Category:Modding]] | [[Category:Modding - Creatures and Objects]] |