TADS 3: SuggestedTopic

I am working with TADS 3. It’s a wonderful system.

However, I am beating my head against the wall with “SuggestedTopic” (or any of its variations).

I have coded a statement as follows:

++ GetCoal : AskTellTopic, SuggestedTopic @BillySubjects

When I run the program, I only see:

(You could .)

Yes, I do not have the suggested topics list initialized—that’s the problem. I cannot find any example in the documentation or on the Internet that shows how to initialize this list.

Can somebody help me, please?


Jeffrey W. Bowyer

TADS just needs to know what to suggest the topic as. :stuck_out_tongue:

Try the following:

++ GetCoal : AskTellTopic, SuggestedAskTopic @BillySubjects name='Billy' ;
If BillySubjects is a physical object you could probably also use name=BillySubjects.theName or similar.

Edit: Also note that you should use SuggestedAsk/TellTopic depending on whether you want the suggestion to be to ask or tell about the subject.


Thanks for your response. Your suggestion was a first step in the right direction.

As you suggested, I coded:

++ GetCoal : AskTellTopic, SuggestedAskTopic @BillySubjects name='Billy'
Now, when I run the program, I see:

(You could ask him about .)


  1. The additional words “ask him about” result from changing SuggestedTopic to SuggestedAskTopic.


seems to have no effect (i.e. the suggested topics list is still not initialized).

  1. One more point of confusion regarding SuggestedTopic (and its variations)…

SuggestedAskTopic was added to the AskTellTopic statement, but the output that it generates appears in response to the HelloTopic statement.


At the risk of making this reply too long, here’s my full code for the NPC named “Billy”:

[code]Billy : Person ‘Billy’ ‘Billy’
“He is playing in the snow”
properName = ‘Billy’
globalParamName = ‘Billy’
isHim = true

  • DefaultGiveTopic, ShuffledEventList
    ‘Billy shakes his head, No thanks.’,
    'He looks at it and smiles. That’s nice, he remarks,
    handing it back to you. ',
    ‘You should keep it, he advises.’

  • DefaultShowTopic, ShuffledEventList
    ‘He grins and says, "That’s nice.’,
    ‘Interesting, replies Billy, yawning.’,
    ‘Billy responds, Thank you for showing me.’

  • BillyTalking : InConversationState
    stateDesc = " and talking with you. "
    specialDesc = "talking with you. "

BillySubjects: Topic ‘eyes buttons eye button coal’;

++ GetCoal : AskTellTopic, SuggestedTopic @BillySubjects
"The snowman needs some eyes and some buttons, you say to Billy.
<.p>You’re right. I’ll fetch some coal to use. "
Name = ‘Billy’

++ BillyWorking : ConversationReadyState
stateDesc = “, rolling a snowball.”
specialDesc = “”
isInitState = true

+++ HelloTopic
“Hi, Billy.<.p>
Hi, he says, I’m happy you came outside.”

Again, thanks for any help that you can provide.

Jeffrey W. Bowyer

There are a couple of problems. Firstly, you need to use either “SuggestedAskTopic” or “SuggestedTellTopic”, not just “SuggestedTopic”. Secondly, “name” needs to be all lower-case. At the moment your code has “Name”, with a capital “N”. Since TADS is case-sensitive, it doesn’t recognise that as the “name” property it’s looking for.

So your amended code looks like this:

++ GetCoal : AskTellTopic, SuggestedAskTopic @BillySubjects "<q>The snowman needs some eyes and some buttons,</q> you say to Billy. <.p><q>You're right. I'll fetch some coal to use.</q> " name = 'the eyes' ;

Also notice that “name” means the name of the topic that will be suggested, so in this case, you want “name” to be something like “the eyes” or “coal”.

The purpose of suggested topics is that they provide a list of topics that the player might like to use. This list is presented when the player first speaks to the character, and can be recalled subsequently (having possibly changed) by typing ‘topics’.

What exactly are you expecting to happen?