"AskTopics," "Tell me about," and setKnowsAbout. TADS3

I have a ton of AskTopics for each of the characters in my game. They work fine.

But when I say, >Character, tell me about foo (which to my way of thinking should be identical to >Ask character about foo), I get the default noResponseFromMsg - UNLESS I run character.setKnowsAbout(foo) at some point.

So the character.knowsAbout does not need to be true for >Ask character about foo, but it does need to be true for >Character, tell me about foo.

It seems inconvenient to have to set character.knowsAbout for each and every topic in the game. Is there a way avoid doing all that work?

Thanks in advance,

–Bob

Both forms of asking are equivalent. They should produce the same result. Are you really, really sure you get a different response between the two forms of asking for the same object? Double check.

Also, the library does not actually keep track of object knowledge for NPCs. It only does so for the player character. If the player knows about the object, both forms of asking will work. If the player doesn’t know about the object, both forms will produce the noResponseFromMsg result. Whether or not the NPC being asked knows about the object or not is not taken into consideration.

You can verify that by temporarily making the player character know about everything. In your “me” object definition, add your own knowsAbout() method implementation:

knowsAbout(obj) { return true; }

I have double-checked! :slight_smile:

I will send you some code offline.

–Bob

Just to wrap this up, RealNC set me straight on this. For anyone else who happens upon this, it turns out that I had followed the code in the Tour Guide 19.4:

knownProp = $sarahKnows
seenProp = &sarahHasSeen

which dissassociates the NPC’s knowledge from the player, and can cause unpleasant side-effects for the unwary (i.e., me).
–Bob