Problems with understanding the word "people"

I’m having problems with using Understand with the word “people”. I have just one thing I want “people” to refer to, and only one thing has an Understand statement that maps the word “people” to it. But I get things like “You can’t use multiple objects with that verb.” when the player types “examine people”, although there is only that one thing. Most seriously, I have two new verbs set up:

Understand "contemplate [something]" as contemplating.
Understand "contemplate [text]" as contemblahing.
Does the player mean contemblahing: it is unlikely.

This is so that the player can contemplate things in scope but I can also do stuff if they try and contemplate a text they enter that doesn’t match anything. This works well for all other objects, but for my object intended to be Understood by “people”, the contemblahing action is activated rather than my contemplating action, which is not what I want.

I guess this is because something in the standard rules maps “people” to be understood as any things with kind person. I don’t think I really need that. I’d love to be able to Understand “people” “as something new” like you can with words that the standard rules Understand as actions, but there doesn’t seem to be a way to do this with nouns. Any help much appreciated!

If you want your action to be able to work on multiple things, you need to use “[things]” in your understand line for the action instead of “[something]”. (See WWI 17.4 Standard tokens of grammar and RB 6.15 Actions on Multiple Objects.)

Understand "contemplate [things]" as contemplating.

This will issue multiple contemplation actions, one per person in scope, when the player types >CONTEMPLATE PEOPLE.

If Alice is defined as a woman, and Bob is defined as a man, then by default the word “people” does not apply to them. This is corrected via:

Understand "people" as the plural of person.

(See WWI 17.8 Understand names for a little more detail.)

This is slightly different than the Standard Rules declaration: “The plural of person is people.” I’m not sure whether there is intended to be a functional difference between these phrasings or not. Perhaps someone wiser than me will elucidate.

Thanks otistdog, that’s useful information, but not quite what I’m after. I want “people” to be understood as specific objects that I choose whether they are of person kind or not. It would be more convenient for me if the word “people” was not understood as the plural of person because apparently this is stopping the parser properly recognising what I want to be a reference to my specific object. It seems odd and wrong that (given my code above) it’s possible for “people” to activate the contemblahing action rather than the contemplating action, when there is a thing in scope supposedly Understood as “people”.

I tested your suggestion anyway and funnily enough just changing “contemplate [something]” to “contemplate [things]” caused a glulx crash in my (so far otherwise stable) game.

However I now found my own work-around which is to include the following line in my contemblahing action:

if "[topic understood]" is "people", try contemplating the object-I-want-understood instead;

Sorry – I misread your question.

Although you didn’t provide enough of your source code to be certain, I think I’ve reproduced your situation with a little experimentation. If you use the debugging command >TRACE 3, then you can see what’s happening to generate the problem. The parser reaches an error state when trying to parse the input as a contemplating action due to the inability to accommodate multiple objects. Then it moves on to the next possible interpretation, which is as a contemblahing action, which it can (and does) match. (This is because both actions use the verb word “contemplate”.)

Your workaround handles the issue, but there are other options.

As mentioned, defining any people in the vicinity of the “people” object as men or women seems to (perhaps unexpectedly) prevent the word “people” from applying to them. This might resolve the conflict for you if you never use the person kind for any other objects in the story.

It’s also possible to rip out the Standard Rules and replace them in your story, as described briefly in WWI 27.9 Extensions can interact with other extensions. Adding replacements for two sections of the Standard Rules to your code will allow you to eliminate the use of the word “people” by the Standard Rules. The only two required changes are 1) commenting out the plural definition using “people” in Section SR1/1, and 2) modifying the “exclude people from take all rule” by replacing the word “people” with the alternate “persons” (so it reads “… whether all includes persons while taking…”).

As an aside, it looks like the key difference between “The plural of person is people.” and the comparable understand rule in my previous answer is that the former allows use of the word “people” in other source code.

1 Like

This is because objects are by default created with an I6 ‘name’ property including an entry for the plural form of their immediate (not inherited) kind, so the name property of a man includes ‘men//p’ but not ‘people//p’ or ‘things//p’ or ‘objects//p’ -however the name property of an unspecified person (i.e. defined as a person, not a man, woman or animal) does include ‘people//p’.

‘Examine people’ will match all things in scope that are either defined or understood as “people” and will fail if there is more than one (if there’s no other matching grammar line) with the response ‘You can’t use multiple objects with that verb’. So, if there’s both an ‘unspecified’ person and an object understood as “people” in scope, ‘Examine people’ will fail, but if there’s only one or the other, it will succeed.

1 Like

Yes, specifically this allows source code to refer to multiple persons as ‘people’ but does not affect how the word people typed in by the player is understood.

To affect how a plural typed by the player is understood, it’s necessary to use an ‘Understand…’ phrase. This can be made more general than ‘Understand “people” as the whatjamacallit’ by using for example ‘Understand “mankind” as the plural of man’ - now the player can type either ‘men’ or ‘mankind’ to refer to one or more men in scope. (At the I6 level, this is implemented using the ‘parse_name’ property of all instances of men, rather than adding ‘mankind//p’ to their ‘name’ property).

PS there’s also ‘the printed plural name’ which defines how groups of indistinguishable things are referred to in printed lists- changing this changes the I6 ‘plural’ property but again does not affect how what the player types is understood.

1 Like

Thank you very much, good people (pun intended)! As usual I learned more than I bargained for but it was all to the good.

I’m running into this problem now. I have a male NPC and a female NPC who are important, but lots of other people in the background who aren’t important, but are necessary as background in the scenario. So you should be able to X PEOPLE and get a description. Later, the people act as one and you should be able to do any standard verb with them.

The stuff in this thread sounds like an awful lot of workaround coding for background in a Petite Mort game. I’d rather not spend many minutes on the code. Is there a quick, easy way to do this? I tried making a “crowd” with the printed name of “people”, which didn’t work, but crowd gives the wrong impression. It’s a group of people. Any ideas for making this super-simple? Or should I rethink this part of my game so I don’t spend precious minutes on this?

Maybe something like this will work for your limited specs:

2 Likes

Thanks! Unfortunately I get an error message for that:

The sentence ‘The crowd are a person in the Lab’ appears to say two things are the same - I am reading ‘crowd’ and ‘person in the Lab’ as two different things, and therefore it makes no sense to say that one is the other: it would be like saying that ‘Ron is Hermione’. It would be all right if the second thing were the name of a kind, perhaps with properties: for instance ‘Hogsmeade is a lighted room’ says that something called Hogsmeade exists and that it is a ‘room’, which is a kind I know about, combined with a property called ‘lighted’ which I also know about.

EDIT: Wait a sec. I screwed something up. This might work after all. Hold, please.

What version are you using? The code I posted works fine for me in both 6M62 and the current version (10.1.2).

1 Like

Inform 7: Version 1.68 (1.68.1)

I still haven’t made the move to 10. I don’t like change.

OK, so I screwed something up earlier, and it DOES work, but it still won’t understand “people” as the crowd, even though I added them as a synonym:

Understand “people” as crowd.

I still get

x people

You can’t use multiple objects with that verb

I may just rethink this whole part. This will eat up a LOT of my 4 hours if I keep messing with it.

The trick is to not have more than one “people.” In order to do that, you need to have defined all your other “people” (the other npcs) as “men” or “women” or some new subkind of people, rather than as “a person.” That way the parser will never think of “people” as the plural of people, only the one thing (the crowd) you’ve defined as a “person” and won’t try multiple objects.

2 Likes

Thanks. Yeah, I have to rethink it. I can get creative about it.

Since the original discussion above isn’t super-clear, here’s a (hopefully) clarified summary:

  1. The You can’t use multiple objects with that verb. message in response to >X PEOPLE is a parser error. It happens because a) the examining action’s grammar doesn’t allow multiple objects and b) more than one object in scope matches the word “people” from the command.

  2. If you want to allow multiple objects to be examined via one command, then extending the grammar as seen in my first response above will solve the issue. The player’s command will be translated into a series of actions, one for each object matching the word “people.”

  3. If instead you want for only a single object to be matched to the word “people,” then you need to make sure that the objects are defined in such a way to support this. The important things to know are:

    a. The I7 compiler knows that “people” is the plural name of the person kind, so anything defined as a person, e.g. Bob is a person., will automatically match the word “people” by default. Anything declared as a subkind of person, however, will not, so Alice is a woman. Bob is a man. The cat is an animal. will by default create three objects that don’t match the word “people.”

    b. You can make every subkind of person to match the word “people,” by adding an Understand... declaration as seen in my first post above. This will override the default, so Alice, Bob and the cat would all match the word “people” at that point.

The parser’s interpretation of the word “people” can be guided by using conditional Understand... lines, and it may be necessary to use these to get what you want. Does the player mean... rules can’t help to get past this issue.

This setup is a definite problem:

Place is a room.

Adam and Barbara are people in Place.
A plural-named person called a crowd is in Place.

In this case, there is no way around the issue. A parser error can’t be avoided, because Adam, Barbara and the crowd all match the word “people,” and the grammar for the examining action doesn’t allow multiple objects.

This setup may be less of a problem:

Adam is a man in Place.
Barbara is a woman in Place.

A plural-named person called a crowd is in Place.

In this case, the word “people” can only ever refer to the crowd.

This setup is still a potential problem:

Understand "people" as the plural of person when the player cannot see a plural-named person.

Adam is a man in Place.
Barbara is a woman in Place.

A plural-named person called a crowd is in Place.

Although the word “people” will preferentially apply to the crowd, if Adam and Barbara are around while the crowd is not then >X PEOPLE will still yield the parser error.

This setup adds a grammar line to allow examining of multiple objects:

Understand "people" as the plural of person when the player cannot see a plural-named person.

Adam is a man in Place.
Barbara is a woman in Place.

A plural-named person called a crowd is in Place.

Understand "examine [things]" as examining.

The word “people” still preferentially applies to the crowd, but if only Adam and Barbara are around then >X PEOPLE examines them both.

4 Likes