SuggestedTopicclass | actor.t[1151] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
>talk to bob
"Excuse me," you say.
Bob looks up from his newspaper. "Yes? Oh, you again."
(You'd like to ask him about the black book, the candle, and the bell, and tell him about the crypt.)
Topic suggestions are entirely optional. Some authors don't like the idea, since they think it's too much like a menu system, and just gives away the solution to the game. If you don't want to have anything to do with topic suggestions, we won't force you - simply don't define any SuggestedTopic objects, and the library will never offer suggestions and will even disable the TOPICS command.
If you do want to use topic suggestions, the easiest way to use this class is to combine it using multiple inheritance with a TopicEntry object. You just have to add SuggestedTopic to the superclass list for your topic entry object, and give the suggested topic a name string (using a property and format defined by the language-specific library) to display in suggestions lists. Doing this, the suggestion will automatically be enabled whenever the topic entry is available, and will automatically be removed from the suggestions when the topic is invoked in conversation (in other words, we'll only suggest asking about the topic until it's been asked about once).
Topic suggestions can be associated with an actor or an actor state; these are topics that a given character would like to talk to the associated actor about. The association is a bit tricky: suggested topic objects are stored with the actor being *talked to*. For example, if we want to suggest topics that the player character might want to ASK BILL ABOUT, we store these suggestions with *Bill*. We do NOT store the suggestions with the player character. This might seem backwards at first glance, since fundamentally the suggestions belong in the player character's "brain" - they are, after all, things the player character wants to talk about. In practice, though, there are two things that make it easier to keep the information with the character being asked. First, in most games, there's just one player character, so one of the two actors in each association will always be the player character; by storing the objects with the NPC, we can just let the PC be assumed as the other actor as a default, saving us some typing that would be necessary if we had to specify each object in the other direction. Second, we keep the *response* objects associated with the character being asked - that association is intuitive, at least. The thing is, we can usually combine the suggestion and response into a single object, saving another bunch of typing; if we didn't keep the suggestion with the character being asked, we couldn't combine the suggestions and responses this way, since they'd have to be associated with different actors.
class
SuggestedTopic : object
SuggestedTopic
SuggestedAskForTopic
SuggestedAskTopic
SuggestedGiveTopic
SuggestedNoTopic
SuggestedShowTopic
SuggestedTellTopic
SuggestedTopicTree
SpecialTopic
SuggestedYesTopic
associatedTopic
curiositySatisfied
fullName
location
name
suggestionGroup
suggestTo
timesToSuggest
associatedTopicCanMatch
associatedTopicIsActive
associatedTopicTalkCount
findEnclosingSuggestedTopic
findOuterSuggestedTopic
fromEnclosingSuggestedTopic
initializeSuggestedTopic
isSuggestionActive
noteSuggestion
associatedTopic | actor.t[1185] |
curiositySatisfied | actor.t[1316] |
fullName | actor.t[1174] |
In English, the fullName should be suitable for use after 'could': "You could <fullName>, <fullName>, or <fullName>".
In English, the phrasing where the 'name' property is used depends on the specific subclass, but it should usually be a qualified noun phrase (that is, it should include a qualifier such as "a" or "the" or a possessive). For ASK and TELL, for example, the 'name' should be suitable for use after ABOUT: "You could ask him about <the lighthouse>, <Bob's black book>, or <the weather>."
By default, we'll walk up our 'location' tree looking for another suggested topic; if we find one, we'll use its corresponding name values.
location | actor.t[1199] |
Because we're using the location property, you can use the '+' notation to add a suggested topic to the target actor, state objects, or topic entry.
name | actor.t[1175] |
suggestionGroup | actor.t[1224] |
suggestTo | actor.t[1221] |
By default, we return the player character; in most cases, you won't have to override this. In most games, only the player character uses the suggested topic mechanism, because there's no reason to suggest topics for NPC's - they're just automata, after all, so if we want them to ask something, we can just program them to ask it directly. Also, most games have only one player character. Games that meet these criteria won't ever have to override this. If you do have multiple player characters, you'll probably want to override this for each suggested topic to indicate which character wants to ask about the topic, as the different player characters might have different things they'd want to talk about.
timesToSuggest | actor.t[1308] |
associatedTopicCanMatch (actor, scopeList) | actor.t[1351] |
associatedTopicIsActive ( ) | actor.t[1345] |
associatedTopicTalkCount ( ) | actor.t[1348] |
findEnclosingSuggestedTopic ( ) | actor.t[1227] |
findOuterSuggestedTopic ( ) | actor.t[1242] |
fromEnclosingSuggestedTopic (prop, defaultVal) | actor.t[1263] |
initializeSuggestedTopic ( ) | actor.t[1320] |
isSuggestionActive (actor, scopeList) | actor.t[1282] |
noteSuggestion ( ) | actor.t[1359] |