How to read mail?

How can I make it so that a player can pick up a letter and read it?

Thanks,
Mathens

READ is a synonym for EXAMINE. So any normal thing you declare that is not “fixed in place” can be automatically picked up, and automatically read or examined, which will display it’s description text.

A letter is a thing in post office.  The description is "It's a letter on fine yellow paper.  It reads 'I'm watching you.'"

Post Office

You can see a letter here.

TAKE LETTER

You pick up the letter.

READ LETTER

It’s a letter on fine yellow paper. It reads “I’m watching you.”

The player will get the description whether they EXAMINE LETTER or READ LETTER.

I often use variable text for further examination.

[code]A letter is a thing in post office. The description is “It’s an envelope[one of] of fine linen stock[or]. You hastily open it and pull out the sheet inside. It reads ‘I’m watching you’. Hm. Curious[or] inside which is a threatening note reading ‘I’m watching you’[stopping].”

Understand “envelope/linen/stock/sheet/paper/note/threatening” as letter[/code]

So the player can EXAMINE LETTER three times, or EXAMINE LETTER and also READ LETTER. Each time they’ll get up to three descriptions:

It’s an envelope of fine linen stock.

It’s an envelope. You hastily open it and pull out the sheet inside. It reads “I’m watching you”. Hm. Curious.

It’s an envelope inside which is a threatening note reading “I’m watching you”.

The “understand” line make sure the player can type EXAMINE ENVELOPE, EXAMINE LETTER, EXAMINE SHEET, EXAMINE THREATENING NOTE and it will all refer to the letter.

If you want READ to mean something different from EXAMINE, you need to do a little more work to separate READ into its own command and define check/carry out/report/after rules as necessary, which is explained in the manual.

Of course, you can always make letters complicated with moving parts.

[code]A letter is a kind of thing. Understand “letter” as a letter.

An envelope is a kind of container. It is openable and usually closed. Understand “envelope/flap/seal/address” as an envelope.

A suspicious envelope is an envelope. The description is “It looks pretty beat up.”

a threatening note is a letter in suspicious envelope. The description is “It’s made of pasted letters on a ragged napkin. It reads ‘You’re next.’ How threatening!”

a bill is a kind of letter. Understand “bill” as a bill.

a windowed envelope is an envelope. The description is “[if phone bill is in windowed envelope]It shows your address through a plastic window[otherwise]It’s a normal envelope with a plastic window where your address would show through[end if].”

A phone bill is a bill in windowed envelope. The description is “[one of]It’s your phone bill. It seems awfully large this month.[or]Upon further examination, you notice a lot of suspicious calls from a phone number you don’t recognize.[or]It’s your phone bill.[stopping]”

Instead of closing an envelope:
say "You’ve already torn it open. It won’t close again like it was.

Check inserting something into an envelope:
if the noun is not a letter:
say “That really won’t fit in the envelope.” instead.[/code]

This way you can make multiple envelopes that can be opened, but not closed, and multiple letters to put inside that can be removed and read. The last rules keep the player from closing an envelope, (mimicking the real world way of tearing a sealed envelope) and prevening the player from inserting the bowling ball they are also carrying into an envelope unrealistically. Having a bill that is a kind of letter lets the bill behave like a letter, but let the player refer to a “bill” that is a sub group of “letters”.

Thanks HanonO, that’s clear and useful to me also. :slight_smile: