inform7

How to understand 's' only as abreviation for starboard, not south, in Inform7 interactive fiction?


I am creating a game using Inform7 that takes place on a space station. I would like to have the directions be fore, aft, port, and starboard rather than the standard compass points. I've used understand as to get most of them redefined successfully. But I am stuck when it comes to using 's' as an abbreviation for starboard, and not south.

The code I have thus far is shown below. Notice the line: Understand "st" as starboard. This is a workaround and not what I really want. What I want is 's' as an abbreviation for starboard only. If I change this line to Understand "s" as starboard., the interpreter still thinks the 's' abreviation could be for south, and replies with Which do you mean, the south or Starboard?.

How can I get Inform7 to forget about south and only apply 's' to starboard?

[ Shipboard Directions ]
Fore is a direction. The opposite of Fore is Aft.
Aft is a direction. The opposite of Aft is Fore.
Port is a direction. The opposite of Port is Starboard.
Starboard is a direction. The opposite of Starboard is Port.
Understand "f" as fore.
Understand "forward" as fore.
Understand "a" as aft.
Understand "p" as port.
Understand "st" as starboard.
Instead of going north, say "In space, there's no magnetic field, so there's no north. Also, no one can hear you scream in space. Not that you should be screaming. Well, there is that one room, but... oh, never mind."
Instead of going east, say "There's no magnetic field here. Compasses are useless. Maybe 'port' is what you meant."
Instead of going west, say "'Go west, young man.' Always with the going west. Obviously, they've never been in space. There's no 'west' in space. There's no I in team, either. There are port and starboard, however. But not in team... on the space station."
Instead of going south, say "South? There ain't no Mason-Dixon line on a space station. Did you mean starboard? You can use 'st' for starboard."

Solution

  • I had suggested Understand the command "s" as something new. in the comments, but that won't work, as "s" is an abbreviation for the south object, not a verb. Oops!

    Instead, you can use the Does the player mean system (section 17.19)

    Does the player mean doing something with south: it is very unlikely.