intfiction.org

The Interactive Fiction Community Forum
It is currently Sat Jan 19, 2019 4:52 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Jan 04, 2019 5:17 pm 
Offline

Joined: Tue Jan 26, 2016 9:35 am
Posts: 67
Cheers,

in the following example:

Code:
"Name Conflict" by HtF

Persuasion rule for asking a man to try doing something:
   persuasion succeeds.   

TestRoom is a room.

Joe is a man in TestRoom.
Joe wears the RedHat. The Description of the RedHat is "A garish, red coloured hat."
Understand "hat" as the RedHat.

The GreenHat is worn by the player. The Description is "A garish, green coloured hat."
Understand "hat" as the GreenHat.


We have a little problem when we ask Joe to take off the hat as Joe will ALWAYS take off HIS hat. When I ask Joe: Joe, take off my hat - it STILL defaults to HIS hat instead.

So the trick would be to either have Inform respect "my" to distinguish between Joe's hat and the player's hat or to ask the "which hat do you mean?" and then typing an additional clarification, although the "my" would be easier and less clumsy.

I've been doing some searching but I haven't come up with a decent solution. Can anyone provide some help?


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Jan 04, 2019 6:17 pm 
Offline

Joined: Sat Oct 27, 2018 6:35 pm
Posts: 58
The parser doesn't know that RedHat and GreenHat are both hats - all it knows is that they're two (wearable) things, both of which can be referred to by "hat". The "Understand 'hat' as..." commands conflict with each other.

Code:
Understand "my hat" as the GreenHat.


If this is something you'll need to apply more broadly, there's an argument for establishing that a hat is a thing and telling the parser that "my" should refer to the instance of a wearable item that is being worn by the player.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Jan 04, 2019 6:21 pm 
Offline
User avatar

Joined: Tue Nov 08, 2011 8:11 am
Posts: 2841
Location: US - Central
First, I suggest
Code:
A hat is a kind of thing. A hat is wearable. Understand "hat" as a hat.

A red hat is a hat. It is worn by Joe. The description is "It's red."

A green hat is a hat. It is worn by the player. The description is "It's green."
Understand "my hat" as green hat.
Rule for printing the name of green hat when green hat is worn by a person:
     say "your green hat."


That should solve disambiguation. Disambiguation with TAKE OFF, I believe, usually has the person asked prefer their own held or worn items unless you tweak it with "Does the player mean..." or make it clear which hat is "yours".

What I think you'll run into next is the verb TAKE OFF or REMOVE usually means specifically "take off something [the person asked] is wearing" which I believe will parse as "Joe is unable to do that." or "Joe is not wearing your hat." since he's not wearing the item called "my hat". I think you'd just need JOE, TAKE HAT. Again I'm guessing, but I believe TAKE disambiguates to choose something preferably not held or worn by the actor.

I've not experimented much with NPCs removing clothes from the player and the involved permissions (surprisingly) so you may need to experiment with this.

_________________
http://hanonondricek.wixsite.com/pyramidif
https://pyramidif.itch.io/


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Jan 04, 2019 7:49 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 5526
Location: Burlington, VT
One thing is that, from things said in this thread, "my" may have some special built-in handling that is hard to override:

zarf wrote:
This is what I meant when I said "'my' is treated as a pronoun". It is biased towards objects in your possession, but can refer to any object. (Maybe the large key is actually the key to your house, or was the first object you picked up at the start of the game. The parser has no way to understand ownership in that sense.)

This is a problem for body parts, or anything which has a concrete sense of ownership. Unfortunately, it does require some I6 hacking to work around this. (There may be an extension that deals with it, I'm not sure.)


There's more discussion about that in this thread, along with a hack that involves replacing the word "my" before processing the command.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Jan 08, 2019 2:41 am 
Offline
User avatar

Joined: Sun Nov 22, 2009 12:58 pm
Posts: 810
Location: Malmö, Sweden
Hacking "my" in I6 isn't too bad -- the Parsing Descriptors heading loops LanguageDescriptors, of which the first element is "my", so begin the loop on the second item and that should work. Am I missing something, or wouldn't the Informy thing to do be to pull it into I7 (possibly an Activity)? Surely the biasing etc could be default I7 coded behavior?

_________________
~Björn Paulsen


Top
 Profile Send private message  
Reply with quote  
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: GiannisG, necrodeath and 15 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