TopicEntryclass
TopicEntry is the base class for ConsultTopics and various kinds of Conversation Topics. It can be used to match a particular topic and output an appropriate response.
class
TopicEntry
: object
Superclass Tree (in declaration order)
TopicEntry
` object`
Subclass Tree
TopicEntry
ActorTopicEntry
AltTopic
AskAboutForTopic
AskForTopic
AskTellGiveShowTopic
AskTellShowTopic
AskTellTopic
AskTopic
CommandTopic
DefaultTopic
DefaultAnyTopic
DefaultAgendaTopic
DefaultAnyNonSayTopic
DefaultAskForTopic
DefaultAskQueryTopic
DefaultAskTellTopic
DefaultAskTopic
DefaultCommandTopic
DefaultConversationTopic
DefaultNonSayTopic
DefaultGiveShowTopic
DefaultGiveTopic
DefaultQueryTopic
DefaultSayQueryTopic
DefaultSayTellTalkTopic
DefaultSayTellTopic
DefaultSayTopic
DefaultShowTopic
DefaultTalkTopic
DefaultTellTalkTopic
DefaultTellTopic
GiveShowTopic
GiveTopic
InitiateTopic
NodeContinuationTopic
NodeEndCheck
MiscTopic
GreetingTopic
ActorByeTopic
BoredByeTopic
ByeTopic
HelloGoodbyeTopic
HelloTopic
ActorHelloTopic
ImpHelloTopic
ImpByeTopic
LeaveByeTopic
HitTopic
KissTopic
NoTopic
TouchTopic
YesNoTopic
YesTopic
SceneTopic
SceneEndTopic
SceneStartTopic
ShowTopic
SlaveTopic
SpecialTopic
QueryTopic
SayTopic
TalkTopic
AskTalkTopic
AskTellTalkTopic
TellTalkTopic
TellTalkShowTopic
TellTopic
ConsultTopic
DefaultConsultTopic
Thought
DefaultThought
Global Objects
(none)
Summary of Properties
active
includeInList
isActive
matchExactCase
matchObj
matchPattern
matchScore
scoreBoost
topicMatched
Summary of Methods
addTopic
initializeTopicEntry
matchTopic
scoreBooster
topicResponse
Properties
active
The active property is used internally by the library to determine whether a TopicEntry is currently available for use. On the base TopicEntry class a topic entry is active if its isActive property is true, but this is not necessarily the case on the ActorTopicEntry subclass defined in actor.t, which needs to distinguish between these properties.
Game code should not normally need to override the active property.
includeInList
The set of database lists we’re part of. This is a list of one or more property pointers, giving the TopicDatabase properties of the lists we participate in.
isActive
Is this TopicEntry currently active? Game code can set a condition here so that a TopicEntry only becomes active (i.e. available) under particular circumstances.
matchExactCase
Do we want to restrict this TopicEntry to an exact case match with its matchPattern? By default we don’t.
matchObj
The object, topic or list of objects/topics that this TopicEntry matches.
matchPattern
A regular expression that this TopicEntry might match, if it doesn’t match a matchObj. We don’t need to define this if we’ve defined a matchObj.
matchScore
Our matchScore is the base score we return if we match the topic requested; this is used to determine whether we’re the best match under the circumstances. By default we use a value of 100.
scoreBoost
A method or property that can be used to dynamically alter our score according to circumstances if needed.
topicMatched
The topic that this TopicEntry actually matched (set by matchTopic()).
Methods
addTopic (top)
If something located in us wants us to add it to our topic database, pass the request up to our location (this is used by AltTopic).
initializeTopicEntry ( )
Initialize this Topic Entry (actually carried out at pre-init
matchTopic (top)
Determine how well this TopicEntry matches top (a Topic or Thing). If it doesn’t match at all we return nil, otherwise we return a numerical score indicating the strength of the match so that a routine that’s looking for the best match can choose the one with the highest score.
scoreBooster ( )
no description available
topicResponse ( )
Output our response to the topic. This can be typically be overridden to a double-quoted string or method to output the required response.
Adv3Lite Library Reference Manual
Generated on 15/03/2023 from adv3Lite version 1.6.1