Rideable Vehicles by Graham Nelson Search for other extensions by this author Approved for the Public Library


Download version 3/140507For Inform 7 6L38, 6L02



Vehicles which one sits on top of, rather than inside, such as elephants or motorcycles.

Tags world-model


Inform's built-in "vehicle" kind assumes that the vehicle is a container, which is fine for cars or hot-air balloons, but not so good for a pony or a four-wheeled lawnmower, which one rides rather than gets inside. Rideable Vehicles is an extension which creates two more kinds: "rideable animal" (good for the pony) and "rideable vehicle" (good for the lawnmower). The pony is a rideable animal in the Forest Clearing. The lawnmover is a rideable vehicle in the Garden Shed. This means that three different kinds of thing can be used as a means of travel, which might make it awkward to write a general rule about them, so we also define the adjective "vehicular" for any thing of any of these kinds. The Transport Museum is a room. "The Museum is filled with means of transport old and new, including [list of vehicular things in the Transport Museum]." A new action called "mounting" is created, and a new command "mount" (or "ride") is added for the player to use. Thus: Instead of mounting the pony, say "The pony snorts and backs off." results in >ride pony The pony snorts and backs off. And a corresponding "dismounting" action handles the command "dismount". >dismount You get off the pony. Moreover, commands such as "get off the pony" or "get on the lawnmower" are converted into these new actions instead, so that rules like the following will always work, no matter what command is tried: Instead of mounting the tricycle when the transport pass is not carried by the player: say "The tricycle can only be ridden by those with a transport pass." Lastly, a special rule means that "pony, go east" is recognised when the player is riding the pony. (This works for rideable animals, but not rideable vehicles.) Example: * Vehicle Testing Center - An assortment of rideable and other vehicles, with restrictions about which rooms can be entered with what rides. *: "Rides" by Emily Short Include Rideable Vehicles by Graham Nelson. The Vehicle Testing Center is a room. "A large square of field surrounded by a wall of hay bales. A driveway leads out to the west. The ground slopes down to a pond along the northern edge." A sign is a thing in the Center. "The sign advertises experimental rides in the following: [list of vehicular things][clear vehicles]." To say clear vehicles: now every vehicular thing is unmentioned. The red wagon is a vehicle in the Vehicle Testing Center. "There is a lovely red wagon here, complete with an outboard motor." The swan is a rideable animal in the Vehicle Testing Center. "At the pond's edge waits a black swan of unusual size, wearing a bridle and a gold-trimmed Mexican hat." The description of the swan is "The swan looks back at you." The swan can be fed or unfed. Instead of mounting the unfed swan: say "The swan gives you a look of disappointment and reproach. Apparently it doesn't work for free." Some chow is carried by the player. The description is "Delicious Purina swan chow pellets!" Instead of giving the chow to the swan: now the swan is fed; say "The swan accepts your offering courteously." Instead of going to the Dusty Road by swan: say "The swan honks indignantly at the very notion." Instead of going to the Open Sky by swan: say "The swan can swim with you aboard, but not lift off." After going somewhere by swan: say "The swan honks a lovely Mexican serenade as it paddles you about."; continue the action. The Pond is north of the Vehicle Testing Center. "Funny, the pond is bigger from the middle than it seemed from the shore. In fact, you can't see any edge but the testing center to the south and a small island to the north." Instead of going to the Pond when the player is not carried by the swan: say "You forgot your water skis." Instead of dismounting when the location is the Pond: say "You'd fall in!" North of the Pond is the Small Island. The glass elevator is a vehicle in the Small Island. It is transparent. "A glass elevator stands in the center, a fantastically strong microfilament connecting it to... something in the sky." The Open Sky is above the Small Island. "There's a great view from here, starting with that lovely glass floor. In fact, maybe you'd better not look that way." Instead of going a direction (called the way) when the player is in the Elevator: if the way is up, continue the action; if the way is down, continue the action; say "The elevator ascends and descends only." Instead of going to the Open Sky when the player is not in the Elevator: say "Do you plan to flap your arms, then?" Instead of exiting in the Open Sky: say "It's a long way down." The Dusty Road is west of the Vehicle Testing Center. "Off to the east is an enclosed area for the testing of dangerous and improbable vehicles." A rideable vehicle called a tricycle is in the Dusty Road. Test me with "test wagon / test tricycle / test swan / test elevator". Test wagon with "get in wagon / w / e / e / w / out". Test tricycle with "get in wagon / mount tricycle / e / n / w / e / dismount". Test swan with "n / get on swan / give chow to swan / mount swan / dismount / mount swan / n / dismount / swan, n / dismount". Test elevator with "u / get in elevator / get out / get in elevator / up / get out / d".