This module extends Inform 7 by providing some basic actions and types that allow the player to read, write and erase text. This is implemented by giving every thing an indexed text called the "read text". With this module loaded, the "read" command no longer invokes the "examining" action. Instead, "read [thing]" shows the read text of the thing read. Allowing the player to write arbitrary text on things is also allowed. The thing to be written on must have the "writable" property, and the player must have access to a "writing tool". Subsequent writes will append new paragraphs to the read text of the thing written. Allowing the player to erase the text on things is also allowed. The thing to be erased on must have the "erasable" property, and the player must have access to an "erasing tool". A writable thing is also erasable unless stated otherwise. Writable-Erasable things: A notebook, a whiteboard, a graffiti Writable-only things: An engraving, a legal document. Example: * OLAB - A writable erasable thing
test meOLAB
An Interactive Fiction by Bart Massey
Release 1 / Serial number 220517 / Inform 7 v10.1.0 / D
OLAB
This room is bare except for a whiteboard mounted on one wall.
>test me
(Testing.)
>[1] read whiteboard
SCRIBBLE ON ME
>[2] erase whiteboard
(taking the eraser)
You erase the whiteboard.
>[3] read whiteboard
"OLAB" by "Bart Massey" Include Basic Literacy by Bart Massey The OLAB is a room. "This room is bare except for a whiteboard mounted on one wall." The whiteboard is writable erasable scenery in the OLAB. The description is "A regulation-issue whiteboard with a metal tray.[if read text of the whiteboard is not empty][the contents of the whiteboard][end if]". The read text is "SCRIBBLE ON ME". Understand "board" as the whiteboard. Understand "scribble [text] on [whiteboard]" as writing it on. To say the contents of the whiteboard: say "Scribbled on the whiteboard is:"; silently try reading the whiteboard. The metal tray is a supporter. It is part of the whiteboard. The description is "This narrow metal tray is built to support markers and erasers." A marker is a kind of writing tool. A marker cap is a kind of thing. The description of a marker cap is usually "This cap keeps the marker from drying up." A marker cap is part of every marker. Does the player mean doing something with the marker cap: it is unlikely. Instead of doing something other than examining with the marker cap: say "There is no need to fiddle with the marker cap." The black marker is a marker on the metal tray. The description is "This is as generic a whiteboard marker as you'll ever hope to find. It has a black cap." Report writing it on (this is the detailed report writing rule): say "You take the cap off the marker, write on [the second noun], and replace the cap carefully." The detailed report writing rule is listed instead of the report writing rule in the report writing it on rulebook. An eraser is an erasing tool on the metal tray. The description is "A classic fuzzy whiteboard eraser, none too clean." Test me with "read whiteboard / erase whiteboard / read whiteboard".
Example: * The Poet's Notebook - A writable non erasable thing
"The Poet's Notebook" by "Andre Rodriguez" Include Basic Literacy by Bart Massey When play begins: say "The Poet's bedroom is place where vulnerability and fragile emotions are encouraged. (Once you write something in his notebook, it is there for all eternity)." The Poet's Bedroom is a room. "This is where the Poet sits down to think and reflect upon existence." The desk is a fixed in place supporter in the Poet's Bedroom. The Poet's Notebook is writable scenery on the desk. The description is "A notebook to transform thoughts and feelings into words. [if read text of the Poet's Notebook is not empty][read text][end if]". Understand "notebook" as the Poet's Notebook. To say the contents of the notebook: say "The notebook reads:"; silently try reading the notebook. A writing tool called a pen is on the desk. The description is "A regular pen. Many stories have been written with this old friend." White Ink is an erasing tool on the desk. The description is "Could this white ink erase something written on the notebook?" Check an actor erasing the notebook (this is the check erasing notebook rule): say "Not a chance, once you write something here there's no going back."