Inspired by the Noisemaking example I’ve been trying to create observation rules by which NPCs will react differently to different types of action. To cut a slightly longer story short (see the example) you can state things like:
Attacking the drum is a loud action.
and then if you create an observation rulebook to run at the right time, you can get NPCs to react by using rules like this:
An observation rule for loud action in the presence of the black crow:
My problem is that trying to use this “action X is Y” syntax frequently throws compiler errors like this:
“Problem. The sentence ‘Dancing is a disconcerting action’ appears to say two things are the same - I am reading ‘Dancing’ and ‘disconcerting action’ as two different things, and therefore it makes no sense to say that one is the other…”
What’s making this really tough to debug is that I get such errors, or don’t, depending purely on where in the source the “Singing is a disconcerting action” declaration is. This sounds really weird, but it seems like it has to come really soon after the declaration of the singing action, or else it doesn’t work (obviously it has to come after, but why soon after?). This is creating problems for me because this is a large project and I need to collect all the definitions of which actions are disconcerting in one place for the code to be manageable.
I admit that because of this strangeness, I suspect the language has bugs with respect to this particular “Action X is Y” syntax.
This is not the same as this problem with the “Action X is acting fast” example, which looks superficially similar but was about not formatting action descriptions properly.
Further, I’m struggling to debug my code because this syntax doesn’t appear to be documented anywhere I can find. It seems to be presented only in this example (and one other, the “acting fast” one) but not described outside of examples. So I don’t know where to look for anything relevant in the Index, for example.
My tests indicate that using this syntax is not creating a new defined adjective for actions (an action defined with an adjective as being a disconcerting action does not activate “an observation rule for a disconcerting action”), nor can it be creating an action variable (because those are unique to each action). So what is this syntax and how do I make it work?