SpecialTopicclass | actor.t[3751], en_us.t[2743] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
A special topic MUST be part of a ConvNode, because these are inherently meaningful only in context. A special topic is active only when its conversation node is active.
Special topics are automatically Suggested Topics as well as Topic Entries. Because special topics use their own custom grammar, it's unreasonable to expect a player to guess at the custom grammar, so we should always provide a topic inventory suggestion for every special topic.
Modified in en_us.t[2743]:
For SpecialTopic matches, treat some strings as "weak": if the user's input consists of just one of these weak strings and nothing else, don't match the topic.
class
SpecialTopic : TopicEntry SuggestedTopicTree
SpecialTopic
TopicEntry
object
SuggestedTopicTree
SuggestedTopic
object
fullName
includeInList
keywordList
matchPat
name
timesToSuggest
weakPat
Inherited from TopicEntry
:
altTalkCount
altTopicList
impliesGreeting
isActive
isConversational
matchObj
matchScore
talkCount
topicGroupActive
topicGroupScoreAdjustment
topicResponse
Inherited from SuggestedTopic
:
associatedTopic
curiositySatisfied
location
suggestionGroup
suggestTo
getConvNode
initializeSpecialTopic
isMatchPossible
matchPreParse
matchTopic
noteSuggestion
Inherited from TopicEntry
:
addAltTopic
addSuggestedTopic
addTopic
adjustScore
anyAltIsActive
breakTopicTie
checkIsActive
deferToEntry
getActor
getTopicOwner
handleTopic
initializeTopicEntry
noteAltInvocation
noteInvocation
setTopicPronouns
Inherited from SuggestedTopicTree
:
associatedTopicIsActive
associatedTopicTalkCount
Inherited from SuggestedTopic
:
associatedTopicCanMatch
findEnclosingSuggestedTopic
findOuterSuggestedTopic
fromEnclosingSuggestedTopic
initializeSuggestedTopic
isSuggestionActive
fullName OVERRIDDEN | actor.t[3816] |
includeInList OVERRIDDEN | actor.t[3822] |
keywordList | actor.t[3766] |
Alternatively, an instance can specifically define its own custom regular expression pattern instead of using the keyword list; the regular expression allows the instance to include punctuation in the syntax, or apply more restrictive criteria than simply matching the keywords.
matchPat | actor.t[3805] |
name OVERRIDDEN | actor.t[3808] |
timesToSuggest OVERRIDDEN | actor.t[3830] |
weakPat | en_us.t[2762] |
getConvNode ( ) | actor.t[3900] |
initializeSpecialTopic ( ) | actor.t[3780] |
This routine adds the topic's keywords to the global dictionary, under the 'special' token type. Since a special topic's keywords are accepted when the special topic is active, it would be wrong for the parser to claim that the words are unknown when the special topic isn't active. By adding the keywords to the dictionary, we let the parser know that they're valid words, so that it won't claim that they're unknown.
isMatchPossible (actor, scopeList) OVERRIDDEN | actor.t[3860] |
matchPreParse (str, procStr) | actor.t[3867], en_us.t[2744] |
matchTopic (fromActor, topic) OVERRIDDEN | actor.t[3833] |
noteSuggestion ( ) OVERRIDDEN | actor.t[3819] |