In the Standard Rules, we find this rule for ‘Undo’:
The immediately undo rule translates into Inter as "IMMEDIATELY_UNDO_R" with
"The use of 'undo' is forbidden in this story." (A),
"You can't 'undo' what hasn't been done!" (B),
"Your interpreter does not provide 'undo'. Sorry!" (C),
"'Undo' failed. Sorry!" (D),
"[bracket]Previous turn undone.[close bracket]" (E),
"'Undo' capacity exhausted. Sorry!" (F).
I would like to replace some of that text with new text. I tried:
The immediately undo in-world rule is the new immediately undo rule.
But the compiler complains about this (" The sentence ‘The immediately undo in-world rule is the new immediately undo rule’ seems to say that ‘immediately undo in-world rule’, which I think is a rule, and ‘new immediately undo rule’, which I think is an object, are the same.")
Is there some way to do this? There are older threads about using the Default Messages extension by David Fisher, but that seems to be out of date (or at least is no longer included in the latest Inform).
The undo command is a bit special but when I enabled the response tracker at startup it could tell me how to change one of the default messages:
>undo
[You can't "undo" what hasn't been done! - response 5]
>response 5
immediately undo rule response (B)
Currently:
"You can't 'undo' what hasn't been done!"
To change, copy and paste the following line into your source:
The immediately undo rule response (B) is "New response text."
* Note: if this response was defined in your own source text, of course, it's easier to change it by searching for the text in your project and updating the original.
>
So to change all undo response messages, you can write
The immediately undo rule response (A) is "New response text."
:
The immediately undo rule response (F) is "New response text."
Neutral Standard Responses not only provides alternatives for many responses, it’s also useful as a reference: it provides all the original responses in comments, too.
For the command-line crowd in *nix-ish environments, there’s an easy way to capture output in a file: