Neutral Library Messages: extension beta

Yep. Save & restore wn:[code]The parser’s wn is a number that varies. The parser’s wn variable translates into I6 as “wn”.

Rule for printing a parser error when the latest parser error is the can’t see any such thing error:
let wn2 be the parser’s wn;
Repeat with the missing item running through things:
Now the item sought is the missing item;
if the player’s command includes “[any sought thing]”:
carry out the noticing absence activity with the missing item;
rule fails;
now the latest parser error is the can’t see any such thing error;
now the parser’s wn is wn2;
make no decision.
[/code]

Thanks - you’re totally getting special credit in Lost Items Version 2!

Updated version now posted. Consider this graduated from alpha to beta. It now styles parser messages differently than in-world messages (even in tricky cases) and delists the original library messages to save memory. Still no documentation but significantly more polished.

On the action rejection messages: I’ve divided these into two categories, likely-physical rejections (You can’t tie X to Y, You can’t set that to anything) versus likely-social rejections (You can’t sing, you can’t attack that.) The former get a stronger message (“You can’t tie the feather to that, or that’s not the way to do so.”) while the latter acknowledge that the action might be possible, just not productive (“Singing would have no effect in these circumstances.”) The weasel-words modifiers can be changed.

Thanks to everyone for all the suggestions-- many of the messages are significantly improved. I wanted to note that after considering, I’ve decided not to meddle with anything other than the messages themselves-- so no changing the default actions or how they work, or fiddling with the command prompt. It’s not that I don’t think these are all great ideas-- more like I would prefer to fix the foundation before renovating the upper floors. This approach should also make the extension compatible with nearly everything, including future work along the suggested lines.

I was excited to see that you were replacing the original library messages to save memory, but I’m afraid including Neutral Library Messages into my WIP forced it into glulx territory anyway. For now, I’m going to steal my favorite bits of the extension, but not use the full list of messages. Hope you don’t mind! :slight_smile:

By the way, Aaron, did you remember that the Remembering extension has the words “You can’t see any such thing” hardcoded in it? In Lost Items, I used this to get around that issue:

[code]Chapter 5 - Printing Parser Errors for Remembering

[The Remembering extension has “You can’t see any such thing” hardcoded into its “replace did not make sense in this context” rule. This rule ensures that the correct library message is issued even if we’re using a Custom Library Messages extension.]

Rule for printing a parser error when the latest parser error is the noun did not make sense in that context error (this is the custom replace did not make sense in that context rule):
now the latest parser error is the can’t see any such thing error;
make no decision;

The replace did not make sense in that context rule is not listed in any rulebook.[/code]