[I7] Supplying a Missing Noun with "Consult"

The following compiles, but doesn’t work:

[code]
Study is room. “Long before the rot and mold set in, this study must have been gorgeous. Only rotting books remain.”

Some rotting books are in the study. They are scenery. “They’re mainly rotting fragments. You could take the time to consult them on any number of topics, but you doubt you’d find much in the scraps of legibility that remain.”

Check consulting the rotting books about a topic listed in the Table of Research:
say “[response entry][paragraph break]” instead.

Check consulting the rotting books about: say “You rummage, but find nothing you didn’t already know.” instead.

Table of Research
Topic Response
“murder/homicide/killing” “Turns out that’s illegal here.”
“sex” “Sadly, the monks have systematically stolen those pages over the years, for their private amusement.”

Rule for supplying a missing noun while consulting:
now the noun is the rotting books.

Test me with “read about sex in the books / read about sex”[/code]

Help me obi-wan-community, you’re my only hope.

(I’ve been able to end-run around this by creating a new “research” action that applies to a topic only instead of a topic and a noun, but that feels messy and makes the whole job more complex …)

It seems that Inform wants a “preposition” (which means, I think, any string of characters) to tell where the topic ends.

The command “Read about sex in” gives the wanted response.

Adding the line

Understand "read about [text] [something]" as consulting it about (with nouns reversed).

also makes the game respond as wanted to “Read about sex”, but alas! with a run-time error message objecting to the lack of prepositions.

Argh :frowning:

See, this works (as far as it goes, anyway):


Study is room. "Long before the rot and mold set in, this study must have been gorgeous. Only rotting books remain. There's a cave to the east for some reason."

Some rotting books are in the study. They are scenery. "They're mainly rotting fragments. You could take the time to consult them on any number of topics, but you doubt you'd find much in the scraps of legibility that remain."

Researching is an action applying to one topic. Understand "Look up [text]" or "Research [text]" or "Read about [text]" or "Look [text] up" as Researching.

Check researching a topic listed in the Table of Research when the rotting books are touchable:
   say "[response entry][paragraph break]" instead.

Check consulting the rotting books about a topic listed in the Table of Research:
   say "[response entry][paragraph break]" instead.

Check researching:
   if the rotting books are touchable, say "You rummage, but find nothing you didn't already know." instead;
   say "There isn't much here in the way of research material."

Check consulting the rotting books about: say "You rummage, but find nothing you didn't already know." instead.

Table of Research
Topic		Response
"murder/homicide/killing"	"Turns out that's illegal here."
"sex"	"Sadly, the monks have systematically stolen those pages over the years, for their private amusement."

Cave is east of Study. "Yes indeedy. It's a cave alright."

Test me with "read about sex in the books / read about sex"

But if feels like a kludge to me. But, it works at least … hrmmmm …

That’s what I’d do, really. The standard “consult” grammar takes two objects. Nothing wrong with defining a one-object version that infers its second noun.

I guess that’s true. Thing is, this is for my “Bare Bones” WIP, where I’m trying to cram as much as possible into a .z5 file, so every little addition makes me wince :slight_smile:

But if I gotta, I gotta (and I think I gotta).

Thanks, guys. If nothing else it’s nice to know I’m not (in this specific context) entirely off track …