Room disambiguation

Banging my head against a disambiguation issue.

I’ve got two “offices” in completely different regions.

Court_Manager is a room in MWArea. The printed name of Court_Manager is "Manager's Office".

Office is a room in Mansion.

The player may teleport to rooms.

Teleporting is an action applying to one thing. Understand "teleport to [any room]" as teleporting. 

Experiencing an issue that if the player “teleports to office” when in the Mansion, the parser tries to clarify:

Which do you mean, the Office or Manager's Office?

The player hasn’t yet encountered the Manager’s Office and it’s in an unconnected region. (And the player can’t teleport in that part of the game anyway.) How do I specify that I mean just the regular Office?

Tried:

Understand "office" as Office when the player is in Mansion. Understand "office" as Court_Manager when the player is in MWArea.

There are some other restrictions in the Mansion region for teleporting to other rooms so I’m hoping for a basic way to set the disambiguation rather than wholesale restructuring of the teleporting. Any ideas?

1 Like

To solve the issue of asking for disambiguation about an unvisited room, I think you could use:

Understand "teleport to [any visited room]" as teleporting.

I can’t remember whether visited is built-in or from Eric Eve’s Epistemology.

For disambiguating after they’ve visited the Manager’s Office, I think you’d want a Does the player mean rule.

1 Like

It’s built in.

1 Like

Is there a method that comes to mind for clearing up the disambiguation without using “visited”?

If some rooms will never be teleportable to, you could invent a new property “teleportable” and say Understand "teleport to [any teleportable room]"...

2 Likes

If your problem is just this part, you could do something like:

Before printing the name of Office when asking which do you mean:
	say "non-descpript ".
	
Understand "non-descript" as the Office.

This will give you:

>teleport to office

Which do you mean, Manager’s Office or the non-descpript Office?

>non-descript

Note that now, the word “non-descript” will always refer to the office, so if you have multiple issues like this, you’ll need to get a little more fancy.

Right, the reason I’m hoping for a disambiguation fix instead of giving rooms a whole new kind is that I want to give a custom message for certain rooms when you try and teleport to them now. In universe “this is why you can’t teleport here yet”.

I have that now, it’s just this one edge case of the two offices.

(Game has 117 rooms and if I going breaking things at large just for one disambiguation I will cry.)

((Honestly, if there isn’t a basic “the player usually means X when teleporting” way of doing this, I’m going to rename the printed name of the Court_Manager to something else and move on.))

Have you tried a Does the player mean rule yet? Maybe something like this:

Does the player mean teleporting to the Manager's Office when the player is in the Mansion: it is unlikely.
Does the player mean teleporting to the Office when the player is in the MWarea: it is unlikely.

Or, make the two offices privately-named, and the Understand solution from your opening post would probably be sufficient. You’d probably also want to add:

Understand "Manager's  Office" as the Manager's Office.
1 Like

There we go. Somehow I’ve made it all this way without using/understanding “does the player mean”, so thank you for teaching me.

1 Like