[Adventuron] Noun2 disappears if there's no preposition

When giving an object to a character, the normal syntax is GIVE OBJECT TO CHARACTER, but I thought I would also implement GIVE CHARACTER OBJECT by using set_sentence to convert the latter into the former. Quite to my surprise, it didn’t work. When I applied some debugging code (that I now have as a permanent fixture for resolving these issues), I discovered that the latter command produced verb = GIVE, noun1 = CHARACTER and noun2 = nothing. What happened to noun2? Can you only have noun2 if noun1 is followed by a preposition?

After further experimenting and discussions on the Telegram group, I realised that noun2 was being discarded because I’d used a synonym for the character’s name, but I hadn’t set the synonym in the vocabulary table or elsewhere using one of the experimental properties that caters for this. In my case, the character’s name is Santa Claus and I wanted to refer to him as ‘Santa’, ‘Claus’ or ‘Santa Claus’.

When providing multi-word synonyms using either experimental_matching_text_sequences in the object definition or experimental_replace in the vocabulary section, it is crucial that the synonyms are specified in the correct order. If you use the order shown above, it won’t work. When you GIVE SANTA CLAUS OBJECT, SANTA is found first and allocated to noun1, CLAUS is found next and allocated to noun2 and OBJECT is discarded.

For me, the solution was to use the following in the object definition:
santa_claus : scenery "Santa Claus" {experimental_matching_text_sequences = ["santa claus", "santa", "claus"] at = "room01"}

I’m not sure whether I can use the vocabulary section, as I have a Mrs Claus character that may cause a conflict. And we certainly don’t want any conflicts between Mr and Mrs Claus! :laughing: If I didn’t have a Mrs Claus, I could have done this in the vocabulary section:

: experimental_replace text = "santa claus" with = "claus";
: experimental_replace text = "santa" with = "claus";

This is all advanced stuff, so if you’re an Adventuron newbie, don’t be scared off. Just ignore all this and stick to the basics.

In my never-ending quest to understand the logic behind Adventuron’s strange parser, I have discovered another quirk. I have Santa Claus defined as shown above. Prior to adding the experimental_matching_text_sequences, I had a : match "examine santa" and it worked. I was under the impression, that this would work with any synonyms for ‘santa’, including ‘claus’ and ‘santa claus’. It turns out that it now only works with : match "examine claus". Am I missing something here?