Custom Library Messages, version 0.

I think this all-new replacement for David Fisher’s venerable one is about ready for prime-time, but could I have a few people poke and prod it to see if the tires fall off? Pre-release version is here. It would make me happy if I could get some help going over the thing. I think it works perfect now… but I’ve said that before. Right now it’s tied to the 6E builds and later because, at the least, the activity is an activity “on numbers”. It compiles with or without the current version of Plurality (version 9).

Anyway! It offers an Activity so you can write Before/After rules for library messages, and uses a table-that-varies rather than being hard-coded to the Table of Custom Library Messages for easy switcheroo. It supports more tenses than David’s, and can be a part of a prose-generation system if you’re inclined in that direction. Some of David’s say-phrases I kept as-is to ease porting an existing work, but I did ditch most of the $ % !@#@$!@ stuff.

And, the documentation is short. Most needn’t read past the first section, which shows:

and the second section is how to use the same table as Default Messages.

Let me know what typos the thing produces. I think I ironed them all out, but one never knows.

EDIT: fixed sample code per below suggestions

Perfect timing, Ron.

I’m just writing up my “Trinity Reimagined” document based on a past class and one of the primary things we wanted to do was change tense and person and all that. We originally did use the Custom Library Messages extension. However, for the updating documentation I’ll include your attempt, which will give me a good opportunity to test it out.

Thanks for making this available and for working on it.

Cool, I will check it out and see if it works with my Rideable Vehicles hack or if I need to redo that hack. Thanks, Ron!

P.

Thanks in advance, guys.

Also! I forgot to mention that the big table in the extension, the one will all 361 messages properly(?) text-substituted out the wazoo, I have put into the same order that David’s extension lists them. I’ve woven his code’s section headers as comments in-between the table rows, so if you’re trying to figure out which how my extensions represent his LibMsg <can’t turn self inside-out>-style messages, looking at the two extensions side-by-side will help you find the relevant message(s) pretty quick.

Sorry for lack of feedback. I’m hoping to delve into this more today. One thing I did notice right off the bat, compiling the example “exhaustive test” from the documentation gives an error on Inform 6F95:

The other thing I notice is that it uses phrases that are not necessarily very user friendly, at least from a “thinking like a writer” standpoint. To wit, the extension uses:

The library declension is third person feminine. The library conjugation is past tense.

From a writer standpoint, the usual preference is for things like this:

The story viewpoint is first person. The story tense is past tense.

I know this is a change that could be easily made and a wrapper can be made to provide that phrasing. I just bring it up because a lot of the writers I’ve been working with feel that a major problem with Inform is that while it gives an “on the surface” look of having a “writer mental model” in mind, Inform most definitely is not a tool that helps you “think like a writer.” To that end, any phrasings that help with that are always welcome.

Tense and viewpoint is probably one of the biggest things that writers are hoping will be easy with Inform. That being said, just about every writer I work with wants to utilize first person, past tense since they feel that’s probably one of the best story modes for textual IF. (I tend to agree, but then I’ve long railed against second person as an effective storytelling mode, while recognizing it as a possibly effective game mode.)

The first class session with the extension won’t be until this upcoming weekend. So I hope to have more substantive feedback following that.

I’m noticing a problem with a basic test. Here’s a test using the original Custom Library Messages:

Include Custom Library Messages by David Fisher.

When play begins:
	change the library message tense to past tense;
	change the library message person to first person.

Palace Gate is a room.

Typing “inventory” gives you “I was carrying nothing.”

Here’s my code with the new extension.

Include Custom Library Messages by Ron Newcomb.

The library declension is first person.
The library conjugation is past tense.

Palace Gate is a room.

Typing “inventory” gives you “I is carrying nothing.”

Thanks Jeff. Tonight I’ll change the variable names and fix the inventory bug. I imagine there will be a few typos and such like inventory’s sprinkled throughout. 361 messages across 8 tenses across 8 viewpoints is a lot to check. The [re nothing] phrase needs be changed to [=> nothing]. That was a last minute change I made so it coincided with David’s, and I didn’t go over the example. (Indeed, I hope to write real examples before release, perhaps stealing the one from Default Messages or from David’s CLM.)

Sounds good.

The [=> nothing] worked just fine. One other problem in the example that I’ve found is that the parts that have [ies] have to be [-ies]. Once I took care of that, the example compiled and ran.

I’ll keep playing around.

Updated version uploaded. Adapted and added the Poster Shopping example from DM, fixed the existing “example”, and changed the variable names to mesh with “story headline” and “story creation year” as you suggested. Sure enough, the [is-are] text substitution was ignoring past tense. That bug would’ve cropped up in a lot of places. Fixed.

Hi Ron,

I’m excited about your extension, and I’m trying it out to see how it interacts with an extension I’m creating.

It appears to default to first person singular, past tense. Is that the intention?

It seems that Custom Library Messages does not influence room descriptions:

Is that by design? Is it necessary to use a separate extension to put room description paragraphs in the proper person and verb tense?

Presumably, since the room descriptions are all specific to any particular game, you are expected to simply write them in the person and tense that the actual game requires.

I haven’t found the time to try Ron’s version yet, but the previous version of Custom Library Messages provided forms like [you] that you can use in text strings for substitution (i.e. “[You] can see a seat here.” should work). So I suppose you would just place those in your room descriptions to trigger the substitution in the case that your person and tense were planned to change mid-game.

Paul.

Hi Mikee,

:slight_smile:

Mostly yes. I did some tricksy things roughly translated as “bitfields = row numbers” in order to tamp down the complexity and memory requirements, and that default just fell out as a result. I’m happy with it though, and have no intention to change it, partly because it allows the author to assert tense & viewpoint at compile-time.

Urg. Browsing the Standard Rules, it seems the aptly-named you-can-also-see rule hard-codes “you” in there rather than using the library message number phrases it should. I’ll update the extension to replace that rule, but any other games or extensions which fiddle with that rule will need to check up on their changes. Thank you for the catch.

Ah-ha, it seems David’s CLM had to replace the offending rule wholesale as well.

Yeah I think I misunderstood the original question. I was thinking ‘You can see a seat here.’ was the actual typed room description rather than an autogenerated contents message in a room with a blank description. Duh! Well looks like the problem will be solved anyway. 8)

Would one of you be so kind as to add this to Mantis as a bug, if you haven’t already? That would be awesome, and might help prevent this kind of issue in future. (Sorry, can’t do it myself right now.)

I’m on it. There’s another bug in both the standard and CLM rule anyway.

As far as ensuring standard library text is replaceable, it may not qualify as a bug.

New version available. I put the version# on this as 1/101112 since this is the third iteration, and some may forget which one they have. (Sadly, Inform doesn’t allow me to call it version 0. Alas.)

Do please thump the new I-could-also-see rule pretty good, as I did some rewriting.

EDIT to add: New bug reported as #409.

I can’t claim any major thumping, but it seems to be working nicely with my Lost Items example.

Your second example isn’t compiling for me on 6E72.

I haven’t tested on earlier builds at all, but I’ll certainly look into it.