I’m trying to make it so that the player can say ask him about/for his name when conversing with an NPC, but I can’t get a vocab phrase with the possessive pronoun in it to work at all. When I use AskAboutForTopic '(his) name' it doesn’t match either ask for his nameorask his name. Meanwhile, obviously, when I use AskAboutForTopic 'name', it works with the second example but not the first, which would be annoying for players. I even tried AskABoutForTopic 'name; his', but that doesn’t seem to work either.
I think that in addition to trying to map ask about/for to a tName topic, I also created a new verb to handle ‘ask [actor] [their] name’… I’ll have to wait till I’m home for details though…
You may not like my solution, because I didn’t get picky about the possessive adjective.
However, unless I mistook something, or Lite is way different, shouldn’t you be defining a Topic with the ‘(his) name’, instead of an AskAboutForTopic?
Here’s what I did (adv3). Note that I took the lazy way out, so that both ‘ask otis for his name’ and ‘ask otis for her name’ will both get the answer.
tName: Topic '(what) (is) (their) (his) (her) (its) name names name/names' ;
otis: Person ;
+ AskAboutForTopic @tName "It's Otis. " ;
//pardon the macros: basically I just created an extra grammar
//so that 'ask otis his name' will reroute to 'ask otis about/for his name'
acT(AskName) ; vR(AskName) 'ask' singleDobj ('what'|) ('his'|'her'|'their'|'its'|'my') ('name'|'names') ('is'|'are'|) : AskNameAction
vP = 'ask/asking (whom)' omitIobj ;
mT dF(AskName) {V if(gDobj && !gDobj.oK(Person)) IL('Why are you trying to ask <<thatObj>> for <<itPossAdj>> name? '); }
Ac replaceAction(AskAbout,self,tName); } } ;
‘ask otis about his name’
‘ask otis for his name’
‘ask otis his name’
‘ask otis what his name is’
all respond (as well as weirder constructions like ‘ask otis about what is his name’, and any ‘his’ could be swapped with ‘her’ or ‘their’ because it doesn’t check the adressee’s gender).
In adv3Lite you can define a topic to match on inline as part of a template for actor topics instead of as it’s own object, for succinctness, and according to the manual the behavior should be identical.
I did some brief checking in a skeletal build of a Lite game, using a tName Topic object. It seems that the parser is very different from adv3, so I think I’m out on this one. It almost sounds as if you (uglily) nested a nameObj in the actor’s containment, that you could probably ask about/for that.
Nesting a ‘his name’ Thing doesn’t work either. The parser seems to really push the possessive here. I get “No his appears to have any name”…
‘Ask Igor about Igor’s name’, will work, however…
Which message comes from a NoneInOwnerError, thrown by matchVocab() of a NounPhrase or TopicPhrase. The parser seems to populate the possQual property of the NounPhrase object, but then not match it later. It feels like the parser is maybe too rigid about assigning the word ‘his’ (and others) to be a PossessiveProduction, and because of that tag to throw the NoneInOwnerError when the word is tried to be used as a regular adjective?
I’m taking notes. Because a certain NPC is very proud of her name & heritage, she deserve her quasi-wall of text after
ASK AZUTEJIKI ABOUT HER NAME
After yesterday’s fiasco (thanks, jon !) I have converted all those cmdDict.Addword into InitializeVocabWith, accepting the intrinsic risks in the frequent long (78+ chars) list of adjectives and synonyms, but, after all ‘her’ is only three letters long…
later, I’ll test Jon’s implementation, I have already provisionally implemented her (that is, Atuj), included a preliminary set of askTopics…
Thanks for the interesting insight and
Best regards from Italy,
dott. Piergiorgio.