Item detail

Good evening,

I’ve been bashing my head against the wall about this problem for a while. I’m writing my first Inform 7 code, and I’m stuck giving even the slightest detail to an item beyond its regular description. For example (please excuse any semantic errors, I’ve generalized for the sake of simplicity):

There is a ball here. “This is a bouncy, red ball.” The description is “This ball can bounce really high! It has a white stripe running around its circumference.”

Now, the player might type: look at white stripe which would then turn up an error, such as: “You see no such thing.”

I’ve tried adding “There is a white stripe on the ball”, which works, but turns the ball into a supporter, and doesn’t work for animals, or other types of things which can’t be converted to “containers” or “supporters”. How do I add detail to my items simply? I’ve also attempted to overload the “Instead of looking at [the noun]:” instruction to attempt to capture the word I want, and it doesn’t work if the [the noun] isn’t defined.

Thanks,

Ian

Have you tried “the white stripe is part of the ball”?
The incorporation relationship should work for (I think) all things.

As an addendum, I’ve also attempted to add scenery to the room to compensate for the lack of item descriptions, and this works, but they aren’t portable with the object. So, if the object moves, its a heck of a lot of work to move the scenery with it. (Just letting everyone know what I’ve tried already.)

Ian

wjousts:

That works for items that become “containers” as I’ve mentioned before, which preclude animals, as an example, and probably other items that aren’t containers. Its weird. The compiler accepts the syntax, such as:

There is a female cat here. "It is a pretty cat."

The collar is part of the cat. It has a description "The collar is bright and white."

This works, but then when you do a SHOWME cat, the item isn’t on the cat. The whole item compiles, but the “part” doesn’t show up in the cat’s inventory.

Ian

Another addendum:

I attempted to have the cat “wear” a tag or a collar, and the item never appears on the cat. (Of course, I have to name a specific instance of the cat, since you can’t put items on a “kind” of cat.) This is in attempt to get around the “living” nature of the cat.

Ian

You could try this:

Understand "white" and "stripe" as the ball.

Then if the player tries “x white stripe” they’ll just get the description of the ball again, which is probably what you want to happen (unless they have to do something specific with the white stripe).

I finally found the problem. It appeared that I defined a cat as a kind of animal, which turned “the cat” into a kind as well. What I really needed to do is instantiate the cat as an animal with “The cat is an animal in…”, and then it had all the properties of that kind, including the ability to “wear” a collar. Once that was allowed, the item showed up with:

The cat is wearing a collar. The description of the collar is "A collar that shines in the light."

and “showme cat” gives:

cat - animal
collar (worn)

Thanks everyone,

Ian

Don’t feel bad! That’s such a common mistake that there’s a feature request to have the compiler reject any instance of “the [kind].” It’s almost never what the author meant.