Conditional relation + property + arithmetic relation

I’m not sure if I’m missing a subtlety here, or if this is just a bug:

[code]Test is a room.

A speech motivation is a kind of value. The speech motivations are idle, suggested, overheard, generally addressed, noticed, exclaimed, told, shown, asked, requested, and offered.

Definition: A speech motivation is personal rather than general if it is at least exclaimed.

A person has a speech motivation.

A person can be finished speaking, moved to speak, or waiting to speak.

Speech cueing relates a person (called motivated speaker) to a speech motivation (called current reason) when the motivated speaker is not finished speaking and the speech motivation of the motivated speaker is the current reason.

The verb to be ready to speak after implies the speech cueing relation.

When play begins: showme whether or not the player is ready to speak after a speech motivation that is at least exclaimed.[/code]

This will compile if I change the last line to this:

When play begins: showme whether or not the player is ready to speak after a personal speech motivation.

Interestingly, this also fails to compile:

When play begins: showme whether or not the player is ready to speak after a speech motivation.

Why won’t it work both ways?

You might have a hat trick here. As best I can tell, you’ve hit two different occurrences of the same bug, or else two closely related bugs, and bug 739 is making the problem messages unhelpful.

First, because you wrote A person has a speech motivation. the wording ``speech motivation’’ is ambiguous to Inform: it could mean either the kind of value or the speech-motivation-valued property of people. It’s guessing the latter when you mean the former and then not backtracking to try the alternative (see bug 686). You can get around the trouble by writing A person has a speech motivation called motivation. or something like that instead.

Second, it’s getting mixed up by at least,'' which can mean eitherat least’’ for numbers or for speech motivations, and, again, it’s not backtracking. (Some trickiness comes from the fact that, under the hood, both share the greater-than-or-equal-to relation.) You could define your own condition-expressing relationship and a verb for it as a workaround.

Or you can use an adjective to derail both ambiguities, as you already pointed out.

I actually did that originally, but I guess I ran into the first problem.

Unfortunately I was trying to compare the motivation with another variable, so that doesn’t really work. I guess I’ll just name the property.

There’s a problem with naming the property. I can’t do this anymore:

When play begins: showme the list of told people.

Any other ideas?

Here’s my failed attempt to use a custom relation to compare speech motivations:

[code]Test is a room.

A speech motivation is a kind of value. The speech motivations are idle, suggested, overheard, generally addressed, noticed, exclaimed, told, shown, asked, requested, and offered.

Definition: A speech motivation is personal rather than general if it is at least exclaimed.

Relative cueing relates a speech motivation (called first reason) to a speech motivation (called second reason) when the first reason is greater than the second reason.

The verb to be more public than implies the relative cueing relation. The verb to be more private than implies the reversed relative cueing relation.

A person has a speech motivation.

A person can be finished speaking, moved to speak, or waiting to speak.

Speech cueing relates a person (called motivated speaker) to a speech motivation (called current reason) when the motivated speaker is not finished speaking and the speech motivation of the motivated speaker is the current reason.

The verb to be ready to speak after implies the speech cueing relation.

When play begins: showme whether or not the player is ready to speak after a speech motivation that is more public than noticed.

When play begins: showme the list of suggested people.[/code]

This requires you to define a sentence verb:

A person has a speech motivation called the motive.
The verb to speak by (it speaks by, they speak by, it is speaking by) implies the motive property.
	...
	showme the list of people who speak by told.

(“Speak by being …” is more grammatical, but I like to keep these verb phrases short. Up to you.)

Whoa, I didn’t know you could do that! Although I suppose if I defined it as a relation instead of a property the verb would be the same.

I ended up dealing with this issue in a more specific way. I needed it to be able to handle gift transactions, so I defined some very specific gift-giving relations. But now that I know that, I might go back and tweak the syntax to be slightly more readable:

[code]A person has a speech motivation called the cue.

Gift-offering relates a thing (called the gift) to a person (called the recipient) when the gift is the concern of the recipient and the cue of the recipient is offered.

The verb to be offered to implies the gift-offering relation.

Definition: A thing is currently offered if it is offered to the person asked.

Gift-requesting relates a thing (called the gift) to a person (called the donor) when the gift is the concern of the donor and the cue of the donor is requested.

The verb to be requested from implies the gift-requesting relation.

Definition: A thing is currently requested if it is requested from the person asked.

Definition: A thing is pointlessly requested if it is currently requested and it is not enclosed by the person asked.
[/code]

Of course all of this is a substitute for a 3-way relation. I wish:

[code]Context relates a person (called the listener) to a thing (called the subject matter) and a speech motivation (called the reason) when the subject matter is the concern of the listener and the reason is the cue of the listener.

The verb to be concerned about it because implies the context relation.[/code]

Of course now that I’ve phrased it that way, I can see using a 3-argument to-decide-whether phrase would make the specific relation definitions simpler.