intfiction.org

The Interactive Fiction Community Forum
It is currently Sun Jul 22, 2018 7:53 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sun Jul 01, 2018 4:07 pm 
Offline

Joined: Thu Jan 31, 2013 12:57 am
Posts: 22
I have created a new relation called "Superworn". I am looking for things that the player "superwears" to not be counted against its carrying capacity. I have looked through the Standard Rules, trying to emulate "wear" but I can't find anything related to inventory and carrying capacity for "worn" things ("now things worn by the player are marked for listing", etc.). Where can I find this so I can add it to my new "superworn" relation? Or am I out of luck and this is getting into I6 territory?

EDIT from below:

Maybe I should clarify, I'm sorry.

This relationship itself doesn't have anything to do with the player wearing anything. I'd in effect like to duplicate the code (or whatever) for the 'worn' relationship in regards to listing inventory items and carrying capacity and have it apply instead to this 'superwears' relationship. The only thing I can find in the Standard Rules for 'wear' is 'now the player wears the item' or somesuch.

My issue is that when the player 'superwears' an item, it is still listed as being carried (which I would not like it to be). Worn items are not listed as being carried (and do not count against carrying capacity afaik).

Take the code below for listing inventory:

Code:
now all the things enclosed by the player are marked for listing;
   now all the things worn by the player are unmarked for listing;
   now all the things superworn by the player are unmarked for listing;
   say "You are carrying:";
   repeat with item running through things carried by yourself:
      if item is carried:
              say "a [item]";
   now all the things enclosed by the player are unmarked for listing;
   now all the things worn by the player are marked for listing;
   now all the things superworn by the player are unmarked for listing;
   say "You are wearing:";
   repeat with item running through things worn by yourself:
      say "a [item]";
   now all the things enclosed by the player are unmarked for listing;
   now all the things worn by the player are unmarked for listing;
   now all the things superworn by the player are marked for listing;
   say "You are superwearing:";
   repeat with item running through things superworn by yourself:
      say "a [item]";


An item that is superworn is listed under both 'carried' as well as 'superworn' categories. I'd like this to not be so, and the closest relationship I could think of was the 'wear' relationship, but I can't find what makes 'wear' act the way it does. (And without getting hokey like 'if an item is carried but also superworn, don't say the name of the item while listing inventory'.)

I hope that doesn't add to the confusion lol.


Last edited by Metalgearmaycry on Wed Jul 04, 2018 11:16 am, edited 1 time in total.

Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Jul 01, 2018 5:04 pm 
Offline
User avatar

Joined: Sun Nov 22, 2009 12:58 pm
Posts: 761
Location: Malmö, Sweden
I may be wrong here, since I don't use that functionality much, but I'd do it the other way around: just rework the carrying capacity functionality instead. You could add a simple definition, such as this:

Code:
The revamped carrying capacity rule substitutes for the can't exceed carrying capacity rule.
A thing can be nonencumbering.
Definition: a thing is encumbering if it is not nonencumbering.

Check an actor taking (this is the revamped carrying capacity rule):
   if the number of encumbering things carried by the actor is at least the
      carrying capacity of the actor:
      if the actor is the player:
         say "[We]['re] carrying too many things already." (A);
      stop the action.


that would make all "nonencumbering" items not count towards the carrying capacity limit, or you could model weight in a more complex fashion.

This may not be what you need. Basically, though, you could hook in the superworn relation here, and thus not need the "nonencumbering" property or the definition. The reason I didn't do that was because I don't really understand what "superworn" is supposed to signify in-game.

_________________
~Björn Paulsen


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Jul 01, 2018 8:46 pm 
Offline

Joined: Tue Nov 08, 2011 8:11 am
Posts: 2516
Location: US - Central
Don't wearable worn objects already not count into carrying capacity? I know I made a camera with a strap wearable specifically so it wouldn't count toward carrying capacity.

Or are you having the issue that the player can't remove a worn item if they are fully encumbered?

Sorry if I've misinterpreted what you're doing altogether, but knowing why you want to do something can help. In many cases, someone has accounted for it - either in the documentation, the recipe book, or an extension.

Solution A: Don't write inventory management puzzles. People hate them.
Solution B: Rewrite the "taking off something worn" action (whatever it is) so that it drops the removed item instead of trying to put it in inventory.
Solution C: Give the player a container that is dubbed the "player's holdall"

Quote:
A player's holdall is a capacious bag into which the player automatically places surplus items whenever his or her hands are full

3:21 : http://inform7.com/learn/man/WI_3_21.html

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


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Jul 04, 2018 6:26 am 
Offline

Joined: Sat Oct 17, 2015 5:48 am
Posts: 61
as world model goes, IMHO dress should not be encumberance, provided isn't armour or otherwise heavy/unbalanced.

On the dress-as-holdall, the actual inventory of my actual pockets led me to agree, to say the least, that makes sense.

Best regards from Italy,
dott. Piergiorgio.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Jul 04, 2018 11:13 am 
Offline

Joined: Thu Jan 31, 2013 12:57 am
Posts: 22
Maybe I should clarify, I'm sorry.

This relationship itself doesn't have anything to do with the player wearing anything. I'd in effect like to duplicate the code (or whatever) for the 'worn' relationship in regards to listing inventory items and carrying capacity and have it apply instead to this 'superwears' relationship. The only thing I can find in the Standard Rules for 'wear' is 'now the player wears the item' or somesuch.

My issue is that when the player 'superwears' an item, it is still listed as being carried (which I would not like it to be). Worn items are not listed as being carried (and do not count against carrying capacity afaik).

Take the code below for listing inventory:

Code:
now all the things enclosed by the player are marked for listing;
   now all the things worn by the player are unmarked for listing;
   now all the things superworn by the player are unmarked for listing;
   say "You are carrying:";
   repeat with item running through things carried by yourself:
      if item is carried:
              say "a [item]";
   now all the things enclosed by the player are unmarked for listing;
   now all the things worn by the player are marked for listing;
   now all the things superworn by the player are unmarked for listing;
   say "You are wearing:";
   repeat with item running through things worn by yourself:
      say "a [item]";
   now all the things enclosed by the player are unmarked for listing;
   now all the things worn by the player are unmarked for listing;
   now all the things superworn by the player are marked for listing;
   say "You are superwearing:";
   repeat with item running through things superworn by yourself:
      say "a [item]";


An item that is superworn is listed under both 'carried' as well as 'superworn' categories. I'd like this to not be so, and the closest relationship I could think of was the 'wear' relationship, but I can't find what makes 'wear' act the way it does. (And without getting hokey like 'if an item is carried but also superworn, don't say the name of the item while listing inventory'.)

I hope that doesn't add to the confusion lol.


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: No registered users and 5 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