intfiction.org

The Interactive Fiction Community Forum
It is currently Wed Jun 20, 2018 7:23 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Postures by Emily Short
PostPosted: Sun May 04, 2014 8:02 pm 
Offline

Joined: Tue Mar 18, 2008 9:04 am
Posts: 1115
This topic is for discussions related to Postures by Emily Short


Top
 Profile Send private message  
Reply with quote  
 Post subject: Quick Postures Question
PostPosted: Sun Sep 21, 2014 5:03 pm 
Offline

Joined: Tue Nov 08, 2011 8:11 am
Posts: 2502
Location: US - Central
I'm using Postures by Emily Short, and I'm having difficulty with "preferred" postures. The documentation seems to be missing a part.

Quote:
Section 1.1: Possible Postures

Each piece of furniture comes with a range of possible postures, which can be expressed with the posture-permission relation: as in


The bunk bed allows seated and reclining.
This definition would say that we're allowed to sit or lie down on the bunk bed, but not to stand up on it. Player attempts to

>STAND ON BUNK BED
will be rejected with

Section 1.2: Preferred Postures

In addition to permitted postures, furniture can have a "preferred" posture: it's possible to stand on a chair, but we're more likely to sit on it. Preferred postures are used to guess what the player means if he types


>GET ON BUNK BED
without naming a posture.


I've tried "step ladder allows seated and standing. step ladder prefers standing" and "...step ladder is usually standing." but the compiler doesn't like either of those. It looks like some of the documentation went missing due to the cut off sentence shown above, so I wonder if this was meant to be taken out?

I even scanned the source of the extension to see if I could find what it wants, but nothing popped out. This isn't critical for my WIP but was curious if I'm missing something.

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


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Sep 21, 2014 5:27 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2617
Location: The Midwest
You don't need "usually" for a single object. Just say "the step ladder is standing".

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Sep 22, 2014 12:46 am 
Offline

Joined: Tue Nov 08, 2011 8:11 am
Posts: 2502
Location: US - Central
Ah will try that. That must be what got lost in the instructions.

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


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Apr 14, 2015 11:26 am 
Offline

Joined: Tue Mar 18, 2008 9:04 am
Posts: 1115
I've tweaked the documentation here and will upload a revised version.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon May 28, 2018 7:23 am 
Offline

Joined: Wed Nov 12, 2014 5:20 pm
Posts: 137
Inspired by this post, I've made a pull request to the Extensions Github repository with an updated version of this extension:

https://github.com/i7/extensions/pull/47

Any comments are very welcome. I'll just copy my thoughts from the PR description here:

I'm not sure what the best way is to handle responses about actions taken by NPC:s. More or less every message printed in the current code is preceded by checking "if the actor is visible," which doesn't seem very elegant and could potentially be slow. In the standard rules, the more common check seems to be "if the actor is the player" and then printing nothing if the actor isn't.

But I think it is nice to get a more detailed response, such as "Clark is already standing on the folding chair," rather than just "Clark is unable to do that," and all those "if the actor is visible" seem to be the simplest way to achieve that without having to write a lot of separate rules just to print basically the same response.

The "convert lying down rule," "convert sitting down rule" and "convert standing up rule" used to end with success or failure, but I've found that if I print a failure message such as "There [are] nothing [here] to sit on," I have to return success, otherwise there will be a second response printed:

Code:
>Clark, sit
There is nothing here to sit on.

Clark is unable to do that.

This means that the rules will now always end in success, which makes all those "rule succeeds" lines a little redundant.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Jun 19, 2018 2:47 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2617
Location: The Midwest
One option is to provide unsuccessful attempt rules, which are run in place of report rules when an action taken by an NPC fails. (These are what give the "Clark is unable to do that" messages.) You can check whether "the reason the action failed" matches one of your rules and print a better failure message.

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Jun 19, 2018 2:55 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 5291
Location: Burlington, VT
Draconis wrote:
One option is to provide unsuccessful attempt rules, which are run in place of report rules when an action taken by an NPC fails. (These are what give the "Clark is unable to do that" messages.) You can check whether "the reason the action failed" matches one of your rules and print a better failure message.


Specifically, they run when an NPC action performed in response to a request fails. An NPC action invoked directly from the source code like "Try Clark sitting" will not invoke unsuccessful attempt rules.


Top
 Profile Send private message  
Reply with quote  
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 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