ActorTopicEntryclass | actor.t[2962]

An ActorTopicEntry is a specialization of TopicEntry for use with the conversation system. ActorTopicEntries represent potential responses to conversational commands like ASK BOB ABOUT LIGHTHOUSE or TELL GEORGE ABOUT FIRE.

Since ActorTopicEntry inherits from ReplaceRedirector as well as TopicEntry, its topicResponse() methods can make use of doInstead() and doNested().

`class ActorTopicEntry : ReplaceRedirector TopicEntry`

Superclass Tree (in declaration order)

`ActorTopicEntry`
`ReplaceRedirector`
`Redirector`
`object`
`TopicEntry`
`object`

Subclass Tree

`ActorTopicEntry`
`AltTopic`
`AskAboutForTopic`
`AskForTopic`
`AskTellGiveShowTopic`
`AskTellShowTopic`
`AskTellTopic`
`AskTopic`
`CommandTopic`
`DefaultTopic`
`DefaultAnyTopic`
`DefaultAgendaTopic`
`DefaultAskForTopic`
`DefaultAskQueryTopic`
`DefaultAskTellTopic`
`DefaultAskTopic`
`DefaultCommandTopic`
`DefaultConversationTopic`
`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`

Global Objects

(none)

Summary of Properties

`activated active autoName convKeys curiosityAroused getActor impliesGreeting isConversational keyTopics listOrder name suggestAs timesInvoked`

``

``

Inherited from `TopicEntry` :
`includeInList isActive matchExactCase matchObj matchPattern matchScore scoreBoost topicMatched`

Summary of Methods

`activate addToConvKeyTable buildName curiositySatisfied deactivate getKeyTopics handleTopic initializeTopicEntry isReachable nodeActive showKeyTopics timesToSuggest`

Inherited from `ReplaceRedirector` :
`redirect`

Inherited from `Redirector` :
`doInstead doNested doOtherAction`

Inherited from `TopicEntry` :
`addTopic matchTopic scoreBooster topicResponse`

Properties

`activated` | `actor.t[3272]`

A flag that can be set with an <.activate> tag. It must be true for this TopicEntry to be active, regardless of the value of isActive. It starts out true by default, but it can be set to nil on TopicEntries that you want to start out as inactive subsequently activate via an activate tag.

`active` OVERRIDDEN | `actor.t[3296]`

This TopicEntry is active if its own isActive property is true and its activated property is true and if its location is active. This allows the isActive conditions of individual TopicEntries to be combined with that of any TopicGroups they're in. This property should not normally be overridden in game code.

`autoName` | `actor.t[2977]`

Set autoName to true to have this topic entry generate a name from its

`convKeys` | `actor.t[3003]`

A string or list of strings defining one or more groups to which this topic entry belongs. Under certain circumstances an ActorTopicEntry may be prioritized if its convKeys overlaps with the associated actor's activeKeys.

`curiosityAroused` | `actor.t[3114]`

We won't suggest this topic entry (if we ever suggest it at all) until its curiosityAroused property by true. By default it normally is from the start, but this can be overridden in individual cases if desired.

`getActor` | `actor.t[3072]`

Our associated actor is our location's associated actor.

`impliesGreeting` | `actor.t[2995]`

Normally a conversational command implies a greeting (that is, it should trigger a greeting if a conversation is not already in process). This needs to be overridden to nil on ActorTopicEntries that explicitly handle greetings (HelloTopic and its subclasses) to avoid an infinite loop.

`isConversational` | `actor.t[2986]`

An ActorTopicEntry is conversational (the default) if it results in an actual conversational exchange. Change this to nil for ActorTopicEntries that merely report why a conversational exchange did not take place (e.g. "Bob ignores you" or "You think better of talking to George about that.")

`keyTopics` | `actor.t[3181]`

The keyTopics can contain a convKey or a list of convKeys, in which case when this TopicEntry is triggered instead of responding directly it will list topic suggestions that correspond to the convKeys defined here. For example, a TopicEntry that responded to ASK BOB ABOUT TROUBLES could define a keyTopics property of 'troubles' that triggered more specific suggestions such as "You could ask when the troubles started, or what the troubles were, or how the troubles ended", assuming that these QueryTopics had a convKeys property of 'troubles'

If you want this TopicEntry to display its topicResponse in the normal way, leave keyTopics as nil.

`listOrder` | `actor.t[3134]`

The order this TopicEntry appears in within its group in a list of suggested topics. The higher this number, the later this topic will be suggested. Note that this does not override the grouping of suggestions into AskTopics, TellTopics, etc.

`name` | `actor.t[2971]`

To make this a suggested topic, just give it a name under which it will be suggested (of the kind that could follow 'You could ask about ' or 'You could tell him about ' or 'You could show him ' etc.). Note that for QueryTopics and SayTopics that are specified with a matchObj the library constructs this name automatically.

`suggestAs` | `actor.t[3126]`

The suggestAs property can be overridden to change the list this topic entry will be suggested as if you don't want it placed in the list the library chooses by default. The allowed values are one of AskTopic, TellTopic, GiveTopic, ShowTopic, or TalkTopic. Normally, though, the library default will work perfectly well and you don't need to specify this property. If you do it must be specified as a kind that this topic entry can actually match, e.g. TellTopic for an AskTellTopic or ShowTopic for a GiveShowTopic.

`timesInvoked` | `actor.t[3106]`

The number of times this topic entry has been invoked.

Methods

`activate ( )` | `actor.t[3279]`

Activate this TopicEntry. This would normally be called in game code via an <.activate> tag.

`addToConvKeyTable ( )` | `actor.t[3017]`

Add this ActorTopicEntry to its associated actor's table of convKeys

`buildName ( )` | `actor.t[3069]`

Construct the name of this ActorTopicEntry by using the theName property of our first matchObj.

`curiositySatisfied ( )` | `actor.t[3097]`

Assuming this topic entry is ever suggested, it will continue to be suggested until curiositySatisfied becomes true. By default this occurs when the topic has been invoked timesToSuggest times. If, however, we have any keyTopics we'll take our curiosity to be satisfied when our keyTopics have all been satisfied.

`deactivate ( )` | `actor.t[3287]`

Deactivate this topic. This could typically be used from within the topicResponse of an ActorTopicEntry you only want to use once (or in the last entry in a StopEventList of an ActorTopicEntry). It can also be called via a <.deactivate key> tag in combination with the convKeys.

`getKeyTopics (updateStatus)` | `actor.t[3209]`

Obtain a list of the TopicEntries that match our keyTopics property.

`handleTopic ( )` | `actor.t[3140]`

Handle this topic (if we're the ActorTopicEntry selected to respond to a conversational command.

`initializeTopicEntry ( )`OVERRIDDEN | `actor.t[3045]`

Initialize this ActorTopicEntry (this is actually called at preinit)

`isReachable ( )` | `actor.t[3304]`

Determine whether this TopicEntry is currently reachable, i.e. whether it could be reached if the player asked/told etc. about its matchObj on the next turn.

`nodeActive ( )` | `actor.t[3011]`

Test whether any of this Topic Entry's convKeys match those in the Actor's activeKeys list (whether or not the latter has any entries). This can be used in the isActive property to make this topic entry *only* available when its convKeys are active.

`showKeyTopics ( )` | `actor.t[3184]`

Show our suggested keyTopics, if keyTopics is defined.

`timesToSuggest ( )` | `actor.t[3081]`

The number of times to suggest this topic entry, if we do suggest it. By default this is either once (if we're not also an EventList) or the number of items in our eventList (if we are an EventList). If you want this topic entry to go on being suggested ad infinitum, set timesToSuggest to nil.

Adv3Lite Library Reference Manual
Generated on 12/09/2014 from adv3Lite version 1.4