Even simpler single paragraph descriptions?

I’m looking for simple ways to remove line breaks and paragraph breaks between room descriptions and object descriptions – either in general, or to make a specific object run on from room text (or a specific room run on its object). For example, here:

Cell Five is a room. "A narrow-walled cell."
A spoon is here.

Cell Five
A narrow-walled cell.

You can see a spoon here.

>

I would like this to print:

Cell Five
A narrow-walled cell. You can see a spoon here.

>

I have attempted adding “[no line break]” and/or “[run paragraph on]” and/or terminating strings with dot-space (". ") for the room and the object text, however nothing has changed the output.

I also also tried defining “Rule for printing a locale paragraph about”, but wasn’t able to remove breaks with it.

I have found the extension Single Paragraph Descriptions, built on Room Description Control, and it works well – but the rule stack is extremely complex and it has numerous side-effects. Are there any simpler methods to intervene – either to strip all breaks when printing a room description / locale, or a solution that targets each individual room or object?

There’s no easy way to mash the automatically-generated object lists into the room description.

You can do this for specific objects:

The Kitchen is a room. "This is the Kitchen[if the ball is in the Kitchen]. There's [a ball] lying here[end if]."

The ball is in the Kitchen.

If the ball is in the room, the room description displays it, and the use of [a ball] gives the ball the mentioned property. (Which keeps it from being displayed in a “You can also see…” line.)

This is easy for one object, but it’s a nuisance for two and a complete headache for any more than that. You have to compose nested conditionals in the room description, but Inform doesn’t allow nested conditionals in text, so you need a helper say phrase, and it get exponentially uglier.

1 Like

I looked around for examples of managing 2-3 custom objects in initial room details. It looks like a one good approach is modeled in the Example “The Eye of the Idol” http://inform7.com/book/WI_18_25.html#e380 It uses a relation to track which rooms and supporters have custom text for objects in their initial descriptions and prevents those things from printing twice.

However, I wanted something that would automatically incorporate a list of initial object descriptions into the room paragraph, and work for an unlimited number of objects. This a prototype extension to do that.

Ambient Things by Jeremy Douglass begins here.


Section - Ambient Things and Ambiance

A thing can be ambient. Things are usually not ambient.

To say the ambient appearances of (L - a list of objects):
	repeat with item running through L:
		say the ambient appearance of the item.

To say the random ambient appearance of (L - a list of objects):
	sort L in random order;
	say the ambient appearance of entry 1 of L;
	repeat with item running through L:
		now the item is mentioned.

To say the shuffled ambient appearances of (L - a list of objects):
	sort L in random order;
	repeat with item running through L:
		say the ambient appearance of the item.

To say the ambient appearance of (item - an object):
	if the item is in the location:
		say "[the initial appearance of the item][no line break] ";
		now the item is mentioned.

To say ambiance:
	say "[the ambient appearances of the list of ambient things in the location]".

To say random ambiance:
	say "[the random ambient appearance of the list of ambient things in the location]".

To say shuffled ambiance:
	say "[the shuffled ambient appearances of the list of ambient things in the location]".


Ambient Things ends here.

---- DOCUMENTATION ----

Ambience provides a simple way of marking items that should have their initial descriptions incorporated into the initial description paragraph of any room, rather than printed in separate paragraphs.

To mark items as ambient:

	The gray rock is a thing. It is ambient. "A gray rock lies on the ground."

To incorprate ambient things into a room, use [ambiance] or [shuffled ambiance] or [random ambiance] in its initial description:

	The hillside is a room. "The slope rises to the north. [ambiance]"

1. [ambiance] will display the initial descriptions of all ambient items, generally in the order that they were declared.
2. [shuffled ambiance] will shuffle the list each time.
3. [random ambiance] will select one item from the list of ambient items each time.

To change the ambience of a thing:
	
	now the rock is not ambient;

If you don’t want a new property on things, you could just accomplish this in a simple way by rolling your own descriptions and appending them to room descriptions, replacing the “carry out looking” rules: (You can also add a condition to the “first carry out looking” rule, to make this conditional rather than game-wide.)

Cell Five is a room. "A narrow-walled cell."

First carry out looking: 
	say "[description of the location][list custom-appearance things][list regular things]";
	rule succeeds.

Definition: a thing is other if it is not the player. 
Definition: a thing is another if it is not the player.
			
Definition: a thing is unhandled if it is not handled and it is not scenery.

To say list custom-appearance things:
	if another unhandled thing is in the location:
		repeat with item running through other unhandled things in the location:
			say " [the initial appearance of the item]";
			now the item is mentioned.
			
Definition: a thing is unmentioned if it is not mentioned and it is not scenery.
			
To say list regular things:
	if another unmentioned thing is in the location:
		say " You can [if at least one thing is mentioned]also [end if]see [a list of other unmentioned things in the location] here."

A piece of bark is here. "Oh look, some bark."

The player carries a knife. 
Sample transcript

A narrow-walled cell. Oh look, some bark.
>i
You are carrying:
a knife

>drop knife
Dropped.

>l
A narrow-walled cell. Oh look, some bark. You can also see a knife.

>get bark
Taken.

>l
A narrow-walled cell. You can see a knife.

>get knife
Taken.

>l
A narrow-walled cell.

1 Like