TopicEntryclass | topicEntry.t[16]

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` | `topicEntry.t[172]`

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` | `topicEntry.t[135]`

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` | `topicEntry.t[160]`

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` | `topicEntry.t[128]`

Do we want to restrict this TopicEntry to an exact case match with its matchPattern? By default we don't.

`matchObj` | `topicEntry.t[110]`

The object, topic or list of objects/topics that this TopicEntry matches.

`matchPattern` | `topicEntry.t[122]`

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` | `topicEntry.t[104]`

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` | `topicEntry.t[142]`

A method or property that can be used to dynamically alter our score according to circumstances if needed.

`topicMatched` | `topicEntry.t[115]`

The topic that this TopicEntry actually matched (set by matchTopic()).

Methods

`addTopic (top)` | `topicEntry.t[178]`

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 ( )` | `topicEntry.t[76]`

Initialize this Topic Entry (actually carried out at pre-init

`matchTopic (top)` | `topicEntry.t[24]`

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 ( )` | `topicEntry.t[144]`

no description available

`topicResponse ( )` | `topicEntry.t[87]`

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