ActorTopicEntryclassactor.t[3334], facts.t[1282], factrel.t[541]

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().

Modified in facts.t[1282]:
Modifications to ActorTopicEntry to work with Facts.

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

Global Objects  

(none)

Summary of Properties  

activated  activateKeyTopics  active  agenda  agendaPath  arouseKeyTopics  aTag  autoName  autoSuppress  autoSuppressSubTopics  autoUseAgenda  convKeys  curiosityAroused  getActor  impliesGreeting  keyTopics  lastConvResponse  lcrScriptClass  listOrder  name  nextStep  suggestAs  timesInvoked  tTag  wasConversational 

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

Summary of Methods  

activate  addToConvKeyTable  baseHandleTopic  buildName  curiositySatisfied  deactivate  filterTopicSuggestions  fText  getKeyTopics  handleTopic  infTag  initializeTopicEntry  isConversational  isReachable  nodeActive  qualifiedDesc  revTag  showKeyTopics  timesToSuggest  tryAgenda  tryNextStep  useAgenda 

Inherited from ReplaceRedirector :
redirect 

Inherited from Redirector :
askMissingLiteral  doInstead  doNested  doOtherAction 

Inherited from TopicEntry :
addTopic  factText  informFact  informNewFact  interpret  matchTopic  revealFact  revealNewFact  scoreBooster  topicResponse 

Properties  

activatedactor.t[3861]

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.

activateKeyTopicsactor.t[3752]
Flag, do we want a master topic to automatically update all its associated subtopics (associated via its keyTopics property). By default we don't (for now).

activeOVERRIDDENactor.t[3885]
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.

agendafactrel.t[548]
If we like, we can specify a particuler FactAgendaItem to use in conjunction with this ActorTopicEntry. But note that if autoUseAgenda is true the AgendaItem we specify here will be ignored unless useAgenda() can't find a suitable AgendaItem.

agendaPathfactrel.t[669]
The path out associated FactAgendaItem wants to take. This will be a list of fact name tags.

arouseKeyTopicsactor.t[3746]
Flag, do we want a master topic to automatically update all its associated subtopics (associated via its keyTopics property). By default we do, or else they won't be included in any list of suggestions at this point.

aTagfacts.t[1287]
The knowledge tag associated with this ActorTopicEntry. If it's nil, we ignore it. This is the tag for a fact our actor is being told about in response to something we'vr asked.

autoNameactor.t[3349]
Set autoName to true to have this topic entry generate a name from its

autoSuppressactor.t[3547]
Flag:do we want to suppress suggesting this topic if subtopics it has suggested through its keyTopic property are in the current list of suggested topics. By default we do but this can be overridden to nil if it produces unwanted behaviour.

autoSuppressSubTopicsactor.t[3556]
Flag - the complement to autoSuppress. If this is true then when the player changes the main topic when a list of suggestions of subtopics from another main topic (e.g. by typing ASK ABOUT WEATHER after a previous ASK ABOUT ISLAND has called up a suggested list of subtopics about the island), then we'll suppress the list of subtopics (on the basis that the player appears to be no longer interested in them, at least for the time being.

autoUseAgendafactrel.t[555]
Do we want the ActorTopicEntry to find an appropriate FactAgendaItem for us? By default we don't. This should only be set to true on ActorTopicEntries that are going to make use of FactAgendaItem path information.

convKeysactor.t[3410]
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.

curiosityArousedactor.t[3563]
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.

getActorOVERRIDDENactor.t[3479]
Our associated actor is our location's associated actor.

impliesGreetingactor.t[3402]
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.

keyTopicsactor.t[3739]
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.

lastConvResponseactor.t[3357]
Our last conversational response if we're a StopEventList. This can be set as a negative numner, such as -1 to mean the last but one. This may be useful if our final response is a summary of what the NPC has said rather than a conversational response which s/he speaks, so that we don't want to suggest the final response or treat it as conversational.

lcrScriptClassactor.t[3365]
The script class we want lastConvResponse to be applicable. By default this is StopEventList, which is what it is designed to be used with, but this allows game code to adjust this. It also allows gameCode to override lastConvResponse on ActorTopicEntry and have it only apply to ActorTopicEntries that are also of lcrScriptClass.

listOrderactor.t[3583]
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.

nameactor.t[3343]
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.

nextStepfactrel.t[663]
The next step (next fact) our associated FactAgendaItem would like us to use. We can use this to tailor our topicResponse as we see fit, which could include responding with our nextStep's description, or could be something more subtle.

suggestAsactor.t[3575]
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.

timesInvokedactor.t[3540]
The number of times this topic entry has been invoked.

tTagfacts.t[1334]
The fact tag we're going to inform and reference if we are telling (imparting information to the other actor we're talking to.

wasConversationalactor.t[3393]
Was this ActorTopicEntry just before we display our Topic Response, which could change the value of isConversational by advancing curScriptState.

Methods  

activate ( )actor.t[3868]

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

addToConvKeyTable ( )actor.t[3424]
Add this ActorTopicEntry to its associated actor's table of convKeys

baseHandleTopic ( )actor.t[3589], factrel.t[607]
Handle the display of this topic entry's topicResponse or of its suggested subtopics as appopriate.

Modified in factrel.t[607]:
Restore the previous last fact mentioned.

buildName ( )actor.t[3476]
Construct the name of this ActorTopicEntry by using the theName property of our first matchObj.

curiositySatisfied ( )actor.t[3531]
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[3876]
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.

filterTopicSuggestions ( )actor.t[3659]
Filter the list of topics to be suggested by removing from the list any subtopics relating to a new main topic (e.g. when the player types A WEATHER when the list of subtopic relating to A ISLAND is still available. The subtopics are removed simply by having their curiosityAroused reset to nil, indicating that the player's curiosity has moved on elsewhere. at least for the time being.

fText ( )facts.t[1328]
Short-nae method of retrieving the description of the fact associated with aTag or tTag without carrying out any further side-effects.

getKeyTopics (updateStatus)actor.t[3780]
Obtain a list of the TopicEntries that match our keyTopics property.

handleTopic ( )actor.t[3638]
Handle this topic (if we're the ActorTopicEntry selected to respond to a conversational command.

infTag (msg?)facts.t[1336]
no description available

initializeTopicEntry ( )OVERRIDDENactor.t[3452], facts.t[1295]
Initialize this ActorTopicEntry (this is actually called at preinit)

Modified in facts.t[1295]:
Carry out additional initialization to set our matchObj from our aTag

isConversational ( )actor.t[3372]
Should we be treated as conversational? Normally an ActorTopicEntry should (except for certain subtypes) but if we're also a script and our lastConvResponse has been defined as non-nil we may want to do something different.

isReachable ( )actor.t[3893]
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[3418]
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.

qualifiedDesc (actor, tag, topicMatched)OVERRIDDENfacts.t[1339]
Get the relevant qualified fact description

revTag (msg?)facts.t[1319]
Short-name method for retrieving the description of the fact associated with aTag and updating what the player character knows and the fact's list of sources.

showKeyTopics ( )actor.t[3755]
Show our suggested keyTopics, if keyTopics is defined.

timesToSuggest ( )actor.t[3490]
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. If, on the other hand, you want it to be suggested fewer times than there are items in the EventList, say because the final item in a StopEventList is a summary of what was said before rather than a conversational response from the NPC, override the lastConvResponse accordingly (most likely to -1).

tryAgenda ( )factrel.t[701]
tryAgenda is an alternative method our topicResponse can call; it simply executes our associated AgendaItem and returns true or nil to our caller so it can tell whether this provided a response.

tryNextStep ( )factrel.t[677]
A method our topicResponse property can call to try executing the next step of our associated agenda item to provide a response. This returns true if there is a nextStep to execute or nil otherwise so our topicResponse can test whether tryNextStep() has provided a response.

useAgenda ( )factrel.t[558]
Look for an appropriate FactAgendaItem to use with this TopicEntry.

Adv3Lite Library Reference Manual
Generated on 03/07/2024 from adv3Lite version 2.1