Descriptive lists

Is it possible to set up a variable text field that is accessed when I want more descriptive lists?

I.e. currently my room description looks like this:

You're overlooking a small room. Two features strike you: [a list of visible things].

A couch and a bookshelf are the only visible things in the room. So the result is

What I want to do is make the list output a more floral description. I envision something like:

[code]
A thing has a text called floral. The floral is usually “[the item described]”.

Welcome is a room with the description “You’re overlooking a small room. Two features strike you: [A floral list of visible things].”

The couch is a thing in Welcome. It has the floral “a couch dominating the middle of the room”.

A bookshelf is a thing in Welcome. It has the floral “a bookshelf propped up against a wall”.[/code]

Which would result in

Messing with how lists output things is a bit beyond me right now, though, so any help would be greatly appreciated.

The easiest way is by using the printed name of the object (see 17.10 in the documentation):

[code]The small room is a room. “You’re overlooking a small room. Two features strike you: [a list of visible things].”

A couch is in the small room. It is scenery.

A bookshelf is in the small room. It is scenery.

Rule for printing the name of the couch while looking: say “couch dominating the middle of the room”.

Rule for printing the name of the bookshelf while looking: say “bookshelf propped up against a wall”.[/code]

(Alternately, since you’re just appending a description to the name, you can say “After printing the name of the couch while looking: say " dominating the middle of the room”.)

However, your larger question is one I’ve been meaning to ask about myself: How do you print a list of properties? (I was working on a “smell” command and wanted it to return the smells of all the objects in the room.)

Thanks for the suggestion! Unfortunately, I need to be able to print the short-form name as well, since I intend to do a “these are the things you can interact with” thingymajig at the bottom of the screen, and the floral description might not always be appropriate.

To account for this, I added the following:

[code]A thing has a text called floral. The floral is usually “[the item described]”.
A thing has a text called shortform. The shortform is usually “[The item described]”.

Before looking:
Repeat with longform running through visible things:
Now the printed name of longform is the floral of longform.

After looking:
Repeat with backtonormal running through things in location:
Now the printed name of backtonormal is the shortform of backtonormal.
Say “[paragraph break][A list of things in location] are interactable.”

Welcome is a room with the description “You’re overlooking a small room. Two features strike you: [A list of visible things].”

The couch is scenery in Welcome. It has the floral “a couch dominating the middle of the room”. It has the shortform “couch”.

A bookshelf is scenery in Welcome. It has the floral “a bookshelf propped up against a wall”. It has the shortform “bookshelf”.[/code]

Which… I mean, it works, but it’s far from perfect. It has no customizability, and means I have to add yet another property that I have to type out for every item.

Something like what you suggested would work pretty well for smelling, though. You already have a property with the smell, and presumably you have a seperate smelling action. So all you need to do is something in this vein:

Odorizing is an action applying to nothing. Understand "odor" as odorizing.

Rule for printing the name of a thing (called odorizer) while odorizing: say "[odor of odorizer]"

Carry out odorizing:
	Say "You smell the unmistakable scents of [a list of things]."
	
Welcome is a room with the description "an empty room".

A thing has a text called odor. The odor is usually "nothing".

Lilacs are in Welcome. The odor of lilacs is "flowers".

Roses are in Welcome. The odor is "chocolate".

The odor of the player is "yourself".

Test me with "odor / look"

Maybe something like this:

Florida is a room with description "Flat. [number of florid-things in location in words] features strike you, [a florid list of things]."

A florid-thing is a kind of thing. 
A florid-thing has a text called florid-text.

The couch is a florid-thing in Florida. The florid-text is "a couch dominating the middle of the room".

A bookshelf is a florid-thing in Florida. The florid-text is "a bookshelf propped up against the wall".

A armoire is a florid-thing. The florid-text is "an armoire you shouldn't see".

To say a florid list of things:
	let F be the list of visible florid-things in location;
	let T be a list of texts;
	repeat with item running through F:
		add the florid-text of item to T;
	say T.
		
Instead of jumping, say "[a list of visible things].".

Instead of singing, say "[a list of visible florid-things].".

test me with "jump / sing".

edit: I’ve tried to get that number of florid-things capitalized (by playing around with ‘in sentence case’ since it doesn’t seem to want to do it automatically] and I can’t figure it out, maybe someone else knows the trick.

How about this?

A thing has a text called floral. The floral is usually "[the printed name of the item described]".

Florid is a truth state that varies. Florid is false.
To say florid style: now florid is true.
To say prosaic style: now florid is false.
Rule for printing the name of something (called item) when florid is true: say the floral of the item.

Welcome is a room with the description "You're overlooking a small room. Two features strike you: [florid style][A list of visible things that is not the player][prosaic style]."

The couch is a thing in Welcome. It has the floral "couch dominating the middle of the room".

A bookshelf is a thing in Welcome. It has the floral "bookshelf propped up against a wall".

EDIT: Make the floral name “[the printed name of the item described]” rather than merely “[the item described]”, or Inform will for some reason fall into an infinite loop when trying to say the player.

That’s perfect - thank you for your suggestions, everyone!