Understanding Things by Relation (a token which is just too complicated)

I am trying to work on a way for the player to refer to different houses (which I have as regions), by using the name of someone who lives there (a relation) however when I attempt to do so using the following code:

Understand "[someone related by the living in relation]'s house" as a house.

I get the following problem from the compiler:

The grammar you give in ‘Understand “[someone related by the living in relation] 's house” as a house’ contains a token which is just too complicated - someone related by the living in relation.

For instance, a token using subordinate clauses - such as ‘[a person who can see the player]’ will probably not be allowed.

And I could not really understand what made this token too complicated compared to the examples used in 17.16 of the documentation such as the line:

Understand "box of [something related by containment]" as a box.

If anyone could explain the difference between the token I’ve tried to use and the ones that work in examples and any possible work arounds I would greatly appreciate it.

2 Likes

You’re up against at least three problems.

  • the related by token won’t take somebody or someone, just something (I’d consider this a bug, but arguably it’s a feature request)
  • you included the word “relation” but despite needing that as part of the relation name everywhere else, you don’t use it with the related by grammar token
  • the parser can’t really handle 's as part of a word; you need to fake it being a different word
A house is a kind of region.
A house has a text called description.
Inhabitation relates one house to various things.
The verb to inhabit means the reversed inhabitation relation.

Alice is a person.
H1 is a house. "It's OK."
White house is a room.
Map region of white house is h1.
Alice inhabits h1.

After reading a command:
let x be "[the player's command]";
replace the text "'s" in x with " [']s";
change the text of the player’s command to x.

Understand "[something related by inhabitation]'s house" as a house.
understand "examine [any house]" as examining.
6 Likes