# Unlimited amount of things

Hello there! Is there a way to implement a container which has an unlimited amount of a kind of thing in it?
I’m thinking along the lines of Extra Supply, but with being able of taking more than just one thing. Thanks in advance.

For reasons of practicality, it’ll be best to limit the total number of such things in play. The pizza example under “Dispensers and Supplies of Small Objects” shows how to implement this. Consider how many such objects the player will really want to be carrying with them.

If you truly need an “endless” supply of something (like coins or money) it’s best to represent it with variables.

For example, a jar of jelly beans: instead of taking the jellybeans, you’d generate a random number between 4 and 10 and say “You grabbed [X] jellybeans!” then add that to the jellybean variable.

The amount should be limited to 5 things at a time and after inserting them into another container they would return to the source. So technically they should only appear unlimited by hiding the amount that is in the initial container and it should never be empty.

Yes, it depends on how “physical” you need your multitudes to be. In Baker of Shireton, the coins you make for selling are physical but limited to (I think?) 50 total in the game. When the player has any more than 30 at a time, the game forces them to drop them all into a piggy bank where they are recycled.

In that game, inserting coins into the bank made the score go up, so it gave the player encouragement for not carrying hundreds of coins. You can do all kinds of tricky things like having an object called “your money” that takes a number variable depending on the amount the player has and then goes away when the variable is 0.

You can think of it how RPGs rarely model individual coins. There’s just a pile of loot with a number that disappears when you take it, then that amount is added to your bank.

That sounds good. You need a special container to take the liquids, which are limited to 5 and after a recipe succeeds the liquid is no longer inside the kettle and can return to its original container. Thanks alot!

I started to adapt the Pizza Prince Code to fit the job at hand. If I test it in isolation it works fine. However, in the real code it won’t accept the slice system. Any ideas what could be wrong?

[code]Section - Ingredients

An ingredient is a kind of thing. A is an ingredient. B is an ingredient. C is an ingredient. D is an ingredient. E is
an ingredient. F is an ingredient. G is an ingredient.

Section - Fluid Containers

A fluid container is a kind of container.
Chapter - Liquids

A liquid is a kind of ingredient.
The indefinite article of a liquid is “some”.

say “You can’t take the [noun].”

Section - Liquids

The H is a liquid.
The G is a liquid.
The F is a liquid.

The Spring Itself is a thing in Blood Spring. Understand “G” as the Spring Itself. The description is “They are all
cheese-only, and all luke-warm.”

10 G are in G Limbo.

Instead of taking the Spring Itself:
let chosen slice be a random G in G Limbo;
if chosen slice is nothing: [That is, there were no slices remaining]
say “[manager refusal]”;
otherwise:
move the chosen slice to the player;
say “Taken (gingerly).”

To say manager refusal:
say “[one of]‘Hey!’ barks a hitherto-unseen manager from behind you. ‘It’s an ‘all you can eat’ buffet, not
an ‘all you can stuff down your pants’ buffet.’[or]You are conscious of a disapproving huff from the manager, so
you refrain.[stopping]”

Rule for implicitly taking the Spring Itself:
let chosen slice be a random G in G Limbo;
if chosen slice is nothing: [That is, there were no slices remaining]
say “[manager refusal]”;
otherwise:
move the chosen slice to the player;
say “(helping yourself from the spring)”;
now the noun is the chosen slice.

Rule for clarifying the parser’s choice of the Spring Itself while taking:
say “(from the magnificent spring before you)[line break]”[/code]

You made G be a single thing rather than a kind of thing. If you want to create “10 G” then you need “a G is a kind of liquid”.

I noticed that too, but if I make it an ingredient and a kind of liquid or vice versa inform gives me an error message too.

What error message?

I got around it by making a ingredient a kind of thing, a liquid a kind of ingredient and G a kind of liquid. However, G needs to have a value.

[code]Chapter - Liquids

A liquid is a kind of ingredient.
The indefinite article of a liquid is “some”.

say “You can’t take the [noun].”

Section - G

The G is a kind of liquid.

The G can be clear, green, red or blue (this is the G color property).

Rule for printing the name of the G when listing contents:
say “[G color] G”.
Understand the G color property as describing the G.

The G has a time called the concealment-time.
The G is a number that varies.
The G is 10. [since every magical knows it changes every 10 minutes]

After closing a container enclosing the G:
now the concealment-time of the G is the time of day;
continue the action.

Every turn when the G is in a closed container:
if the remainder after dividing the minutes part of the concealment-time of the G minus 1 by G change is the remainder after dividing the minutes part of the time of day by G change:
now the G color of the G is the G after the G color of the G.[/code]

Inform tells me the following:

``You wrote 'Understand the G color property as describing the G'  : but I don't understand what single thing or kind of thing that refers to, but it does need to be an object (or kind of object) and not some other sort of value. For instance, 'understand the transparent property as describing a container.' is okay because 'a container' is a kind of object.``

Is there a way to work around it?

If “G” is a kind of thing, you can’t refer to “the G” (because there are many of them). You can only refer to “a G”.