Instead of doing something

Hi all,

Just a really quick question: Following code :

The birds are in the room. They are scenery. Understand "flock" or "bird" or "heart" or "wings" as the birds. Instead of doing something to the birds, say "They are too far away".

It works fine, but some commands don’t seem to be captured by ‘doing something’

Transcript :

x birds
They are too far away

touch birds
They are too far away

attack birds
They are too far away

get birds
They are too far away

(so far so good)

kiss birds
You can only do that to something animate.


smell birds
They are too far away

open birds
They are too far away

put feather on birds
Putting things on the birds would achieve nothing.


So my question is, is there an elegant way of capturing the exceptions above, and, in a single statement, making it so that the default text for interacting with the birds is the default text?

Thanks in advance.


Instead of doing anything when the noun is the birds or the second noun is the birds...

By default “doing something with…” only checks the first noun. Unfortunately the “you can only do that to something animate” is a parser error, not a response to an action, so no action even occurs. Making the birds an animal will give them the “animate” property and circumvent that.

Ugh. I knew it was that that caused the issue but I couldn’t find the code to make it work. >_<

Thanks Dan.

Instead of doing something when the current action involves the birds

…will solve your first noun/second noun problem.

Bear in mind that this will also catch “birds, [something]”, assuming the birds are implemented as animate (ie. an animal).

Hi all, sorry - I’m bumping this.

I’m racking my brains around this, but I’m not sure how to go about it.

I have a backdrop that is also an animal. I need let the player interact with the backdrop in the same way they might a person, or an animal (kiss, talk to, punch…etc…

An example of the sort of thing I mean:

The Whale is a backdrop. It is in Stomach and Throat and Mouth and Intestine and Lungs.

Is this possible? Is there a way to give the whale an ‘animate’ property so that the commands that require ‘animate’ will work out of the box? Or is there a way to circumvent the parser error? I really don’t want to ‘as something new’ every parser command for interacting with an animated thing.

Thanks in advance.

I think the most direct native I7 solution would be to make the Whale a person that is part of a backdrop.

However, if all you want to do is to allow the commands to apply to certain inanimate objects while keeping the same behavior for the animate ones, you don’t need to understand them as something new–you can just add a new understand line with a [something] token like this:

[code]Living room is a room. A lamp is in living room. Jane is a woman in living room. A table is in living room.

Understand “kiss [something]” as kissing.

Check kissing something when the noun is not a person and the noun is not the lamp: say “You can only do that to something animate, or a lamp.” instead.[/code]

The Understand as something new line rips out all the existing understand lines for a word…but in this case we don’t actually need to rip them out, because an understand line for “kiss [someone]” can coexist peacefully with an understand line for “kiss [something]”.

Cool…thanks Matt.

If you don’t mind a bit of I6, you can do:

The Whale is a backdrop. It is in Stomach, Throat, Mouth, Intestine, and Lungs.
Include (- has animate, -) when defining The Whale.

Yes! I had really hoped there was a way of doing this. I really need to get my head around i6. Thank you.

You can also include Inanimate Listeners by Emily Short, and set the whale “addressable”. This allows you to talk to it and such (though it won’t obey commands).

The DM4 is a great read, so long as you realize that the exercises are more of a reference for returning readers than didactic exercises for first time readers; they often require information that has not yet been presented. It also has a chapter entitled The Craft of Adventure that’s full of historical information and language-independent IF design advice. It’s worth reading regardless of which system you use.

A more general observation: if you’re working atop a pile of abstractions, and things are going well, then fantastic. If they stop going well, the more of the underlying layers that you understand, the better off you’ll be. It’s one thing not to have to work at a lower level all of the time; it’s another not to be able to when the need arises.

I recall looking at that extension and seeing that it sets the talkable attribute for an object. We could implement a similar extension (Animate Kinds?), replacing talkable with animate, if we find that it’s often needed. I think talkable was inaccessible entirely from I7, while animate is now provided by Person and its subclasses, so a problem only arises if one needs an object to be animate while also being of some other specialized kind (e.g., Backdrop).