Benutzer Diskussion:Andyk/Mitschriften/Technische I7-Auseinandersetzungen

Aus Philo Wiki
Wechseln zu:Navigation, Suche

<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>

Initial appearance

  • Wenn nach einer Raum-Instanz wie My house is a room, ein Text wie "Schönes, großes Haus." kommt, dann wird der Text der Description-Property zugewiesen.
  • Wenn nach einer Objekt-Instanz wie The apple is a thing. so ein Text kommt, dann wird er der "Initial Appearance"-property zugewiesen. Wenn das Ding von der Spielerin aufgehoben wird, wird AFAIK der Initial appearance-text ausgegeben.

Nicht ganz. Die initial appearance wird auf den Befehl "look" hin ausgegeben, wenn das Ding sich im Raum befindet und der Spieler das Ding noch nie in der Hand hatte (wird über die property "handled" geregelt): <source lang="inform" line enclose="div"> "Don't pick the flowers"

The meadow is a room. "You are standing in a green meadow full of flowers. You might see a sign if you look close enough."

The sign is scenery in the meadow. "'Please don't pick the flowers.'"

The edelweiss is in the meadow. "An edelweiss is rooted firmly in the ground, sprouting delicate petals." The description is "The edelweiss is sprouting delicate petals that may or may not be tattered by an unhandy hand. It may or may not be rooted firmly in the ground."

The gentian is in the meadow. "A gentian is rooted firmly in the ground, sprouting delicate petals." The description is "[if handled]The gentian is severed from its roots[else]The gentian is rooted firmly in the ground[end if]. The petals are [if handled]tattered by an unhandy hand[else]almost too delicate to touch[end if]."

test me with "look / x sign / x edelweiss / take edelweiss / look / drop edelweiss / x edelweiss / look / x gentian / take gentian / x gentian / look / drop gentian / x it / look".

[Initially I wrote: The sign is scenery in the meadow. "A wooden sign would strike your eye if it wasn't scenery." The description is "'Please don't pick the flowers.'" But this led to: Problem. You wrote '"A wooden sign would strike your eye if it wasn't scenery."' , but in another sentence 'The description is "'Please don't pick the flowers.'"'  : but this looks like a contradiction, because the same property seems to be being set in each of these sentences, but with a different outcome. Thus, as "scenery" means that the initial appearance is never printed, a scenery thing doesn't have an initial appearance at all, rather, the text after the naming of the object is treated in the description, like with rooms. Also, the English word for "Edelweiß" appears to be "edelweiss".] </source> --H.A.L. 12:15, 6. Mär. 2009 (UTC)

Wie man bool'sche Eigenschaftswörter definieren kann

Soweit ich das verstanden habe, sind diese Eigenschaftswörter eine handlichere Methode, eine property zu definieren: A person can be grumpy or happy ist äquivalent zu Mood is a kind of value. The moods are grumpy and happy. A person has a mood., aber man muß die property nicht eigens benennen. Sie müssen auch nicht dichotom sein: A person can be grumpy, happy or apathetic ist auch möglich. Oder: A person can be grumpy, happy, angry, joyous, bored or none_of_the_above. - Ich glaube schon, daß das den Prädikaten entspricht. --H.A.L. 11:49, 7. Mär. 2009 (UTC)

To say...

Genau genommen ist die einzige Besonderheit einer To say-Funktion, daß sie von innerhalb eines Strings aufgerufen werden kann. Daß die Funktion selbst Text zurückgibt, ist nur Konvention. Man kann diese Konstruktion auch auf andere Weise nutzen; ich habe dafür mal ein paar Beispiele eingestellt.

In Inform7 liegt vielleicht eine stärkere Betonung auf Strings als in anderen Sprachen. Das ist kein Wunder bei dem Gewicht, das bei IF auf, naja, Text liegt. Dazu gehört, daß man anscheinend nur Strings ausgeben kann und daß alle Variablen nur innerhalb von Strings ausgegeben werden können. Wo es zum Beispiel in JavaScript heißt: document.write("Hallo Welt! Im Moment ist es " + time_of_day + ", und das Wetter momentan ist " + sky.description + "!");, schreibt man in Inform: say "Hallo Welt! Im Moment ist es [time of day], und das Wetter momentan ist [description of the sky]!".

Übrigens kann man tatsächlich eine Variable aufrufen und ihren Wert ad hoc bestimmen, ohne eine "to say"-Funktion zu verwenden:

To decide what text is the pronoun of (greeter - a person):
	if the greeter is neuter, decide on "It";
	if the greeter is female, decide on "She";
	decide on "He".
	
The description of a person usually is "[pronoun of the noun] says 'hello!'".

The cabin is a room. Alex is a man in the cabin. Sam is a woman in the cabin. Jo is a neuter person in the cabin.

Alllerdings kann ich mir vorstellen, daß das bei komplizierteren Ausdrücken umständlich wird.

--H.A.L. 18:19, 8. Mär. 2009 (UTC)