Benutzer:H.A.L./Inform Code-Beispiele

Aus Philo Wiki
< Benutzer:H.A.L.
Version vom 16. Januar 2009, 21:48 Uhr von H.A.L. (Diskussion | Beiträge) (variante der lockable doors demo)
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>

zu technischen Aspekten

verschließbare Türen

"The everlasting quest for paradise, aka Lockable Doors Demo" by H-A-L

The maximum score is 350.

Section 1 - The gate

The Afterlife is a room. The Gate of Heaven is a locked door. It is west from the afterlife and east from the Paradise.

The gold key is in the afterlife. The gold key unlocks the gate.

The description of the afterlife is "You are in the Afterlife, longing for paradise."
The description of the paradise is "You reached Paradise! Hooray!"
The description of the gate is "It stands between you and Paradise. If you only could unlock it!"
The description of the key is "It emits a magical glimmer."

The plaque is a thing in the afterlife. "The author of this afterlife has left his last message to the players on a plaque." The description is "Welcome to the everlasting quest for paradise, aka a demo on how to write lockable doors for my colleagues. Includes an option to win the game."


Section 2 - Nectar

The cup of nectar is an edible thing in the Paradise. The description is "The cup is  made of shining gold and richly decorated with ornaments depicting a bird, a long stick, a king and a man with a beret and bushy sideburns. It contains a lactic liquid emitting a treacly scent." 

Instead of smelling the nectar:
	say "Its aura bewitches your senses while at the same time clearing your mind."
	
Instead of tasting the nectar:
	say "its taste is a strange mix of purification and sweetness. (Wait, is it just me or does that sound like peppermint with honey?)"

Carry out eating the nectar:
	say "Consumption of the divine delicacy ascends your mind to higher planes of understanding.";
	award 351 points;
	end the game in victory.
Understand "drink [something]" as eating.

Section 3 - Testing

test gate with "open gate / unlock gate / key / w / open gate / w / lock gate with gold key / close gate / lock gate with gold key / unlock gate with gold key"

test nectar with "examine nectar / take it / smell it / taste it / drink it"

test me with "test gate / test nectar"

zu technischen + inhaltlichen Aspekten

Musikalische Erziehung. Entscheidungen, Auswirkungen, zeitliche Abläufe. Und satirische Simulationen.

Anm.: Wenn ich mich recht er innere, habe ich die Low-Tech-Version nach der Mid-Tech geschrieben. Dabei habe ich auch ein paar Details verfeinert. - Der im Text erwähnte Marsch war die Titelmusik zu Monty Python's Flying Circus, deswegen die ganzen Python-Referenzen. Alles Wissenswerte dazu gibt es auf der Wikipedia-Seite.

low-tech-version

"It's a man's life at the Cardiff Rooms, Libya" by "H.A.L."

An alternative is a kind of room. The description of an alternative is usually "You have made your choice. Now that it is too late to go back, let's see whether you have chosen wisely. And there is a hostile stranger already approaching with a loaded raspberry! Now all you can do is throw yourself into the battle (-> go inside) and hope you have acquired enough courage!"

The cardiff is a room. The printed name is "The Cardiff Rooms, Libya". Understand "cardiff" or "rooms" or "libya" as the cardiff. The description is "You have to prepare for the big battle. Your task is to choose the music that will teach you the adequate mood for fighting.". The cohen is an alternative. The march is an alternative.

The cohen cd is a door. "In the north, you see a [printed name]." The printed name is "CD called 'Leonard Cohen - Greatest Hits'". Understand "Leonard" or "Cohen" or "Greatest" or "Hits" as the cohen cd. The description is "As the booklet says: 'The cover of Greatest Hits was taken in a mirror of a hotel room in Milan - I rarely ever look this good, or bad, depending on your politics.'"It is north of the cardiff. Through it is the cohen. The march cd is a door. "In the south, you see a [printed name]." The printed name is "CD called 'John Philip Sousa - Liberty Bell March'". Understand "John" or "Philip" or "Sousa" or "Liberty" or "Bell" or "March" as the march cd. The description is "The cover image mainly consists of a huge foot." It is south of the cardiff. Through it is the march.

Depression is inside from the cohen. The description is "You advance the enemy, but then you aren't any sure whether any of this has any meaning at all." After going to depression: say description of location; end the game in death. Vigour is inside from the march. The description is "You vigorously advance the enemy and drop a 16-ton-weight on him! Ha! Take that!" After going to vigour: say description of location; end the game in victory.

test depression with "x cohen / open it / enter it / in". test vigour with "x march / open it / enter it / in".

mid-tech-version

"It's a man's life at the Cardiff Rooms, Libya" by "H.A.L."

A cd is a kind of thing. A cd has some text called title. The title is usually "Oe3 top 20". The printed name of a cd is usually "cd called [title]".

The cohen is a cd. The title is "Leonard Cohen - Greatest hits". 
The description is "As the booklet says: 'The cover of Greatest Hits was taken in a mirror of a hotel room in Milan - I rarely ever look this good, or bad, depending on your politics.'"

The march is a cd. The title is "John Philip Sousa - Liberty Bell March". The description is "The cover image mainly consists of a huge foot."

The player is carrying the march and the cohen.

The gymnasion is a room. The soldier is a man in the gymnasion. The soldier has a number called mood.

Instead of giving something to the soldier:
	say "[The second noun] accepts gladly.";
	now the second noun is carrying the noun;
	increase the mood of the soldier by 1.
Instead of taking something had by the soldier:
	say "The soldier grudgingly returns [the noun] to you.";
	now the player carries the noun;
	decrease the mood of the soldier by 1.
Instead of removing something from the soldier:
	say "[The second noun] reluctantly returns [the noun] to you.";
	now the player carries the noun;
	decrease the mood of the soldier by 1.

Every turn:
	if the soldier has the cohen, decrease the mood of the soldier by 1;
	if the soldier has the march, increase the mood of the soldier by 1;
	if the mood of the soldier is greater than 12, change the mood of the soldier to 12;
	if the mood of the soldier is less than 0, change the mood of the soldier to 0.
	
when play begins:
	change the mood of the soldier to a random number between 5 and 8;
	change the left hand status line to "[mood of the soldier]";
	the attack occurs in 6 minutes from now;
	say "You are chosen to educate the soldier. Your responsibility is to make the right musical choice."

At the time when the attack occurs:
	say "There! A hostile stranger advances with a loaded raspberry!";
	If the mood of the soldier is less than 4:
		say "The soldier just sits there and doesn't do anything. The enemy beats you to pulp.";
		end the game in death;
	else if the mood of the soldier is less than 8:
		say "The soldier attacks the enemy half-heartedly. They kill each other.";
		end the game saying "You have survived, but your army doesn't look too good.";
	else:
		say "The soldier bravely advances the enemy and buries him under a sixteen-ton weight!";
		end the game in victory.
	
test depression with "i / x cohen / give cohen to soldier / z / z / z / z".
test vigour with "i / x march / give march to soldier / z / z / z / z".
test balance with "i / x cohen / x march / give cohen to soldier / give march to soldier / z / z".
test indetermination with "i / x cohen / give cohen to soldier / take cohen / give cohen to soldier / take cohen from soldier / z"

Die Idee des Pferdes

"Die Idee des Pferdes - basic implementation"

[Eben ist mir wieder eingefallen, daß man in Inform ja die Idee von etwas leibhaftig in der Welt herumlaufen lassen kann.]

An animal has a number called Widerrist. An animal has some text called Abmessung. The abmessung is usually "Die Widerristhoehe betraegt [widerrist] cm." An animal has some text called remark. The description of an animal is usually "[remark] [abmessung]".

A Pferd is a kind of animal. The widerrist is usually 160. The remark is usually "Ein vollendetes Pferd."

A Vollblut is a kind of pferd. The widerrist is usually 150. The remark is usually "Ein vollendetes Vollblutpferd, wenn auch ein bißchen klein fuer ein vollendetes Pferd. Und nervoes ist das Vieh, ich sage Ihnen..."

The paddock is a room. One pferd is in the paddock. One vollblut is in the paddock.

Butterblume is a pferd in the paddock. The widerrist is 168. The remark is "Ein Wesen, das Anteil an der Idee des Pferdes hat."

White Fury is a vollblut in the paddock. The widerrist is 155. The remark is "Nur ein Abglanz der Idee des Vollbluts, aber erzählen Sie ihm das bloß nicht!"

[Statistics:
Pferd - av. 160
Vollblut - 140 - 160 - 150
Warmblut - 160 - 170 - 165
Kaltblut - 160-180 - 170
Pony - bit more complicated, still have to look it up.
* In German Warmblut means a type of horse, so to say (medium-sized riding horse), in Englisch it appears to mean a special breed of medium-sized riding horses. Similar with Vollblut and Kaltblut.
* In German, Pony seems to be considered a kind of horse, in English, a Pony seems *not* to be a horse.
* What actually is a horse? The German Wikipedia disambiguation leads, apart from the metaphorcal meanings and such, to "Pferde oder Einhufer" (Equidae), "Wildpferd" (Equus ferus) and "Hauspferd" (Equus ferus caballus), the "Hauspferd" page gives as taxonomy:
* Familie Pferde - Equidae
** Gattung Pferde - Equus
*** Art Wildpferd - Equus ferus
**** Unterart Hauspferd - Equus ferus caballus
Nach dem "Pferde"-Artikel ist Equidae eine Familie mit nur einer Gattung, die - genaue Abgrenzung mal wieder umstritten - diese Arten umfaßt:
    * Wildpferd (Equus ferus)
    * Afrikanischer Esel (Equus asinus)
    * Asiatischer Esel (Equus hemionus)
    * Kiang (Equus kiang)
    * Steppenzebra (Equus quagga)
    * Bergzebra (Equus zebra)
    * Grevyzebra (Equus grevyi)
]

Zu inhaltlichen Aspekten

Etwas über Jenseitsvorstellungen

Eine Erweiterung der "lockable doors demo" von weiter oben, die näher auf den Aspekt "Jenseits" eingeht. Inspiriert von dem Gyges-Beispiel und unserer Diskussion darüber. Das hat zwar jetzt nicht direkt mit der Debatte über Gerechtigkeit zu tun, über die wir gerade reden, aber mit Platon doch schon auch.

erster Rohschnitt


"The everlasting quest for paradise, aka Lockable Doors Demo - revision with added prelude" by H-A-L

The maximum score is 350.

Include Basic Screen Effects by Emily Short.

Section 1 - Prelude

Platform 1 is a room. 

The poster is a fixed in place thing in the platform. The description is "'Paradise? Not in this life. If you want to go to paradise, you will have to do the inevitable..."

The warning sign is a fixed in place thing in the platform.  The description is "'Danger! High voltage! Deadly peril! Do not step on the rails! Counteracting will result in penalties up to $ 41,18!'"

The display panel is a fixed in place thing in the platform. The description is "'Next train: IC 399. To: Paradise. Scheduled: Whenever you are ready. Delay: None. Platform: 1.'"

Some rails are an enterable supporter in the platform.

The bench is an enterable supporter in the platform.
The waste paper basket is a container in the platform.
The empty beverage can is a thing in the platform.

The clock is a fixed in place thing in the platform. The description is "[time of day]."

After entering the rails:
	say "You do the inevitable...";
	wait for any key;
	say "
	
	[bold type]  *** You have died ***[roman type]
	
	
	
	In that game you scored 0 out of a possible 350, in 1 turn.
	
	
	
	Would you like to RESTART, RESTORE a saved game or QUIT?[line break]> ";
	wait for any key;
	award 10 points;
	move the player to afterlife.

[
[And let's make the bench a mortal trap to test the fake death properly:]
After entering the bench:
	say "You just wanted to sit down for a rest...";
	wait for any key;
	say "
	
	[bold type]  *** You have died ***[roman type]
	
	
	
	In that game you scored 0 out of a possible 350, in 1 turn.
	
	
	
	Would you like to RESTART, RESTORE a saved game or QUIT?[line break]> ";
	wait for any key;
	end the game in death.]

test platform with "e / enter exit / open exit / x poster / x display / x warning sign / x rails / enter rails"

Section 2 - The gate

The Afterlife is a room. The Gate of Heaven is a locked door. It is west from the afterlife and east from the Paradise. 
The Exit is a locked door. It is west from the Paradise and east from the platform.

The gold key is in the afterlife. The gold key unlocks the gate and the exit.

The description of the afterlife is "You are in the Afterlife, longing for paradise."
The description of the paradise is "You reached Paradise! Hooray!"
The description of the gate is "It stands between you and Paradise. If you only could unlock it!"
The description of the key is "It emits a magical glimmer."

The plaque is a thing in the afterlife. "The author of this afterlife has left his last message to the players on a plaque." The description is "Welcome to the everlasting quest for paradise, aka a demo on how to write lockable doors for my colleagues. Includes an option to win the game."


Section 3 - Nectar

The cup of nectar is an edible thing in the Paradise. The description is "The cup is  made of shining gold and richly decorated with ornaments depicting a bird, a long stick, a king and a man with a beret and bushy sideburns. It contains a lactic liquid emitting a treacly scent." 

Instead of smelling the nectar:
	say "Its aura bewitches your senses while at the same time clearing your mind."
	
Instead of tasting the nectar:
	say "its taste is a strange mix of purification and sweetness. (Wait, is it just me or does that sound like peppermint with honey?)"

Carry out eating the nectar:
	say "Consumption of the divine delicacy ascends your mind to higher planes of understanding.";
	award 351 points;
	end the game in victory.
Understand "drink [something]" as eating.

Section 4 - Testing

test gate with "open gate / unlock gate / key / w / open gate / w / lock gate with gold key / close gate / lock gate with gold key / unlock gate with gold key"

test nectar with "examine nectar / take it / smell it / taste it / drink it"

test me with "test gate / test nectar"