0.10.7 - Clothing use condition do not trigger when it is equipped [RESOLVED 0.11.4]

Locked
User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

0.10.7 - Clothing use condition do not trigger when it is equipped [RESOLVED 0.11.4]

Post by Yagiza »

If I have a piece of clothing with use condition like this:
Item _cloak_ item class 6 subclass 13

_cloak_ used do _adjust_
_adjust_ task trigger only if I do not wear _cloak_ when using it .
When I use _cloak_ having it on me, _adjust_ task do not trigger.

I already afraid of reply that it isn't a bug but another wonderful improvement for stupid players. :shock:

User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

Re: Clothing use condition do not trigger when it is equipped

Post by Yagiza »

Performed more investigation and found out, that it works even strangely, than I thought:

When I give the item to an enemy:
give item _cloak_ to _mage_
and then kill it and take the item from its body, it behaves just as described above: could be used only when I don't wear it.

But when I give it to PC:
get item _cloak_
,
It behaves differently:
It cannot be used at all, but when I wear it with Equip button, _adjust_ action triggered, just like it was used!

Another interesting thing is that if I use it as described above (with use command) and it displays a message in _adjust_ action, I leave inventory mode. But if it is used the second way (with Equip command), after message is displayed, I'm back in my inventory. And if the action puts an item to the inventory, like this:
_adjust_ task:
say 1083
get item _map_
,
it do not appear before I leave inventory manually and then switch back to it!

So, this strange behavior seems to be obviously a bug.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Clothing use condition do not trigger when it is equipped

Post by Interkarma »

"item used do" will trigger on both an "equip" and "use" inventory action. Picking up and transferring item won't trigger this condition.

There are a few layers for "use" action in combination with clothing however. You can "use" clothing to adjust appearance state, to cast spells, and to trigger quest actions. I agree this sounds like a bug where secondary usage isn't being triggered by clothing with multiple states while equipped.

Yagiza wrote: Tue Sep 24, 2019 8:30 pm it do not appear before I leave inventory manually and then switch back to it!
The game is paused while UIs are open, including quest execution. If you need to give the player an item, this quest action will not execute until player closes the UI. Items that have a quest action waiting for clicks (e.g. letters) will drop back to world so quest system can operate on that click (e.g. show popup text). Once issue with clothing "use" and quest actions is resolved, it will follow this pattern.

I'll move this to bug reports now, thanks for the spot.

User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

Re: Clothing use condition do not trigger when it is equipped

Post by Yagiza »

Interkarma wrote: Tue Sep 24, 2019 9:21 pm "item used do" will trigger on both an "equip" and "use" inventory action. Picking up and transferring item won't trigger this condition.
Just checked original Daggerfall. In original Daggerfall item used do always triggers on Use (no matter, if the item is equipped, or not) and never on Equip.
In DFU, when quest item appears in your inventory by get item command or by picking it from the floor, it triggers on both Use and Equip. For items, taken from enemies, it triggers only for Use and never for Equip (as it was in original Daggerfall). But either way, Use never trigger the action, when item is equipped. So, I hope, the whole issue will be fixed and will act as in original Daggerfall.
Interkarma wrote: Tue Sep 24, 2019 9:21 pmThere are a few layers for "use" action in combination with clothing however. You can "use" clothing to adjust appearance state, to cast spells, and to trigger quest actions.
Yes. And that's the whole idea of the quest, when user tries to adjust appearance state of clothing and something interesting happens.

P. S.: Quest engine of DFU is an improved version of X-engine, used by Daggerfall, so it would be a good idea to add conditions to check, if item equipped and for item equip event. Like
_anItem_ equipped do _aTask_
_anItem_ equipped saying nnnn do _aTask_
equipped _anItem_ set _aVariable_
equipped _anItem_ do _aTask_


Locked