Possessive pronouns for topics?

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 name or ask 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.

What’s going on here?

1 Like

I’ve dealt with this but I’m not at the computer right now…

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…

1 Like

Company over for the evening… are you still looking for a solution?

2 Likes

Yeah, I could make a special verb for it but I’d rather get the topic to match properly. Don’t worry about it though, there’s no rush!

2 Likes

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).

PS parentheses mean weak tokens in adv3

2 Likes

Additional thought, you could define:

tHisName 'his name' ;
tHerName 'her name';
tTheirName 'their name/names' ;

and then a given actor could have

sophie:Person;
+ AskAboutForTopic @tHerName

etc.
The grammar in AskNameAction would be trickier, though, unless you created three new actions, each with specific pronouns…

1 Like

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.

2 Likes

Have you checked to see if you get the normal behavior using @Topic? Mine works as expected…

1 Like

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.

1 Like

EDIT: THIS IS WRONG: see later post

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?

Okay, I forgot to list Igor as isHim = true.

This (ugly) approach will get the parser to comply:

+ igor: Actor 'igor' isHim = true ;
++ igorsName: Thing 'his name' ; //make invisible
++ AskAboutForTopic @igorsName "Igor is his name, oh! " ;

And I note that Lite does not need the extra grammar I made in order to field ‘ask igor his name’…

2 Likes

Well, it’s not ideal, but I’ll take it. Maybe the library could be improved though…

2 Likes

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.

2 Likes

Glad it was helpful!

1 Like

An alternative is to define a name object thus:

name: Thing 'name; his her'
    familiar = true
    ownedBy(obj) { return obj.ofKind(Actor)); }
;

Then

++ AskAboutForTopic @name 
   ...
;

should work for any Actor

3 Likes