Technical definition details of "reason the action failed"?

The Standard Rules (6M62) include:

The reason the action failed -- documented at var_reason -- is an action name based rule producing nothing that varies.

I was surprised to see the definition here… I would have expected a nothing based rule, maybe.

Can anyone explain why that particular kind was chosen? Is it an artifact of an earlier era that was never updated because the type doesn’t really matter?

Has to be that way. If the reason the action failed variable is assigned anything, that thing is going to be some particular action rule, whatever rule stopped the action, i.e., some particular before, instead, persuasion, or check rule, or one of the basic visibility rule, the basic accessibility rule, or the carrying requirements rule… or a visibility rule, an accessibility rule, a reaching inside rule, or a reaching outside rule, or other, depending on what the author’s gotten up to.

[ Edited: the Visibility rules themselves never stop the action; if the Basic Visibility Rule need to follow the Visibility Rules, it may stop the action based on their result. ]

Oh, I was misremembering the docs when I said nothing based – I was thinking of the part in WWI 19.9 Basis of a Rulebook that says:

If a rulebook is declared like so:

Marvellous reasoning is a rulebook.

then it is an action based rulebook.

which when I read it long ago I must have cross-indexed with nothing based because when you don’t specify the basis, you get action based as the default.

I get what you’re saying, but it doesn’t seem like the compiler particularly cares about the exact details of the rulebook’s I/O. It’s accepting this, for example:

Foo is a rulebook.

Foo jumping:
	anonymously abide by the bar rules.

Bar is an (action name) based rulebook.

Bar jumping:
	anonymously abide by the zork rules..

Zork is an (action) based rulebook.

Zork jumping:
	anonymously abide by the foo rules.

… which is a quick ticket to a stack overflow if you try to follow any of those rulebooks.

Does the Index have a place where it shows the basis/produced value for each rulebook?

Huh. It seems to compile and work fine (6M62 and 10.1) with:

The reason the action failed -- documented at var_reason -- is a nothing based rule producing nothing that varies. [MODIFIED]

(You need to replace that section of the Standard Rules to test.)

Example scenario:


Lab is a room.

An open openable enterable transparent container called a glass box is here.

Test me with "enter box / close box / actions / exit".

Just plain nothing based rule seems to work, too. I’m not sure that it matters for a read-only purpose.

I’m curious about what motivated the original choice.

Like you said, the compiler accepts mismatched variable assignments but executing one shows that it’s a bug. So it’s better to avoid the mismatch, right?

But are all of the possible rules really the same type?

The basic accessibility rule, for example, is defined:

The basic accessibility rule translates into I6 as "BASIC_ACCESSIBILITY_R" with
	"You must name something more substantial." (A).

It’s listed in the action-processing rules but that doesn’t define its type, does it? Is it just another default type rule? And is that default actually action name based (as the definition of reason the action failed implies) or action based (as the documentation claims)?