maps/python/dialog/pre
Nicolas Weeger 4217a11b56 Fix Scorn's smith dialog 2023-04-13 19:48:14 +02:00
..
README Remove trailing whitespace. 2013-05-09 11:08:11 +00:00
age.py Fix Scorn's smith dialog 2023-04-13 19:48:14 +02:00
archininventory.py Pre-condition script, checking for some archetype in the inventory. 2010-06-12 16:50:41 +00:00
item.py Remove trailing whitespace. 2013-05-09 11:08:11 +00:00
knowledgeknown.py Fix comments. 2010-06-06 15:14:56 +00:00
level.py Remove trailing whitespace. 2013-05-09 11:08:11 +00:00
npctoken.py Add 'npctoken' and 'setnpctoken' pre and post conditions, to keep data in NPC instead of player. 2010-05-30 10:11:58 +00:00
quest.py Remove trailing whitespace. 2013-05-09 11:08:11 +00:00
questdone.py Add a 'questdone' precondition to vary dialogs. 2010-05-30 10:43:07 +00:00
token.py Remove trailing whitespace. 2013-05-09 11:08:11 +00:00

README

Dialog 'Pre' block check handlers:

Every .py file in this directory corresponds to a handler for a class of checks in a dialog file.
Each file describes in its comments the check that it performs.

When writing a new check, you have the variable 'verdict' which you are able to write to.
It is passed in with the value 'True' In order to have a check be treated as 'passed' then
ensure that this variable is still true when you are done, if you want to have your check fail
then set the verdict to 'False' at the point where control goes back to your caller.

The following variables are also avaiable to you:

character, speaker, location
which hold the CFObject of the player and the NPC and the location where tokens are being
written to and read from.

These should probably be treated as read-only by your check, otherwise you might cause strange
side-effects on other checks.

Other than that, there are no technical limits on what you can do with a check, although it is
probably good form not to make drastic changes to the player's character.