Backdrops

Hello, all:

I know that backdrops are defined as a thing from the programming code of Inform 7 (the book by Graham Nelson). But they do not appear to have the same properties as things.

For example, this code works on a piece of scenery:

a thing has some text called the scent.  a thing has some text called the sound.

Definition:  A thing (called the odor-bearer) is smelly if the scent of the odor-bearer is not "".

Definition:  A thing (called the sounder) is loud if the sound of the sounder is not "".

instead of listening to something:
	if the noun is loud:
		say "[Sound of the noun][paragraph break]";
	otherwise if the noun is the player:
		say "Bad enough that you like the sound of your own voice, now you've got to demonstrate it?";
	otherwise:
		say "I don't hear anything coming from the [noun]."

instead of listening:
	let L be the list of loud things enclosed by the location;
	if L is empty:
		say "You don't hear anything out of the ordinary.";
	otherwise:
		say "You hear [a list of loud things enclosed by the location]."

instead of smelling something:
	if the noun is smelly:
		say "[scent of the noun][paragraph break]";
	otherwise if the noun is the player:
		say "You don't smell too bad, at least from where I'm standing.";
	otherwise:
		say "It smells like an ordinary [noun]."

instead of smelling a room:
	let L be the list of smelly things enclosed by the location;
	if L is empty:
		say "Nothing tickles your olfactory nerve about this place.";
	otherwise:
		say "You smell [a list of smelly things enclosed by the location]."

fish parts is a thing.  "Chunks of exploded, dead trout, just the way your Uncle used to prepare it, are in a goopy pile here."  The scent of fish parts is "Not the most pleasant thing you have ever smelled.".  The printed name is "a pile of fish parts".

This code works, if I smell in the location I smell fish parts and if I smell the fish parts is says the scent. However, this same code does not appear to work for backdrops:

sewage is backdrop. sewage is in Sewer_intersection, Eastern_Sewer, Northern_Slope, Southern_Slope, and Cul_de_Sac.  the sound of sewage is "Watery blood rushing through the rivulets in the center of the room sounds like thunderous applause.".  the scent of sewage is "The metallic stink of blood clots even the corners of every room.".

when I smell or listen, it gives me the default responses as if there is nothing to listen to or smell.

Am I correct, that backdrops can’t have these descriptors for backdrops even though I can back them for other types of things? Or am I coding it wrong?

BTW, smelling and listening code is from “Inform 7 Handbook” by Jim Aikin. Great book if you’ve never read it.

You have

let L be the list of smelly things enclosed by the location;

But a backdrop is not enclosed by the location. This is a detail of the “enclosure” relation.

1 Like

Thank you for pointing this out. As always your feedback is appreciated.