Shipboard directions?

I’m trying to implement shipboard directions as per example 42 (Fore). I believe I have copied the example pretty literally, but it’s not working for me.

The starboard is a direction.  The starboard has opposite port.  Understand "s" as starboard when the location is nautical.

The port is a direction.  The port has opposite starboard.  Understand "p" as port when the location is nautical.

The fore is a direction.  The fore has opposite aft.  Understand "f" as fore when the location is nautical.

The aft is a direction.  The aft has opposite fore.  Understand "a" as aft when the location is nautical.

Does the player mean going a nautical direction when the location is nautical: it is very likely.

Index map with fore mapped as north.
Index map with aft mapped as south.
Index map with port mapped as west.
Index map with starboard mapped as east.

A room can be nautical of earthbound.  A room is usually not nautical.  
A direction can be nautical or earthbound.  A direction is usually not nautical.
Starboard, port, fore, aft, up, down, the inside, and the outside are nautical.

Before going a nautical direction when the location is not nautical, say "Nautical directions can only be used on board ship."
Before going an earthbound direction when the location is nautical, say "Compass directions make no sense on board ship, but you can use [list of nautical directions] instead." instead.


The Cockpit is a room.

The Cargo Hold is aft from the Cockpit.

The Cockpit and the Cargo Hold are nautical.

is yielding

Problem. The sentence 'A room is usually not nautical'   seems to tell me that 'room' and 'not nautical' have to be the same, but it looks odd to me. 'room' is something generic - not something definite; but 'not nautical' is (presumably) something specific. So it's as if you'd written 'A room is the Sydney Opera House'. (Which room, exactly? You see the trouble.)



--------------------------------------------------------------------------------

Problem. In 'A direction can be nautical or earthbound'  , you proposed the new either/or property 'nautical': but this already has a meaning.

 See the manual: 4.7 > 4.7. New either/or properties



--------------------------------------------------------------------------------

Problem. In order to act on 'A direction is usually not nautical'  , I seem to need to give a new meaning to 'not nautical', something which was created by the earlier sentence 'A room is usually not nautical'  . That must be wrong somehow: I'm guessing that there is an accidental clash of names. This sometimes happens when adjectives are being made after objects whose names include them: for instance, defining 'big' as an adjective after having already made a 'big top'. The simplest way to avoid this is to define the adjectives in question first.



--------------------------------------------------------------------------------

Problem. The sentence 'The Cockpit and the Cargo Hold are nautical'   appears to say two things are the same - I am reading 'Cockpit' and 'nautical' as two different things, and therefore it makes no sense to say that one is the other: it would be like saying that 'Tarzan is Jane'. It would be all right if the second thing were the name of a kind, perhaps with properties: for instance 'Treehouse is a lighted room' says that something called Treehouse exists and that it is a 'room', which is a kind I know about, combined with a property called 'lighted' which I also know about.

Any idea what I’m missing?

Typo.

3 Likes

Wow. Thanks. I overlooked that so many times. I must need sleep!

1 Like

This example seems to rule out using up and down directions except in a nautical setting. Is there a way around this?

The example, as it is (and also in the docs version), does technically allow the player to use the nautical directions in “earthbound” locations, because the rule “Before going a nautical direction when the location is not nautical, say "Nautical directions can only be used on board ship.” does not have an “instead” appended to it. So the player will get that message, but the action will proceed. The other “Before going ...” rule ends in “instead” and thus prevents the action from continuing.

I don’t know if that’s intentionally so, maybe just because of the issue you mentioned (that “up/down” etc. should still work in normal earthbound locations), but it seems unfortunate to have the message in that case.

One method for really allowing them could be to introduce a third kind of direction, “neutral” (or whatever) in addition to “nautical” and “earthbound”, and classify up, down, etc. as neutral, and then modify the other rules accordingly.

Another way is to directly check only for the genuinely nautical directions in the Before rule, and let the action proceed as normal otherwise; like this:

Before going a nautical direction (called D) when location is not nautical:
	if D is starboard or D is port or D is fore or D is aft:
		say "Nautical directions can only be used on board ship." instead.
3 Likes

Though at that point you don’t really need the “nautical” definition at all.

2 Likes