I7 - "Writing a paragraph about" Order

Hi, all! I’m coming back to Inform 7 after an 18 month hiatus. Obviously things have changed radically since then, so I’m trying to get a handle on (what appears to be) some simple newbie stuff.

Last time around, I used Room Description Control by Emily Short, which apparently is no longer used. So here’s what I’m trying to do. Here’s the source code:

[code]“Description Initial” by Jay Goemmer

The story headline is “An Interactive Example”.

South Beach is a room. “The southern end of the white sand beach gives way to a wall of rock.”

[ 18.24. Writing a paragraph about – Must be used to make individual objects separately “visible.” ]

Rule for writing a paragraph about Tall Cliff:
say “A cliff that’s too steep and too tall to climb towers over the beach.”

The Tall Cliff is fixed in place in South Beach. The printed name is “tall cliff”. The description is “[line break]The cliff made of distinct layers of lava flows is now a black, hard wall of rock.” Understand “rock”, “volcanic”, “lava”, “black”, “wall”, “stone” as Tall Cliff. The indefinite article of the Tall Cliff is “a”.

Rule for writing a paragraph about Volcanic Rock:
if the player does not have the Volcanic Rock:
say “A fist-sized piece of black lava rock is lying nearby.”

Volcanic Rock is in South Beach. The printed name is “volcanic rock”. The description is “[line break]This black volcanic rock has countless pockets where tiny bubbles of gas were trapped while the lava flow cooled into solid form.[paragraph break]The edges are sharp where the rock broke loose after cooling.” Understand “rock”, “volcanic”, “lava”, “black”, “piece”, “fist”, “stone”, “pockets”, “bubbles”, “gas”, “solid”, “edge”, “edges”, “sharp”, “cooling” as Volcanic Rock. The indefinite article of the Volcanic Rock is “a”. [/code]

And here’s the transcript I get:

How can I consistently keep the rock’s paragraph at the “bottom” of the page, below the paragraph about the cliff? What’s the most up-to-date method of maintaining this kind of order or sequencing?

Thanks in advance,

Well, if that’s the only thing you want to use Room Description Control for, you could just manually set the locale priority of the volcanic rock to something higher than 5 – paragraphs get written about things in order of locale priority, and 5 is the default value for things that are candidates. So I think this works:

After choosing notable locale objects: if the Volcanic Rock is a notable-object listed in the Table of Locale Priorities: set the locale priority of Volcanic Rock to 10.

The “notable-object listed in the Table of Locale Priorities” checks to see whether we’re going to be writing a paragraph about the Volcanic Rock, and setting its locale priority to 10 basically moves it to the back of the line. You might want to make this (and the special paragraph for the Volcanic Rock) only happen in Tall Cliff, in case the player drops the rock somewhere else.

Anyway sections 18.25-28 of Writing with Inform are super-useful here.

By the way, I don’t think you’ll need “if the player does not have the rock” – if the player has the rock, then it won’t be one of the things that gets a paragraph written about it. Also if you type “x volcanic rock” you have a nasty disambiguation problem.

I don’t know if Room Description Control or something like it is coming back – I hope so!


Thanks for the feedback, it’s greatly appreciated! I think the “locale priority” is new from last time around. I recall using “desc_rank” in I6 to approximate this behavior.

And yes, I hadn’t dealt with the “which rock do you mean?” bug – er, feature– yet. :blush: :smiley:

There are some other items in other locations that I want to control their “order of appearance” of, so I’ll be exploring this technique for sure!

Thanks and cheers! :smiley:

Locale priority was definitely in 6G60. According to section 26.5 of the 6G60 documentation, it looks like that stuff was added in 5T18, the April 2008 build.

Room Description Control was also updated for the new build, so there should be a working version in the Public Library. (Though it may indeed be sensible to transfer to built-in features if what you want to do is pretty simple.)

Oh, whoops; of course the reason I couldn’t get it to run in the new build is that I haven’t updated my extensions yet. (I’m afraid of squashing stuff I need for my 6G60 projects, but it really should be safe to download the ones that aren’t blue.)

I don’t seem to be finding it in the Public Library, though. I’d think it’d be in §1.2, but all I get there is Assorted Text Generation, Complex Listing, List Control, List Controller, and Text Capture.

It’s in 5.1 under looking.

Ah, I had tried expanding everything and searching for “room description” but it looks like the extension names in that pane aren’t searchable.

EDIT: No, that’s not right. I must have misspelled “Description” or thrown in an extra space or something.

This desired functionality is implemented in Example #356 Priority Lab with ‘the late listing rule’ chunks of code; the rest of the example may also be informative.


Dear Matt, Emily, and Roger,

Thanks for the pointers and the heads-up!

Cheers and blessings,

Dear Emily,

I still had Version 10, but managed to track down the latest implementation (Version 12). Thanks so much!