conversation with TADS3

Hello,

I am trying to make my NPC more interactive using AskTellTopic function.
But when I test my game, the command Ask troll about Durandal (see below) doesn’t work.

But I don’t understand how work this function.

Is someone can explain me what is wrong in my code ?

Below part of the code (description in french beacause I’m french):

Epee : thing
name = ‘Durandal’
desc = “L’&eacutep&eacutee mythique de Roland”
;

Grong: Person ‘troll/grong’ ‘un troll vert’
desc = “Il y a un troll au milieu du pont\n”
;

  • AskTellTopic @Epee // dosen’t work :cry:
    "Grong : Tu ne me fais pas peur avec ton ep&eacutee !\n "
    ;

  • DefaultAnyTopic // work :slight_smile:
    "Grong : Tu ne me fais pas peur avec ton ep&eacutee !\n "
    ;

  • HelloTopic // work :slight_smile:
    “Grong : sors de mon pont !”
    ;

Well, there are two things wrong with this:

Epee : thing name = 'Durandal' desc = "L'&eacutep&eacutee mythique de Roland" ;

First, TADS 3 is case sensitive, and it needs to be Thing, not thing.
Second, you haven’t given the Epee object any vocabWords, so it can never be matched.

At a minimum you need:

Epee : Thing vocabWords = 'durandel name = 'Durandal' desc = "L'&eacutep&eacutee mythique de Roland" ;

Though it would be more idiomatic to make use of the template and write:

Epee : Thing 'durandal' 'Durandal' "L'&eacutep&eacutee mythique de Roland" isProperName = true // I'm not sure if this works in the French library though ;

In practice you’d probably need to add more vocabWords than this to match other things players might use to refer to the Epee with.