Replacing "Taken." with another string

Hi

Is it possible to replace the “Taken.” string that appears when you “take” something, but do it for the entire story, rather than one item at a time?

Olly

Yes. That’s one of the built-in responses.

First you need to find out the name of the response you’re trying to replace. To do this, run the story and type RESPONSES at the command prompt. In the list of responses, find the “Taken” response.

Once you have the name of the response you can give a new value for it in your code, like this:

The print empty inventory rule response (A) is "Your hands are empty."

(The name of the response you’re trying to replace here won’t be “print empty inventory response (A)”–that’s just an example.)

See also 14.11 and 14.12 in the Writing with Inform manual.

Edited to add: I’m assuming you’re using Inform 7. If not, please disregard.

Another way to default responses is via the Index under “Actions” for the verb you want to change. There is a magic clicky button which will insert the correct phrase for you.

Screenshot 2017-03-12 21.08.06.jpg

When I click the “set” button, it inserts the correct command into the source:

standard report taking rule response (A) is “New text.”.

Obviously, you replace “New text” with your output. You can use tense/person tokens as desired like:

standard report taking rule response (A) is “[We] [grab] [the noun] and [stash] it in [our] inventory.”.

But if you’re writing a specific game and not an extension, you can just write the response as you want it.

standard report taking rule response (A) is “You snag [the noun] and stash it in your fanny pack, hoping nobody saw you. Awesome.”.