Quantcast
Channel: Modding — Beamdog Forums
Viewing all articles
Browse latest Browse all 11774

Highlighting unowned items in stores

$
0
0
Hi guys, I just made up a single script that will highlight store items that are not in the inventory of selected character (or contents of opened bag). I normally use it when buying spells or potions, to check if I already have it in my Scroll/Potion Case: ` function groupHasItem(item, groupItems) for k,v in pairs(groupItems) do if item.item.res == v.item.res then return true end end return false end ` and this needs to be added to menu with name STORE_BUYSELL, just before the label responsible for printing the value of item (with text lua "store.storeItems[rowNumber].value"): label { area 310 0 91 60 enabled "not groupHasItem(store.storeItems[rowNumber], store.groupItems)" rectangle 7 rectangle opacity 150 } Now I don't have an experience/knowledge to "pack" this code into some sort of patch or UI-mod, so this is all I can offer. It helped me, maybe it will suit others too :smile: Feel free to use without any restriction, in any form.

Viewing all articles
Browse latest Browse all 11774

Latest Images

Trending Articles



Latest Images