Wir brauchen als Gegenstände drei Hoodies (rot, weiß und schwarz) und ein Stück Kreide. Außerdem soll es ein paar unbewegliche Objekte geben, die vor allem zur Dekoration da sind und das Spielen befriedigender machen. Außerdem brauchen wir noch sieben Geißlein. Den Wolf spielen wir selber.
Allgemeine Gegenstände und ihre Eigenschaften
Die Klasse für Gegenstände ist thing
:
The red hoodie is a thing. It is wearable. It is in the Wolf Cave. The description is “This is a red hoodie. A hoodie is a sweater with a hood.”
The black hoodie is a thing. It is wearable. It is in the Wolf Cave. The description is “This is a black hoodie. A hoodie is a sweater with a hood.”
The white hoodie is a thing. It is wearable. It is in the Wolf Cave. The description is “This is a white hoodie. A hoodie is a sweater with a hood.”
Gegenstände haben in der Regel eine Beschreibung, die mit: the description is
eingeleitet wird. Außerdem brauchen sie, jedenfall wenn sie von Anfang an im Spiel da sein sollen, eine Ortsangabe, zum Beispiel eben in the Wolf Cave
. Der Ort sollte vorher angelegt worden sein.
Gegenstände haben außerdem bestimmte Attributwerte. Die wichtigsten sind:
wearable/not wearable
– kann man anziehen oder nichtedible/not edible
– kann man essen oder nichtportable/fixed in place
(oder:not portabl
e) – kann man mitnehmen oder nichtscenery/not scenery
(dazu später mehr)
Das mit dem wearable
haben wir schon bei den Hoodies eingesetzt.
Dann packen wir auch noch die essbare Kreide dazu:
The piece of chalk is a thing. It is in the Marketplace. It is edible. The description is “Here is some chalk. You can use it, to write on a blackboard. If you eat it, your voice will get temporarily high and female.”
Das scenery-Attribut
Normalerweise werden alle Gegenstände in einem Raum eigens in einer zur Laufzeit generierten Liste ausgedruckt. Das sind vor allem die wichtigen Gegenstände, die einem in dem Raum sofort auffallen würden, und die man vielleicht mitnimmt oder benutzt.
Atmosphärisch wird die Geschichte aber erst dann, wenn es Gegenstände gibt, die reine Dekoration sind. Wenn ein Gegenstand den Attribtuwert auf scenery gesetzthat, wird dieser Gegenstand nicht in der Liste ausgedruckt, ist aber doch vorhanden – man kann sie betrachten und benutzen. (Standardmäßig: nicht mitnehmen, aber das kann man ändern.) Da diese Gegenstände nicht in der Liste aufgeführt werden, muss man durch die Raumbeschreibung den Spieler-Leser darauf hinweisen, dass es da noch etwas gibt, das man betrachten kann:
The dripping cave ceiling is scenery in the Wolf Cave. The description is “There are drops at the ceiling. The whole cave is very wet and you can hear the drops hitting the ground.”
Oder:
The trees are scenery in the Forest. The description is “Lots of trees, some old, some new. Some have hearts cut into them.” Understand “tree” as the trees.
The birds are scenery in the Forest. The description is “Small bodies that hop from tree to tree.”
Behälter und Oberflächen
Es gibt zwei wichtige Unterklassen von thing
, nämlich supporter
und container
. In einen Container kann man Sachen tun, auf einen Suppoerter kann man Sachen draufstellen.
Wenn es sich um einen Behälter handelt, gibt es auch noch:
openable/not openable
– kann man öffnen und schließen oder nichtlockable/not lockable
– kann man auf- und zusperren oder nichtopen/closed
– ist zur Zeit offen oder geschlossenlocked/unlocked
– ist zur Zeit zugesperrt oder nichtenterable/not enterable
– man kann hineingehen oder nichttransparent/opaque
(oder:not transparent
) – ist durchsichtig oder nicht
Für die Geißlein-Geschichte brauchen wir das nicht, jedenfalls solange wir keinen Uhrenkasten haben wollen, in dem sich ein Geißlein versteckt. Deshalb nur kurz zwei Beispiele:
Ein Pappkarton:
The cardboard box is an openable container in the Living Room. The description is “Looks like an ordinary cardboard box.” [It is closed and not lockable. It is not transparent.]
Die Angaben in eckigen Klammern kann man eigentlich weglassen, da das schon die Standard-Attributwerte für Container sind.
Ein Sessel, betretbar (man kann darauf sitzen) und zu schwer zum Tragen:
The comfy chair is an enterable supporter in the Living Room. It is fixed in place. The description is “My! This looks comfortable.” Understand “comfortable” as the comfy chair.
Fehlen noch die Geißlein. Die kommen im nächsten Kapitel.
Wichtige Klassen und Attribute im Überblick:
Gesamter Code bisher:
"The Wolf and the Seven Kids" by Moritz. The Wolf Cave is a room. "Here is your home. You got nearly everything in this cave that you need to invade the seven little kids. Light comes in from the west." West of the Wolf Cave is the Forest. The Forest is a room. "This place is very large and it is dark here. You can go north, east, south and west. You can hear birds singing." South of the Forest is the Marketplace. West of the Forest is the Entrance Area. North of the Forest is the River. The River is a room. "Here is a place where you can relax. Every time you did hard work, you can lie down next to the river and chill. A road leads south to a forest." The Marketplace is a room. "You should not stay here for too long, because the mother of the kids is often here to buy some food. If she sees you, she will bump the shit out of you. In the north, you can see the trees of the forest." The Entrance Area is a room. "Now you are in front of the house where the kids live. You have to go west to enter the house, or you can go east to the forest." West of the Entrance Area is the Kid House. The Kid House is a room. "A nice house. There is only one room, and the exit is west." The red hoodie is a thing. It is wearable. It is in the Wolf Cave. The description is "This is a red hoodie. A hoodie is a sweater with a hood." The black hoodie is a thing. It is wearable. It is in the Wolf Cave. The description is "This is a black hoodie. A hoodie is a sweater with a hood." The white hoodie is a thing. It is wearable. It is in the Wolf Cave. The description is "This is a white hoodie. A hoodie is a sweater with a hood." The piece of chalk is a thing. It is in the Marketplace. It is edible. The description is "Here is some chalk. You can use it, to write on a blackboard. If you eat it, your voice will get temporarily high and female." The dripping cave ceiling is scenery in the Wolf Cave. The description is "There are drops at the ceiling. The whole cave is very wet and you can hear the drops hitting the ground." The trees are scenery in the Forest. The description is "Lots of trees, some old, some new. Some have hearts cut into them." Understand "tree" as the trees. The birds are scenery in the Forest. The description is "Small bodies that hop from tree to tree."