ActorTopicDatabaseclass
A TopicDatabase for an Actor. This is used not only directly for an Actor but also for an actor’s sub-databases, in ActorState and ConvNode.
Actor topic databases field queries for the various types of topic-based interactions an actor can participate in: ASK, TELL, SHOW, GIVE, and so on.
Each actor has its own topic database, which means each actor can have its own set of responses. Actor states can also have their own separate topic databases; this makes it easy to make an actor’s response to a particular question vary according to the actor’s state. Conversation nodes can also have their own separate databases, which allows for things like threaded conversations.
class
ActorTopicDatabase
:
TopicDatabase
Superclass Tree (in declaration order)
ActorTopicDatabase
TopicDatabase
` object`
Subclass Tree
ActorTopicDatabase
Actor
UntakeableActor
Person
ActorState
AccompanyingInTravelState
GuidedInTravelState
AccompanyingState
GuidedTourState
ConversationReadyState
HermitActorState
InConversationState
ConvNode
Global Objects
(none)
Summary of Properties
askForTopics
askTopics
commandTopics
giveTopics
initiateTopics
miscTopics
showTopics
specialTopics
tellTopics
Inherited from TopicDatabase
:
limitSuggestions
suggestedTopics
topicGroupActive
topicGroupScoreAdjustment
Summary of Methods
initiateTopic
showTopicResponse
Inherited from TopicDatabase
:
addSuggestedTopic
addTopic
addTopicToList
compareVocabMatch
findTopicResponse
getTopicOwner
handleTopic
removeSuggestedTopic
removeTopic
removeTopicFromList
showSuggestedTopicList
Properties
askForTopics
no description available
askTopics
Our ‘ask about’, ‘ask for’, ‘tell about’, ‘give’, ‘show’, miscellaneous, command, and self-initiated topic databases - these are vectors we initialize as needed. Since every actor and every actor state has its own separate topic database, it’s likely that the bulk of these databases will be empty, so we don’t bother even creating a vector for a topic list until the first topic is added. This means we have to be able to cope with these being nil anywhere we use them.
commandTopics
no description available
giveTopics
no description available
initiateTopics
no description available
miscTopics
no description available
showTopics
no description available
specialTopics
our special command database
tellTopics
no description available
Methods
initiateTopic (obj)
Initiate conversation on the given simulation object. If we can find an InitiateTopic matching the given object, we’ll show its topic response and return true; if we can’t find a topic to initiate, we’ll simply return nil.
showTopicResponse (fromActor, topic, resp)
OVERRIDDEN
show a topic response
TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3