Benutzer:Andyk/Mitschriften/Inform 7 Rahmenstruktur: Unterschied zwischen den Versionen

Aus Philo Wiki
Wechseln zu:Navigation, Suche
K (corr.)
K (syntax: Inform-Code)
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 1: Zeile 1:
 +
{{PSI}}
 +
 
= Was ist das hier? =
 
= Was ist das hier? =
  
Zeile 42: Zeile 44:
 
|style="background-color:#FCD5B4" align="center" valign="center" | in-code
 
|style="background-color:#FCD5B4" align="center" valign="center" | in-code
 
|style="background-color:#E6B9B8" align="center" valign="center" | my house
 
|style="background-color:#E6B9B8" align="center" valign="center" | my house
|style="background-color:#C5D9F1" colspan="2" rowspan="7" align="center" valign="center" | <small><source lang="inform">My house is a dark room.
+
|style="background-color:#C5D9F1" colspan="2" rowspan="7" align="center" valign="center" | <small><code>My house is a dark room.
 
The map region of my house is Retz.
 
The map region of my house is Retz.
 
Grandmas house is a lighted room in Retz.
 
Grandmas house is a lighted room in Retz.
Zeile 50: Zeile 52:
 
The printed name of my house is "AKAdemie".
 
The printed name of my house is "AKAdemie".
 
My house has a number called windowcount.
 
My house has a number called windowcount.
The windowcount of my house is 6.</source></small>
+
The windowcount of my house is 6.</code></small>
  
 
|- style="font-size:11pt"
 
|- style="font-size:11pt"
Zeile 104: Zeile 106:
 
|style="background-color:#FCD5B4" | in-code
 
|style="background-color:#FCD5B4" | in-code
 
|style="background-color:#E6B9B8" | golden door
 
|style="background-color:#E6B9B8" | golden door
|style="background-color:#C5D9F1" colspan="2" rowspan="10" | <small><source lang="inform">The Cemetery and the Church  
+
|style="background-color:#C5D9F1" colspan="2" rowspan="10" | <small><code>The Cemetery and the Church  
 
are lighted rooms in Retz.
 
are lighted rooms in Retz.
 
The jimmy is a thing in Cemetery.
 
The jimmy is a thing in Cemetery.
Zeile 118: Zeile 120:
 
door is the jimmy.
 
door is the jimmy.
 
The golden door is inside of Church  
 
The golden door is inside of Church  
and outside of Cemetery.</source></small>  
+
and outside of Cemetery.</code></small>  
  
 
|- style="font-size:11pt" align="center" valign="center"
 
|- style="font-size:11pt" align="center" valign="center"
Zeile 188: Zeile 190:
 
|style="background-color:#FCD5B4" align="center" | in-code
 
|style="background-color:#FCD5B4" align="center" | in-code
 
|style="background-color:#E6B9B8" align="center" | jimmy
 
|style="background-color:#E6B9B8" align="center" | jimmy
|style="background-color:#C5D9F1" colspan="2" rowspan="16" | <small><source lang="inform">
+
|style="background-color:#C5D9F1" colspan="2" rowspan="16" | <small><code>
 
[The jimmy is a singular-named and  
 
[The jimmy is a singular-named and  
 
proper-named and inedible and unlit  
 
proper-named and inedible and unlit  
Zeile 214: Zeile 216:
 
   say "The jimmy does not fulfill the  
 
   say "The jimmy does not fulfill the  
 
   intended function of a jimmy since  
 
   intended function of a jimmy since  
   you have pushed it too heavy.".</source></small>
+
   you have pushed it too heavy.".</code></small>
  
 
|- style="font-size:11pt"
 
|- style="font-size:11pt"
Zeile 314: Zeile 316:
 
|style="background-color:#FCD5B4" align="center" | in-code
 
|style="background-color:#FCD5B4" align="center" | in-code
 
|style="background-color:#E6B9B8" align="center" | small coffin
 
|style="background-color:#E6B9B8" align="center" | small coffin
|style="background-color:#C5D9F1;font-size:11pt" colspan="2" rowspan="17" | <small><source lang="inform">The big coffin is a container in Cemetery.
+
|style="background-color:#C5D9F1;font-size:11pt" colspan="2" rowspan="17" | <small><code>The big coffin is a container in Cemetery.
 
The small coffin is an edible container  
 
The small coffin is an edible container  
 
in big coffin.
 
in big coffin.
Zeile 321: Zeile 323:
 
The carrying capacity of small coffin is 1.
 
The carrying capacity of small coffin is 1.
 
The carrying capacity of big coffin is 10.
 
The carrying capacity of big coffin is 10.
The hammer is a lit thing in small coffin.</source></small>  
+
The hammer is a lit thing in small coffin.</code></small>  
  
 
|-  
 
|-  
Zeile 505: Zeile 507:
  
 
|-  
 
|-  
|style="background-color:#C5D9F1" colspan="4" height="242" | <source lang="inform">The degree is a kind of value.
+
|style="background-color:#C5D9F1" colspan="4" height="242" | <code>The degree is a kind of value.
 
The degrees are low and middle and high and pathologic.
 
The degrees are low and middle and high and pathologic.
 
The player has a degree called alcohol level.
 
The player has a degree called alcohol level.
Zeile 526: Zeile 528:
 
A bottle of mineral water is a edible thing. A bottle of mineral water is in the house.
 
A bottle of mineral water is a edible thing. A bottle of mineral water is in the house.
 
Instead of drinking bottle of mineral water:
 
Instead of drinking bottle of mineral water:
change the alcohol level of the player to low.</source>
+
change the alcohol level of the player to low.</code>
 
|style="font-size:11pt"  valign="bottom" | &nbsp;
 
|style="font-size:11pt"  valign="bottom" | &nbsp;
  
Zeile 773: Zeile 775:
  
 
|- style="font-size:11pt"
 
|- style="font-size:11pt"
|style="background-color:#C5D9F1" colspan="3" height="138" align="center" | <source lang="inform">A scene has a number called step.
+
|style="background-color:#C5D9F1" colspan="3" height="138" align="center" | <code>A scene has a number called step.
 
Call on nature is a non-recurring scene.
 
Call on nature is a non-recurring scene.
 
Call on nature begins when play begins.
 
Call on nature begins when play begins.
Zeile 793: Zeile 795:
 
         "[the player's surroundings] / [turn count] turns / [score] points";
 
         "[the player's surroundings] / [turn count] turns / [score] points";
 
change the right hand  status line to "[time of  day]".
 
change the right hand  status line to "[time of  day]".
</source>
+
</code>
 
|  valign="bottom" | &nbsp;
 
|  valign="bottom" | &nbsp;
  
Zeile 869: Zeile 871:
  
 
|- style="font-size:11pt"
 
|- style="font-size:11pt"
|style="background-color:#C5D9F1" colspan="3" height="182" align="center" | <source lang="inform">Justice relates people (called x) to another  
+
|style="background-color:#C5D9F1" colspan="3" height="182" align="center" | <code>Justice relates people (called x) to another  
 
(called y) when the being of x is the being of y.
 
(called y) when the being of x is the being of y.
  
Zeile 881: Zeile 883:
 
when Sokrates equals the player:
 
when Sokrates equals the player:
 
say "You are my friend".
 
say "You are my friend".
</source>
+
</code>
 
|  valign="bottom" | &nbsp;
 
|  valign="bottom" | &nbsp;
  
Zeile 984: Zeile 986:
  
 
|- style="font-size:11pt"
 
|- style="font-size:11pt"
|style="background-color:#C5D9F1" colspan="3" height="94" align="center" | <source lang="inform">Instead of unjust action when the being of the player is just:
+
|style="background-color:#C5D9F1" colspan="3" height="94" align="center" | <code>Instead of unjust action when the being of the player is just:
 
     say "I cannot do this because of my moralic Being.";
 
     say "I cannot do this because of my moralic Being.";
 
     increase UnjustDeeds of player by 1;
 
     increase UnjustDeeds of player by 1;
 
     decrease the score by 10.
 
     decrease the score by 10.
</source>
+
</code>
 
|  valign="bottom" | &nbsp;
 
|  valign="bottom" | &nbsp;
  
Zeile 1.063: Zeile 1.065:
  
 
|- style="font-size:11pt"
 
|- style="font-size:11pt"
|style="background-color:#C5D9F1" colspan="3" height="103" align="center" | <source lang="inform">When the blue-monday-feeling begins  
+
|style="background-color:#C5D9F1" colspan="3" height="103" align="center" | <code>When the blue-monday-feeling begins  
 
when player is in house,  
 
when player is in house,  
 
     say "I think that I will be  
 
     say "I think that I will be  
Zeile 1.069: Zeile 1.071:
  
 
Every turn when the blue-monday-feeling is happening,  
 
Every turn when the blue-monday-feeling is happening,  
     say "I feel so slumberous".</source>
+
     say "I feel so slumberous".</code>
 
|  valign="bottom" | &nbsp;
 
|  valign="bottom" | &nbsp;
  
Zeile 1.194: Zeile 1.196:
  
 
|- style="font-size:11pt"
 
|- style="font-size:11pt"
|style="background-color:#C5D9F1" colspan="3" height="86" align="center" | <source lang="inform">Rule for Soultransferring someone (called the target)
+
|style="background-color:#C5D9F1" colspan="3" height="86" align="center" | <code>Rule for Soultransferring someone (called the target)
 
(this is the soultransfer rule):
 
(this is the soultransfer rule):
 
say "[paragraph break]I hope you enjoy being [the target].  
 
say "[paragraph break]I hope you enjoy being [the target].  
 
             Conversion is excluded[line break]";
 
             Conversion is excluded[line break]";
 
change the command prompt to "> ";
 
change the command prompt to "> ";
change player to the target.</source>
+
change player to the target.</code>
 
|  valign="bottom" | &nbsp;
 
|  valign="bottom" | &nbsp;
  
Zeile 1.261: Zeile 1.263:
  
 
|- style="font-size:11pt"
 
|- style="font-size:11pt"
|style="background-color:#C5D9F1" colspan="3" height="99" align="center" | <source lang=inform>
+
|style="background-color:#C5D9F1" colspan="3" height="99" align="center" | <code>
 
[Sample A]
 
[Sample A]
 
To pageswitch (whatever - a book):
 
To pageswitch (whatever - a book):
Zeile 1.309: Zeile 1.311:
 
[muse]What makes a picture an artifact is  
 
[muse]What makes a picture an artifact is  
 
the frame, as Simmel says. [muse]Does that make a work  
 
the frame, as Simmel says. [muse]Does that make a work  
of art a frame-work? [muse]".</source>
+
of art a frame-work? [muse]".</code>
 
|  valign="bottom" | &nbsp;
 
|  valign="bottom" | &nbsp;
  

Aktuelle Version vom 4. Oktober 2016, 22:15 Uhr

<root> <div class='right_side_navigation' style='width:156px;position:fixed;bottom:50px;background-color:#efefef;border-color:#bbbbbb;border-width:1pt;border-style:solid;padding:1px 2px;font-size:8pt;text-align:center;filter:alpha(opacity=90);-moz-opacity: 0.9;opacity: 0.9;'> Navigation (PSI)<br> Hauptseite (alt)<br> Hauptseite (Endspurt)<br> recent changes<br> Alle Seiten

Development<br> Endspurt<br> Dev-Talk<br> ChangeLog<br> Repository<br> Global Mindset V4<br /> Szenariosammlung<br /> Projekt-Präsentation

</div><ignore><includeonly></ignore><ignore></includeonly></ignore></root>

Was ist das hier?

Ich möchte mir kurz überlegen, welche Elemente in einer Interactive Fiction vorkommen können (oder manchmal: müssen). Wenn man die Elemente kennt, muss man sich fragen…:

  • wie man die Elemente näher beschreiben kann (descriptions, initial appearances, properties, …),
  • in welche Struktur(en) sie eingebettet sind (Actions, Rules, Scenes, Relationen,…) und
  • wie die Struktur genau ausschaut (To-Phrasen, Aktivitäten, Algorithmen, Schleifen, ...).

Über die Sinnhaftigkeit einer Rahmenstruktur

Natürlich kann man einwenden, dass die geistige Flexibilität durch eine solche Rahmenstruktur eingeschränkt wird, da man dem Inhalt durch sie bereits voreingenommen entgegentritt. Andererseits ist der Einsatz einer solchen Struktur verständlich: Sie ermöglicht die Umsetzung durch ein Minimum an Kompatibilität zwischen inhaltlichen Überlegungen und technischen Einschränkungen. Mein Lösungsvorschlag aus diesem Dilemma: Die Rahmenstruktur aus Sicht jener Struktur, die sich aus den inhaltlichen Überlegungen ergibt, in Frage stellen und (falls I7 uns das erlaubt) anpassen.

Es folgt nun also der Versuch, I7-Konzepte in Elemente, Elementspezifikationen, Strukturen, Strukturspezifikationen einzuteilen. Wir sollten prüfen, ob das eine viable Einteilung und Auflistung ist:

Elemente

(eine vollständige Auflistung der Elemente und auch der Elementspezifikationen findet man in der I7-Entwicklungsumgebung unter INDEX / KINDS. Ich habe versucht, die wichtigsten zusammenzufassen)

  • Räumliche Struktur: room, region, door
  • Zeug: thing, supporter, container, device, <other kinds>
  • Kulisse: scenery, backdrop
  • Akteure und Akteurzeug: person (man, woman, animal), player, player’s holdall, <actor>’s holdall

Elementspezifikationen

Räume

Spezifikation für Räume
Struktur Beispiel I7-Codebeispiel
Property Value Inhalt
identifier in-code my house My house is a dark room.

The map region of my house is Retz. Grandmas house is a lighted room in Retz. My house is north of grandmas house. The description of my house is "Nice house with [windowcount] windows." The printed name of my house is "AKAdemie". My house has a number called windowcount. The windowcount of my house is 6.

description text "Nice house with...."
printed name text "AKAdemie"
map region region Retz
lighted/dark either/or dark
<new property>
windowcount
<some value>
number
6
is <D> of <R> <D>… Direction
<R>… Room
is north of grandmas house

Türen

Spezifikation für Türen
Struktur Beispiel I7-Codebeispiel
Property Value Inhalt
identifier in-code golden door The Cemetery and the Church

are lighted rooms in Retz. The jimmy is a thing in Cemetery. The golden door is a door. The golden door is locked and unopenable. The description of the golden door is " [if the player is in the church] This is the exit of the church [otherwise] This is the entrance of the church [end if]". The matching key of the golden door is the jimmy. The golden door is inside of Church and outside of Cemetery.

description text "[if...]..."
printed name text default: identifier
open/closed either/or closed
openable/unopenable either/or unopenable
unlocked/locked either/or locked
unlockable/lockable either/or lockable
matching key thing jimmy
<new property> <some value>  
is <D> of <R> and
<D> of <R>
<D>… Direction
<R>… Room
is north of grandmas house


Dinge

Spezifikation für Dinge
Struktur Beispiel I7-Codebeispiel
Property Value Inhalt
identifier in-code jimmy

[The jimmy is a singular-named and proper-named and inedible and unlit and portable thing.]

The printed name of jimmy is "rusty jimmy". The initial appearance of jimmy is "Oh, what's this? A thief may lost this jimmy...". The jimmy is initially carried.

The description of jimmy is "[if proper-named]A jimmy. So what? [otherwise]A broken jimmy[end if]".

Understand "rusty jimmy" as jimmy.

Instead of pushing jimmy:

 now the jimmy is improper-named;
 say "Oh no. The jimmy brake down...".

Instead of unlocking the golden door with jimmy when jimmy is improper-named,

 say "The jimmy does not fulfill the 
 intended function of a jimmy since 
 you have pushed it too heavy.".
kind kind thing
description text "[if proper-named]…"
printed name text rusty jimmy
initial
appearance
text "Oh… whats this? …"
not wearable/
wearable
either/or default: not wearable
singular-named/
plural-named
either/or singular-named
proper-named/
improper-named
either/or proper-named
edible/inedible either/or inedible
initially carried either/or yes
portable/fixed in place either/or portable
pushable between rooms either/or yes
unlit/lit either/or unlit
scenery Zuweisung no
located in <R>
located in <C>
located at
<R>… Room
<C>… Container
… Supporter
located in player's holdall
(weil initially carried)
<new property> <some value>  


Container

Spezifikation für Container
Struktur Beispiel I7-Codebeispiel
Property Value Inhalt
identifier in-code small coffin The big coffin is a container in Cemetery.

The small coffin is an edible container in big coffin. The description of the small coffin is "It is made of marzipan." The carrying capacity of small coffin is 1. The carrying capacity of big coffin is 10. The hammer is a lit thing in small coffin.

kind kind container
description text "It is made of marzipann."
printed name text default: identifier
initial appearance text "Oh… whats this? …"
not wearable/
wearable
either/or default: not wearable
singular-named/
plural-named
either/or singular-named
proper-named/
improper-named
either/or proper-named
edible/inedible either/or edible
initially carried either/or default: no
portable/
fixed in place
either/or portable
pushable
between rooms
either/or no
unlit/lit either/or unlit
scenery Zuweisung no
located in <R>
located in <C>
located at
<R>… Room
<C>… Container
… Supporter
located in big coffin
(located in Cemetery)
carrying capacity number 1
<new property> <some value>  

Strukturen

  • Understandings
  • Aktionen
  • Gruppen von Aktionen
  • Regeln
    • Regelbücher für Aktionen (Check, Carry Out, Report)
    • Aktions-bezogene Regeln (Instead of, After, Before, Persusation, Unsuccessful attempt)
    • Zeitbezogene Regeln (Every Turn, Spielbeginn, Spielende, Szenenbeginn, Szenenende)
    • Individuelle Regeln/Regelbücher
    • Prozedurale Regeln
    • Aktivitäts-bezogene Regeln (Before, For, After)
  • Aktivitäten
  • Szenen
  • Relationen
  • Phrasen (To, To-say,

Aktionen, Understandings, Regeln (und evt. Szenen) sind eng miteinander verknüpft.

Aktivitäten und Aktivitäts-bezogene Regeln sind eng miteinander verknüpft.

Szenen und Zeitbezogene Regeln sind eng miteinander verknüpft

Strukturspezifikationen

Understandings

Es ist zunächst wichtig, zwischen Aktionen und Spieler-Befehlen zu unterscheiden. Spieler-Befehle sind sprachliche Ausdrücke, die der Spieler eingibt. Die sprachlichen Ausdrücke (genannt: Topics) verursachen eine Aktion, sofern es ein Standard-Befehl ist oder eine passende Understand-Phrase im Code festgelegt wurde.

Man kann zwischen verschiedenen Arten von Understandings unterscheiden:

  • Befehl: Spieler-Befehl, der eine Aktion verursacht
  • Alias: Ausdruck, der synonym zu einem Objektnamen verwendet werden kann
  • Mistake: Understandings, die nur eine Textmeldung verursachen und Vorrang gegenüber anderen Understandings haben ( vgl. hier )

Zusätzlich sollte man angeben, unter welchen Bedingungen ein sprachlicher Ausdruck auf bestimmte Weise verstanden werden soll. (z.B könnte kill the soldier nur in der Szene „Gemetzel“ zur Aktion kill [a person] führen).

Ich schlage vor, Understandings folgendermaßen zu spezifizieren (da man mit Understand auch noch andere Dinge machen kann, habe ich <Other> in der "Typ"- und "führt zu"-Zeile reingeschrieben. Wenn man nicht weiß, wie man den Zusammenhang in die Rahmenstruktur bringt, können Ausnahmefälle bei "zusätzliche Bemerkungen" beschrieben werden):


Spezifikation für Understandings  
 
Struktur Beispiel Beispiel 2  
Property Value / Beschreibung  
Typ (Befehl|Alias|Mistake|Other) Befehl Mistake  
Topic Ausdruck, den die Spielerin eingibt "read [book]" "read [book]"  
führt zu (Aktion|Objekt|Befehl|Text|Other) Aktion: reading Text "reading is too…"  
Bedingungen (Szene X läuft|Akteur im Raum R|…)
Alles, was wahr oder falsch sein kann
keine Szene "blue-Monday-feeling" läuft  
zusätzliche
Bemerkungen
Warum wird diese Verbindung hergestellt?   kann man auch mit einer Check-Rule
machen, aber so geht’s auch.
 
I7-Code  
 
The degree is a kind of value.

The degrees are low and middle and high and pathologic. The player has a degree called alcohol level.

A blue-monday-feeling is a scene. Blue-monday-feeling begins when the alcohol level of the player is high or the alcohol level of the player is pathologic. Blue-monday-feeling ends when the alcohol level of the player is low or the alcohol level of the player is middle.

Understand "read [book]" as a mistake ("Reading is too productive in betray of my actual constitution") when blue-monday-feeling is happening. Understand "read [book]" as reading [when blue-monday-feeling is not happening].

When play begins, change the alcohol level of the player to high. When the blue-monday-feeling begins, say "I think that I will be unable to do something productive the next time...". When the blue-monday-feeling ends, say "I will never again drink alcoholics.".

A bottle of mineral water is a edible thing. A bottle of mineral water is in the house. Instead of drinking bottle of mineral water: change the alcohol level of the player to low.

 


Ein kleiner Hinweis: Man sollte das Standard-Befehlsset (Index/Actions/“Commands available to the player“) verwenden und nur dort, wo es semantisch notwendig ist, zusätzliche Befehle durch Understandings festlegen. Es ist kein Problem, wenn sowohl ein Standardbefehl als auch ein selbst erstellter Befehl auf eine Aktion gemapped werden. Schwierig für die Spieler wird es erst dann, wenn ausschließlich individuelle Befehle verwendet werden, die man im Kontext des Spiels und der vorhergehenden Beschreibungen schwer bis gar nicht erraten kann.

Aktionen

Um eine Aktion grob zu spezifizieren, sind folgende Angaben wichtig:

Spezifikation für Aktionen  
 
Struktur Beispiel  
Property Value / Beschreibung  
Aktionsname <Verb> + ing destroying  
Objektbezug (visible thing|thing|room|nothing|text|topic)
Visible thing bedeutet, man braucht das Ding
nicht angreifen, es reicht, wenn es sichtbar ist.
thing  
Licht? (yes|no) default: no yes  
informelle
Beschreibung
Was wird durch die Aktion bewirkt und was
sind die Bedingungen für das Ausführen der Aktion?
Das ist sinnvoll, wenn man nur weiß, dass man die
Aktion brauchen wird, aber die Regeln noch nicht explizit
definiert werden (z.B. weil eine andere Arbeitsgruppe dafür verantwortlich ist oder weil man gerade keine Zeit dafür hat).
Vorbedingung: Man kann nur Bücher lesen. Das Buch ist offen (wenn nicht - öffne es).

Wirkung: Es wird der Inhalt der linken und rechten Seite des Buches angezeigt.

Bericht: Einen Hinweis einbauen, dass man zum Weiterlesen umblättern muss (vgl. Aktion browse)
 
I7-Code  
 
Reading is an action applying to one thing requiring light.  



Für jede Aktion werden explizit 3 Regelbücher erstellt (Prüfen,Durchführen,Berichten), die aber jeweils leer bleiben können, doch dazu später.

Gruppen von Aktionen

  • Aktionsgruppen, auf die man später zum Beispiel in Regeln Bezug nehmen kann (vgl. hier) :


Spezifikation für Aktionsgruppen  
 
Struktur Beispiel  
Property Value / Beschreibung  
Name Name der Gruppe unjust action  
Liste der
Aktionen
Aktion1
Aktion2
Aktion3
attacking
drinking
stealing
 
Zweck der
Verwendung
Warum wird diese Gruppe definiert?
Wofür könnte sie eingesetzt werden?
Man kann damit alle ungerechten Handlungen
klassifizieren und dann eine Regel erstellen,
wodurch ungerechte Handlungen nur von
ungerechten Personen durchgeführt werden können.
 
I7-Code  
 
Attacking is unjust action.
Drinking is unjust action.
Stealing is unjust action.
 

Aktivitäten

Spezifikation für Aktivitäten  
 
Struktur Beispiel  
Property Value / Beschreibung  
Name Name der neuen Aktivität Soultransferring  
Objektbezug (something|nothing) something  
Variablen (können von den Regeln
geändert/gelesen werden)

Variablen anzugeben wird nur sinnvoll sein,
wenn man schon relativ konkrete
Vorstellungen hat, was die Aktivität
bezwecken soll.

<Value1> genannt <Name1>
/  
informelle
Beschreibung
Was wird durch die Aktivität ausgeführt
und was sind die Bedingungen für das
Ausführen der Aktivität? Unter welchen
Umständen wird die Aktivität aufgerufen?
Diese Beschreibung ist sinnvoll, wenn man nur
weiß, dass man die Aktivität brauchen wird,
aber die Regeln noch nicht explizit definiert
werden (mangels Zeit, fehlender Details
oder anderer Verantwortungsbereich).
Der Spieler wird aufgrund seiner
im Spiel bekannt gegebenen Wahl
in eine andere Person transferiert.
Diese Aktivität triggert im Kontext
des Spiels "Sein und Schein V2"
das Ende der Szene
"Carry on Nature", in der sogut
wie alle üblichen I7-Befehle
suspendiert sind. Das eigentliche
interaktive Spiel beginnt erst
danach.
 
I7-Code  
 
Soultransferring something is an activity.  

Szenen

Spezifikation für Szenen  
 
Struktur Beispiel  
Property Value / Beschreibung  
Typ (Wiederkehrend|Einmalig) Einmalig  
Name Name der Szene Call on Nature  
Start-
Bedingung
Unter welchen Umständen beginnt die Szene?
Alles, was wahr oder falsch sein kann
(Wenn Szene S endet, Wenn Punktezahl >10,…)
Wenn das Spiel beginnt  
End-
Bedingung
Unter welchen Umständen endet die Szene?
Alles, was wahr oder falsch sein kann
(Wenn Szene S endet, Wenn Punktezahl >10,…)
Wenn der Spieler nicht mehr im Himmel ist  
Plot Was passiert?
Welche Rätsel/Aufgaben sind zu bewältigen?
Welche Gegenstände zu holen?
Sind besondere Regeln/Aktivitäten wichtig?
* Der Spieler muss nur die gestellten Fragen beantworten
* Das Standard I7-Verhalten ist suspendiert
* Die Eingaben werden mit After reading a command-Regeln abgefangen
 
Ausgang Wie endet die Szene? Interessant, wenn man
mehrere Ausgänge vorsieht und Daran
"Zeitbasierte Regeln" (When Szene x ends happily…)
anknüpft.
/  
I7-Code  
 
A scene has a number called step.

Call on nature is a non-recurring scene. Call on nature begins when play begins. Call on nature ends when the player is not in heaven. The step of call on nature is 0. When Call on nature begins: clear the screen; now the step of call on nature is 1; say "[paragraph break][paragraph break][step of call on nature]:

       Why do you think you are here? You think you can relax with 
       playing a simple interactive fiction?";

change the command prompt to "(Y/N)? "; stop the action.

When Call on nature ends: say "[paragraph break]Nature left you alone with your new destiny"; change the command prompt to "> "; change the left hand status line to

       "[the player's surroundings] / [turn count] turns / [score] points";

change the right hand status line to "[time of day]".

 

Relationen

  • Im Prinzip sind Relationen Eigenschaften, die einem Ding verglichen mit einem anderen Ding zukommen.
  • Prädikatenlogische Interpretation: Eine Relation ist ein Prädikat, das ein Individuum näher bestimmmt.
  • Graphentheoretische Interpretation: Relationen sind Kanten. Sie verbinden zwei Knoten miteinander.
  • Technische Details gibt's hier
  • "the stone, and the table, have no opinions, emotions, knowledge or memory. If the stone is taken away and then put back, nothing has changed. People, on the other hand, tend to remember having met each other before; they like being in some places, but not others; their behaviour depends on who, or what, is nearby. Being conscious, they have internal states, unlike the stone. Relations are a simple but powerful way to express and talk about such connections, and although they have numerous uses in physical contexts too, they are at their most powerful when helping to make the characters of interactive fiction come alive."


Spezifikation für Relationen  
 
Struktur Beispiel  
Property Value / Beschreibung  
Name Name der Relation Justice  
Objekte Welche Objektarten werden verbunden?
Links: <thing|room|person|new kind>
Rechts: <thing|room|person|new kind>

ggf. Name der rechten Seite (Ehepartner, Haustier
, Freundin, Bruder,…)
Links: People
Rechts: People
 
Quantität * 1-zu-1 Beziehung
* 1-zu-Viele-Beziehung
* Viele-zu-1-Beziehung
* Viele-zu-Viele-Beziehung
* Gruppen-Beziehung
* Bedingung wann Relation zutrifft
Bedingung:
Wenn das Sein
der Personen gleich ist
 
Typ (S|A)
S… Symmetrisch (nur: 1-zu-1, Viele-zu-Viele)
A… Asymmetrisch

S: Relation geht in beide Richtungen
A: geht nur in eine Richtung (default)
S  
Verben to / to be <Verb> (normal oder invers)

( wenns schräge Verben sind,
dann mit Beugung . Es kann
sinnvoll sein, mehrere Verben
anzugeben, die diese Relation
implizieren. Wenn das Verb von
rechts nach links verstanden
werden soll, "invers" angeben)
to resemble
to equal
 
Bemerkungen Ideen, wo man die Relation einsetzen kann;
andere Implementierungsdetails
etc.
/  
I7-Code  
 
Justice relates people (called x) to another

(called y) when the being of x is the being of y.

The verb to resemble (it resembles, they resemble,

it resembled) implies the justice relation.

The verb to equal (it equals, they equal, it equaled) implies the justice relation.

Instead of asking Sokrates about something when Sokrates equals the player: say "You are my friend".

 


Regeln

Wenn man sich Regeln überlegt, sollte man ein bisschen ein Verständnis über die technischen Hintergründe haben, die hier und hier zu finden sind.

Regelbücher für Aktionen

Es gibt folgende Typen von Regeln, die auf eine bestimmte Aktion Bezug nehmen (die Liste ist nach der Reihenfolge, nach der die Regeln geprüft werden, geordnet):

  • BEFORE: Hier kann man gut Ergänzungen für Standard-Regeln unterbringen
    • Persuasion (nur für NPCs wichtig): Die Regel gibt Antwort auf die Frage, ob ein NPC der Aufforderung, etwas zu tun, nachkommen soll.
  • INSTEAD OF: Mit dieser Regel kann man üblicherweise Regeln von Standard-Aktionen/Aktionsgruppen blockieren. Das heißt, nach einer Instead-Of-Regel wird standardmäßig mit „STOP THE ACTION“ abeschlossen.
  • CHECK: Regelbuch, indem geprüft wird, ob für die Aktion nötige Vorbedingungen erfüllt sind. Falls nicht, wird abgebrochen.
    • Unsuccessful Attempt By (nur für NPCs wichtig): Ein NPC würde gern der Aufforderung nachkommen, kann aber nicht, weil es CHECK- oder INSTEAD-OF-Regeln der Welt nicht erlauben
  • CARRY OUT: Die Regeln dieses Regelbuchs führen die Aktion aus, d.h. verändern bestimmte Zustände der Welt, der Spielfigur, etc. Hier sollte wenn möglich kein Text ausgegeben werden.
  • AFTER: Solche Regeln sind nützlich für Szenen-Wechsel (wenn eine solche Regel existiert, wird die Report-Regel üblicherweise unterdrückt).
  • REPORT: Hier soll Text ausgegeben werden, der dokumentiert, was in CARRY OUT passiert ist.


Zur Spezifikation dieser Regelarten schlage ich folgenden Rahmen vor:

Spezifikation für nur-Aktions-bezogene Regeln  
 
Struktur Beispiel  
Property Value / Beschreibung  
Typ ( Before | Persusasion | Instead of |
Check | Unsuccessful Attempt |
Carry out | After | Report )
Instead of  
Name Name der Regel (wenn gewünscht) /  
Reihenfolge (nur, wenn gewünscht; Bezugspunkt ist
immer das durch den Typ festgelegte
Regelbuch)

ganz am <Anfang|Ende>
<vor|nach|statt> Regel <R>
/  
Betroffene
Aktion oder
Aktionsgruppe
<Aktion|Aktionsgruppe> Aktionsgruppe: unjust action  
Akteur (alle|nur NPC|nur Spieler) alle  
Bedingungen Alles, was wahr oder falsch sein kann wenn das Sein des Spielers
gerecht ist
 
informelle
Beschreibung
* Was wird durch die Regel getan?
* Was ist durch sie erlaubt/verboten?
* Was wird durch sie verändert?
* Welche Aktivitäten führt sie ungefähr aus?
(evt. I7-Codestücke zur Verdeutlichung)
* say "I cannot do this because
of my moralic behaviour"

* erhöhe den Zähler der un-
gerechten Taten um 1.

* vermindere die Punktezahl um 10
 
Ergebnisse
(Outcome)
Bedingungen angeben für:
<Erfolg|Misserfolg|benanntes Ergebnis>
der Regel --> Regelbuch wird nicht weiter verarbeitet

Ergebnis unentschieden --> nächste Regel
im Regelbuch

Geplante Verwendung von Ergebnissen
(in Aktionen, anderen Regeln, …)
unter allen Bedingungen:
Regelstatus unentschieden
 
Benannte
Ergebnisse
<Ausdruck1> bedeutet
<Erfolg|Misserfolg|Unentschieden>
keine  
I7-Code  
 
Instead of unjust action when the being of the player is just:
   say "I cannot do this because of my moralic Being.";
   increase UnjustDeeds of player by 1;
   decrease the score by 10.		

 

Zeitbasierte Regeln

Spezifikation für Zeitbasierte Regeln  
 
Struktur Beispiel  
Property Value / Beschreibung  
Typ When play begins, When play ends,
When scene S begins,
When scene S ends, Every turn
When scene begins
scene: blue-Monday-feeling
 
Name Name der Regel (wenn gewünscht) /  
Reihenfolge (nur, wenn gewünscht; Bezugspunkt ist
immer das durch den Typ festgelegte
Regelbuch)

ganz am <Anfang|Ende>
<vor|nach|statt> Regel <R>
/  
Bedingungen Alles, was wahr oder falsch sein kann wenn Spieler im Haus ist  
informelle
Beschreibung
Was wird durch die Regel getan?
Was ist durch sie erlaubt/verboten?
Was wird durch sie verändert?
Welche Aktivitäten führt sie ungefähr aus?
(evt. I7-Codestücke zur Verdeutlichung)
* say "I feel so slumberous"  
Ergebnisse
(Outcome)
Bedingungen angeben für:
* <Erfolg|Misserfolg|benanntes Ergebnis>
* Ergebnis unentschieden

Geplante Verwendung von Ergebnissen
(in Aktionen, anderen Regeln, …)
unter allen Bedingungen:
Regelstatus unentschieden
 
Benannte
Ergebnisse
<Ausdruck1> bedeutet
<Erfolg|Misserfolg|Unentschieden>
keine  
I7-Code  
 
When the blue-monday-feeling begins

when player is in house,

    say "I think that I will be 
    unable to do something productive the next time...".

Every turn when the blue-monday-feeling is happening,

    say "I feel so slumberous".
 


Prozedurale Regeln

  • Diese Spezifikation verwendet man, wenn man bestehende oder bereits definierte Regeln unter bestimmten Umständen nicht oder schon oder anders verwenden möchte (dazu vgl. hier )
  • Gibt es keine speziellen Umstände, braucht man auch keine Prozedurale Regel
  • Prozedurale Regeln kann man als Metaregeln ansehen, die dazu führen, dass unter bestimmten Bedingungen (z.B. in einer bestimmten Szene) bestimmte Regeln (z.B. die Regel, dass die Zeit vergeht) anders als normalerweise anwenden (unterdrücken oder mit einer anderen Regel ersetzen)


Spezifikation für Prozedurale Regeln  
 
Struktur Beispiel  
Property Value / Beschreibung  
Aktion * Regel <R> ignorieren
* <R> durch <R2> ersetzen
* ignorierte <R> wiederherstellen
* Ergebnis von <R> unterdrücken
* ignoriertes Ergebnis von <R> wiederherstellen
* verschiebe <R> (vor|nach> <R2>
Die "Turn Sequence Rules"
ignorieren
 
Bedingungen Alles, was wahr oder falsch sein kann wenn eine Aktion der
Aktionsgruppe "acting fast"
ausgeführt wird
 
Bemerkungen Warum braucht man diese Prozedurale Regel?
Was will man damit für ein Verhalten erzielen?
Alle Aktionen, die man in dieser
Aktiongruppe definiert, performen
schneller, weil ein Haufen von
komplexen und oft auftretenden
Regeln ignoriert werden.
 
I7-Code  
 
Procedural rule when acting fast: ignore the turn sequence rules.  

Regeln für Aktivitäten

Spezifikation für Aktivitäts-bezogene Regeln (Object-parametrized rulebooks)  
 
Struktur Beispiel  
Property Value / Beschreibung  
Typ (Before |For | After) For  
Name Name der Regel (wenn gewünscht) the soul transfer rule  
Reihenfolge (nur, wenn gewünscht; Bezugspunkt ist
immer das durch den Typ festgelegte
Regelbuch)

ganz am <Anfang|Ende>
<vor|nach|statt> Regel <R>
/  
Betroffene Aktivität <Aktivität> Soultransferring <someone>  
Bedingungen wenn <andere Aktivität> (nicht) läuft /  
Beschreibung Was wird durch die Regel getan?
Was ist durch sie erlaubt/verboten?
Was wird durch sie verändert?
Welche Aktivitäten führt sie ungefähr aus?
(evt. I7-Codestücke zur Verdeutlichung)
* Glückwunsch-Text zum neuen Körper
* Befehlsprompt auf Standard ändern
* Spielerin auf "target"-Person ändern
 
I7-Code  
 
Rule for Soultransferring someone (called the target)

(this is the soultransfer rule): say "[paragraph break]I hope you enjoy being [the target].

            Conversion is excluded[line break]";

change the command prompt to "> "; change player to the target.

 


Individuelle Regeln / Regelbücher

Phrasen

Spezifikation für Hilfsfunktionen / neue Adjektive  
 
Struktur Beispiel  
Property Value / Beschreibung  
Typ * A: Hilfsfunktion ohne Rückgabewert
* B: Hilfsfunktion mit ja|nein-Rückgabewert (wann trifft Adjektiv zu?)
* C: Hilfsfunktion mit Rückgabe <thing|room|…>
* D: Hilfsfunktion für Verwendung in Textausgaben
4 Beispiele:
* A
* B
* C (Rückgabe "number")
* D
 
Parameter/
Argument
Bezeichnung - Typ * A: whatever - a book
* B: /
* C: bookvar - a book
* D: /
 
Funktionsname * B: Adjektivname
* A,C,D: Funktionsname (+ optionale Teile)
* A: pageswitch <whatever>
* B: the turn count is even
* C: maximum page of <bookvar>
* D: muse
 
Informelle
Beschreibung
A,C,D: Was tut die Hilfsfunktion?
B: Wie entscheidet die Funktion, ob das Adjektiv
zutrifft?
* A: Wechselt auf die nächste Seite
* B: Ist Bewegungsanzahl gerade?
* C: Seitenzahl bestimmen
* D: Abkürzung für Tastendruck
und Zeilenumbruch
 
I7-Code  
 

[Sample A] To pageswitch (whatever - a book): if whatever is not a book begin; say "[printed name of the noun] is not a book."; end if;] Let L be the list of pages which are part of the noun; repeat with item running through L begin; [change the item of whatever to page the page number of item.] let x be the page number of the item; increase x by 2; let newcontent be content of noun at page x; if newcontent is empty begin; say "I can not browse on. This is the end of the book."; break; else; increase the page number of item by 2; now the text of the item is newcontent; end if; end repeat.


[Sample B - stolen from Documentation] To decide whether the turn count is even:

   if the remainder after dividing the turn count by 2 is 0, yes; 
   no. 

[Sample C] to decide what number is maximum page of (bookvar - a book): let max be 0; repeat with N running from 1 to the number of filled rows in Table 1.0 begin; if thing in row N of Table 1.0 is bookvar begin; let x be page in row N of Table 1.0; if x is greater than max begin; let max be x; end if; end if; end repeat; decide on max.


[Sample D (code from H.A.L.)]

To say muse: wait for any key; say line break.

The image gallery is a room. "The room is full of images. [muse]What makes a picture an artifact is the frame, as Simmel says. [muse]Does that make a work of art a frame-work? [muse]".

 


Der source-Tag hat bei diesem Code-Stück irgendwie nicht funktioniert... :|

ja, das Syntax-Highlighting hat leider noch seine Macken. Wenn wie im Sample A eckige Klammern innerhalb eckiger Klammern auftauchen, schafft das leider Unruhe. Wenn sich da einer der Herren Informatiker berufen fühlt, die inform.php zu verbessern, würde mich das sehr freuen... --Thai 13:03, 19. Mär. 2009 (UTC)
Lag an meinem Sourcecode, da war ein [ zuviel.--Andyk 00:41, 25. Mär. 2009 (UTC)