Talking to NPCs vs documentation

I want a player to query Bork the bartender, but the player has multiple possible inputs. This works:

to say novacancy: say " 'Sorry. We're full up. No Vacancy.' ";
Instead of asking bartender about "rooms", say novacancy.
Instead of asking bartender about "renting a room", say novacancy.
Instead of asking bartender about "rooms for rent", say novacancy.

However, the documentation (Ex. Sybil 1 in section 7.6) says THIS should work:

Instead of asking bartender about "rooms/renting a room/rooms for rent", say novacancy.

It doesn’t. Instead, I get the default response: “Bartender does not reply.”

Yes, I know I can set up a table of possible responses (and I have several tables for this action elsewhere) but I am focusing on the documentation. What am I missing?

Ha, I think I actually know this one. The slashes only alternate individual words.

So this doesn’t match “rooms” or “renting a room” or “rooms for rent” but instead matches “(rooms/renting) a (room/rooms) for rent”

That is, it’ll match “rooms a room for rent” or “renting a rooms for rent”

1 Like

Thanks for your response, but I’m not sure I understand. I am trying to get something like this to work, taken from the same example

Understand "Athenians/Spartans/Greeks" or "hoplite army/forces" as "[Greeks]". Instead of asking the Sybil about "[Greeks]", say "She looks encouraging."

I’m not sure what the expression “[Greeks]” is doing.
My version of this:

Understand "rooms/renting a room/rooms for rent" as "[rentQuery]".
Instead of asking bartender about "[rentQuery]", say novacancy.

gives me a compile error. It is almost a direct copy from the documentation.

Hmm, how else do I explain it? It’s because of the spaces in your example. Slashes don’t let you alternate between whole phrases, only between single words. So if you look at that example you’ll see that it doesn’t understand “forces” by itself: it’s not recognizing “hoplite army” OR “forces”, it’s recognizing “hoplite army” or “hoplite forces”.

Slashes separate individual words, so this matches (either “rooms” or “renting”) followed by “a” followed by (either “room” or “rooms”) followed by “for rent”. Which isn’t what you want.

Use “or” to separate multi-word phrases:

Instead of asking the bartender about "rooms" or "renting a room" or "rooms for rent"…

OK. I studied section 7.6 and Sybil 1 example better, and the Understand section, but got really confused when it didn’t work. I even copied the example line. Then I found out the PREVIOUS (irrelevant to this topic) line had a semicolon. As soon as I replaced it with a period, it worked.

Sorry for the quasi-false alarm, but now I understand next text tokens much better.

Quick tangent question for anyone: Is there a difference between a “to say” phrase and a “to [something]” phrase, like

To say pocketlist: say "You turn out your pockets. You have [a list of things in the jeans pocket]."
After taking inventory, say "[pocketlist]".


To flood the river plain: repeat with item running through things enclosed by the lowland region: if item is not anchored: now item is in sewer grate.
After taking inventory: flood the river plain.


The reason I ask, is I’m not certain which this is…

Is “novacancy” a say token, or a custom action called “say novacancy”?

Or are they both basically the same thing?

The main difference is that “to say X” phrases can be invoked with [X] inside text, and “to X” can’t. But conversely, “to X” phrases are more versatile in their syntax, like being able to take phrase options.

The intent is that “to say X” should be used for anything that prints stuff without major side effects, and “to X” should be used for everything else, but this isn’t enforced anywhere. It’s just a convention to help avoid nasty surprises when text gets evaluated for comparison.