[I7] Eric Eve's Conversation Package Unexpected Results?

I’m doing a bit of code to try and get used to the Conversation Package extension and I have been getting weird results. It seems like asking/telling someone about something does not require a touchable noun, but asking/telling someone about “text” does? However asking someone for “text” doesn’t. Here’s the relevant code.

[code]Include Conversation Package by Eric Eve.

The White Room is a room. The description of the white room is “You came to this serene place to talk to God.”.

God is a man in the white room. Rule for writing a paragraph about God: now God is mentioned.

Instead of doing something when the action requires a touchable noun and the noun is God:
say “You cannot touch [the noun].”.

Instead of examining God:
say “You cannot actually see God, only speak with Him.”.

Default tell response for God:
say “‘I already know.’ God says.”.

Default ask-for response for God:
say “You hear no response.”.

Default ask response for God:
say “‘That, you must learn about on your own.’ God says.”.

test me with “ask god about me / ask god about heaven / tell god about me / tell god about sins / ask god for forgiveness”[/code]

What is going on here to cause this, and can I get around it easily? Any help is greatly appreciated. Thanks!

Unfortunately, the actions defined in the Standard Rules are created by code like Asking it about is an action applying to one thing and one topic. whereas Conversation Framework adds to that set with code like Requesting it for is an action applying to two visible things. Imploring it for is an action applying to one visible thing and one topic.in which ``visible’’ overrides the default touchability requirement.

The easiest way I can think of to work around that is to find Standard Rules.i7x on your computer and ask the Inform IDE to install it. That will give you a new copy, in which you can change the lines Telling it about is an action applying to one thing and one topic. ... Asking it about is an action applying to one thing and one topic. ... Asking it for is an action applying to two things. to Telling it about is an action applying to one visible thing and one topic. ... Asking it about is an action applying to one visible thing and one topic. ... Asking it for is an action applying to one visible thing and one thing.

Or you could just add the fixes by replacing the relevant section. Pre pending the following to the code in question should work.

[spoiler][code]Section 1 - Fixed Actions (in place of Section SR4/6 - Standard actions concerning other people in Standard Rules by Graham Nelson)

Giving it to is an action applying to one carried thing and one thing.
The giving it to action translates into I6 as “Give”.

The specification of the giving it to action is "This action is indexed by
Inform under ‘Actions concerning other people’, but it could just as easily
have gone under ‘Actions concerning the actor’s possessions’ because -
like dropping, putting it on or inserting it into - this is an action
which gets rid of something being carried.

The Standard Rules implement this action fully - if it reaches the carry
out and report rulebooks, then the item is indeed transferred to the
recipient, and this is properly reported. But giving something to
somebody is not like putting something on a shelf: the recipient has
to agree. The final check rule, the ‘block giving rule’, assumes that
the recipient does not consent - so the gift fails to happen. The way
to make the giving action use its abilities fully is to replace the
block giving rule with a rule which makes a more sophisticated decision
about who will accept what from whom, and only blocks some attempts,
letting others run on into the carry out and report rules."

Check an actor giving something to (this is the can’t give what you haven’t got rule):
if the actor is not the holder of the noun,
stop the action with library message giving it to action number 1 for the noun.

Check an actor giving something to (this is the can’t give to yourself rule):
if the actor is the second noun,
stop the action with library message giving it to action number 2 for the noun.

Check an actor giving something to (this is the can’t give to a non-person rule):
if the second noun is not a person,
stop the action with library message giving it to action number 4 for the
second noun.

Check an actor giving something to (this is the can’t give clothes being worn rule):
if the actor is wearing the noun:
issue library message dropping action number 3 for the noun;
silently try the actor trying taking off the noun;
if the actor is wearing the noun, stop the action;

Check an actor giving something to (this is the block giving rule):
stop the action with library message giving it to action number 3 for the
second noun.

Carry out an actor giving something to (this is the standard giving rule):
move the noun to the second noun.

Report an actor giving something to (this is the standard report giving rule):
if the actor is the player:
issue library message giving it to action number 5 for the noun;
otherwise if the second noun is the player:
issue actor-based library message giving it to action number 6 for the noun;
otherwise:
issue actor-based library message giving it to action number 7 for the noun;

Showing it to is an action applying to one carried thing and one visible thing.
The showing it to action translates into I6 as “Show”.

The specification of the showing it to action is "Anyone can show anyone
else something which they are carrying, but not some nearby piece of
scenery, say - so this action is suitable for showing the emerald locket
to Katarina, but not showing the Orange River Rock Room to Mr Douglas.

The Standard Rules implement this action in only a minimal way, checking
that it makes sense but then blocking all such attempts with a message
such as ‘Katarina is not interested.’ - this is the task of the ‘block
showing rule’. As a result, there are no carry out or report rules. To
make it into a systematic and interesting action, we would need to
unlist the block showing rule and then to write carry out and report
rules: but usually for IF purposes we only need to make a handful of
special cases of showing work properly, and for those we can simply
write Instead rules to handle them."

Check an actor showing something to (this is the can’t show what you haven’t
got rule):
if the actor is not the holder of the noun,
stop the action with library message showing it to action number 1
for the noun.

Check an actor showing something to (this is the convert show to yourself to
examine rule):
if the actor is the second noun,
convert to the examining action on the noun.

Check an actor showing something to (this is the block showing rule):
stop the action with library message showing it to action number 2
for the second noun.

Waking is an action applying to one thing.
The waking action translates into I6 as “WakeOther”.

The specification of the waking action is “This is the act of jostling
a sleeping person to wake him or her up, and it finds its way into the
Standard Rules only for historical reasons. Inform does not by default
provide any model for people being asleep or awake, so this action does
not do anything in the standard implementation: instead, it is always
stopped by the block waking rule.”

Check an actor waking (this is the block waking rule):
stop the action with library message waking action number 1 for the noun.

Throwing it at is an action applying to one carried thing and one visible thing.
The throwing it at action translates into I6 as “ThrowAt”.

The specification of the throwing it at action is "Throwing something at
someone or something is difficult for Inform to model. So many considerations
apply: just because the actor can see the target, does it follow that the
target can accurately hit it? What if the projectile is heavy, like an
anvil, or something not easily aimable, like a feather? What if there
is a barrier in the way, like a cage with bars spaced so that only items
of a certain size get through? And then: what should happen as a result?
Will the projectile break, or do damage, or fall to the floor, or into
a container or onto a supporter? And so on.

Because it seems hopeless to try to model this in any general way,
Inform instead provides the action for the user to attach specific rules to.
The check rules in the Standard Rules simply require that the projectile
is not an item of clothing still worn (this will be relevant for women
attending a Tom Jones concert) but then, in either the ‘futile to throw
things at inanimate objects rule’ or the ‘block throwing at rule’, will
refuse to carry out the action with a bland message.

To make throwing do something, then, we must either write Instead rules
for special circumstances, or else unlist these check rules and write
suitable carry out and report rules to pick up the thread."

Check an actor throwing something at (this is the implicitly remove thrown clothing rule):
if the actor is wearing the noun:
issue library message dropping action number 3 for the noun;
silently try the actor trying taking off the noun;
if the actor is wearing the noun, stop the action;

Check an actor throwing something at (this is the futile to throw things at inanimate
objects rule):
if the second noun is not a person,
stop the action with library message throwing it at action number 1
for the second noun.

Check an actor throwing something at (this is the block throwing at rule):
stop the action with library message throwing it at action number 2
for the noun.

Attacking is an action applying to one thing.
The attacking action translates into I6 as “Attack”.

The specification of the attacking action is “Violence is seldom the answer,
and attempts to attack another person are normally blocked as being unrealistic
or not seriously meant. (I might find a shop assistant annoying, but IF is
not Grand Theft Auto, and responding by killing him is not really one of
my options.) So the Standard Rules simply block attempts to fight people,
but the action exists for rules to make exceptions.”

Check an actor attacking (this is the block attacking rule):
stop the action with library message attacking action number 1 for the noun.

Kissing is an action applying to one thing.
The kissing action translates into I6 as “Kiss”.

The specification of the kissing action is “Possibly because Inform was
originally written by an Englishman, attempts at kissing another person are
normally blocked as being unrealistic or not seriously meant. So the
Standard Rules simply block attempts to kiss people, but the action exists
for rules to make exceptions.”

Check an actor kissing (this is the kissing yourself rule):
if the noun is the actor,
stop the action with library message touching action number 3 for the noun.

Check an actor kissing (this is the block kissing rule):
stop the action with library message kissing action number 1 for the noun.

Answering it that is an action applying to one thing and one topic.
The answering it that action translates into I6 as “Answer”.

The specification of the answering it that action is "The Standard Rules do
not include any systematic way to handle conversation: instead, Inform is
set up so that it is as easy as we can make it to write specific rules
handling speech in particular games, and so that if no such rules are
written then all attempts to communicate are gracefully if not very
interestingly rejected.

The topic here can be any double-quoted text, which can itself contain
tokens in square brackets: see the documentation on Understanding.

Answering is an action existing so that the player can say something free-form
to somebody else. A convention of IF is that a command such as DAPHNE, TAKE
MASK is a request to Daphne to perform an action: if the persuasion rules in
force mean that she consents, the action ‘Daphne taking the mask’ does
indeed then result. But if the player types DAPHNE, 12375 or DAPHNE, GREAT
HEAVENS - or anything else not making sense as a command - the action
‘answering Daphne that …’ will be generated.

The name of the action arises because it is also caused by typing, say,
ANSWER 12375 when Daphne (say) has asked a question."

Report an actor answering something that (this is the block answering rule):
stop the action with library message answering it that action number 1
for the noun.

Telling it about is an action applying to one visible thing and one topic.
The telling it about action translates into I6 as “Tell”.

The specification of the telling it about action is "The Standard Rules do
not include any systematic way to handle conversation: instead, Inform is
set up so that it is as easy as we can make it to write specific rules
handling speech in particular games, and so that if no such rules are
written then all attempts to communicate are gracefully if not very
interestingly rejected.

The topic here can be any double-quoted text, which can itself contain
tokens in square brackets: see the documentation on Understanding.

Telling is an action existing only to catch commands like TELL ALEX ABOUT
GUITAR. Customarily in IF, such a command is shorthand which the player
accepts as a conventional form: it means ‘tell Alex what I now know about
the guitar’ and would make sense if the player had himself recently
discovered something significant about the guitar which might interest
Alex."

Check an actor telling something about (this is the telling yourself rule):
if the actor is the noun,
stop the action with library message telling it about action number 1
for the noun.

Report an actor telling something about (this is the block telling rule):
stop the action with library message telling it about action number 2
for the noun.

Asking it about is an action applying to one visible thing and one topic.
The asking it about action translates into I6 as “Ask”.

The specification of the asking it about action is "The Standard Rules do
not include any systematic way to handle conversation: instead, Inform is
set up so that it is as easy as we can make it to write specific rules
handling speech in particular games, and so that if no such rules are
written then all attempts to communicate are gracefully if not very
interestingly rejected.

The topic here can be any double-quoted text, which can itself contain
tokens in square brackets: see the documentation on Understanding.

Asking is an action existing only to catch commands like ASK STEPHEN ABOUT
PENELOPE. Customarily in IF, such a command is shorthand which the player
accepts as a conventional form: it means ‘engage Mary in conversation and
try to find out what she might know about’. It’s understood as a convention
of the genre that Mary should not be expected to respond in cases where
there is no reason to suppose that she has anything relevant to pass on -
ASK JANE ABOUT RICE PUDDING, for instance, need not conjure up a recipe
even if Jane is a 19th-century servant and therefore almost certainly
knows one."

Report an actor asking something about (this is the block asking rule):
stop the action with library message asking it about action number 1
for the noun.

Asking it for is an action applying to one visible thing and one thing.
The asking it for action translates into I6 as “AskFor”.

The specification of the asking it for action is "The Standard Rules do
not include any systematic way to handle conversation, but this is
action is not quite conversation: it doesn’t involve any spoken text as
such. It exists to catch commands like ASK SALLY FOR THE EGG WHISK,
where the whisk is something which Sally has and the player can see.

Slightly oddly, but for historical reasons, an actor asking himself for
something is treated to an inventory listing instead. All other cases
are converted to the giving action: that is, ASK SALLY FOR THE EGG WHISK
is treated as if it were SALLY, GIVE ME THE EGG WHISK - an action for
Sally to perform and which then follows rules for giving.

To ask for information or something intangible, see the asking it about
action."

Check an actor asking something for (this is the asking yourself for something rule):
if the actor is the noun and the actor is the player,
try taking inventory instead.

Check an actor asking something for (this is the translate asking for to giving rule):
convert to request of the noun to perform giving it to action with the
second noun and the actor.

Section 2 - Game Code[/code][/spoiler]

Hope this helps.

The Conversation package also uses new actions for asking/telling, I believe, to allow for asking about things or text and the like. I believe it’s called quizzing it about and informing it about. And if I ask/tell god about me (or any thing) it does not trigger the instead rule, it works properly. If I ask god about “text”, however, only then does it act like god needs to be touchable. If I could look at the source code to the extension, I could probably fix it. I just don’t know how to get to it.

Oh, nevermind, I see now that ask/tell someone about “text” still calls the actions from the Standard Rules. (Thank you rule tracing). I will try what you guys suggested. Thanks for the help.

I decided to try this:

[code]Asking god about something is allowed. Telling god about something is allowed. Showing something to God is allowed. Answering god that some text is allowed. Asking god for something is allowed.

Instead of doing something when the action requires a touchable noun and the noun is God:
if the current action is not allowed:
say “You cannot touch [the noun].”;
otherwise:
continue the action.[/code]

It’s a bit hacky, I know. Can anyone see any major problems with this way of doing it. I won’t have any other NPCs that have to respond this was so it’s a special case.

That looks reasonable. If you wanted to generalize it, you could even do:

A thing can be tangible or intangible. A thing is usually tangible. God is intangible.

Asking someone about something is communicating.
Telling someone about something is communicating.
Showing something to someone is communicating.
Answering someone that some text is communicating.
Asking someone for something is communicating.

Instead of doing something when the action requires a touchable noun and the noun is intangible and the current action is not communicating: say "You cannot touch [the noun]."

Editing the Standard Rules? That sounds scary… what if you want to share your source with someone, or you forget your changes next time you update Inform 7?

I offer as an alternative my extension Flexible Action Requirements, which was created for just this sort of situation.

eyeballsun.org/i/Flexible%20Acti … ements.i7x

Here’s an example. Add these lines and replace the “requires a touchable noun” rule with the Instead rule here:

[code]Include Flexible Action Requirements by Mike Ciul.

Telling something about is flexible about touching the noun.
Asking something about is flexible about touching the noun.
Asking something for is flexible about touching the noun.

Instead of doing something when God must be touched:
say “You cannot touch God.”.[/code]

Thanks everyone, it seems to be working perfectly at this point.

Capmikee, this may be a stupid question, but I can’t figure out how/where to download the i7x file for your extension. It looks very useful, where can I download it?

At the link he gave. His webserver is apparently set up to send .i7x files as plain text (which they are, really, so that’s OK) so your browser will display it as text, but you can just save the page anywhere you like and then install it into Inform. (Depending on your browser and OS, it might insist on saving it with a .txt extension; if so, you may need to rename it or select “All files” in the Inform install dialog to see it.)