values for kinds of things

I want to create an oil skein and a water skein, so I create a “kind of skein”. Skeins have a fullness to reflect the amount of fluid in them, but Inform won’t let me write a detailed description for that.

A fluid container is a kind of container. 
Carrying capacity is 1. [This means only one fluid can be poured in.]
A fluid container has a real number called capacity. [The nbr of oz it can hold.]
A fluid container has a fullness. Fullness is a kind of value. 
The fullnesses are completely full, not quite full, half full, almost empty, and completely empty. 
[Almost empty must be used because 'empty' is a reserved word.]

A fluid is a kind of thing. Fluids can be drinkable or undrinkable.

Water is a fluid. Water is drinkable.
Description of water is "Water is, ah...well...It's drinkable water. Don't worry about it. You're not thirsty now anyway.".

A skein is a kind of fluid container. The skein is openable. The skein is closed. 
The skein has a fullness. Capacity of skein is 32.0.
Description of skein is "A bota-like waterproof bag for holding liquids.".

A water skein is a kind of skein. The fullness of water skein is completely full.
Description of water skein is "This waterproof leather bota can hold a quart of water, wine, or some other liquid. Currently, it is [fullness of water skein] of water.".

I get this error:
** In the sentence ‘“This waterproof leather bota can h […] fullness of water skein] of water.”’ it looks as if you intend ‘fullness of water skein’ to be a property, but ‘a water skein’ is not specific enough about who or what the owner is.**

Everything works until I include the “[fullness of water skein]” in the code. How do I write a general description that allows me to describe the fullness. Isn’t thtat the point of a variable?

It sounds like you want the water skein to be a specific skein in the game. So skein should be a kind but water skein should be a thing. It’s getting confused because as you have written it so far, there could be several water skeins in the game, so it doesn’t know which one you’re referring to when you say fullness of the water skein.

If you say a water skein is a skein instead of a water skein is a kind of skein does it work better?

2 Likes

Yes, it does, but I do have several water skeins in the game, which is why I had to say “kinds of water skeins”. How do I designate the fullness of a water skein when it is not designated? Do I need duplicate descriptions?

I would try something like this:

A water skein is a kind of skein.
The fullness of a water skein is usually completely full. 
The description of a water skein is usually "This waterproof leather bota can hold a quart of water, wine, or some other liquid. Currently, it is [fullness of item described] of water.".
2 Likes

This produces the same problem. [fullness of item] is even less specific than [fullness of water skein].
ERROR:
In the line ‘“This waterproof leather bota can h […] it is [fullness of item] of water.”’, I was expecting that ‘fullness of item’ would be something to ‘say’, but it didn’t look like any form of ‘say’ that I know. So I tried to read ‘fullness of item’ as a value of some kind (because it’s legal to say values), but couldn’t make sense of it that way either.

Not “item” but “the item described”. You need to use those exact words.

“The item described” is Inform-speak for “the object whose property this text is stored in”.

2 Likes

Perfect! These secret little phrases make learning INFORM like learning arcane magical chants. :wink:

You can actually omit item described entirely in simple cases like this.

The description of a water skein is usually "This waterproof leather bota can hold a quart of water, wine, or some other liquid. Currently, it is [fullness] of water.".

I’m pretty sure that’ll do the exact same thing.

1 Like

Thanks. I’ll give it a try.

CM:
Yes that worked great–and less typing too. :slightly_smiling_face:

1 Like