conversationManagerobject | actor.t[163] |
Superclass Tree | Property Summary | Method Summary | Property Details | Method Details |
<.reveal key> - add 'key' to the knowledge token lookup table. The 'key' is an arbitrary string, which we can look up in the table to determine if the key has even been revealed. This can be used to make a response conditional on another response having been displayed, because the key will only be added to the table when the text containing the <.reveal key> sequence is displayed.
<.convnode name> - switch the current responding actor to conversation node 'name'.
<.convstay> - keep the responding actor in the same conversation node as it was in at the start of the current response
<.topics> - schedule a topic inventory for the end of the turn (just before the next command prompt)
conversationManager : OutputFilter PreinitObject
conversationManager
OutputFilter
object
PreinitObject
ModuleExecObject
object
customTags
idToActor
pendingTopicInventory
respondingActor
revealedNameTab
tagPat
Inherited from ModuleExecObject
:
execAfterMe
execBeforeMe
hasInitialized_
isDoingExec_
isExecuted_
beginResponse
doCustomTag
execute
filterText
finishResponse
scheduleTopicInventory
setRevealed
showOrScheduleTopicInventory
topicInventoryDaemon
Inherited from ModuleExecObject
:
_execute
classExec
customTags | actor.t[181] |
First, add a 'customTags' property that defines a regular expression for your added tags. This will be incorporated into the main pattern we use to look for tags. Simply specify a string that lists your tags separated by "|" characters, like this:
customTags = 'foo|bar'
Second, define a doCustomTag() method to process the tags. The filter routine will call your doCustomTag() method whenever it finds one of your custom tags in the output stream.
idToActor | actor.t[495] |
pendingTopicInventory | actor.t[536] |
respondingActor | actor.t[466] |
revealedNameTab | actor.t[492] |
tagPat | actor.t[342] |
beginResponse (actor) | actor.t[395] |
doCustomTag (tag, arg) | actor.t[182] |
execute ( ) OVERRIDDEN | actor.t[498] |
filterText (ostr, txt) OVERRIDDEN | actor.t[185] |
finishResponse (actor, node) | actor.t[421] |
'node' is the default new ConvNode the actor for the responding actor. If another ConvNode was explicitly set in the course of handling the response, this is ignored, since the explicit setting overrides this default.
scheduleTopicInventory ( ) | actor.t[357] |
setRevealed (tag) | actor.t[482] |
(Games and library extensions can use 'modify' to override this and store more information in the table entry. For example, you could store the time when the information was first revealed, or the location where it was learned. If you do override this, just be sure to set the revealedNameTab entry for the tag to a non-nil and non-zero value, so that any code testing the presence of the table entry will see that the slot is indeed set.)
showOrScheduleTopicInventory (actor, otherActor) | actor.t[374] |
If there's a non-default report, don't suggest the topics now; instead, schedule a topic inventory for the end of the turn. When we have a non-default report, the report could change the ConvNode for the actor, so we don't want to show the topic inventory until we've had a chance to process all of the reports.
topicInventoryDaemon ( ) | actor.t[518] |