Not able to "use" quest items

Discuss modding questions and implementation details.
Post Reply
User avatar
harbinger451
Posts: 199
Joined: Mon Apr 13, 2020 4:08 pm
Contact:

Not able to "use" quest items

Post by harbinger451 »

So, I've got a drug script that applies certain effects when you use some new drug items I've added. It works for items picked up or bought in the world at large (from loot piles, corpses, shops etc), but using any drug items gained through the quest system doesn't seem to apply the effects. Anyone any clue why? Or how to get round it?
Maybe something I need to add to the coding that applies it to quest items? Kinda makes my "buy some drugs" quests pointless if you can't "use" the drugs.
Image

User avatar
harbinger451
Posts: 199
Joined: Mon Apr 13, 2020 4:08 pm
Contact:

Re: Not able to "use" quest items

Post by harbinger451 »

If anyone's interested, this issue should hopefully be solved with a later version of DFU. In the words of Hazlenut (I hope he doesn't mind me paraphrasing ...
To allow this to work, a DFU code change will be needed so that the quest Item resource class uses ItemBuilder rather than doing the item construction itself. This won't be available until DFu 1.2 though since 1.1 is locked now. I think I'll probably add a different definition form so that there's no chance of affecting normal items in any way. But until then your items will not have their custom use code working if created by quest script. New item definitions will likely change to something like

Code: Select all

Item _skooma_ item template 564
Image

Post Reply