Writing for Curveship-py

Curveship-py includes a text generator and has the ability to produce different texts depending upon how high-level narrative parameters are set. Because of this, it's necessary to write the descriptive text associated with rooms and other items, and the representation of actions, in a special format: As templates rather than simple strings. These “string-with-slots” templates provide flexibility in generation while being relatively easy to write.

Three Examples // Curveship-py

Describing Rooms // Curveship-py

An IF author would typically write a room description by typing a string which could begin with something like “You are in ...” Some IF systems do provide for certain types of slots which are filled with when text is output. In Curveship-py, the system is a bit more complex than is standard in IF but much less complex than a full abstract syntax representation, of the sort used in computational linguistics, would be. It's enough to provide a great deal of flexibility, but hopefully will still be be fairly easy to compose. As a simple example, consider the description of the building in Adventure with Style:

[*/s] [are/v] inside _a_building, _a_well_house for _a_large_spring

This of course produces “You are inside a building...” by default, but it can do a bit more. There are three special things in this sentence: a slot for a subject, ending with “/s]”; a slot for a verb, ending with “/v]”; and some noun phrases that have been very lightly annotated using underscores. The * means “whoever is doing the sensing,” and [*/s] means “place whoever is doing the sensing here as the subject of the sentence.” [are/v] is just the verb “to be.” There's no need to say anything else about the verb, because the necessary information (the number) will come from the subject. And finally, this sentence doesn't have an object that is represented by a slot. It has a few noun phrases that have been decorated with underscores to make them entities in the discourse, even though they are not simulated. After the adventurer enters the building and looks around, a second look will result is something like “You are inside the building, the well house for the large spring.” People usually shift from using the indefinite article to using the definite one after they've mentioned something for the first time. Curveship-py does this as well, both with simulated items and with noun phrases that have been decorated like this.

That description, of course, was written to imitate an existing room description in interactive fiction. Here's another example, a bit more complex and created with Curveship-py in mind. This is the description of the center of the plaza from Lost One:

[*'s] senses [hum/ing/2/v] as [*/s] [view/v] [@plaza_center/o]

the morning [conclude/1/ed/v]

it [is/1/v] midday [now]

This defines three sentences. When writing a string-with-slots template, sentences do not have to be capitalized or punctuated—Curveship-py provides for that when it realizes text. Again, the '*' here is whoever is doing the sensing. [*'s] means the possessive form of whoever is doing the sensing, which could end up as “your,” “the visitor's,” “the punk's,” “my,” or several other things. “senses” is just a plain word, written as part of the string. [hum/ing/2/v] is the verb “to hum.” Since the subject of the sentence isn't specified, “/2” has been added to specify that “hum” is plural. “/ing” is also added to specify that the progressive should be realized. This gets us something like “Your senses are humming...” along with other variations.

Then, [*/s] indicates that the sensor appears as a subject of the phrase coming up. [view/v] is the verb “to view.” Nothing else needs to be specified about it. Finally, [@plaza_center/o] will generate a noun phrase naming the plaza center; it's an object, hence the “/o]” ending.

[conclude/1/ed/v] is a singular verb (that's why the “/1” is there) and is to be realized as perfect (thus, “/ed"). This provides “The morning has concluded” along with variations.

Finally, [is/1/v] is the singular verb “to be.” In almost all cases, verbs should be specified by using their infinitive form with the “to” removed: [eat/v], [drink/v], [take/v], [drop/v], and so on. But because it looks sort of silly to write “it [be/1/v] midday [now],” the system understands “is” and “are” as indicating “be.” That's why the Adventure in Style room description can start off “[*/s] [are/v] inside” rather than needing to be written “[*/s] [be/v] inside."

Finally, [now] is a deictic word, one that refers to the situation of the telling. Imagine that you're telling a story in the present tense, narrating it as it happens, and you use “now,” as in “I'm here, I'm walking up the pathway now ...” If you were to retell that from somewhere else, later, in the past tense, using more or less the same language, you would want to change the “now” to “then” and the “here” to “there": “I was there, I was walking up the pathway then ...” Curveship-py alters [now] and [here] appropriately based on whether or not the narrator is in fact “here” “now” during the telling of the story.

Representing Action // Curveship-py

The core of narration is representing action. After all, a text that just describes something isn't a narrative; it takes the representation of different actions to bring temporality, causality, and all the other interesting properties particular to narratives into play.

Here's a special template for representing the “block” action. This one is particular to Adventure in Style, which has various guardians that block the adventurer:

[direct/s] [are/not/v] able to get by [agent/o]

This one reverses the usual object and subject: According to the action, the “agent” is blocking the “direct” (the direct object), and should be the subject. But this changes the construction so that “direct” is not able to get by “agent.” The way Curveship-py represents sentences isn't rich enough to allow the system to automatically convert between active and passive constructions, but authors can write templates to have actions represented however they like. Note that “/not” is present in the verb to negate it. Here's another action representation, this one one of the straightforward built-in ones:

[agent/s] [touch/v] [direct/o] with [indirect/o]

This is from “touch” with an indirect object. With the appropriate agent, direct object, and indirect object it will produce “You touch the gelatinous cube with the ten-foot pole” and many variations. Notice that it's extremely similar to the template for “drink” with an indirect object:

[agent/s] [drink/v] [direct/o] from [indirect/o]

The only difference is the verb slot and the pronoun. Touching with a tool is best expressed using “with,” while drinking from a source should be expressed using “from.” By themselves, these brief representations of action may not seem very interesting. But they appear in the context of other actions and can be narrated in different orders and in different groupings, not to mention recounted within flashbacks and in other ways.

Main Curveship Page