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.
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.
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]”.
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).