conversationManager object | actor.t[163]

Conversation manager output filter. We look for special tags in the output stream:

<.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`

Superclass Tree (in declaration order)

`conversationManager`
`OutputFilter`
`object`
`PreinitObject`
`ModuleExecObject`
`object`

Summary of Properties

`customTags idToActor pendingTopicInventory respondingActor revealedNameTab tagPat`

``

``

Inherited from `ModuleExecObject` :
`execAfterMe execBeforeMe hasInitialized_ isDoingExec_ isExecuted_`

Summary of Methods

`beginResponse doCustomTag execute filterText finishResponse scheduleTopicInventory setRevealed showOrScheduleTopicInventory topicInventoryDaemon`

``

``

Inherited from `ModuleExecObject` :
`_execute classExec`

Properties

`customTags` | `actor.t[181]`

Custom extended tags. Games and library extensions can add their own tag processing as needed, by using 'modify' to extend this object. There are two things you have to do to add your own tags:

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]`

a vector of actors, indexed by their convMgrID values

`pendingTopicInventory` | `actor.t[536]`

flag: we have a pending prompt-time topic inventory request

`respondingActor` | `actor.t[466]`

The current responding actor. Actors should set this when they're about to show a response to an ASK, TELL, etc.

`revealedNameTab` | `actor.t[492]`

The global lookup table of all revealed keys. This table is keyed by the string naming the revelation; the value associated with each key is not used (we always just set it to true).

`tagPat` | `actor.t[342]`

regular expression pattern for our tags

Methods

`beginResponse (actor)` | `actor.t[395]`

Note that an actor is about to give a response through a TopicEntry object. We'll remember the actor so that we'll know which actor is involved in a <.convnode> operation.

`doCustomTag (tag, arg)` | `actor.t[182]`

no description available

`execute ( )`OVERRIDDEN | `actor.t[498]`

preinitialize

`filterText (ostr, txt)`OVERRIDDEN | `actor.t[185]`

filter text written to the output stream

`finishResponse (actor, node)` | `actor.t[421]`

Finish the response - call this after we finish handling the response. There must be a subsequent matching call to this routine whenever beginResponse() is called.

'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]`

Schedule a topic inventory request. Game code can call this at any time to request that the player character's topic inventory be shown automatically just before the next command prompt. In most cases, game code won't call this directly, but will request the same effect using the <.topics> tag in topic response text.

`setRevealed (tag)` | `actor.t[482]`

Mark a tag as revealed. This adds an entry for the tag to the revealedNameTab table. We simply set the table entry to 'true'; the presence of the tag in the table constitutes the indication that the tag has been revealed.

(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]`

Show or schedule a topic inventory request. If the current action has a non-default command report, schedule it; otherwise, show it now.

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]`

Prompt daemon: show topic inventory when appropriate. When a response explicitly asks us to show a topic inventory using the <.topics> tag, or when other game code asks us to show topic inventory by calling scheduleTopicInventory(), we'll show the inventory just before the command input prompt.

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3