intfiction.org

The Interactive Fiction Community Forum
It is currently Tue May 21, 2013 10:04 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri May 29, 2009 1:13 pm 
Offline
User avatar

Joined: Mon Nov 10, 2008 12:19 pm
Posts: 305
Location: Southcentral Indiana
Ok, this is a pretty weird problem, and maybe one I shouldn't even be worried about because it's kind of a cosmetic thing.

There's a church with a door. The only reason there's a door there is that it's stupid to have a church without a door. I don't want the player to ever enter the church through the door. It also looks nice with the windows.

My beta tester ran into the following situation. He said, "Pastor, unlock door" and the default response was "What do you want the pastor to unlock the door with?". The tester said that this makes him think he ought to go looking for a key, and since that's not the case in this game, it would be nice to have some other response that makes it clear to the user that no one's opening the door and there's no point in pursuing it. I think it's a good point. It's one thing for the player to not be sure whether he should enter through a door or a window, but it's another to bring up a "key" that doesn't exist.

I tried some variations on "Instead of asking the pastor to try unlocking the door, say "That's never going to happen". But the response is always the same as above, because you haven't supplied a second noun.

So I tried to do this ridiculous hack:

Code:
The churchdoor is part of the chapel. The printed name of the churchdoor is "church door". The churchdoor is a container. The churchdoor is openable and closed and locked and enterable. Instead of entering the churchdoor, say "The door is locked."

The pastor is carrying the invisikey. The matching key of the Church door is the invisikey.
Rule for deciding the concealed possessions of the pastor: yes.

Rule for supplying a missing noun when unlocking the Church door with: [also tried second noun in both spots]
   Change the noun to the invisikey.

Instead of asking the pastor to try unlocking something with something:
   say "The pastor doesn't have a key to the door."


Two things aren't working. The program isn't supplying the missing noun, and the custom response isn't firing even when the second noun is explicit:

Quote:
>pastor, unlock door
What do you want the Pastor to unlock the church door with?

>pastor, unlock door with invisikey
There is no reply.


This variation and others like it either gave me an error or didn't work:
Code:
Instead of asking the pastor to try unlocking the churchdoor with the inviskey:
   say "The pastor doesn't have a key to the door."


So... the questions are, is this the best way to do this? And if so, what's wrong with this code?

Thanks!


Top
 Profile Send private message  
 
PostPosted: Fri May 29, 2009 1:29 pm 
Offline
User avatar

Joined: Mon Nov 10, 2008 12:19 pm
Posts: 305
Location: Southcentral Indiana
OK, I just imported this code into a clean project and it's working there. It turns out I get the responses I get because the pastor is wearing a suit and tie.

This fixed it:
Code:
Does the player mean asking the pastor to try unlocking the churchdoor with the suit: It is very unlikely.
Does the player mean asking the pastor to try unlocking the churchdoor with the tie: It is very unlikely.


Still wondering if this is the best way to do this though.


Last edited by ShaeSays on Fri May 29, 2009 1:52 pm, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Fri May 29, 2009 1:34 pm 
Offline
User avatar

Joined: Mon Nov 10, 2008 12:19 pm
Posts: 305
Location: Southcentral Indiana
also

Code:
Rule for clarifying the parser's choice of the invisikey when unlocking the churchdoor with: stop.


Quote:
>pastor, unlock door
(with the invisikey)
The pastor doesn't have a key to the door.


Why didn't that work?


Top
 Profile Send private message  
 
PostPosted: Fri May 29, 2009 2:13 pm 
Offline

Joined: Tue Dec 25, 2007 10:06 am
Posts: 887
The example 351 in chapter 17.30 explains how to supply missing nouns for NPC actions.

Code:
Rule for clarifying the parser's choice of the invisikey when unlocking the churchdoor with: stop.

This applies only when the player is the one doing the action. You need

Code:
Rule for clarifying the parser's choice of the invisikey when an actor unlocking the churchdoor with: stop.


Top
 Profile Send private message  
 
PostPosted: Sat May 30, 2009 10:14 am 
Offline
User avatar

Joined: Mon Nov 10, 2008 12:19 pm
Posts: 305
Location: Southcentral Indiana
Thanks Nitku, I'll give that a try!


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group