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.