Help needed with understanding proper-name


(Derek) #1

Hello all!

I’m new here and just starting out. I’ve made 1 room only so far and am stuck with the code below. What I’m looking to do is have the “older gentlemen” be recognized as “Bob and Gary” after asking the older gentlemen anything. Hopefully, the code is enough for you to understand what I’m trying to do here. This is just a test room to get a basic understanding of Inform7.

If anyone is willing to point out some corrections to make, I would surely appreciate the help!

older gentlemen are men. older gentlemen are scenery. Understand “Bob and Gary” as older gentlemen when older gentlemen are proper-named.
older gentlemen are in the diner. “Two well-dressed chaps seem to be engrossed in their game while enjoying coffee and chatting.”.
After examining older gentlemen for the first time:
now the description of older gentlemen is “Manners…Maketh…Man[paragraph break]Interrupting their game to ask about something would probably be alright if you were polite about it.”
Instead of asking older gentlemen about anything:
Now the printed name of older gentlemen is “Bob and Gary”;
Now older gentlemen are proper-named;
say “‘Excuse me gentlemen…’ [paragraph break]You politely extend a hand of introduction. Bob and Gary each shake your hand and introduce themselves”.
Instead of doing something other than examining to older gentlemen:
say “[line break][line break]Manners…Maketh…Man”.


(Hanon Ondricek) #2
Diner is a room.

Some older gentlemen are men in Diner. Understand "man/men/chap/chaps/gentleman" as older gentlemen. Older gentlemen are scenery. Understand “Bob/Gary” and "bob and gary" as older gentlemen when older gentlemen are proper-named.
older gentlemen are in the diner. “Two well-dressed chaps seem to be engrossed in their game while enjoying coffee and chatting.”.
After examining older gentlemen when older gentlemen are not proper-named:
	now the description of older gentlemen is “Manners…Maketh…Man[paragraph break]Interrupting their game to ask about something would probably be alright if you were polite about it.”
Instead of asking older gentlemen about anything:
	Now the printed name of older gentlemen is “Bob and Gary”;
	Now older gentlemen are proper-named;
	say “‘Excuse me gentlemen…’ [paragraph break]You politely extend a hand of introduction. Bob and Gary each shake your hand and introduce themselves”.
Instead of doing something other than examining to older gentlemen:
	say “[line break][line break]Manners…Maketh…Man”.
Result

Diner

x men
Two well-dressed chaps seem to be engrossed in their game while enjoying coffee and chatting.

x chaps
Manners…Maketh…Man

Interrupting their game to ask about something would probably be alright if you were polite about it.

x gary
You can’t see any such thing.

talk to chaps
That’s not a verb I recognise.

ask chaps about chaps
“Excuse me gentlemen…”

You politely extend a hand of introduction. Bob and Gary each shake your hand and introduce themselves

x men
Manners…Maketh…Man

Interrupting their game to ask about something would probably be alright if you were polite about it.

x gary
Manners…Maketh…Man

Interrupting their game to ask about something would probably be alright if you were polite about it.

x bob and gary
Manners…Maketh…Man

Interrupting their game to ask about something would probably be alright if you were polite about it.

One suggestion: don’t get in the habit of using INSTEAD for everything. You could use a CARRY OUT rule which is part of the normal parsing process. This comes into play when, say if the Diner were a dark room and you don’t want the player to talk to Bob and Gary while they can’t see. INSTEAD will override all other parsing completely.

Also [line break][line break] in most cases is the same as [paragraph break], although you do often have to futz with it to make the carriage returns work correctly.


(Derek) #3

Wow! Thanks for such a speedy response.

I didn’t get to check this out until this morning since I work evenings.

You pushed me in the right direction to where I found (and better understand) the RULES sections regarding, INSTEAD, BEFORE, AFTER and CHECK, CARRY OUT, REPORT. This led me to find Jim Aiken’s Inform7 tutorial which I just started reading.

The results of your example still do not compile to what I’m trying to accomplish. Here are my full results.

test
An Interactive Fiction by Derek Christenson
Release 1 / Serial number 190301 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N) SD

Diner
You sought shelter from the cold, drizzling rain in Moe’s Diner. A hot cup of coffee would lift your spirits.

The place is empty aside for a couple older gentlemen playing cribbage at a corner table. The menu is written in chalk on a board above the counter and a waitress is making coffee. You see the cook preparing for the morning rush behind her through a window. You decide to take a seat at the empty counter.

x older gentlemen
Two well-dressed chaps seem to be engrossed in their game while enjoying coffee and chatting.

x older gentlemen
Manners…Maketh…Man

Interrupting their game to ask about something would probably be alright if you were polite about it.

push older gentlemen

Manners…Maketh…Man

ask older gentlemen about weather
“Excuse me gentlemen…”

You politely extend a hand of introduction. Bob and Gary each shake your hand and introduce themselves

x bob
Manners…Maketh…Man

Interrupting their game to ask about something would probably be alright if you were polite about it.

x older gentlemen
Manners…Maketh…Man

Interrupting their game to ask about something would probably be alright if you were polite about it.

l
Diner
You sought shelter from the cold, drizzling rain in Moe’s Diner. A hot cup of coffee would lift your spirits.

The place is empty aside for a couple older gentlemen playing cribbage at a corner table. The menu is written in chalk on a board above the counter and a waitress is making coffee. You see the cook preparing for the morning rush behind her through a window. You decide to take a seat at the empty counter.

Examining older gentlemen after asking them something still regards them as older gentlemen rather than Bob and Gary and looking at the room did not change the description from “older gentlemen playing cribbage” to "Bob and Gary playing cribbage.

I understand “x Bob” not changing because I haven’t added a new description yet for “Bob/Gary”. I guess I just assumed that after proper-naming “older gentlemen” that the room description would change when looking or examining again. (I have a lot to learn).

THANKS AGAIN!


(Derek) #4

Nevermind.

I figured it out like a big boy. :slight_smile: I just needed to use square brackets in the room description.

I have a completely new respect for author’s of IF! There’s a lot more that goes into making a text game run smoothly than I could have ever imagined. One hundred lines of code per one line of text it seems!