intfiction.org

The Interactive Fiction Community Forum
It is currently Wed Jun 19, 2013 12:12 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Fri Apr 20, 2012 2:55 pm 
Offline

Joined: Fri May 06, 2011 7:15 pm
Posts: 489
Location: The Big Apple
You can define multiple actions as a kind of action (see Section 7.15 of the Manual) and then use an instead rule which refers to the kind of action.

Robert Rothman


Top
 Profile Send private message  
 
PostPosted: Fri Apr 20, 2012 2:58 pm 
Offline
User avatar

Joined: Sun Nov 22, 2009 12:58 pm
Posts: 402
Location: Malmö, Sweden
Well, first of all, I'd name the action "grabbing" if only to maintain consistency.

Secondary, you can easily add conditions to an instead statement, like so:

Code:
Grabbing is an action applying to one visible thing.

Home is a room. A flight stick is here.

Instead of pushing or pulling or grabbing when the noun is the flight stick, say "No."

_________________
~Björn Paulsen


Top
 Profile Send private message  
 
PostPosted: Sat Apr 21, 2012 11:58 pm 
Offline

Joined: Mon Apr 16, 2012 12:33 am
Posts: 10
Eleas wrote:
Well, first of all, I'd name the action "grabbing" if only to maintain consistency.

Secondary, you can easily add conditions to an instead statement, like so:

Code:
Grabbing is an action applying to one visible thing.

Home is a room. A flight stick is here.

Instead of pushing or pulling or grabbing when the noun is the flight stick, say "No."



Thanks for the post. I had to add:

Code:
Understand "grab [something]" as grabbing.


To get it to work, but all is well now.

And any idea why Inform requires this? (assuming I'm doing everything correctly that is) It seems odd that Inform can infer things so easily when creating rooms, yet setting up an action requires two lines of:

Code:
Grabbing is an action applying to one visible thing.

Understand "grab [something]" as grabbing.


Seems like the game could figure it out with just one line of code by assuming most actions work by having "ing" taken from them.

Code:
Grabbing is an action applying to one visible thing.

^^^ Should just work in my mind. Does it?

Code:
Grab is an action applying to one visible thing.

^^^^ Better yet, just Grab it as above would simplify things.

I'm not complaining about Inform as much as trying to figure out its reasoning.


Thanks,

Tom / Hardwater


Top
 Profile Send private message  
 
PostPosted: Sun Apr 22, 2012 1:54 am 
Offline

Joined: Tue Dec 25, 2007 10:06 am
Posts: 898
If you remove -ing from "grabbing" you get "grabb".

_________________
Vorple UI libraryBeta testing siteBlog


Top
 Profile Send private message  
 
PostPosted: Sun Apr 22, 2012 5:11 am 
Offline
User avatar

Joined: Sun Nov 22, 2009 12:58 pm
Posts: 402
Location: Malmö, Sweden
Hardwater wrote:
Thanks for the post. I had to add:

Code:
Understand "grab [something]" as grabbing.


To get it to work, but all is well now.


That's good.

I wanted as compact an example as possible so I didn't add the understand statement, but yeah, you do have to define the vocabulary of actions separately. Juhana gives one reason for why Inform 7 works like that. Another reason is because the Understanding machinery is flexible enough to handle variations, so you'd frequently have to define synonyms and preferred interpretations for your new actions anyhow.

_________________
~Björn Paulsen


Top
 Profile Send private message  
 
PostPosted: Sun Apr 22, 2012 1:29 pm 
Offline

Joined: Sun Dec 05, 2010 11:07 am
Posts: 321
Location: ኢትዮጵያ
WI 12.8 explains this design decision:
Quote:
Our three example actions can be recognised in play using the following:

Code:
Understand "photograph [something]" as photographing.
Understand "blink" as blinking.
Understand "scrape [something] with [something]" as scraping it with.


The last of these examples shows why Inform does not risk generating this automatically: English is so full of irregular verbs. Inform could have guessed "blink" and "photograph", but might then have opted for "scrap" instead of "scrape".


Top
 Profile Send private message  
 
PostPosted: Sun Apr 22, 2012 1:52 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 2138
Location: Burlington, VT
I've also written this:

Code:
Keywording is an action applying to one topic. Understand "[text]" as keywording.


I wouldn't want Inform to automatically try to understand "keyword [text]" as keywording, because I'd want the input "Keyword" to be understood as keywording "keyword", not as keywording "".


Top
 Profile Send private message  
 
PostPosted: Tue Apr 24, 2012 12:03 am 
Offline

Joined: Mon Apr 16, 2012 12:33 am
Posts: 10
I am using Reactable Quips by Michael Martin (version 10) with plenty o' success for my NPCs. Now I am running into a hurdle where I want to have a handheld computer that the player can carry with them and ask computer about [awesome thing here].

Only people can be asked questions, so if I make the computer a person then it creates odd situations with the parser such as not being able to pick them up.

Is there a way to get Reactable Quips to function with an inanimate object? I've been trying to use the recipe of "9.6. Reading Matter", but sticking to the "ask" command still gives inanimate warnings.


Thanks,

Tom / Hardwater


Top
 Profile Send private message  
 
PostPosted: Tue Apr 24, 2012 4:13 am 
Offline
User avatar

Joined: Thu Nov 04, 2010 6:30 am
Posts: 999
Location: Gothenburg, Sweden
At the Inform 6 level Inform only checks whether things are "animate"; so, if no Inform 7 code intervenes (I don't think it does in the Standard Rules – at least the ask and tell grammar allows you to address things in general rather than just people), you can do this:
Code:
Include (- has animate -) when defining the computer.

or, more generally,
Code:
A thing can be animate.
The animate property translates into I6 as "animate".
The computer is animate.

Then animate things can be asked and told about topics.

But since the rules and tables of the Reactable Quips extension are defined for people (not for things in general), you'd still have to go into that extension and change "person", "people", and "someone" to "thing", "things" and "something", to be able to use it when addressing animate things.

_________________
Man ska inte tro allt man tänker.


Top
 Profile Send private message  
 
PostPosted: Tue Apr 24, 2012 10:20 am 
Offline

Joined: Sun Dec 05, 2010 11:07 am
Posts: 321
Location: ኢትዮጵያ
Hardwater wrote:
Only people can be asked questions, so if I make the computer a person then it creates odd situations with the parser such as not being able to pick them up.

Honestly, rather than hacking apart the extension and I6-level values, it may be simpler to make the computer a person and write exceptions allowing it to be picked up and carried like other things.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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