how to make lootable/pickable guitars, flashlights, radios and other "devices" from dead npc's? I want to loot items that are given to particular npc in character_desc_xxx.xml files (stalkers are using guitars but after killing them this devices are no longer present in their inventory)
Hey, NatVac, I made a repair kit script from the abc bag.
The code is working, but I want to make the repair kits droppable. Right now, when I drop the kit from the inventory the window will open, and when cancelling it will give me a duplicate.
EDIT: Found a workaround.
Moved the code to process the repair kit to the use_object callback (which I already used to play item sounds in the inventory). Removed the use of _dev script to time the menu (I was experiencing some serious slowdown, but I'm not sure it was actually because of that, loading the game once without any gamedata folder and again with the mod seemed to fix the problem).
After that I was having problem with the inventory eating my extra toolkit, but I realized it was because of a check to see if one existed in inventory before creating a new one. Removed the check, and everything seems to be working as expected.