I'm trying to make a well you can drink out of and I can't figure it out

I just started fooling around with Inform7 and I’ve run into a bit of a stumbling block.


Open Field is east of Wilds of Cernunnos

Open Field is a room.  "Tall grasses sway slightly in the breeze.  Once this would have been planted with oats or barley but the wild grass has completely overtaken it." 

Water is a thing. Water is fixed in place.  

A well is a container. The well is fixed in place. The well contains Water. 

Water is an item you can drink. "You scoop up a hand full of water and drink it.  The water is cold and refreshing."

A well is in Open Field. "There is a beautifully carved marble well with a tile roof.  It is filled with water."

The description of well is "The marble well has various woodland figures carved around the outside.  Four wooden beams support a peaked roof covered in brilliant red terra cotta tiles"


 

Gives me this error.


In Chapter one - Helios:

Problem. The sentence 'Water is an item you can drink'   appears to say two things are the same - I am reading 'Water' and 'item you can drink' as two different things, and therefore it makes no sense to say that one is the other: it would be like saying that 'Tom is Jerry'. It would be all right if the second thing were the name of a kind, perhaps with properties: for instance 'Mouse-Hole is a lighted room' says that something called Mouse-Hole exists and that it is a 'room', which is a kind I know about, combined with a property called 'lighted' which I also know about.
 

Because of this problem, the source could not be translated into a working game. (Correct the source text to remove the difficulty and click on Go once again.)

I’ve searched though the documentation and examples and unless I’m just blind I’m not sure why this shouldn’t work. If someone could explain what I’m doing wrong I’d apricate it, because I am not a smart person.

1 Like

Hi GreyGold,

I can assure you that you’re plenty smart! You’re almost there. Try:

Instead of drinking the water:
	say "You scoop up a hand full of water and drink it.  The water is cold and refreshing."

instead of:

Water is an item you can drink. "You scoop up a hand full of water and drink it.  The water is cold and refreshing."

Note that there is an edible property, but no drinkable property in Inform.

2 Likes

Thank you. That works! It was driving me crazy that I couldn’t figure it out.

@GreyGold9 Don’t knock yourself, I’m sure you’re smart enough to get the hang of programming in Inform 7 (the fact that you’re making the attempt says a lot about your intelligence and drive).

I started programming Inform 7 in earnest last year and even now I struggle sometimes with implementing something (right now it’s catching and combining multiple results from the “describe room gone into rule”).

As you’ve found out, these forums are a lifesaver when you can’t figure out something from the documentation alone. Someone, somewhere has probably tried to do what your attempting and can point you in the right direction.

I also implemented a well in my first Inform 7 game.


Inside the Domed Building
Sunlight streams through the dome’s oculus, illuminating the entire room. Low stone tables are arranged in a circular pattern around a large central well underneath the center of the dome. Circling the entire wall of the dome except for the exits is a series of murals.

There is an small archway to the south and the main exit to the west.

x well
The well is circular and filled with what appears to be fresh water. It appears to be the same size as the oculus far above it with a knee-high wall running around its circumference.

drink water
You cup some water in your hand and take a quick drink.


I do like your implementation though, it is short and sweet. My own was a few more lines of code though I don’t remember exactly why I went into such depth (I probably started small and it grew as I tried to cover all my options).

The well is a thing.
The well is a container.
The well is open.
The well is scenery in the Inside Dome.
The description of the well is "The well is circular and filled with what appears to be fresh water. It appears to be the same size as the oculus far above it with a knee-high wall running around its circumferance."

Instead of inserting things into the well: say "I don't see the purpose of dropping [the noun] in the water."

The well-water is a thing.
The well-water is scenery in the Inside Dome.
The well-water is edible.
The description of the well-water is "The water appears fresh, replenished by some unseen mechanism far below.[first time] Of course, if Wells were here he would be able figure out the mechanics of such an engineering feat but you can only puzzle at its' execution.[only]"

The printed name of well-water is "water".
Understand "water" as well-water.

Before taking the well-water:
	try eating the well-water;
	stop the action.

Instead of tasting the well-water:
	try eating the well-water.

Instead of eating the well-water:
	say "You cup some water in your hands for a quick drink.";
	stop the action.

Instead of drinking the well-water:
    say "You cup some water in your hand and take a quick drink." [Recipe §10.2. Liquids]

Instead of smelling the well-water: 
    say "It smells fine."

Good luck with the rest of your game!

I started with Inform 7 a year and a half ago with no programming experience at all, because I’d wanted to write an IF game forever. I was absolutely certain I was too dumb to do it, plus I was 50 years old and thought you couldn’t teach an irascible old dog like me a new trick like coding.

And a year and a half later, I’ve written four games and even won a competition! I did it by asking for help here. A lot. A whole lot.

It’s not that you’re not smart. It’s that I7 is weird and tricky. If I could do it, so can you. Keep asking for help and keep reading that documentation.

4 Likes