intfiction.org

The Interactive Fiction Community Forum
It is currently Wed May 22, 2013 6:46 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Mon Apr 02, 2012 10:13 pm 
Offline

Joined: Fri Mar 09, 2012 3:42 pm
Posts: 62
Hi, folks. I have a bit of an odd case on my hands - I have an item in my game that needs special handling wherever a pronoun would appear in the standard messaging. Specially, it needs to be referred to by its full name wherever a pronoun would normally be used. I'm using Plurality, and it looks like the it-them and it-they values cover all the needed cases, but I can't figure out how to override these values for just one object, or whether it's even possible to do so. Does anyone have any experience trying to do this kind of thing?


Top
 Profile Send private message  
 
PostPosted: Mon Apr 02, 2012 10:25 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 2128
Location: Burlington, VT
I don't have any experience doing this, but it seems as though the relevant rule in Plurality should be easy enough to hack. Instead of this:

Code:
To say it-them of (item - a thing):   
    now the prior named noun is the item;
   mark prior named noun in output;
    if the item acts plural
    begin;
       say "them";
    otherwise if the item is the player;
       say "you";
   otherwise if the item is male and item is not neuter;
         say "him";
    otherwise if the item is female and item is not neuter;
       say "her";
    otherwise;
       say "it";
    end if.


can you put this:

Code:
To say it-them of (item - a thing):   
    now the prior named noun is the item;
   mark prior named noun in output;
    if the item is the macguffin
    begin;
       say "the macguffin";
    otherwise if the item acts plural
    begin;
       say "them";
    otherwise if the item is the player;
       say "you";
   otherwise if the item is male and item is not neuter;
         say "him";
    otherwise if the item is female and item is not neuter;
       say "her";
    otherwise;
       say "it";
    end if.


and similarly for [It-them]? I don't usually use the begin-end if syntax, but this seems pretty straightforward.


Top
 Profile Send private message  
 
PostPosted: Mon Apr 02, 2012 10:43 pm 
Offline

Joined: Fri Mar 09, 2012 3:42 pm
Posts: 62
Huh. Just overwriting the whole rule hadn't occurred to me, but I can't think of any reason that wouldn't work. Thanks!


Top
 Profile Send private message  
 
PostPosted: Tue Apr 03, 2012 2:00 am 
Offline

Joined: Tue Dec 25, 2007 10:06 am
Posts: 887
You could also not override the whole phrase but add a special case (more specific phrases override less specific phrases):

Code:
To say it-them of (item - the King):
   say "His Royal Highness".

_________________
Vorple UI libraryBeta testing siteBlog


Top
 Profile Send private message  
 
PostPosted: Tue Apr 03, 2012 5:46 am 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 2128
Location: Burlington, VT
That's a much, much better idea!

If you want to generalize it, can you do that based on an adjective, like this?

Code:
A thing can be pronoun-referrable or non-pronoun-referrable. A thing is usually pronoun-referrable.

To say it-them of (item - a non-pronoun-referrable thing):
   say "[the item]".


Top
 Profile Send private message  
 
PostPosted: Wed Apr 04, 2012 11:07 am 
Offline

Joined: Fri Jul 16, 2010 2:09 pm
Posts: 1950
I don't think so. I believe it has to be a kind (or a specific object).


Top
 Profile Send private message  
 
PostPosted: Wed Apr 04, 2012 2:27 pm 
Offline

Joined: Fri Mar 09, 2012 3:42 pm
Posts: 62
capmikee wrote:
I don't think so. I believe it has to be a kind (or a specific object).

I tried the adjective-based approach just now, and it seems to have worked. I'll keep an eye out for unwanted side-effects.


Top
 Profile Send private message  
 
PostPosted: Wed Apr 04, 2012 2:43 pm 
Offline

Joined: Fri Jul 16, 2010 2:09 pm
Posts: 1950
Well, that's nice to know. It seems to work for regular (non-say) phrases and "to decide" phrases as well. But not for adjective definitions.


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

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 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