>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.
SuggestedTopic : object
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.
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.
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.