Hotel rooms

I have entered the Endgame zone in my game. It involves a hotel with two floors, 60 rooms. 58 of them are actually ‘false’ rooms–only two of them will be of interest to the player. Anyone have any suggestions on how to at least enable the player to refer to any one of 60 rooms? Because the player will first have to find out which of these rooms are the ones in which he will face his ‘final challenge’ so to speak.

Each of the two floors has 5 actual rooms–called End of Upper North Hall, Center of Upper North Hall, Upper Hub, etc, for example. (Each floor being a V shape, with a north wing and a south wing, both meeting at a hub). Each of these rooms has a number of doors to the hotel ‘rooms’–but most of them will be inaccessible, however, I want the player to be able to ‘knock on’ or somehow investigate each one(listening, etc), each of the false ones returning a similar wry response. Of course, I would include a number of outside clues as to which doors will be correct–and lead into the two actual rooms.

I have thought of making each hotel room a scenery item–but that’s tedious. Or putting a scenery item in each of the actual rooms, making the hotel room doors as ‘part of’ each scenery item–but that’s also tedious.
Any ideas?

Thanks

It would probably be easiest to just have one ‘wrong floor’ with a variable that changes to say what floor you’re on.

Something like:

WrongFloorNorthEnd is a room. The printed name of WrongFloorNorthEnd is “North End of Hallway, Floor [floornum]”.

Forgive me if I am out of context, here, but how about having one room for each corridor and within each corridor-room you have 30 containers that the player can actually “go in” and each of them is labelled “Room 01,” “Room 02,” … etc.

Thus, try something along the logic of:

This is totally off the top of my head, but it may give you some direction that may work.

Oh, I misunderstood; I thought there were 60 floors!

You can create a door object with all the same properties “openable, can be open, can be locked…etc” and put those in your hall to avoid having to work with actual Inform doors. I have an extension that handles this called “Easy Doors” - You can place doors that go nowhere, and they don’t require a compass direction nor a connection to any room. Or, you can make a hundred doors that all lead to the same hotel room.

The easiest way I’ve found to do knocking is to make “knock on [something]” a synonym for attacking. That way, you cover all the variations of “hit door”. Then you write your rules based on the player attacking the door.

Hanon, that was precisely what I had in mind–just creating the doors, but not actually calling them ‘a door’(I noticed way back that you can create ‘a red door’ and put it ‘south of Front Yard’, but unless you say ‘The red door is a door’, it would just be an object placed south of Front Yard). All of these doors will be in two specific directions from where the player is standing in the hall, so I can simply write a couple of rules saying ‘All of those doors are locked’. Fortunately, I did precisely what you suggest about ‘Knocking on’ earlier in the game(it was a crucial action), so I can simply apply it to these doors. Well, looks like I’ll have to create all these doors anyway, but thank you all for the ideas. I thought there might just be a way of referring to many different doors without having to create all of them. I had thought of creating a verb like so–

Cracking on is an action applying to one visible thing and a number and requiring light. Understand "crack on [something][a number]" as cracking on. Understand "knock on [something][a number]" as cracking on. [likewise with all the other synonyms of 'knock on']
…and then writing some rules dealing with the number–

Check cracking on: if the location is End of Upper North Hall: if roomnumber > 105: instead say "That door is not visible from here."; if roomnumber < 101: instead say "That door is not visible from here."; etc etc

…and prohibiting this action when not in the hotel(Room #206 is not going to be in the Parking Lot), but it would be complicated if I wanted the player to do other things with the doors. The player would be able to ‘knock on’ the door to room #105, for example, but if he wanted to listen to the door, or push/pull the door, I would have to at least write rules to get the program to Understand the number as part of the command.

Thanks a lot

You might be able to do something like this by making a special “generic hotel door” object and allowing it to be understood by referring to the number. Here’s an attempt. It might be pretty fragile–you’d have to make some more intelligent Understand lines, because right now only “room [number]” will work as a reference to the door, and you’d also have to make sure the non-generic door will work. But maybe it’d be something to help you get started, which wouldn’t require creating every individual door.

[code]A hotel floor is a kind of room. A hotel floor has a number called minimum door number. A hotel floor has a number called maximum door number.

A generic hotel door is a kind of thing. A generic hotel door can be open. A generic hotel door can be openable. A generic hotel door can be locked. A generic hotel door is privately-named, openable, closed, locked, and scenery. Understand “door [number]” as a generic hotel door.

The most recent room referred to is a number that varies. The most recent room referred to is initially 101.

First before doing anything when the current action involves a generic hotel door: now the most recent room referred to is the number understood.

Before doing anything when the current action involves a generic hotel door and (the most recent room referred to is less than the minimum door number of the location or the most recent room referred to is greater than the maximum door number of the location): say “You can only see doors [minimum door number of the location] to [maximum door number of the location] here.” instead.

Instead of doing anything other than examining when the current action involves a generic hotel door: say “The door is locked.”

The printed name of a generic hotel door is usually “door [most recent room referred to]”.

The description of a generic hotel door is usually “It looks like all the other doors.”

Every hotel floor contains a generic hotel door.
The description of a hotel floor is usually “You can see doors [minimum door number of the item described] to [maximum door number of the item described] here.”

Hotel Floor One is a hotel floor. The minimum door number of Hotel Floor One is 101. The maximum door number of Hotel Floor One is 105.

Hotel Floor Two is a hotel floor. Hotel Floor Two is above Hotel Floor One. The minimum door number of Hotel Floor Two is 201. The maximum door number of Hotel Floor Two is 205.

To decide whether the current action involves a generic hotel door: [there’s a syntax “if the current action involves [object]” documented in §12.20, but it only applies to specific named objects. So we hack up a special routine for hotel doors. This is a way of saying “I tried using the syntax on generic hotel doors and got a compiler error.”]
if the noun is a generic hotel door, yes;
if the second noun is a generic hotel door, yes;
no.

The player carries a key.

Instead of going in a hotel floor when the noun is east or the noun is west: say “You’ll have to find a door that you can open first.”[/code]

…oh, and as a matter of design it might be a good idea to include some indication that the way to do things isn’t to knock on all sixty doors in turn. Like, after the fifth time the player does something to a generic door, say something like “You need to think about which door you want.” You could drop progressively stronger hints. This shouldn’t be at all hard to implement–you could have a counter that you increment in the rule for doing things involving generic hotel doors (I should name those rules!) that dispenses suggestions when the counter reaches certain values.

I’d suggest you don’t need sixty different objects. Make an object called “the hotel room door”, then understand “door/room number/-- [number]” as the hotel room door.

Very true - you can slyly make a “hotel room doors” kind of object that is plural-named and direct several numbers at it since they all presumably behave the same.