Ibid.
"Hitchhiker's Guide to the Galaxy" introduced the idea of footnoted descriptions, and various IF games since have toyed with the idea. The recommended implementation in Inform 6 involved keeping an assortment of footnote objects around, but in Inform 7 the table is a much tidier way of handling the same problem.
assignment | note |
a number | "Francis Drake ate here, if the sign on the door is to be believed" |
-- | "this is unlikely, considering that owls are protected animals in England these days [3 as a footnote]" |
-- | "moreover, you can't imagine that owl would be very tasty" |
Whenever we mention a footnote for the first time, we need to assign it a number, which we will use consistently thereafter. And it's probably a good idea to protect ourselves against the author accidentally using a number too large for the footnote table, too. So:
Now, in order to let the player view these footnotes, we'll need to parse numbers.
Test me with "footnote 1 / examine pie / footnote 2 / footnote 3".
Here you are in a lovely pub which your guidebook assures you is extremely authentic. (1).
To your left sits a party of Italians, with their guidebook.
To your right is a silent, but not unappealing, young man.
You can see a table (on which is a mysterious pie) here.
>(Testing.)
>[1] footnote 1
(1): Francis Drake ate here, if the sign on the door is to be believed.
>[2] examine pie
Your waitress told you it was the specialty of the day, Steak and Owl Pie. (2).
>[3] footnote 2
(2): this is unlikely, considering that owls are protected animals in England these days (3).
>[4] footnote 3
(3): moreover, you can't imagine that owl would be very tasty.
This method does require us to keep track of where a footnote appears in the table. If we found this inconvenient, we could add a column to the footnote table so that we could invoke it with tags like "[appearance quip as a footnote]".