As I’ve mentioned elsewhere, I’m currently building a system where I have a “reference” object and one or more “instances” of it. The user is never supposed to refer to the “reference” object itself, but I also want the user to be able to refer to any of the instances through the name of the reference object. To make things worse, I want to be able to do this only after the user has examined the instance.
I can make the “reference” object a property of the instance objects, but I cannot use Understand the reference property as describing the instance because the reference property is not a kind of value but an object.
I have also tried using the “Understanding using relations” way, but I get the “too complicated error”,
In Volume 4 - Actions, Book 2 - Scoping in the extension Artists And Their
Works by Oblomov:
>--> The grammar you give in 'Understand "[creative work represented by a
creative work instance]" as a creative work instance' (Testing
Artists.materials/Extensions/Oblomov/Artists and their Works.i7x, line 177)
contains a token which is just too complicated - creative work represented
by a creative work instance. For instance, a token using subordinate
clauses - such as '[a person who can see the player]' will probably not be
allowed.
So the way I’m trying to do is to let the parser match the reference object (putting it in scope under appropriate conditions), and then prepare a list of actionable instances from that.
Now, when the list of actionable instances has a single element, I can redirect the action from the reference object to the actionable instance (good), and when the reference list of actionable instances is empty, I can give an error about not being able to see an instance of the object here (good).
The question becomes then how to handle the case when the list of actionable instances has more than one element. In this case, I would like to leverage the built-in system that asks for clarifications, but my understanding is that this triggers only at parsing time, i.e. if the parser finds an ambiguity it cannot resolve, not later. Even the closest thing I’ve found in the documentation is in the chapter about Asking which do you mean (the “Walls and Noses” example) works this way.
So, the question is: am I missing something about how this can be handled, or do I have to do some custom input management?