[Crossfire-wiki] [Crossfire DokuWiki] page changed: cfdialog
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Tue Jan 1 22:44:22 CST 2008
A page in your DokuWiki was added or changed. Here are the details:
Date : 2008/01/01 22:44
User : kbulgrien
Edit Summary: Note \n usable in NPC message text.
@@ -5,8 +5,9 @@
complex dialogs. It is made for those who do not want to
bother about complex programming, but just want to make a few
dialogs that are better than the @match system used in the
server.
+
==== How to use this. ====
First, you need to import DialogRule and Dialog classes. Add the
@@ -20,8 +21,9 @@
* **Keywords** are what the rule will be an answer to. For example, if you want a rule to be triggered when the player will say "hi", then "hi" is the keyword to use. You can associate more than a keyword to a rule by concatenating them with the "|" character. Finally, "*" is a special keyword that means: "match everything". "*" is useful to provide generic answers.
* **Answers** are what will be said when the rule is triggered. This is what the NPC replies to the player. Answers are stored in a list. When there is more than one answer in that list, one will be selected at random.
+ * Insert newlines in an answer with **\n**.
* **Preconditions** are flags that must match for the rule to be triggered. Each precondition has a name and a value. The default value of a precondition is "0". The flags are stored into each player, and will survive between gaming sessions. They are useful to set the point in a dialog reached by a player - you can see those as an "NPC memory". All conditions must have a name and a value. The ":" and ";" characters are forbidden. For a rule to be triggered, all the player's flags should match the preconditions. If you give "*" as the value for a precondition, it means that there is no need to match it. A precondition is a list in the form: [key, value]. All preconditions are stored in a list. Note that you can use any string you want for the condition values, provided it doesn't contain ";" or ":".
* **Postconditions** are the status changes to apply to the player's conditions after the rule has been triggered. Their format is similar to preconditions. A value of "*" means that the condition will not be touched.
IP-Address : 70.254.39.97
Old Revision: http://wiki.metalforge.net/doku.php/cfdialog?rev=1193583465
New Revision: http://wiki.metalforge.net/doku.php/cfdialog
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list