Nameless
By default, ASK SOMEONE ABOUT… applies only to a text token. We might want also to offer the player the option of asking characters about pieces of physical evidence. This example implements an ASK PERSON ABOUT THING command that is mostly synonymous with SHOW, with the added nuance that the player can ask about things that are not currently visible, as long as he has encountered them at some time in the past.
Now we create our new action, "interrogating it about". We write the grammar lines so that we can show any object in sight to someone, but also ask someone about any object that we have ever interacted with in the game, whether it is currently visible or not.
Now we replace and redirect the showing action. This gets rid of the requirement in the default library that the player be holding anything he shows to another character:
This bit keeps track of what the player has seen, for the purposes of "any known thing":
Here we define what happens by default when we interrogate someone about something; we use the same response we get to asking someone about something that isn't otherwise interesting:
Now redirect all asking to a topic table, and all interrogating to an object table:
item | reply |
letter | "'It is enciphered,' she remarks[if the advisor can see the letter], glancing over the contents[otherwise], after you have offered a detailed description[end if]. 'A substitution cipher of some complexity, I believe.'" |
Advisor | "She listens to your inquiries about her identity and parentage with a placid smile, but does not answer." |
topic | reply |
"cipher" | "'I know many dozens of ciphers,' she replies, smiling in a disquieting way." |
"substitution cipher" | "'One letter is allowed to stand for another,' she explains, folding her hands together patiently. The backs of both hands are tattooed with silvery stars." |
And just so that we can test what happens when asking someone about something out of sight:
…and something unknown:
Test me with "test sight / test knowledge".
Despite its menacing name, it is quite an ordinary room, underlying the post office above. Here letters are brought each day, unsealed, transcribed, resealed, and sent again on their way; their contents then analyzed and recorded.
A woman whose name has never been disclosed to you sits at the window, writing numbers on a sheet of paper.
You can also see a safe box (closed) here.
>(Testing.)
>[1] test sight
(Testing.)
>[2] i
You are carrying:
a letter from the emperor
>[3] x letter
Though its origin is obvious, its meaning is secret: the letters are an inexplicable jumble.
>[4] ask nameless advisor about cipher
"I know many dozens of ciphers," she replies, smiling in a disquieting way.
>[5] show cipher to nameless advisor
You can't see any such thing.
>[6] ask nameless advisor about the letter
"It is enciphered," she remarks, glancing over the contents. "A substitution cipher of some complexity, I believe."
>[7] show the letter to nameless advisor
"It is enciphered," she remarks, glancing over the contents. "A substitution cipher of some complexity, I believe."
>[8] show nameless advisor the letter
"It is enciphered," she remarks, glancing over the contents. "A substitution cipher of some complexity, I believe."
>[9] test knowledge
(Testing.)
>[10] open safe box
You open the safe box.
>[11] put letter in safe box
You put the letter from the emperor into the safe box.
>[12] close safe box
You close the safe box.
>[13] ask nameless advisor about the letter
"It is enciphered," she remarks, after you have offered a detailed description. "A substitution cipher of some complexity, I believe."
>[14] show the letter to nameless advisor
You can't see any such thing.
>[15] ask nameless advisor about the apple
There is no reply.