Rewriting old code that uses Plurality by Emily Short

I’m looking at some old I7 code and want to bring it up to speed. It uses Plurality by Emily Short. I guess that extension is considered deprecated now…

Is there a guide of some sort describing how to convert old phrases from Plurality using new built-in features and/or other extensions?

Specifically, things like “[the it-them of X]” where X is not the current noun.

1 Like

That should be “[regarding X][them]”.

Chapter 14: Adaptive Text and Responses Discusses all of the built-in phrases that now cover what Plurality did (and quite a bit more). It’s not specifically a conversion guide, but you should find everything you need there.

1 Like

Similarly, “[the x][is]” replaces “[the x][is-are of x]”, and same with “[has]” for has-have.

The verbs traditionally use the plural, so you’ll want [are] and [have].

1 Like

Ok, thanks, got it!

I was investigating this issue and found both the old Plurality example included with the extension, as well as the new example in the Inform 7 documentation entitled #249 Olfactory Settings. By comparing and contrasting these two examples, I was able to do the conversions I needed.

I’m posting both examples here because others might find them helpful as well.

Here’s the old Plurality extension example:

The Doghouse is a room. "Not so much a place as a state of being."

The player carries a ticket to the opera, some papers, and a bouquet of flowers. The bouquet is ambiguously plural.

Instead of eating something inedible, say “[The noun] do[es]n’t seem likely to agree with you at all. You’d be wiser to leave [it-them] alone.”

Instead of touching something: say “[That-those of noun] [is-are] all prickly.”

Instead of smelling something: say “Your nose is too weak to get much smell from [that-those of noun].”

Instead of smelling the bouquet: say “[It-they of the noun]['s-'re] lovely.”

Instead of tasting something: say “Whew! [Is-are of the noun] [that-those] ever nasty!”

Test me with “x ticket / eat it / eat them / touch it / touch them / smell it / smell them / taste it / taste them / x papers / eat it / eat them / touch them / smell them / taste them / x bouquet / eat it / eat them / touch them / smell them / taste them”.

And here is the new Inform 7 example:

The Doghouse is a room. "Not so much a place as a state of being."

The player carries a ticket to the opera, some papers, and a bouquet of flowers. The bouquet is ambiguously plural.

Instead of eating something inedible, say “[The noun] [don’t] seem likely to agree with [us] at all. [We][’]d be wiser to leave [regarding the noun][them] alone.”

Instead of touching something: say “[regarding the noun][Those] [are] all prickly.”

Instead of smelling something: say “[Our] nose [regarding nothing][are] too weak to get much smell from [regarding the noun][those].”

Instead of smelling the bouquet: say “[regarding the noun][They]['re] lovely.”

Instead of tasting something:
say “Whew, [regarding the noun][are] [those] ever nasty!”

Test me with “x ticket / eat it / eat them / touch it / touch them / smell it / smell them / taste it / taste them / x papers / eat it / eat them / touch them / smell them / taste them / x bouquet / eat it / eat them / touch them / smell them / taste them”.

4 Likes