Multiple objects with a verb

I have a group of NPCs who basically exist only as a group. In the code, I’m referring to them as “a plural-named man”. This works fine until I try to give them a sound, as detailed in Example 95. At this point I get the following output:

>listen to men
You can't use multiple objects with that verb

The Standard Rules state, “Listening to is an action applying to nothing or one thing…” That’s all well and good, but my object IS only one thing. It’s one plural-named thing.

So how do I fix it so that a thing that is plural-named (such as, perhaps, a pair of scissors) can be listened to?

I have a phobia of “instead of,” but this seems like a good place for it: “Instead of listening to the men…”.

That specifically doesn’t work. The standard “listening to” action is being triggered before the Instead rule is consulted.

I think this should work:

Understand "listen to [things]" as listening.

This does open the possibility of the player doing LISTEN TO ALL, which you might be able to close off via multiple action processing rules if you really cared to.

That the men are plural-named isn’t what’s snagging you here. You can say The boys are a plural-named man. and then listen to boys as expected. But the parser knows the plurals of kinds and will automatically try to employ them. (In fact, listen to men will work in the boys case.)

What’s your actual definition of the men object and what understand lines, if any, do you have associated with them? with this code:

Lab is a room.
The well-dressed men are a plural-named man in the Lab.

listen to men works.

Do you have another man in the room at the time you’re trying to listen to the men? 'cause that’d cause this error.

Huh. This code works for me:

Example Location is a room. 

The group of men is a plural-named man in example location.

Instead of listening to the group of men:
	say "They mutter and moan.".

ETA except for the “group” part, which causes indefinite article weirdness. But the listening part works.

Yes. It’s a stone angel, but I had to make it a man so I could give it an object. So the ambiguity is unavoidable. How can I instruct the parser that in this case the word “men” refers only to the plural-named “men” object, and not to the other man?

I think that takes care of it. Thanks. I’m not going to delve into the multiple action processing rules today. Maybe next month…

Maybe someone’ll come along with an easy way to do this with the appropriate manipulation of grammar tokens or a does the player mean? rule or something. But the first thing that comes to my mind is the crude-but-effective: you could replace the Animals, Men and Women section of the Standard Rules and say The plural of man is manly-men. If there’s no context in which you don’t want “men” in a command to refer to your plural-named person object, I don’t think there’s a downside.

1 Like

A quick fix could be to make the stone angel a person instead of a man.

1 Like

The Docs (in 17.20) discuss how to do a couple of things with this rulebook, but there is no mention at all of how to disallow specific actions with “all” is entered by the player. And of course the Standard Rules don’t help. The phrase “multiple action processing” is used only twice, and in neither case is it followed by a list of rules.

At no point, as far as I can see, is there a complete discussion in the Docs of how this rulebook is constructed or of all the ways in which it can be altered.

Would someone like to pull a rabbit out of this hat? Hope so – I’d really like to understand what’s going on.

1 Like

I am not a maven on this stuff by any means, but here’s my basic understanding. First, the Standard Rules don’t generally disallow actions involving “all” because they’re not allowed in the first place except for specific grammar allowing it for TAKE ALL and DROP ALL (maybe there are others? Those are the only ones I know off the top of my head). So by default I don’t think there’s anything in the multiple action processing rulebook – it’s primarily there for authors to use once they decide to let the genie of multiple-actions out of the bottle.

As for how to use it to disallow specific actions, here’s a stripped-down example based on one of my games, where I had a tester who tried to juggle multiple items, which I wanted to acknowledge but not allow. Here’s the code for that:

Understand the command "juggle" as something new.  Understand "juggle [things]" as juggling.  Juggling is an action applying to one carried thing.  

A multiple action processing rule when the action name part of the current action is the juggling action:
	Let L be the multiple object list;
	If the number of entries in L is greater than 1:
		Change L to have 1 entry;
		Alter the multiple object list to L.

Check juggling:
	If the player does not carry the noun, say "You're dubious that you could juggle that, but you're quite sure you couldn't do so without laying hands on it first." instead;
	If the player carries the noun, say "You don't know how to juggle, and you don't think you're likely to start with [the noun]." instead.

So this basically lets the player type in a long list of things they want to juggle together, but then reduces the multiple object list down to one – which truncates the action count down to one as well – and has check rule that provides a different sad trombone based on whether or not the player is carrying the first item they tried to juggle (I could have implemented an implicit take here, but that seemed messier).

To get more sophisticated, you could run through the multiple object list to pluck out the ones you want to allow multiple actions with and then prune the list down so it just includes those. And condense down so it only takes a single turn, if that’s what you’d prefer to have happen. But basically the mechanics are just running the same action over and over until the multiple object list is done.

(I’ve realized I don’t know how the mechanics work if you try to allow something nuts like TIE ALL TO ALL – are there two multiple object lists? Or does the compiler just not let you? – but that seems sufficiently dangerous to give it a wide wide berth).

This is something that I consider an unfortunate behavior in Inform, though it’s apparently intended and not a bug. When the name of an individual thing conflicts with the automatically-generated plural name for a kind, the plural one takes precedence.

That’s why this section of Scroll Thief exists. I had “double doors” and a “row of containers” that wouldn’t work properly until I disabled the plural forms “doors” and “containers”.

I haven’t noticed any major side effects from this hack yet. You can still “repeat with the item running through containers” in your source, for example. All it means is you can’t “take all containers” or “open all doors”, which few players try anyway.

1 Like

I wanted to chuck a note in about a side-effect of this behaviour. As Draconis indicated, if you create a kind, Inform always generates the plural name based on the kind’s name in the source. This means you can’t actually create a (genuinely) privately-named kind. You can create supertreasures, then say ‘A supertreasure is usually privately-named’, and this makes every supertreasure you create in the source privately-named by default. But when you play the game, Inform will recognise the plural word ‘supertreasures’, even though it doesn’t recognise the singular supertreasure.

Is a player likely to type supertreasures if they never even saw the word supertreasure appear in the game? No. But that’s just this case. Or, you may not like having Inform make available to the player a kind name you had intended for internal use, anyway. So again, this can be addressed by setting the plural name yourself, when relevant.

-Wade

2 Likes

Poor St. Thomas Aquinas…

Best regards from Italy,
dott. Piergiorgio.