For number 2, if you want to make “open” apply automatically to doors, you can use the “supplying a missing noun” activity, like this:
[code]Kitchen is a room. Basement is a room. The basement door is a door. It is down from Kitchen and up from Basement.
Dining Room is north of the Kitchen.
The player carries a rock.
Understand “open” as opening. [This is necessary to get Inform know to use the “supplying a missing noun” rules… it’s supposed to understand “open” without a noun, but the opening action requires a noun, so it looks to the supplying a missing noun rules for what to do]
Rule for supplying a missing noun when opening:
if the player can touch a door (called the portal):
say “([the portal])[command clarification break]”;
now the noun is the portal; […we supplied a noun, so the action can go on]
otherwise:
say “You’ll have to say what to open.” [the “supplying a missing noun” activity ended without supplying a noun, so the action aborts]][/code]
This might be an issue if there’s a room with two doors… it’ll automatically open one of them. You might want to write a case to capture that. Also, I think the issue with automatically filling in the inventory item as the noun only happens when the player has exactly one item in their inventory.
(You could also try does the player mean rules like Hanon suggests, but fair warning: I can never get those to work.)
For your first point, it’s trickier, because I’m not sure exactly what you’re trying to do. Inform doesn’t have a notion of facing per se–if you’re in a room, you don’t need to face a certain way to find the things that are in the room. So I’m not sure exactly what you want to achieve. If you don’t want to tell the player that the basement door is there until they do something else… well, that’s really going to confuse the player. To avoid confusing the player in other rooms in the hallway, you should just include the directions that they can go in the room description. (You can see how to do that in the example I give below.)
One thing you can do to avoid the awkward “You can see the basement door here” is to make the door scenery, which means it won’t show up in the room description, and then describe it in the room description. You can even include a flag to change the room description, depending on whether the player has seen that it goes to the basement or not. Here’s an implementation:
[code]Kitchen is a room. Basement is a room. The basement door is a door. It is down from Kitchen and up from Basement. It is scenery.
The basement door can be explored or unexplored. The basement door is unexplored.
After opening the unexplored basement door:
now the basement door is explored;
say “You open the door, revealing the basement.”
The description of the Kitchen is “A kitchen. You can go north to the dining room. [if the basement door is unexplored]There is a door here[otherwise]The basement door leads down[end if].”
Dining Room is north of the Kitchen. “You can go south to the kitchen.”
The description of the basement is “The basement door is here, [if the basement door is open]open[otherwise]closed[end if]. It leads back up to the kitchen.”
The player carries a rock.
Understand “open” as opening.
Rule for supplying a missing noun when opening:
if the player can touch a door (called the portal):
say “([the portal])[command clarification break]”;
now the noun is the portal;
otherwise:
say “You’ll have to say what to open.”[/code]
Also, shouldn’t the basement be down from the hallway rather than up?