Problems with the (rather mysterious) "action X is Y" syntax (e.g. as used in Noisemaking example)

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?

The “is a(n) __ action” used in some examples can seem like a special case because of the “action”, but as far as I can tell, they just create a new kind of action, as described in 7.15 (Kinds of action). There is no functional difference between “is a(n) __ action” and “is acting fast”, “is unmaidenly behaviour”, “is speech” and others.

You can see the result of the declarations in the Index under “Actions → Behaviour — Kinds of action, grouped under common names”.

Unfortunately, this doesn’t immediately solve the problems with compiling.

In principle, you should be able to group the actions together in the source, see example 205, “Under Contract”, in section 12.11. In that example, a lot of actions are defined as “useless action” in one spot in the source.
(Of course, the example is rather short, so that’s not helping to find out issues of declaration order.)

One thing that might be of interest is this note from 7.15:

“(Note that we were only allowed to say that “Kissing Mr Carr is unmaidenly behaviour.” because Inform already knew from earlier sentences - see the example below - that Mr Carr was a person, and therefore that “kissing Mr Carr” made sense as a description of an action.)”

That could point to issues where the order of declaration matters.


Thanks for pointing me to the relevant documentation! The basic idea makes more sense now.

And I have now managed to solve my problem. It was because one of my actions is called “dancing” but I also elsewhere had a thing called “ideaOf dancing”. This problem arose, or did not, depending on where I stated that the action of dancing is disconcerting, in relation to where I declared the “ideaOf dancing” thing.

I have learned my lesson previously not to call things “X of Y” because this can confuse the compiler. But it didn’t occur to me that if you have a thing called “X Y” then you may get problems if you then have an action kind called Y. But apparently you can.