Custom Library Messages, version 4

Version 4 of Custom Library Messages is now posted. I sincerely hope this is the last version I need create for a long, long time. (Wish me luck on that.) I’ve removed the most abstruse functionality and moved it into a separate extension, “Automated Verb Phrases”. Otherwise, this is what’s changed:

  • Saying “[The player] saw [the player]” now works correctly for non-second person viewpoints. Thanks Mark Tilford.

  • Several Going action messages were corrected for obvious faults, and looking action #6 was touched to deal with line break issues when additional rules follow the I-could-also-see rule. Thanks CEJ Pacian, StJohnLimbo, and Matt W.

  • Fixed many more messages for particular tense-viewpoint combinations. Thanks Ben Sokal.

  • Informed the list writer to observe past & present tenses.

  • Modified the [n’t] say-phrase so it always prints n’t/not when used, rather than hinging on a variable.

  • Removed a few say-phrases that weren’t used at all. Documented the remaining say-phrases.

  • Re-arranged documentation, added new examples. Final section of documentation no longer exists as it was moved to the new extension.

  • Added the “any third person singular” and “any third person plural” objects to cover some edge cases like “Time pass[-es].”

  • New irregular verbs require only 3 table rows per entry rather than four. Moreover, these forms are in the same order as a new relation: The verb to weigh (he weighs, they weigh, he weighed) implies the…

  • Polished the extension’s appearance in the author’s index.

  • Added the [^] capitalisation say-phrase from the extension Mentioned In Room Descriptions.

  • Added [have+], [are+], and [do+] as the helping verb versions of have*, are*, and do*. This is partly to ease migration from David’s CLM extension, and partly for correctness.

  • Removed from the big table the messages that Inform no longer actually uses. They’re commented out just in case. If you’re interested in what messages no longer appear, and my best guess as to why, I took notes:[spoiler]Asking it for 1
    *** is always converted to NPC, GIVE the noun TO ME

##CommandsRead,5 “would come after the prompt” (no 1,2,3,4, exist
*** not supported in I7… but could be, theoretically

Examining action 1 “Darkness, noun. An absence of light to see by.”
*** no way to refer to the Darkness.

Exiting action 4 “But [we] [is-are][n’t] [if library message object is a supporter]on[otherwise]in[end if] [the library message object].”


Inserting it into action 1 “[We] [aux]need[-s] to be holding [the noun] before [we] [can] put [it-them of the noun] into something else.”
*** the can’t insert what’s not held rule will always implicitly TAKE, but if the take itself fails, then it printed something so Insert needn’t do so.

Inserting it into action 4 “[We][’]ll need to take [it-them of noun] off first.”
*** as above, DOFF is implicitly done.

Looking action 1 " (on [the library message object])[ignore library line break]"
Looking action 2 " (in [the library message object])[ignore library line break]"
*** both of these were subsumed into LOOK #8, which neatens the code which uses it

Looking action 3 " (as [library message object])[ignore library line break]"
*** deprecated?

Looking action 7 “[We] [see*] nothing unexpected in that direction.”
*** EXAMINE #5 is identical, and used.

Looking under action 1 “But it[if the story tense is in any past tense] was[else]'s[end if] dark.”
*** if it’s dark, the noun is either out of scope so processing stops at the parser (“You can’t see any such thing.”) or if in scope, stopped within the visibility rules (library #17 “…pitch dark and you can’t see…”)

Searching action 1 “But it[if the story tense is in any past tense] was[else]'s[end if] dark.”
*** if it’s dark, the noun is either out of scope so processing stops at the parser (“You can’t see any such thing.”) or if in scope, stopped within the visibility rules (library #17 “…pitch dark and you can’t see…”)

Removing it from action 1 “[It-they of noun] [is-are] unfortunately closed.”
Removing it from action 3 “Removed.”
*** this action delegates to TAKE, so almost all successes & failures are printed by TAKE

requesting the pronoun meanings action 5 “.”
*** The period is hard-coded in ANNOUNCE_PRONOUN_MEANINGS_R

Taking inventory action 3 “:[line break]”
Taking inventory action 4 “.”
*** as above, these are hard-coded where needed

– 18 “[ourselves]” [deprecated?]
** is now YOURSELF__TX, which is only used in the Printing the Name of, which CLM rewrites to deprecate

– 19 “As good-looking as ever.”
** redeclared in the standard rules as a property

– 12 “[bracket]Can’t ‘undo’ twice in succession. Sorry.[close bracket]”
– 52 “[line break]Type a number from 1 to [library message amount], 0 to redisplay or press ENTER.”
– 53 “[line break][bracket]Please press SPACE.[close bracket]”
** farmed off to the interpreter?

– 54 “[bracket]Comment recorded.[close bracket]”
– 55 “[bracket]Comment NOT recorded.[close bracket]”
*** the action that previously led to these does not exist.[/spoiler]

  • For Glulx builds only, I’ve split the I-could-also-see rule in twain, so the former can be replaced without nixing the listing nondescript items activity. There’s no functional difference, but normally, the default behavior of the listing nondescript items activity is entirely coded within the also-see rule, so replacing said rule also gutted the activity. I didn’t make any change here to the Z machine due to extra memory, and no one’s complained about the existing state of matters so far.

  • Added the ability to expand the list of pronouns (and hence story viewpoints) for members of the LGBT and SFF communities.

  • Added a new example to demonstrate creating new pronouns and story viewpoints.

  • Removed support for second person plural to conserve memory. The above example demonstrates how to add it back in.

  • Added a run-time problem callout in the case of a missing library message, which prints which table the message is missing from. The use option “library message alerts” is effectively always on in testing builds: it only fires if a message is completely missing from the custom library messages table.

  • Moved the default behaviour of the new Printing Library Message activity to an actual For rule. Now the author can place new rules before and/or after it, or even replace it entirely. New say phrases of the general shape “library message corresponding to…” ease creation of new activity rules.

  • Corrected the extension’s ability to detect missing messages.

  • Rewrote from scratch the code to decide on verb inflections – it’s really elegant now and I’m quite proud of it, though the full version only appears in “Automated Verb Phrases”:To decide which number is the appropriate inflection [for a main verb]: if passive voice is true, decide on the -en past participle form; if the story tense is in any continuous tense, decide on the -ing present participle form; if the story tense is in any perfect tense, decide on the -en past participle form; if suffix eaten by auxiliary is true, decide on the infinitive form; if the story tense is the past tense, decide on the -ed past form; if the prior named noun acts plural, decide on the base present plural form; decide on the -s present singular form.

  • Gave names to the grammatical cases and verb inflections. This is only internal, but improves readability.

  • Now uses section replacement on Plurality for smoother integration.

  • Rewrote L__M() and completely removed LanguageLM() so there’s only one intervened phrase, which is now an activity For rule which works better with rules placed before & after it.

  • Added the irregular verb aren’t* because of issues with trying to negate are*

  • Renamed the [that-those of…] phrase to [that-those-us of…] because Plurality’s is in nominative case, while CLM needs dative case. Hence when including Plurality, CLM cannot simply use Plurality’s instead. Thanks Ben Sokal.

  • Fixed a few messages to use the library message object or the second noun instead of the noun. Thanks CEJ Pacian.

  • Finally, replaced the pronoun in “You have died” with [We] because, even though the message is arguably out of world, the player at the keyboard presumably does not die. Thanks CEJ Pacian.

When including the new extension “Automated Verb Phrases” along with CLM, all the previous functionality regarding [aux] helping phrase creation, etc. is restored. I don’t know of anyone personally that was using this, but here it is. Most of the documentation and examples are carried over unchanged from CLM. Changes in this functionality:

  • New modal auxiliary verbs may be created, such as may, might, or dare, or whatever must needs exist in your WIP.

  • New irregular verbs require 5 table rows per entry rather than four (or three, as with vanilla CLM). Moreover, the five forms of the verb are in the same order as a new relation: The verb to weigh (he weighs, they weigh, he weighed, he has weighed, it is weighing) implies the…

  • The say phrase [n’t?] works like [n’t] used to: whether it says anything depends on the global Negation Pending variable.

… I think that’s about it. A lot of changes, to be sure, but CLM is more correct and smaller(!) than it used to be.

Way to go, Ron! Looks like a fantastic update. :slight_smile:

I concur :slight_smile:

Very nice.

Great stuff :slight_smile: This is probably my favourite extension. Thanks Ron!

… and I almost made it a whole week before another bug was found.

The definition of the I6 function Switch__TX should read:

if (((t - 1) & 1) == 0)

…to mirror the “is in any present tense” phrase defined earlier. Right now it gives precisely backward results.

Thank you for the continued support, everyone. I’ll have this thing licked yet.

Version 4/110422 has been posted to the Inform site. The above bug plus a pair of snafus with the documentation were corrected. Also thanks to Mark for correcting a few of my typos in the documentation.

Hello!

I observed this in Version 4/110416 using the past tense.

Is that “are” in the last line listing the contents of the drawer (a container) correct when past tense is used?
BTW, thanks for this great extension, without it I could never have used the past tense in my Indigo speed-comp entry!

thanks rockersuke. Try downloading the latest version from the Inform site, a la my previous message. It fixes that specific bug.

Ow! and I thought I double-checked the version I had before posting :blush: Remark: don´t try to report bugs when you haven´t had your proper sleep hours. Thanks a lot again! I downloaded it and it all works OK now!