ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Clothing Slots

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Clothing Slots

Postby malenfant21 » Wed Jul 02, 2014 2:29 pm

Hi everyone!
This is my first post on here but I've enjoyed IF since the days of Zork and Adventureland (on the Commodore Vic-20, no less!!!).

I just spent a fair bit of time working on Adrift to incorporate the infamous clothing layers I've read about a little bit on this site.

Right now, I have managed to build a working model that:
- uses 10 different slots (Head, Neck, Torso, Waist, Pelvis, Arms, Hands, Thighs, Calves, Feet)
- allows objects to be worn on multiple slots at the same time (ex. a hoodie can cover Head, Neck,Torso, and Arms; trousers can cover Waist, Pelvis, Thighs, and Calves)
- allows use of any number of clothing layers (
- restricts players from removing objects that are covered (ex. you cannot remove your shirt without removing your jacket first)
- restricts players from wearing objects when a higher-layer object in the same slot is already worn (ex. you cannot put on underwear if you are wearing pants)

I'm working on concealing clothing that is not the highest layer in a slot (ex. if you are wearing a jacket, the "inventory" command will not show your shirt which is hidden by the jacket.)

Does anyone want something like this?

What's the next step?

Thanks
malenfant21
 
Posts: 4
Joined: Tue Jul 01, 2014 4:15 am

Re: Clothing Slots

Postby malenfant21 » Wed Jul 02, 2014 4:29 pm

Here's a link to the TAF file. http://www.4shared.com/file/d2juEksEce/clothing_layers.html?

Please let me know what you think.

Thanks
malenfant21
 
Posts: 4
Joined: Tue Jul 01, 2014 4:15 am

Re: Clothing Slots

Postby malenfant21 » Thu Jul 03, 2014 3:48 pm

Here's the actual taf file.
Attachments
clothing layers.taf
(16.64 KiB) Downloaded 193 times
malenfant21
 
Posts: 4
Joined: Tue Jul 01, 2014 4:15 am

Re: Clothing Slots

Postby ice_wanted » Wed Jul 09, 2014 1:51 am

Nicely done so far. I could use this if you get the visibility. Adding commands to pull up or unzip clothing items (while affecting visibility) would be the following step I would like to see.
ice_wanted
 
Posts: 95
Joined: Thu Aug 22, 2013 1:12 am
Points: 10

Re: Clothing Slots

Postby Lumin » Wed Jul 09, 2014 4:06 pm

Malenfant, thanks for this, it's probably much more efficient than the mess I kludged together for my own game. I'd suggest uploading it to the demos section of the main site, I'm sure other people could make use of it too, and not everyone visits the forums.

(Actually lately it seems like no one visits the forums, but ah well, I guess we've gone through these phases before...)
User avatar
Lumin
 
Posts: 2115
Joined: Fri Aug 06, 2004 5:48 pm
Points: 49

Re: Clothing Slots

Postby Lazzah » Wed Jul 09, 2014 11:43 pm

Lumin wrote:Malenfant, thanks for this, it's probably much more efficient than the mess I kludged together for my own game. I'd suggest uploading it to the demos section of the main site, I'm sure other people could make use of it too, and not everyone visits the forums.

(Actually lately it seems like no one visits the forums, but ah well, I guess we've gone through these phases before...)

Well I'm still visiting at least once a day and I know PO Prune is as well. Campbell doesn't seem to be around very much these days, because of the new baby no doubt, but I noticed he has added a few more fixed bugs to the list on the bugs and enhancements page (24 to date). Who knows, we may even get a new version of ADRIFT sometime this year! :whistle:
The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust, The Lost Children, Run, Bronwynn, Run, The Call of the Shaman, The Lost Labyrinth of Lazaitch, Magnetic Moon, Starship Quest, Revenge of the Space Pirates
User avatar
Lazzah
Moderator
 
Posts: 2353
Joined: Thu Mar 31, 2011 4:54 am
Location: Clacton-on-Sea, Essex
Points: 65

Re: Clothing Slots

Postby malenfant21 » Sun Jul 13, 2014 11:40 pm

ice_wanted wrote:Nicely done so far. I could use this if you get the visibility. Adding commands to pull up or unzip clothing items (while affecting visibility) would be the following step I would like to see.


Well, visibility is done. I used a trick where I move all clothes to a NPC (the mannequin) and then move ONLY the top-most layer to the player every time the player wears or removes something.

As for pulling-up or un-zipping... do you mean like unzipping a jacket to reveal the shirt beneath and the jacket?

Sounds like it would involve adding a property for clothing (can be unzipped) and then... I'm not sure :)
malenfant21
 
Posts: 4
Joined: Tue Jul 01, 2014 4:15 am

Re: Clothing Slots

Postby Lumin » Mon Jul 14, 2014 12:43 am

I'm sure the AIF crowd will put zippers to good use. :P
User avatar
Lumin
 
Posts: 2115
Joined: Fri Aug 06, 2004 5:48 pm
Points: 49

Re: Clothing Slots

Postby Dastardly » Tue Dec 16, 2014 1:55 am

I installed the library to a game I am working on and the following happens after hitting return:

First error
Image

Then, after clicking 'ok' on that, this comes up:

second error
Image

Any ideas? Suggestions?

Even after the item is worn, the game still says the PC is naked
i.e.
Image

I hope someone can help me understand what is going on here. :?

Thanks
Dastardly
 
Posts: 14
Joined: Thu Nov 20, 2014 12:52 am
Points: 10

Re: Clothing Slots

Postby The0didactus » Wed Feb 26, 2020 5:34 pm

This thread is a little old, but in the interest of giving credit where credit is due, I "stole" this method for use in Lost Coastlines. It's an elegant solution to a rather complex problem.
The0didactus
 
Posts: 286
Joined: Sun Mar 30, 2014 8:20 pm
Points: 150


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 1 guest

cron