Well, sort of. There’s no extension to do exactly this, but the built-in Complex Listing extension lets you control the way things are named in lists and the way lists are delimited, which gets you partway there. Then some tweaking with indexed text will help you control the sentence case and strip out the punctuation in order to join short sentences together.
I’ve done the example so that it works for both LOOK and EXAMINE, but you could turn this off again by making the desk once more undescribed.
As it stands, this example will glue the initial appearances together into one sentence. If you want to see it with individual enumerated sentences (more like your second request), change
let N be “[prepared list delimited in appearance style]”;
to
let N be “[prepared list delimited in elaborate style]”;
[code]Include Complex Listing by Emily Short. Use the serial comma.
The Study is a room.
The Desk is a supporter in the Study. The description is “A solid desk.”
The Notes is on the desk. “Scattered bits of notepaper are strewn about on the desk.”
Pens are on the desk. “A jumble of pens lies about.”.
To say trimmed appearance of (target object - a thing):
let N be indexed text;
let N be “[initial appearance of the target object]”;
while N matches the regular expression “.”:
replace the regular expression “.” in N with “”;
say N.
Rule for writing a paragraph about a supporter (called target) which supports something:
say "Well look at this. ";
let N be indexed text;
if a not handled thing is on the target:
repeat with item running through not handled things which are on the target:
now the item is marked for special listing;
register things marked for listing;
let N be “[prepared list delimited in appearance style]”;
if a handled thing is on the target:
let N be “[N]; you also see”;
otherwise if a handled thing is on the target:
let N be “On [the target] you see”;
if a handled thing is on the target:
repeat with second item running through handled things which are on the target:
now the second item is marked for special listing;
register things marked for listing;
let N be “[N] [prepared list]”;
let N be “[N in sentence case]”;
say “[N].”
The examine containers rule is not listed in any rulebook.
The examine supporters rule is not listed in any rulebook.
Instead of examining a container:
carry out the writing a paragraph about activity with the noun.
Instead of examining a supporter:
carry out the writing a paragraph about activity with the noun.
Table of List Style Assignments (continued)
list style first delimiter second delimiter alternate second delimiter indefinite name phrase definite name phrase
appearance ", " "[if the serial comma option is active],[end if] and " " and " “[trimmed appearance of current listed object]” “[trimmed appearance of current listed object]”
elaborated ". " ". " ". " “[current enumeration in counting terms][trimmed appearance of current listed object]” "Finally, you see [trimmed appearance of the current listed object]. "
To say (N - a number) in counting terms:
if N is:
– 1: say "One thing you see is ";
– 2: say "The second is ";
– 3: say "Third, there’s ";
[add more here until your patience runs out]
test me with “look / x desk/get pens/put pens on desk/ look / x desk / get notes / put notes on desk / look / x desk”.[/code]