My scenery

Hello everyone!

Ok, so I have a device in my game that acts upon objects in a certain way. Most of the time, it acts one particular way, but there are some kinds of items (like doors, people, backdrops, etc.) where it makes sense for it to act differently.

Think of the frotz spell from Enchanter. It should turn most things into a light source, but probably not most people and certainly not backdrops like the sky.

I’m using the “kinds” tab in Inform 7 to easily find the different kinds of objects that I’ve created and code the appropriate exceptions as necessary.

And that’s worked really well, except I can’t find a listing for my scenery. I can find the listing for my backdrops, but not scenery.

I know I can search my code for “is scenery” but it would be much neater if I could just find all of my scenery in one place in the kinds tab. Am I missing something obvious?

I think the issue is that scenery isn’t a “kind” – it’s a flag. That’s why you can say “now the maguffin is not scenery” and have it change its behavior at runtime.

I guess you could say:

A prop is a kind of thing. A prop is usually scenery."

That way you’d group all the scenery together, but still be able to change whether it’s described or not dynamically during the game. (If that’s important to you.)

Hmm. Re reading that, I’m essentially saying sure: re write all your code. Helpful, huh? :laughing:

1 Like

Right. The standard rules say:

A thing can be scenery.

A backdrop is usually scenery.

(Note that “usually”. You could write “Foo is a backdrop. Foo is not scenery.” and the compiler would accept that.)

If you want a list, you could write a debug command:

Section -- not for release

Scenery-listing is an action out of world. 
Understand "list scenery" as scenery-listing.

Carry out scenery-listing:
	say "Scenery: [list of scenery].";		
1 Like

That makes sense. I’ll make use of the debug command, thanks!

By the way, if you want to make a generic response for scenery instead of going and finding all the scenery and doing specific responses for them, that is possible with “Instead of levitating scenery:” or something like that.

Hall is a room. "Ornate tapestries adorn the walls." A rock is in the hall. 

Levitating is an action applying to one thing. Understand "levitate [something]" as levitating.

Carry out levitating: now the player holds the noun.

To levitate is a verb.

Report levitating: say "[The noun] [levitate] smoothly into your inventory."

To glow is a verb. To remain is a verb.

Instead of levitating scenery: say "[The noun] [glow] briefly but [remain] fixed in place."

Some tapestries are scenery in the hall. "The tapestries look tightly tied down, and also Chun the Unavoidable is hiding behind them."

Some walls are scenery in the hall. "The walls are adorned with ornate tapestries."
1 Like