"Il Dr Home" by Leonardo Boselli
[Questo esempio è tratto in parte da 'The Dr Kilpatient', uno degli esempi inclusi nell'estensione "Conversation Package" by Eric Eve]
Chapter 1 - Introduzione
Section 1.1 - Pubblicazione
[Materiali da produrre durante la pubblicazione, tra cui i sorgenti e una pagina HTML per il sito]
Release along with cover art, the source text, a "MilleHyper" website, a "MilleHyper" interpreter and a file of "Introduzione alle Avventure Testuali" called "Introduzione alle Avventure Testuali.pdf".
Section 1.2 - Dati bibliografici
[Alcune indicazioni utili per descrivere l'avventura]
The story headline is "Un paziente alle prese col cinico Dr Home".
The story genre is "Medical Thriller - DEMO".
The release number is 3.
The story description is "Un dimostrativo in cui vengono mostrate all'opera le estensioni 'Conversation Package' e 'Hyperlink Interface' in versione italiana."
The story creation year is 2009.
Section 1.3 - Estensioni
[Inclusione delle estensioni necessarie:
"Italian" per la lingua italiana, "Conversation Package" per la gestione delle conversazioni, "Hyperlink Interface" per i collegamenti alle parole chiave, "Implicit Actions" per alleggerire le sequenze di azioni ovvie (inclusa per l'apertura automatica delle porte nel passaggio da una stanza all'altra) e "Written Inventory" per una descrizione più discorsiva dell'inventario. ]
Include Italian by Leonardo Boselli.
Include Conversation Package IT by Leonardo Boselli.
Include Hyperlink Interface IT by Leonardo Boselli.
Include Implicit Actions IT by Leonardo Boselli.
Include Written Inventory IT by Leonardo Boselli.
Section 1.4 - Immagini HTML
The image-side is some text that varies. The image-side is usually "left".
To say show-side (text - a text):
say "
".
To say show-drhome: say show-side "drhome".
To say show-bastone: say show-side "bastone".
To say show-oculista: say show-side "oculista".
To say show-palla: say show-side "palla".
To say show-playboy: say show-side "playboy".
To say show-tv: say show-side "tv".
To say show-center (text - a text):
say "
".
To say show-attesa: say show-center "attesa".
To say show-ambulatorio: say show-center "ambulatorio".
Section 1.5 - Imposta conversazioni
[Quando il gioco inizia:
* dichiara che dopo aver salutato l'NPC non è necessario elencare automaticamente i possibili argomenti di conversazione;
* dichiara che gli argomenti di conversazione devono essere evidenziati;]
First when play begins:
now suggest-on-greeting is false;
now topic hyperlink highlighting is true.
[Un'abbreviazione, invece di "argomenti", per elencare i possibili argomenti di discussione]
Understand "argo" as listing suggested topics.
[Nuove proprietà degli oggetti:
* 'discussable': un argomento che può essere discusso;
* 'speakable': un oggetto di cui si può parlare;
* 'unspeakable': tutti gli altri oggetti.]
A thing can be discussable or speakable or unspeakable. A thing is usually unspeakable.
[Azione alternativa che permette di scegliere tra gli argomenti di conversazione che possono essere chiesti o discussi con l'NPC]
Instead of examining a speakable thing (called the argument) when the current interlocutor is a person:
if the argument is listed in the ask-suggestions of the node of the current interlocutor:
try quizzing the current interlocutor about the argument;
otherwise if the argument is listed in the tell-suggestions of the node of the current interlocutor:
try informing the current interlocutor about the argument;
otherwise:
continue the action.
[Azione alternativa che permette di chiedere notizie o parlare di un oggetto invece di esaminarlo]
Instead of examining a discussable thing (called the argument):
if the current interlocutor is a person:
if the argument is listed in the ask-suggestions of the node of the current interlocutor:
try quizzing the current interlocutor about the argument;
otherwise if the argument is listed in the tell-suggestions of the node of the current interlocutor:
try informing the current interlocutor about the argument;
otherwise:
say "[arg-discusso argument]";
otherwise:
say "[arg-discusso argument]".
[Messaggio che specifica al giocatore che un particolare oggetto non si può esaminare al di fuori di una conversazione proprio perché è solo un argomento di conversazione]
To say arg-discusso (argument - a discussable thing):
say "[The argument] [if the argument is plural-named]sono solo[otherwise]è solo un[end if] argomento di discussione."
Chapter 2 - Le stanze
Section 2.1 - La sala d'attesa
[Le stanze devono essere sempre descritte, anche se già visitate]
Use full-length room descriptions.
[La descrizione del giocatore in risposta a "X ME"]
The description of the player is "Non hai proprio una bella cera."
[Descrizione della sala d'attesa, con l'aggiunta di alcune direzioni rinominate con il nome della porta che consente il passaggio.
Notare l'uso di [o]...[x] per evidenziare gli oggetti, [o]...[x] per le parti di scenario e [d]...[x] per le porte]
The sala d'attesa is a female room. "[show-attesa]La sala d'attesa dell[']ambulatorio è una stanza spoglia con poche [o]sedie[x] e un [o]tavolino[x] centrale.[line break]La [d]porta[x] dell[']ambulatoio è proprio di fronte all['][d]uscita[x] e[if the porta is closed] su di essa campeggia a grandi lettere la scritta 'Dr Jeremy Home MD'[else]d è aperta. Se vuoi, [d]chiudi la porta[x][end if]."
Understand "uscita" as south.
Understand "attraversa la porta dell'ambulatorio" as north when the location is the sala d'attesa.
Understand "attraversa la porta dell'ambulatorio" as south when the location is the ambulatorio.
The luogo-esterno is a room. It is south of the sala d'attesa.
[Azione alternativa che consente l'uscita dalla sala d'attesa solo se si è passati per l'ambulatorio. In tal caso, il gioco termina con un successo se la porta dell'ambulatorio è stata chiusa.]
The maximum score is 100.
Instead of going south when the location is the sala d'attesa:
if the Dr Jeremy Home is satisfied:
if the porta dell'ambulatorio is closed:
say "Complimenti! Hai chiuso la porta dell[']ambulatorio.";
now the score is 100;
end the game in victory;
otherwise:
say "Peccato! Hai dimenticato di chiudere la porta dell[']ambulatorio.";
end the game in death;
otherwise:
say "Te ne vai senza essere visitato?"
Section 2.2 - Arredamento della sala d'attesa
[Descrizione delle sedie nella sala d'attesa. Il giocatore non può utilizzarle per sedersi]
The sedie are a female, plural-named enterable scenery supporter. They are in the sala d'attesa. The description is "Non c[']è nessuno seduto in attesa."
Instead of entering the sedie, say "E['] inutile sedersi. Non c[']è coda!"
Understand "sedia" as sedie.
[Il tavolino della sala d'attesa]
The tavolino is a scenery supporter. It is in the sala d'attesa. The description is "Un tavolino con spigoli acuminati, basso abbastanza per attentare all[']integrità delle ginocchia dei pazienti."
[La rivista sul tavolino nella sala d'attesa]
The rivista is a female thing on the tavolino. The description is "[show-playboy]Una rivista molto consumata. Guardi la copertina e pensi: 'Uh! E['] un Playboy dell[']85. Niente male la coniglietta del mese, ora però avrà quasi sessant[']anni!'"
[La porta tra l'ambulatorio e la sala d'attesa]
The porta dell'ambulatorio is a female scenery door. The keyword is "porta". It is south of the ambulatorio and north of the sala d'attesa. The description is "Sul vetro campeggia a grandi lettere la scritta 'Dr Jeremy Home MD'.".
[Un messaggio che sottolinea l'azione di passaggio da una stanza all'altra, per arricchire la narrazione]
After going somewhere:
say "Entri [inp the room gone to].";
continue the action.
Section 2.3 - L'ambulatorio del Dr Home
[L'inizio della descrizione dell'ambulatorio]
The ambulatorio is a room. "[show-ambulatorio]L[']ambulatorio della clinica è una stanza dalle pareti dipinte di bianco. Da un lato puoi vedere lo [o]schermo[x] per le visite oculistiche e sotto un [o]televisore[x] accanto alla [o]porta[x] che conduce alla sala d'aspetto."
[Il lettino nell'ambulatorio]
The lettino per le visite is an enterable supporter. It is in the ambulatorio. "Vedi anche un [o]lettino[x] per le visite, ma da come è disfatto sembra che qualcuno ci abbia appena dormito sopra." The keyword is "lettino". The description is "Un lettino per le visite... disfatto!"
[La poltrona nell'ambulatorio]
The poltrona per il paziente is a female, enterable supporter. It is in the ambulatorio. "C[']è pure una [o]poltrona[x] molto scomoda, come se il Dr Home non volesse mettere a loro agio i propri pazienti." The keyword is "poltrona". The description is "[if the player is on the poltrona]Dopo esserti seduto, ti rendi conto che la poltrona è ancora più scomoda di quello che ti era sembrato.[otherwise]Il Dr Home ti dice: 'Siediti sulla poltrona.'[end if]"
[Lo schermo luminoso]
The schermo per la visita oculistica is a scenery thing in the ambulatorio. The keyword is "schermo". The description is "[show-oculista]Il solito schermo luminoso zeppo di lettere di cui riesci a leggere solo la 'E' gigante in cima."
[Il televisore]
The televisore is a scenery device in the ambulatorio. It is switched off. The description is "[show-tv]Un televisore ultrapiatto gigante."
[Se si accende il televisore...]
Instead of switching on the televisore:
now the televisore is switched on;
say "Accendi il televisore e compare immediatamente la telenovela preferita del Dr [o]Home[x].[paragraph break]Il dottore ti dice: 'Bene, ora puoi andare.'"
[Se si tenta di spegnere il televisore... (differenziato per la prima volta e le successive)]
Instead of switching off the televisore for the first time:
say "Provi a spegnere il televisore, ma il dottore ti ferma dicendo: 'No, lascia pure acceso.'"
Instead of switching off the televisore:
say "Il dottore lo vuole acceso!"
[Suggerimento dell'azione successiva dopo aver esaminato il televisore]
Instead of examining the televisore:
say "Il dottore ti dice: '[if the televisore is switched on]La mia telenovela preferita... mi commuovo sempre quando la guardo[otherwise]Invece di gurdare il televisore spento, faresti meglio ad accenderlo![no line break][end if]'.";
continue the action.
[Tutti questi oggetti vengono definiti come possibili argomenti di conversazione]
The lettino is speakable. The poltrona is speakable. The bastone is speakable. The palla is speakable. The televisore is speakable.
Understand "tv" as televisore.
[La scrivania, la palla da baseball ed il bastone da passeggio]
The scrivania is a female scenery. It is in the ambulatorio. The description is "La scivania del Dr Home, identica a quella che si vede nei telefilm del Dr House."
The palla da baseball is a female thing on the scrivania. The keyword is "palla". The description is "[show-palla]Una palla da baseball con le firme della squadra dei Red Socks (anno 1974)."
The bastone is a thing on the scrivania. The description is "[show-bastone]Il bastone del Dr Home. Lo userà anche per cacciare i pazienti molesti?"
[Azioni alternative se si tenta di prendere la palla o il bastone]
Instead of taking the bastone:
say "Tenti di prendere il bastone, ma il Dr Home ti precede e lo fa roteare in modo minaccioso. Poi, soddisfatto, lo posa nuovamente sulla [o]scrivania[x]."
Instead of taking the palla da baseball:
say "Tenti di prendere la palla da baseball, ma il Dr Home ti precede e la fa rimbalzare un paio di volte contro la parete. Poi, soddisfatto, la posa nuovamente sulla [o]scrivania[x]."
Instead of giving the rivista to Dr Jeremy Home:
say "Porgi la rivista al dottore, ma lui ti risponde: 'No, grazie. L[']ho già letta'."
Instead of entering the scrivania:
say "Non è una buona idea. Il Dr Home potrebbe farti internare!"
Section 2.4 - Il Dr Jeremy Home
[Possibili argomenti di discussione.
Notare l'uso di [t]...[x] per ottenere l'evidenziazione degli argomenti]
The sintomi are a plural-named discussable. The printed name is "[t]sintomi[x]".
The consigli is a plural-named discussable. The printed name is "[t]consigli[x]".
The tempo is a discussable. The printed name is "[t]tempo[x]".
The consigli, tempo, sintomi are part of the Dr Jeremy Home.
[Ridefinizione di argomenti standard]
The printed name of yes-suggestion is "dire [t]sì[x]".
The printed name of no-suggestion is "dire [t]no[x]".
The printed name of yes-no-suggestion is "dire [t]sì[x] o [t]no[x]".
[Il dottor Jeremy Home
La sequenza [t]...[x] evidenzia gli argomenti di conversazione, in questo caso il saluto che inizia la discussione]
The Dr Jeremy Home is a man in the ambulatorio. "Il dottor Jeremy [o]Home[x] è seduto dietro la sua [o]scrivania[x] e ti osserva con l[']aria di un uomo la cui pratica della misantropia, ormai esercitata da una vita, è prossima al conseguimento della massima perfezione." The description is "[show-drhome]Il Dr Home è vestito in borghese, indossa comode scarpe da passeggio e ha la barba di tre giorni. Non è il tipico medico. Se vuoi [if the Dr Jeremy Home is the current interlocutor]congedarti da lui, salutalo con un [t]addio[x][otherwise]parlargli, salutalo con un [t]buongiorno[x][end if]."
A man can be satisfied. A man is usually not satisfied.
Understand "dottore" as the Dr Jeremy Home.
Section 2.5 - Spunti di conversazione
[Uno snodo della conversazione ed i suoi possibili sviluppi]
malattia-node is a closed convnode.
The node of the Dr Jeremy Home is malattia-node.
The other-suggestions of malattia-node are { yes-no-suggestion }.
The tell-suggestions of malattia-node are { sintomi }.
[Azioni che vengono attivate implicitamente o esplicitamente quando l'NPC viene salutato]
After saying hello to the Dr Jeremy Home when the greeting type is explicit for the first time:
say "[node malattia-node]'Buongiorno dottore!' esordisci.[paragraph break]Il Dr Home ti osserva e dice: 'Cosa vuoi? Sei malato?'"
After saying hello to the Dr Jeremy Home when the greeting type is explicit more than one time:
say "[node malattia-node]'Buongiorno dottore!' esordisci.[paragraph break]Il Dr Home ti osserva e dice: 'Non ti avevo già congedato? Cosa vuoi? Sei malato?'"
[Azioni che vengono attivate implicitamente o esplicitamente quando l'NPC viene congedato]
After saying goodbye to the Dr Jeremy Home when the farewell type is explicit:
say "'Allora la saluto!' concludi.[paragraph break]Il Dr Home dice solo: 'Chiudi la porta prima di andartene,' e ricomincia a far rimbalzare la palla contro la parete."
After saying goodbye to the Dr Jeremy Home when the farewell type is implicit:
say "Il Dr Home dice: '[o]Chiudi la porta[x] prima di andartene,' e ricomincia a far rimbalzare la palla contro la parete."
[Un'alternativa ai saluti standard]
Understand "buongiorno" as hailing.
[Nodo di discussione: malattia-node: risposte a 'sì', 'no', 'sintomi']
Response for malattia-node when saying yes:
say "[node sintomi-node]'Sì, ecco perché sono qui, dottore,' gli rispondi. [paragraph break]'Ma qual è il problema esattamente?' chiede il dottore."
Response for malattia-node when saying no:
say "'No, io volevo solo...' inizi a dire. [paragraph break]'Allora gentilmente non farmi perdere tempo.' taglia corto il [o]dottore[x], '[t]Addio[x]!'".
Response for malattia-node when told about sintomi:
say "[remove sintomi tell suggestion]'Facciamo un passo alla volta,' ti interrompe, 'Ora dimmi, sei malato, [t]sì[x] o [t]no[x]?'"
Default response for malattia-node:
say "'Forza, ti ho fatto una domanda abbastanza semplice,' replica, 'Sei malato, [t]sì[x] o [t]no[x]?'";
Node-continuation rule for malattia-node:
if a random chance of 1 in 2 succeeds then say "'Non ho a disposizione tutto il giorno,' si lamenta il dottore, 'quindi gradirei molto sapere se risponderai alla mia domanda: sei malato [t]sì[x] o [t]no[x]?'"
[Uno snodo della conversazione ed i suoi possibili sviluppi]
sintomi-node is a closed convnode.
The tell-suggestions are {sintomi}.
[Nodo di discussione: sintomi-node: risposte a 'sintomi']
Response for sintomi-node when told about sintomi:
now the Dr Home is satisfied;
say "'Bene, dottore, ho questo terribile mal di testa, la mia schiena mi sta uccidendo, ho problemi nel camminare ed è comparso questo grosso bubbone sotto l[']ascella destra,' gli dici. [paragraph break][node help-node]'Non ti preoccupare,' replica, 'sarai morto entro la settimana e poi non ti farà mai più male. Ora, c[']è nient[']altro che posso fare per te? [t]Sì[x] o [t]no[x]?' [line break]"
Default response for sintomi-node:
say "'No, no, no, non cercare di cambiare argomento, dimmi solo i [t]sintomi[x]!' ti interrompe."
[Uno snodo della conversazione ed i suoi possibili sviluppi]
help-node is a convnode.
the other-suggestions of help-node are {yes-no-suggestion}.
[Nodo di discussione: sintomi-node: risposte a 'sì' e 'no']
response for help-node when saying no:
say "'No, penso che mi sia stato già d[']aiuto, dottore,' rispondi. [paragraph break]'Faccio del mio meglio,' risponde seccamente, '[t]addio[x]!'."
response for help-node when saying yes:
say "[node dottor-node]'Beh, sì, speravo in qualcosa di più ottimistico,' rispondi. [paragraph break]'Non lavoro nel ramo della speranza,' replica seccamente, '[t]addio[x]!'."
[Uno snodo della conversazione ed i suoi possibili sviluppi]
dottor-node is a closed convnode.
The ask-suggestions are {tempo, consigli}.
The tell-suggestions are {sintomi}.
[Nodo di discussione: sintomi-node: risposte a 'tempo', 'consigli' e 'sintomi']
Default response for dottor-node:
say "'Sono un uomo molto occupato,' dice lanciando la palla da baseball verso il soffitto, 'non farmi perdere altro tempo.' conclude riafferrandola al volo. '[t]Addio[x]!'"
response for dottor-node when asked about consigli:
say "[remove consigli ask suggestion]'Mi può dare un suggerimento su come ridurre il dolore - o rimanere in vita - o cose utili come queste?' chiedi. [paragraph break]'Il dolore è un toccasana per l[']anima. Così la morte. Ritieniti fortunato', replica. [line break]"
response for dottor-node when asked-or-told about the tempo:
say "[remove tempo ask suggestion]'E['] piuttosto freddo in questo periodo dell[']anno; potrebbe influire sulla mia salute?' chiedi. [paragraph break]'E['] possibile,' risponde. [line break]"
response for dottor-node when told about sintomi:
say "[remove sintomi tell suggestion]'Mi permetta di parlarle degli altri miei sintomi,' cominci a dire. [paragraph break]'Non farlo,' ti interrompe, 'sono sicuramente molto noiosi; il tuo non è un caso interessante dal punto di vista medico.' [line break]".
Chapter 3 - Azioni suggerite
Definition: a thing is takeable if it is not scenery and it is not a person and it is not part of something and it is not an enterable container and it is not a supporter.
After examining a thing (called the object):
say "[fixed letter spacing]";
if the object is worn by the player:
change HI hyperlink text to "togli [the object]";
print HI hyperlink;
otherwise:
if the object is wearable:
change HI hyperlink text to "indossa [the object]";
print HI hyperlink;
if the object is carried by the player:
change HI hyperlink text to "lascia [the object]";
print HI hyperlink;
if the object is edible:
change HI hyperlink text to "annusa [the object]";
print HI hyperlink;
change HI hyperlink text to "assaggia [the object]";
print HI hyperlink;
change HI hyperlink text to "mangia [the object]";
print HI hyperlink;
[INIZIO oggetti specifici trasportati]
if the object is the rivista and the location is the ambulatorio:
change HI hyperlink text to "dai [the object] al dottore";
print HI hyperlink;
[FINE oggetti specifici trasportati]
repeat with S running through supporters in the location:
if S is not the object:
change HI hyperlink text to "metti [the object] [sup the S]";
print HI hyperlink;
repeat with C running through open containers in the location:
if C is not the object:
change HI hyperlink text to "metti [the object] [inp the C]";
print HI hyperlink;
otherwise if the object is takeable:
change HI hyperlink text to "prendi [the object]";
print HI hyperlink;
if the object is a container:
if the object is open:
if the object is openable:
change HI hyperlink text to "chiudi [the object]";
print HI hyperlink;
repeat with Obj running through the things carried by the player:
change HI hyperlink text to "metti [the Obj] [inp the object]";
print HI hyperlink;
otherwise:
change HI hyperlink text to "apri [the object]";
print HI hyperlink;
if the object is enterable:
if the object is a supporter:
if the player is on the object:
change HI hyperlink text to "scendi";
print HI hyperlink;
otherwise:
change HI hyperlink text to "siedi [sup the object]";
print HI hyperlink;
otherwise if the object is a container:
if the player is in the object:
change HI hyperlink text to "esci";
print HI hyperlink;
otherwise:
change HI hyperlink text to "entra [inp the object]";
print HI hyperlink;
[INIZIO oggetti specifici]
if the object is the televisore:
if the televisore is switched off:
change HI hyperlink text to "accendi [the object]";
print HI hyperlink;
otherwise:
change HI hyperlink text to "spegni [the object]";
print HI hyperlink;
[FINE oggetti specifici]
if the object is a door:
change HI hyperlink text to "attraversa [the object]";
print HI hyperlink;
say "[roman type][no line break]";
continue the action.