Help with coding multi-wear locations for SMAUG/SMAUGfuss

Posted by Ntechh on Wed 17 Jul 2019 04:52 PM — 3 posts, 13,666 views.

#0
I'm running a customized version of SMAUGfuss, and as you know, it supports layering of clothing, but not clothing covering multiple parts (for example, a shirt that when worn covers neck, chest and arms).

How would I implement such a system, where an item takes up all the wear locations of its wear-flags?

Perhaps the item could be duplicated and put in each slot (as placeholders)?
Australia Forum Administrator #1
Or you could have a check that, if you have a multi-part shirt, then you can't equip neck or arms items.
#2
Yep. So what I decided to go with was to create a new item-type flag, ITEM_CLONE, which, if enabled, would mean that an item is simply a placeholder.

So I modified the wear code to create a duplicate of an item for each wear flag it has, to add the ITEM_CLONE item-type flag, and to put it on. I also modified the remove code to serach for all gear currently equipped and delete each one that matchces the keyword, if it has the flag ITEM_CLONE.

This would prevent the stacking of bonuses, and seems to be the simplest solution.