New Extension: Indefinite Article Substitution Fix

New extension posted at Github: Indefinite Article Substitution Fix.

The idea behind the extension is to fix the bug (or behavior) where the rules for printing the name of something get called twice when the name is printed with the default indefinite article, once for the purposes of determining whether to print “a/an” and again to actually print the name. This messes up cycling and random text substitutions, as described in this bug report.

The extension takes care of this by caching the text produced the first time the rules are called (to determine whether to print a/an) and, when it comes time to actually print the name, printing the cache instead of calling the printing the name of activity again.

It should work just by being included, without the author having to do anything else.

One limitation is that it can’t handle the more outré Unicode characters (those outside group (a) in Writing with Inform §5.10), because the buffers that the text gets cycled through can’t handle those characters. Also, since it involves a bunch of I6 template hacking and I don’t really understand the I6 template, there may be other issues; let me know if you encounter anything. (Pretty soon, it’ll probably be better to use the direct e-mail in the extension documentation rather than PMing me on the forum.)

Thanks to Daniel Fremont for invaluable assistance with the I6 problems I was encountering, to Taryn Michelle for writing Print Stage Detection which I borrowed a lot of ideas from, and Natrium for pointing me to Print Stage Detection. (Natrium, if you want me to use your real name in the acknowledgments let me know; I got it wrong the first time!)

Ha, I didn’t know I would be so useful! :stuck_out_tongue:

My name is Nathanaël Marion, but really, I didn’t do anything. (You already knew the existence of the extension, I just reminded you.)

If you really really want to keep my name, don’t forget the diaeresis.

Hmm? I don’t remember.

On my first Github commit I gave a thanks to Hugo, before I actually checked to see what his forum name was and realized he wasn’t you. You can see my shame here, as immortalized by Github’s history archive. And I probably wouldn’t have come up with this without your suggestion in the other thread, so you’re definitely staying in the acknowledgments!