unending bowl of stuff

Imagine a jar of grapes. What I want is this: The player is not allowed to take “the grapes”, but can take a single grape. If the player later loses the grape, she can take another, as often as she likes, without ever emptying the jar of grapes.

I don’t want to solve it by simply having 1000 grapes in the jar: I worry that that will slow the game, and in any case it’s not really what I want. I’d like to be able to have a jar of “stuff” (grapes, olives, barley grains), of which the player can take one, but not all “the stuff.”

The problems I run into are names-of-things difficulties, and controlling player’s access to things.

ATTEMPT ONE:

The Red Room is a room.

The jar is a closed openable container in the Red Room.

A grape is an edible thing.

The collection of grapes is a thing in the jar. 

The can't take items out of play rule does nothing when taking a grape and the jar is open.

Instead of taking the collection of grapes, say "You should probably just take a grape."

Problem: I don’t seem to have chosen the correct rule. Is there a rule governing the “You can’t see any such thing” response that I could disable, and syntax that would disable that rule only when the jar is open?

ATTEMPT TWO:

The Red Room is a room.

The jar is a closed openable container in the Red Room.

A grape is an edible thing.

The bunch of grapes is a thing in the jar. 

Instead of taking the bunch of grapes:
	say "You take a single grape and close the jar after yourself.";
	now the player carries a grape;
	now the jar is closed.

Instead of taking a grape when the jar is open:
	if the player carries a grape, say "You already have one";
	else:
		say "You take a single grape and close the jar after yourself.";
		now the player carries a grape;
		now the jar is closed.

The “Instead” does not prevent the attempt at taking a grape, so the player is told “You can’t see any such thing.” Is there a way to basically say, “Instead of TRYING to take a grape…”?

Finally, in both attempts, I run into names-of-things confusion. If the player has a single grape, for example, and tries to take “the grapes”, the player is told “You already have that.”

I hope this makes sense. Let me know if I can provide more information. Feel free to ditch my attempts altogether if there is a simpler solution!

Thanks,
Brooke

I’m down with a cold, so if I missed some requirements, I can only apologize. That said, I hope this helps.


The jar is a closed openable container in the Red Room.

A grape is an edible thing.

The bunch of grapes is a thing in the jar. 
Understand "grape" as the bunch of grapes when the player does not hold the grape.

Instead of taking the bunch of grapes when the player does not hold the grape:
	say "You take a[one of] single[or]nother[stopping] grape and close the jar after yourself.";
	now the player carries a grape;
	now the jar is closed.

Instead of taking the bunch of grapes, say "You already have one." instead.

Offhand, the only edge case here seems to be that you could drop the grape you picked and the player will still get a new one, at which point the “old” one as it were “disappears.”

I’d make the Understand line unconditional, use a “Does the player mean” rule (if I can ever get those working), and change the condition on the Instead of “when the grape is off-stage”. But basically this. ^

Look at the Recipe Book under “dispensers and supplies of small objects”.

Björn and Daniel, these are great responses. I’ll spend the afternoon playing with the details, but I can see that I’m out of the woods.

I can’t believe I’d missed “dispensers and supplies of small objects” in the Recipe Book! I suspect I’ll be using “Pizza Prince” as my template for these situations in the future.

Thanks again! Björn, hope you’re feeling better. :slight_smile:

Brooke