[Crossfire-wiki] [Crossfire DokuWiki] page changed: user:cavesomething:guide_to_quest_dialogs
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Wed May 5 06:58:14 CDT 2010
A page in your DokuWiki was added or changed. Here are the details:
Date : 2010/05/05 06:58
User : cavehippo
Edit Summary: describe dialog check script
@@ -57,10 +57,11 @@
* 'post' - **Required** - Actions which take place after a rule has been matched these are things that happen after
* 'msg' - **Required** - This is what the NPC will say.
* 'suggests' - **Optional** - These are responses that the client can give which 'make sense'. The client should permit other responses not on this list.
* 'requires' - **Optional** - These are a list from the responses that the client must give. The client may choose not to permit other responses that are not on this list.
+ * 'comment' - **Optional** - This has no meaning, you can put whatever you want as a comment, this is recommended for very complex dialog.
- Any other types of element will be **ignored** this does mean you can put in something like a 'comment': element to explain why some really complex rules are structured the way they are, this is recommended for very complex dialog.
+ Any other types of element will be **ignored** and generate a warning when the file is checked.
==An include rule==
These rules determine whether to include a file which can contain additional rules.
These included files can also include more files, there is no theoretical limit to this, although you probably don't want to go more than 3 or 4 levels down just because it becomes a little impractical then.
@@ -455,8 +456,24 @@
for emphasis.
+
+ ===== Sanity Checking =====
+
+ Ok, so now you have finished writing your dialog file, the next step will be testing it. You can do this with a local server and watch for error messages that it spits out, but you can also save yourself some time by checking the dialog file beforehand.
+
+ There is a script in maps/python/dialog called check_dialog.py which can do this for you.
+
+ run it against your dialogue file, like this:
+ maps/python/dialog $ python dialog_check.py ../../scorn/shops/smith.msg
+ and you should see an output like this:
+ checked 12 rules from file ../../scorn/shops/smith_finished.msg Found 0 errors and 0 warnings
+ checked 47 rules from file ../../scorn/shops/smith.msg Found 0 errors and 0 warnings
+
+ If there are errors in the dialog file, this will pick them up and allow you to correct them before needing to run a server and speak to the character the dialog is bound to.
+
+ **NB** This script only checks for grammatical errors in your dialog files, there is no check that the rules you have set up actually make sense, nor is there any checking for the order of your rules, it is up to you to ensure your rules do what you want when you want.
===== Quest Definition =====
Quests are defined in a text file, in a similar way to archetypes. There are a collection of fields that may be used to express different properties of the quest.
IP-Address : 81.141.58.188
Old Revision: http://wiki.metalforge.net/doku.php/user:cavesomething:guide_to_quest_dialogs?rev=1272652383
New Revision: http://wiki.metalforge.net/doku.php/user:cavesomething:guide_to_quest_dialogs
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list