Same door in multiple rooms?

Hey all-
I’d like to have a metal door in several different rooms, but Inform doesn’t like that. I tried making a metal door a kind of door and placing one in each room, but nope.

There’s no magic that could cause confusion about which metal door the player means, and no two metal doors would lead in to the same space. And each door would have exactly the same description.

I’ve read a few threads and a few chapters in the Documentation about multiple objects, but they haven’t helped. I’ve tried making multiples of other objects, too, and I get this in my error message:

‘A whatever is here’ : but something described only by its kind should not be given a specific place or role in the world

which is a bummer, because I want identical objects with places in the world, and obviously doors have a role.

Any ideas for how I can do this? Or should I just scrap the idea?

I’m pretty sure it’s impossible with the standard rules: doors are a kind of thing that can’t be moved and can’t also be a backdrop, which is a different kind of thing.

You might take a look at the extension Easy Doors by Hanon Ondricek. I’ve never used it myself, but it looks like it might work for what you’re trying to do.

3 Likes

I looked at Easy Doors, and it seems like that would allow me to move the same door around as the player moves, but that sounds scary. I have to decide if I’m that attached to the idea. Moving a door around sounds like it could cause some issues unless I’m really on the ball, which we all know is probably not going to happen.

1 Like

You can make a kind of door – that’s probably what you want. You just can’t say “There is a metal door in every room.” You have to declare separate metal doors and specify what room is east/west (or whatever) from each one.

1 Like

I just couldn’t get the syntax right, I guess. It kept objecting to two of them.

It seems like a workaround to name the door whatever I want, like “penguin door,” make it scenery, and then say

Understand “metal door” as penguin door.

and just do this with each door.

The thumbnail is:

R1 is a room.
R2 is a room.
R3 is a room.

A metal-door is a kind of door.
The printed name of a metal-door is usually "metal door".
The description of a metal-door is usually "It's big and square and metal."

Understand "metal", "door" as a metal-door.

The D1 is a metal-door. D1 is south of R1 and north of R2.
The D2 is a metal-door. D2 is south of R2 and north of R3.

I’m using “metal-door” (hyphenated) as the kind name so that there’s absolutely no chance of confusing the compiler.

You can add more specific descriptions and object names to individual doors, of course.

2 Likes

Well, that’s incredibly useful. I was missing the hyphen, and also making it way more complicated than it needed to be, as is my wont. Thank you!

My half-formed thought when I wrote that was “this is essentially what Inform does with backdrops, it shouldn’t be that hard to duplicate the behavior.” (Inform handles backdrop objects by just moving them into the room when the player is there.) I’d think that a few before going rules, plus maybe an every turn rule that watches to make sure that odd situations (now the player is in ... won’t be caught by the going action, for instance) might do it.

Alternately, maybe what you really want is for a number of doors to share state? That seems like it would be easier to manage than moving doors around.

The main goal of Easy Doors was to create doors that didn’t take up a direction nor a map connection, so you can have multiple doors on the “same wall” or a door inside a container, or a door that can move around (and even be carried) like the portable hole in Leather Goddesses of Phobos.

You can certainly say
A town-portal is a kind of easy door. A town-portal usually leads to Stormwind.
and scatter multiples of them around.

(Edit to correct my own syntax, oops.)

2 Likes

a metal door being the same in multiple room… I’m wrong or you’re experimenting with a classic, the implementation of an elevator room ?

WI 271 can be of help in this ?

Best regards from Italy,
dott. Piergiorgio.

1 Like

The original thought came when someone asked about an enterable broom closet in a room that already had map connections in all four cardinal directions. They had pictured a room with two doors on the north wall, one leading out, one leading into a separate closet room.

Easy Doors lets you put as many “doors” in a room as you want. An Easy Door is an object that behaves like a door, is enterable, openable, closable, potentially lockable, potentially portable, and can be moved around during play with standard rules, so I suppose you could definitely use it as an elevator!

You’d have an interior elevator room with controls that moved the external door to different floors, and an Easy Door in the elevator that changes destination to the location of the external door. Call the external door “Elevator” and it would appear and disappear in whichever room or floor the author wants.