[MOD] Better Quick Loot v1.7
Adul
Member Posts: 2,002
Version 1.7
I've made an improved version of the quick loot bar, with the following changes:
You can install this mod to your game by following these steps:
1. Download the zip file from the bottom of this post and unpack its contents into your override folder.
2. Open up the UI.menu file. Search for the line "toggle groundItemsButtonToggle" and delete the button section that contains it. Replace it with the following code:
3. Search for the menu section with the name "WORLD_QUICKLOOT" and delete the entire menu section. Replace it with the following code:
4. Finally, we need to avoid the quick loot bar repositioning itself whenever the message box is resized, as per the original behavior. Find the following line and either delete it or comment it out with --:
Customization:
I've made an improved version of the quick loot bar, with the following changes:
- Turned the quick loot bar into a compact, easy-to-navigate panel
- Can be opened and closed via a hotkey (default: E)
- When the quick loot panel is opened, it appears right next to the mouse cursor so you can start looting immediately
- Added encumbrance indicator
- New page indicator shows the current page number as well as the page total
- Previous/next page buttons only become highlighted when appropriate, they're otherwise greyed out
- Scrolling the mouse wheel over the quick loot panel scrolls between the item pages
You can install this mod to your game by following these steps:
1. Download the zip file from the bottom of this post and unpack its contents into your override folder.
2. Open up the UI.menu file. Search for the line "toggle groundItemsButtonToggle" and delete the button section that contains it. Replace it with the following code:
-- BEGIN BETTER QUICK LOOT INIT 1.7
button
{
area 21 12 32 32
bam ROUNDBUT
scaleToClip
toggle groundItemsButtonToggle
tooltip "Quick Loot"
action
"
if(groundItemsButtonToggle == 1) then
worldScreen:StartGroundItems()
setQuickLootPosition(true)
else
worldScreen:StopGroundItems()
end
"
actionAlt
"
if(groundItemsButtonToggle == 1) then
worldScreen:StartGroundItems()
setQuickLootPosition(true)
else
worldScreen:StopGroundItems()
end
"
}
button
{
area 21 12 0 0
on e
toggle groundItemsButtonToggle
action
"
Infinity_PlaySound('GAM_09')
if(groundItemsButtonToggle == 1) then
worldScreen:StartGroundItems()
setQuickLootPosition()
else
worldScreen:StopGroundItems()
end
"
}
-- END BETTER QUICK LOOT INIT
3. Search for the menu section with the name "WORLD_QUICKLOOT" and delete the entire menu section. Replace it with the following code:
-- BEGIN BETTER QUICK LOOT MAIN 1.7
menu
{
name 'WORLD_QUICKLOOT'
align center center
ignoreEsc
onClose
"
mouseOverQuicklootContainer = nil
"
label
{
area 0 0 422 132
rectangle 0
actionScroll "scrollQuickLootItems()"
}
label
{
area 341 16 68 100
encumbrance
actionScroll "scrollQuickLootItems()"
}
label
{
area 330 53 37 27
mosaic A0BQAR
opacity 220
actionScroll "scrollQuickLootItems()"
}
label
{
area 273 54 65 24
text lua "getQuickLootPageText()"
text style "label"
align center center
actionScroll "scrollQuickLootItems()"
}
label
{
area 283 8 45 48
bam A0BQSV10
sequence 0
frame 1
opacity 180
actionScroll "scrollQuickLootItems()"
}
label
{
area 283 76 45 48
bam A0BQSV10
sequence 1
frame 1
opacity 180
actionScroll "scrollQuickLootItems()"
}
button
{
area 283 8 45 48
bam A0BQSV10
sequence 0
enabled "worldScreen:GroundScrollEnabled(-1)"
action
"
worldScreen:OnGroundScroll(-1)
"
actionScroll "scrollQuickLootItems()"
}
button
{
area 283 76 45 48
bam A0BQSV10
sequence 1
enabled "worldScreen:GroundScrollEnabled(1)"
action
"
worldScreen:OnGroundScroll(1)
"
actionScroll "scrollQuickLootItems()"
}
button
{
area 13 13 52 52
bam STONSLOT
tooltip lua "getGroundItemProperty(0,'name')"
tint lua "getGroundItemProperty(0,'tint')"
icon lua "getGroundItemProperty(0,'icon')"
count lua "getGroundItemProperty(0,'count')"
usages lua "getGroundItemProperty(0,'usages')"
action "groundItemClick(0)"
actionEnter "mouseOverQuicklootContainer = getSlotContainerId(0,'containerId')"
actionExit "mouseOverQuicklootContainer = nil"
actionScroll "scrollQuickLootItems()"
}
button
{
area 67 13 52 52
bam STONSLOT
tooltip lua "getGroundItemProperty(1,'name')"
tint lua "getGroundItemProperty(1,'tint')"
icon lua "getGroundItemProperty(1,'icon')"
count lua "getGroundItemProperty(1,'count')"
usages lua "getGroundItemProperty(1,'usages')"
action "groundItemClick(1)"
actionEnter "mouseOverQuicklootContainer = getSlotContainerId(1,'containerId')"
actionExit "mouseOverQuicklootContainer = nil"
actionScroll "scrollQuickLootItems()"
}
button
{
area 121 13 52 52
bam STONSLOT
tooltip lua "getGroundItemProperty(2,'name')"
tint lua "getGroundItemProperty(2,'tint')"
icon lua "getGroundItemProperty(2,'icon')"
count lua "getGroundItemProperty(2,'count')"
usages lua "getGroundItemProperty(2,'usages')"
action "groundItemClick(2)"
actionEnter "mouseOverQuicklootContainer = getSlotContainerId(2,'containerId')"
actionExit "mouseOverQuicklootContainer = nil"
actionScroll "scrollQuickLootItems()"
}
button
{
area 175 13 52 52
bam STONSLOT
tooltip lua "getGroundItemProperty(3,'name')"
tint lua "getGroundItemProperty(3,'tint')"
icon lua "getGroundItemProperty(3,'icon')"
count lua "getGroundItemProperty(3,'count')"
usages lua "getGroundItemProperty(3,'usages')"
action "groundItemClick(3)"
actionEnter "mouseOverQuicklootContainer = getSlotContainerId(3,'containerId')"
actionExit "mouseOverQuicklootContainer = nil"
actionScroll "scrollQuickLootItems()"
}
button
{
area 229 13 52 52
bam STONSLOT
tooltip lua "getGroundItemProperty(4,'name')"
tint lua "getGroundItemProperty(4,'tint')"
icon lua "getGroundItemProperty(4,'icon')"
count lua "getGroundItemProperty(4,'count')"
usages lua "getGroundItemProperty(4,'usages')"
action "groundItemClick(4)"
actionEnter "mouseOverQuicklootContainer = getSlotContainerId(4,'containerId')"
actionExit "mouseOverQuicklootContainer = nil"
actionScroll "scrollQuickLootItems()"
}
button
{
area 13 67 52 52
bam STONSLOT
tooltip lua "getGroundItemProperty(5,'name')"
tint lua "getGroundItemProperty(5,'tint')"
icon lua "getGroundItemProperty(5,'icon')"
count lua "getGroundItemProperty(5,'count')"
usages lua "getGroundItemProperty(5,'usages')"
action "groundItemClick(5)"
actionEnter "mouseOverQuicklootContainer = getSlotContainerId(5,'containerId')"
actionExit "mouseOverQuicklootContainer = nil"
actionScroll "scrollQuickLootItems()"
}
button
{
area 67 67 52 52
bam STONSLOT
tooltip lua "getGroundItemProperty(6,'name')"
tint lua "getGroundItemProperty(6,'tint')"
icon lua "getGroundItemProperty(6,'icon')"
count lua "getGroundItemProperty(6,'count')"
usages lua "getGroundItemProperty(6,'usages')"
action "groundItemClick(6)"
actionEnter "mouseOverQuicklootContainer = getSlotContainerId(6,'containerId')"
actionExit "mouseOverQuicklootContainer = nil"
actionScroll "scrollQuickLootItems()"
}
button
{
area 121 67 52 52
bam STONSLOT
tooltip lua "getGroundItemProperty(7,'name')"
tint lua "getGroundItemProperty(7,'tint')"
icon lua "getGroundItemProperty(7,'icon')"
count lua "getGroundItemProperty(7,'count')"
usages lua "getGroundItemProperty(7,'usages')"
action "groundItemClick(7)"
actionEnter "mouseOverQuicklootContainer = getSlotContainerId(7,'containerId')"
actionExit "mouseOverQuicklootContainer = nil"
actionScroll "scrollQuickLootItems()"
}
button
{
area 175 67 52 52
bam STONSLOT
tooltip lua "getGroundItemProperty(8,'name')"
tint lua "getGroundItemProperty(8,'tint')"
icon lua "getGroundItemProperty(8,'icon')"
count lua "getGroundItemProperty(8,'count')"
usages lua "getGroundItemProperty(8,'usages')"
action "groundItemClick(8)"
actionEnter "mouseOverQuicklootContainer = getSlotContainerId(8,'containerId')"
actionExit "mouseOverQuicklootContainer = nil"
actionScroll "scrollQuickLootItems()"
}
button
{
area 229 67 52 52
bam STONSLOT
tooltip lua "getGroundItemProperty(9,'name')"
tint lua "getGroundItemProperty(9,'tint')"
icon lua "getGroundItemProperty(9,'icon')"
count lua "getGroundItemProperty(9,'count')"
usages lua "getGroundItemProperty(9,'usages')"
action "groundItemClick(9)"
actionEnter "mouseOverQuicklootContainer = getSlotContainerId(9,'containerId')"
actionExit "mouseOverQuicklootContainer = nil"
actionScroll "scrollQuickLootItems()"
}
}
`
function setQuickLootPosition(buttonPress)
local x,y = Infinity_GetMousePosition()
if (buttonPress) then
x = x - 39
else
x = x + 26
end
y = y - 66
local screenWidth,screenHeight = Infinity_GetScreenSize()
if (x < (-screenWidth+422)/2 + 10) then
x = (-screenWidth+422)/2 + 10
else
if (x > (screenWidth+422)/2 - 432) then
x = (screenWidth+422)/2 - 432
end
end
if (y < (-screenHeight+132)/2 + 10) then
y = (-screenHeight+132)/2 + 10
else
if (y > (screenHeight+132)/2 - 182) then
y = (screenHeight+132)/2 - 182
end
end
Infinity_SetOffset('WORLD_QUICKLOOT',x,y)
local i = 0
while (worldScreen:GroundScrollEnabled(i-1)) do
i = i - 1
end
worldScreen:OnGroundScroll(i)
end
function scrollQuickLootItems()
if scrollDirection > 0 then
if worldScreen:GroundScrollEnabled(-1) then
worldScreen:OnGroundScroll(-1)
end
elseif scrollDirection < 0 then
if worldScreen:GroundScrollEnabled(1) then
worldScreen:OnGroundScroll(1)
end
end
end
function getQuickLootPageText()
local prev = 0
while (worldScreen:GroundScrollEnabled(-prev-1)) do
prev = prev + 1
end
local next = 0
while (worldScreen:GroundScrollEnabled(next+1)) do
next = next + 1
end
return (prev+1) .. "/" .. (prev+next+1)
end
`
-- END BETTER QUICK LOOT MAIN
4. Finally, we need to avoid the quick loot bar repositioning itself whenever the message box is resized, as per the original behavior. Find the following line and either delete it or comment it out with --:
Infinity_SetOffset('WORLD_QUICKLOOT',0, -toolbarTop)
Customization:
- You can edit the line "on e" to change the quick loot hotkey.
- If you're using a language other than English, you can edit the line tooltip "Quick Loot" with the appropriate translation for the quick loot button's tooltip.
Post edited by Adul on
13
Comments
1.5
-- BEGIN BETTER QUICK LOOT INIT 1.5 button { area 21 12 32 32 bam ROUNDBUT toggle groundItemsButtonToggle action " if(groundItemsButtonToggle == 1) then worldScreen:StartGroundItems() setQuickLootPosition(true) else worldScreen:StopGroundItems() end " } button { area 21 12 0 0 on e toggle groundItemsButtonToggle action " Infinity_PlaySound('GAM_09') if(groundItemsButtonToggle == 1) then worldScreen:StartGroundItems() setQuickLootPosition() else worldScreen:StopGroundItems() end " } -- END BETTER QUICK LOOT INIT
-- BEGIN BETTER QUICK LOOT MAIN 1.5 menu { name 'WORLD_QUICKLOOT' align center center ignoreEsc onClose " mouseOverQuicklootContainer = nil " label { area 0 0 422 132 rectangle 0 actionScroll "scrollQuickLootItems()" } label { area 341 16 68 100 encumbrance actionScroll "scrollQuickLootItems()" } label { area 330 53 37 27 mosaic A0BQAR actionScroll "scrollQuickLootItems()" } label { area 273 54 65 24 text lua "getQuickLootPageText()" text style "label" align center center actionScroll "scrollQuickLootItems()" } label { area 283 8 45 48 bam GUISV10 sequence 0 frame 1 opacity 180 actionScroll "scrollQuickLootItems()" } label { area 283 76 45 48 bam GUISV10 sequence 1 frame 1 opacity 180 actionScroll "scrollQuickLootItems()" } button { area 283 8 45 48 bam GUISV10 sequence 0 enabled "worldScreen:GroundScrollEnabled(-1)" action " worldScreen:OnGroundScroll(-1) " actionScroll "scrollQuickLootItems()" } button { area 283 76 45 48 bam GUISV10 sequence 1 enabled "worldScreen:GroundScrollEnabled(1)" action " worldScreen:OnGroundScroll(1) " actionScroll "scrollQuickLootItems()" } button { area 13 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(0,'name')" tint lua "getGroundItemProperty(0,'tint')" icon lua "getGroundItemProperty(0,'icon')" count lua "getGroundItemProperty(0,'count')" usages lua "getGroundItemProperty(0,'usages')" action "groundItemClick(0)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(0,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 67 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(1,'name')" tint lua "getGroundItemProperty(1,'tint')" icon lua "getGroundItemProperty(1,'icon')" count lua "getGroundItemProperty(1,'count')" usages lua "getGroundItemProperty(1,'usages')" action "groundItemClick(1)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(1,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 121 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(2,'name')" tint lua "getGroundItemProperty(2,'tint')" icon lua "getGroundItemProperty(2,'icon')" count lua "getGroundItemProperty(2,'count')" usages lua "getGroundItemProperty(2,'usages')" action "groundItemClick(2)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(2,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 175 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(3,'name')" tint lua "getGroundItemProperty(3,'tint')" icon lua "getGroundItemProperty(3,'icon')" count lua "getGroundItemProperty(3,'count')" usages lua "getGroundItemProperty(3,'usages')" action "groundItemClick(3)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(3,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 229 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(4,'name')" tint lua "getGroundItemProperty(4,'tint')" icon lua "getGroundItemProperty(4,'icon')" count lua "getGroundItemProperty(4,'count')" usages lua "getGroundItemProperty(4,'usages')" action "groundItemClick(4)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(4,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 13 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(5,'name')" tint lua "getGroundItemProperty(5,'tint')" icon lua "getGroundItemProperty(5,'icon')" count lua "getGroundItemProperty(5,'count')" usages lua "getGroundItemProperty(5,'usages')" action "groundItemClick(5)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(5,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 67 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(6,'name')" tint lua "getGroundItemProperty(6,'tint')" icon lua "getGroundItemProperty(6,'icon')" count lua "getGroundItemProperty(6,'count')" usages lua "getGroundItemProperty(6,'usages')" action "groundItemClick(6)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(6,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 121 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(7,'name')" tint lua "getGroundItemProperty(7,'tint')" icon lua "getGroundItemProperty(7,'icon')" count lua "getGroundItemProperty(7,'count')" usages lua "getGroundItemProperty(7,'usages')" action "groundItemClick(7)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(7,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 175 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(8,'name')" tint lua "getGroundItemProperty(8,'tint')" icon lua "getGroundItemProperty(8,'icon')" count lua "getGroundItemProperty(8,'count')" usages lua "getGroundItemProperty(8,'usages')" action "groundItemClick(8)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(8,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 229 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(9,'name')" tint lua "getGroundItemProperty(9,'tint')" icon lua "getGroundItemProperty(9,'icon')" count lua "getGroundItemProperty(9,'count')" usages lua "getGroundItemProperty(9,'usages')" action "groundItemClick(9)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(9,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } } ` function setQuickLootPosition(buttonPress) local x,y = Infinity_GetMousePosition() if (buttonPress) then x = x - 39 else x = x + 26 end y = y - 66 local screenWidth,screenHeight = Infinity_GetScreenSize() if (x < (-screenWidth+422)/2 + 10) then x = (-screenWidth+422)/2 + 10 else if (x > (screenWidth+422)/2 - 432) then x = (screenWidth+422)/2 - 432 end end if (y < (-screenHeight+132)/2 + 10) then y = (-screenHeight+132)/2 + 10 else if (y > (screenHeight+132)/2 - 182) then y = (screenHeight+132)/2 - 182 end end Infinity_SetOffset('WORLD_QUICKLOOT',x,y) local i = 0 while (worldScreen:GroundScrollEnabled(i-1)) do i = i - 1 end worldScreen:OnGroundScroll(i) end function scrollQuickLootItems() if scrollDirection > 0 then if worldScreen:GroundScrollEnabled(-1) then worldScreen:OnGroundScroll(-1) end elseif scrollDirection < 0 then if worldScreen:GroundScrollEnabled(1) then worldScreen:OnGroundScroll(1) end end end function getQuickLootPageText() local prev = 0 while (worldScreen:GroundScrollEnabled(-prev-1)) do prev = prev + 1 end local next = 0 while (worldScreen:GroundScrollEnabled(next+1)) do next = next + 1 end return (prev+1) .. "/" .. (prev+next+1) end ` -- END BETTER QUICK LOOT MAIN
-- BEGIN BETTER QUICK LOOT INIT 1.4 button { area 21 12 32 32 bam ROUNDBUT toggle groundItemsButtonToggle action " if(groundItemsButtonToggle == 1) then worldScreen:StartGroundItems() setQuickLootPosition(true) else worldScreen:StopGroundItems() end " } button { area 21 12 0 0 on e toggle groundItemsButtonToggle action " Infinity_PlaySound('GAM_09') if(groundItemsButtonToggle == 1) then worldScreen:StartGroundItems() setQuickLootPosition() else worldScreen:StopGroundItems() end " } -- END BETTER QUICK LOOT INIT
-- BEGIN BETTER QUICK LOOT MAIN 1.4 menu { name 'WORLD_QUICKLOOT' align center center ignoreEsc onClose " mouseOverQuicklootContainer = nil " label { area 0 0 417 132 rectangle 0 actionScroll "scrollQuickLootItems()" } label { area 336 16 68 100 encumbrance actionScroll "scrollQuickLootItems()" } label { area 273 54 65 24 text lua "getQuickLootPageText()" text style "label" align center center actionScroll "scrollQuickLootItems()" } label { area 283 8 45 48 bam GUISV10 sequence 0 frame 1 opacity 180 actionScroll "scrollQuickLootItems()" } label { area 283 76 45 48 bam GUISV10 sequence 1 frame 1 opacity 180 actionScroll "scrollQuickLootItems()" } button { area 283 8 45 48 bam GUISV10 sequence 0 enabled "worldScreen:GroundScrollEnabled(-1)" action " worldScreen:OnGroundScroll(-1) " actionScroll "scrollQuickLootItems()" } button { area 283 76 45 48 bam GUISV10 sequence 1 enabled "worldScreen:GroundScrollEnabled(1)" action " worldScreen:OnGroundScroll(1) " actionScroll "scrollQuickLootItems()" } button { area 13 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(0,'name')" tint lua "getGroundItemProperty(0,'tint')" icon lua "getGroundItemProperty(0,'icon')" count lua "getGroundItemProperty(0,'count')" usages lua "getGroundItemProperty(0,'usages')" action "groundItemClick(0)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(0,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 67 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(1,'name')" tint lua "getGroundItemProperty(1,'tint')" icon lua "getGroundItemProperty(1,'icon')" count lua "getGroundItemProperty(1,'count')" usages lua "getGroundItemProperty(1,'usages')" action "groundItemClick(1)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(1,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 121 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(2,'name')" tint lua "getGroundItemProperty(2,'tint')" icon lua "getGroundItemProperty(2,'icon')" count lua "getGroundItemProperty(2,'count')" usages lua "getGroundItemProperty(2,'usages')" action "groundItemClick(2)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(2,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 175 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(3,'name')" tint lua "getGroundItemProperty(3,'tint')" icon lua "getGroundItemProperty(3,'icon')" count lua "getGroundItemProperty(3,'count')" usages lua "getGroundItemProperty(3,'usages')" action "groundItemClick(3)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(3,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 229 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(4,'name')" tint lua "getGroundItemProperty(4,'tint')" icon lua "getGroundItemProperty(4,'icon')" count lua "getGroundItemProperty(4,'count')" usages lua "getGroundItemProperty(4,'usages')" action "groundItemClick(4)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(4,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 13 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(5,'name')" tint lua "getGroundItemProperty(5,'tint')" icon lua "getGroundItemProperty(5,'icon')" count lua "getGroundItemProperty(5,'count')" usages lua "getGroundItemProperty(5,'usages')" action "groundItemClick(5)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(5,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 67 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(6,'name')" tint lua "getGroundItemProperty(6,'tint')" icon lua "getGroundItemProperty(6,'icon')" count lua "getGroundItemProperty(6,'count')" usages lua "getGroundItemProperty(6,'usages')" action "groundItemClick(6)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(6,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 121 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(7,'name')" tint lua "getGroundItemProperty(7,'tint')" icon lua "getGroundItemProperty(7,'icon')" count lua "getGroundItemProperty(7,'count')" usages lua "getGroundItemProperty(7,'usages')" action "groundItemClick(7)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(7,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 175 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(8,'name')" tint lua "getGroundItemProperty(8,'tint')" icon lua "getGroundItemProperty(8,'icon')" count lua "getGroundItemProperty(8,'count')" usages lua "getGroundItemProperty(8,'usages')" action "groundItemClick(8)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(8,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 229 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(9,'name')" tint lua "getGroundItemProperty(9,'tint')" icon lua "getGroundItemProperty(9,'icon')" count lua "getGroundItemProperty(9,'count')" usages lua "getGroundItemProperty(9,'usages')" action "groundItemClick(9)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(9,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } } ` function setQuickLootPosition(buttonPress) local x,y = Infinity_GetMousePosition() if (buttonPress) then x = x - 39 else x = x + 26 end y = y - 66 local screenWidth,screenHeight = Infinity_GetScreenSize() if (x < (-screenWidth+417)/2 + 10) then x = (-screenWidth+417)/2 + 10 else if (x > (screenWidth+417)/2 - 427) then x = (screenWidth+417)/2 - 427 end end if (y < (-screenHeight+132)/2 + 10) then y = (-screenHeight+132)/2 + 10 else if (y > (screenHeight+132)/2 - 182) then y = (screenHeight+132)/2 - 182 end end Infinity_SetOffset('WORLD_QUICKLOOT',x,y) local i = 0 while (worldScreen:GroundScrollEnabled(i-1)) do i = i - 1 end worldScreen:OnGroundScroll(i) end function scrollQuickLootItems() if scrollDirection > 0 then if worldScreen:GroundScrollEnabled(-1) then worldScreen:OnGroundScroll(-1) end elseif scrollDirection < 0 then if worldScreen:GroundScrollEnabled(1) then worldScreen:OnGroundScroll(1) end end end function getQuickLootPageText() local prev = 0 while (worldScreen:GroundScrollEnabled(-prev-1)) do prev = prev + 1 end local next = 0 while (worldScreen:GroundScrollEnabled(next+1)) do next = next + 1 end return (prev+1) .. "/" .. (prev+next+1) end ` -- END BETTER QUICK LOOT MAIN
-- BEGIN BETTER QUICK LOOT INIT 1.3 button { area 21 12 32 32 bam ROUNDBUT toggle groundItemsButtonToggle action " if(groundItemsButtonToggle == 1) then worldScreen:StartGroundItems() setQuickLootPosition() else worldScreen:StopGroundItems() end " } button { area 21 12 0 0 on e toggle groundItemsButtonToggle action " Infinity_PlaySound('GAM_09') if(groundItemsButtonToggle == 1) then worldScreen:StartGroundItems() setQuickLootPosition() else worldScreen:StopGroundItems() end " } -- END BETTER QUICK LOOT INIT
-- BEGIN BETTER QUICK LOOT MAIN 1.3 menu { name 'WORLD_QUICKLOOT' align center center ignoreEsc onClose " mouseOverQuicklootContainer = nil " label { area 0 0 417 132 rectangle 0 } label { area 13 16 68 100 encumbrance } label { area 354 54 65 24 text lua "getQuickLootPageText()" text style "label" align center center } label { area 364 8 45 48 bam GUISV10 sequence 0 frame 1 opacity 180 } label { area 364 76 45 48 bam GUISV10 sequence 1 frame 1 opacity 180 } button { area 364 8 45 48 bam GUISV10 sequence 0 enabled "worldScreen:GroundScrollEnabled(-1)" action " worldScreen:OnGroundScroll(-1) " } button { area 364 76 45 48 bam GUISV10 sequence 1 enabled "worldScreen:GroundScrollEnabled(1)" action " worldScreen:OnGroundScroll(1) " } button { area 94 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(0,'name')" tint lua "getGroundItemProperty(0,'tint')" icon lua "getGroundItemProperty(0,'icon')" count lua "getGroundItemProperty(0,'count')" usages lua "getGroundItemProperty(0,'usages')" action "groundItemClick(0)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(0,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 148 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(1,'name')" tint lua "getGroundItemProperty(1,'tint')" icon lua "getGroundItemProperty(1,'icon')" count lua "getGroundItemProperty(1,'count')" usages lua "getGroundItemProperty(1,'usages')" action "groundItemClick(1)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(1,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 202 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(2,'name')" tint lua "getGroundItemProperty(2,'tint')" icon lua "getGroundItemProperty(2,'icon')" count lua "getGroundItemProperty(2,'count')" usages lua "getGroundItemProperty(2,'usages')" action "groundItemClick(2)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(2,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 256 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(3,'name')" tint lua "getGroundItemProperty(3,'tint')" icon lua "getGroundItemProperty(3,'icon')" count lua "getGroundItemProperty(3,'count')" usages lua "getGroundItemProperty(3,'usages')" action "groundItemClick(3)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(3,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 310 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(4,'name')" tint lua "getGroundItemProperty(4,'tint')" icon lua "getGroundItemProperty(4,'icon')" count lua "getGroundItemProperty(4,'count')" usages lua "getGroundItemProperty(4,'usages')" action "groundItemClick(4)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(4,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 94 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(5,'name')" tint lua "getGroundItemProperty(5,'tint')" icon lua "getGroundItemProperty(5,'icon')" count lua "getGroundItemProperty(5,'count')" usages lua "getGroundItemProperty(5,'usages')" action "groundItemClick(5)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(5,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 148 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(6,'name')" tint lua "getGroundItemProperty(6,'tint')" icon lua "getGroundItemProperty(6,'icon')" count lua "getGroundItemProperty(6,'count')" usages lua "getGroundItemProperty(6,'usages')" action "groundItemClick(6)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(6,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 202 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(7,'name')" tint lua "getGroundItemProperty(7,'tint')" icon lua "getGroundItemProperty(7,'icon')" count lua "getGroundItemProperty(7,'count')" usages lua "getGroundItemProperty(7,'usages')" action "groundItemClick(7)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(7,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 256 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(8,'name')" tint lua "getGroundItemProperty(8,'tint')" icon lua "getGroundItemProperty(8,'icon')" count lua "getGroundItemProperty(8,'count')" usages lua "getGroundItemProperty(8,'usages')" action "groundItemClick(8)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(8,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 310 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(9,'name')" tint lua "getGroundItemProperty(9,'tint')" icon lua "getGroundItemProperty(9,'icon')" count lua "getGroundItemProperty(9,'count')" usages lua "getGroundItemProperty(9,'usages')" action "groundItemClick(9)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(9,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } } ` function setQuickLootPosition() local x,y = Infinity_GetMousePosition() x = x - 47 y = y - 66 local screenWidth,screenHeight = Infinity_GetScreenSize() if (x < (-screenWidth+417)/2 + 10) then x = (-screenWidth+417)/2 + 10 else if (x > (screenWidth+417)/2 - 427) then x = (screenWidth+417)/2 - 427 end end if (y < (-screenHeight+132)/2 + 10) then y = (-screenHeight+132)/2 + 10 else if (y > (screenHeight+132)/2 - 182) then y = (screenHeight+132)/2 - 182 end end Infinity_SetOffset('WORLD_QUICKLOOT',x,y) end function getQuickLootPageText() local prev = 0 while (worldScreen:GroundScrollEnabled(-prev-1)) do prev = prev + 1 end local next = 0 while (worldScreen:GroundScrollEnabled(next+1)) do next = next + 1 end return (prev+1) .. "/" .. (prev+next+1) end ` -- END BETTER QUICK LOOT MAIN
-- BEGIN BETTER QUICK LOOT INIT 1.2 button { area 21 12 32 32 bam ROUNDBUT toggle groundItemsButtonToggle action " if(groundItemsButtonToggle == 1) then worldScreen:StartGroundItems() setQuickLootPosition() else worldScreen:StopGroundItems() end " } button { area 21 12 0 0 on e toggle groundItemsButtonToggle action " Infinity_PlaySound('GAM_09') if(groundItemsButtonToggle == 1) then worldScreen:StartGroundItems() setQuickLootPosition() else worldScreen:StopGroundItems() end " } -- END BETTER QUICK LOOT INIT
-- BEGIN BETTER QUICK LOOT MAIN 1.2 menu { name 'WORLD_QUICKLOOT' align center center ignoreEsc onClose " mouseOverQuicklootContainer = nil " label { area -8 -30 346 142 rectangle 0 } label { area 115 -24 100 24 text lua "getQuickLootPageText()" text style "label" align center center } label { area 0 24 35 57 bam GUIBTACT frame 45 } label { area 295 24 35 57 bam GUIBTACT frame 43 } button { area 0 24 35 57 bam GUIBTACT frame 44 enabled "worldScreen:GroundScrollEnabled(-1)" action " worldScreen:OnGroundScroll(-1) " } button { area 295 24 35 57 bam GUIBTACT frame 42 enabled "worldScreen:GroundScrollEnabled(1)" action " worldScreen:OnGroundScroll(1) " } button { area 35 0 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(0,'name')" tint lua "getGroundItemProperty(0,'tint')" icon lua "getGroundItemProperty(0,'icon')" count lua "getGroundItemProperty(0,'count')" usages lua "getGroundItemProperty(0,'usages')" action "groundItemClick(0)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(0,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 87 0 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(1,'name')" tint lua "getGroundItemProperty(1,'tint')" icon lua "getGroundItemProperty(1,'icon')" count lua "getGroundItemProperty(1,'count')" usages lua "getGroundItemProperty(1,'usages')" action "groundItemClick(1)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(1,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 139 0 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(2,'name')" tint lua "getGroundItemProperty(2,'tint')" icon lua "getGroundItemProperty(2,'icon')" count lua "getGroundItemProperty(2,'count')" usages lua "getGroundItemProperty(2,'usages')" action "groundItemClick(2)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(2,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 191 0 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(3,'name')" tint lua "getGroundItemProperty(3,'tint')" icon lua "getGroundItemProperty(3,'icon')" count lua "getGroundItemProperty(3,'count')" usages lua "getGroundItemProperty(3,'usages')" action "groundItemClick(3)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(3,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 243 0 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(4,'name')" tint lua "getGroundItemProperty(4,'tint')" icon lua "getGroundItemProperty(4,'icon')" count lua "getGroundItemProperty(4,'count')" usages lua "getGroundItemProperty(4,'usages')" action "groundItemClick(4)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(4,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 35 52 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(5,'name')" tint lua "getGroundItemProperty(5,'tint')" icon lua "getGroundItemProperty(5,'icon')" count lua "getGroundItemProperty(5,'count')" usages lua "getGroundItemProperty(5,'usages')" action "groundItemClick(5)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(5,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 87 52 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(6,'name')" tint lua "getGroundItemProperty(6,'tint')" icon lua "getGroundItemProperty(6,'icon')" count lua "getGroundItemProperty(6,'count')" usages lua "getGroundItemProperty(6,'usages')" action "groundItemClick(6)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(6,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 139 52 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(7,'name')" tint lua "getGroundItemProperty(7,'tint')" icon lua "getGroundItemProperty(7,'icon')" count lua "getGroundItemProperty(7,'count')" usages lua "getGroundItemProperty(7,'usages')" action "groundItemClick(7)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(7,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 191 52 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(8,'name')" tint lua "getGroundItemProperty(8,'tint')" icon lua "getGroundItemProperty(8,'icon')" count lua "getGroundItemProperty(8,'count')" usages lua "getGroundItemProperty(8,'usages')" action "groundItemClick(8)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(8,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } button { area 243 52 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(9,'name')" tint lua "getGroundItemProperty(9,'tint')" icon lua "getGroundItemProperty(9,'icon')" count lua "getGroundItemProperty(9,'count')" usages lua "getGroundItemProperty(9,'usages')" action "groundItemClick(9)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(9,'containerId')" actionExit "mouseOverQuicklootContainer = nil" } } ` function setQuickLootPosition() local x,y = Infinity_GetMousePosition() x = x - 18 y = y - 52 local screenWidth,screenHeight = Infinity_GetScreenSize() if (x < (-screenWidth+350)/2 + 10) then x = (-screenWidth+350)/2 + 10 else if (x > (screenWidth+350)/2 - 356) then x = (screenWidth+350)/2 - 356 end end if (y < (-screenHeight+146)/2 + 24) then y = (-screenHeight+146)/2 + 24 else if (y > (screenHeight+146)/2 - 180) then y = (screenHeight+146)/2 - 180 end end Infinity_SetOffset('WORLD_QUICKLOOT',x,y) end function getQuickLootPageText() local prev = 0 while (worldScreen:GroundScrollEnabled(-prev-1)) do prev = prev + 1 end local next = 0 while (worldScreen:GroundScrollEnabled(next+1)) do next = next + 1 end return (prev+1) .. "/" .. (prev+next+1) end ` -- END BETTER QUICK LOOT MAIN
Fixed a minor positioning bug
Update 1.2:
Tinkered some more with positioning for improved usability
Update 1.3:
Redesigned the quick loot panel
Added encumbrance indicator to the quick loot panel
Nice work, though! Very sleek.
Here's a hastily (and very badly drawn) MS PAINT copy/paste job... Something like that, but nicer...
I can, however, overlay another image over it, and I like the arrow idea. @Mr2150 Do you mind if I use yours as a basis? It's a whole lot better than what I could come up with, me being as severely graphically challenged as I am.
- Moved the encumbrance indicator over to the right side of the panel
- Scrolling the mouse wheel while the cursor is over the quick loot panel now flips between the item pages
- The quick loot panel now resets to the first item page each time it's opened
Unfortunately I couldn't quite make the arrow work without it seeming out of place. Now matter what I tried it looked somewhat confusing, and it didn't help that there were already two other arrows on the panel. So this will have to do, for now. If you have any suggestions for further improvement, let me know.Also, don't forget to download the zip pack from the OP and unpack it into the override folder.
Update 1.5:
Added an arrow image overlay to the encumbrance indicator
Update 1.6:
Uniformized the previous/next page buttons across games to use the more appropriate BG2:EE graphics
Thanks for the suggestions everyone!
First, you'd need to find out which resource holds the image of the inventory slots. I'd start with looking through the game's BAM resources in NearInfinity and if I could find it that way. It's also possible that it's in some other graphical format, I wouldn't know off the top of my head.
Once you have the resource, you'll probably need to convert it to a regular image format like png, then edit it to your liking, and convert it back to BAM (or whatever format the original resource was). There are a bunch of tools out there to do these conversions. And then, when you have the altered file, you'd just need to put it in the game's override folder, and that should be it.
1.6
-- BEGIN BETTER QUICK LOOT INIT 1.6 button { area 21 12 32 32 bam ROUNDBUT toggle groundItemsButtonToggle action " if(groundItemsButtonToggle == 1) then worldScreen:StartGroundItems() setQuickLootPosition(true) else worldScreen:StopGroundItems() end " } button { area 21 12 0 0 on e toggle groundItemsButtonToggle action " Infinity_PlaySound('GAM_09') if(groundItemsButtonToggle == 1) then worldScreen:StartGroundItems() setQuickLootPosition() else worldScreen:StopGroundItems() end " } -- END BETTER QUICK LOOT INIT
-- BEGIN BETTER QUICK LOOT MAIN 1.6 menu { name 'WORLD_QUICKLOOT' align center center ignoreEsc onClose " mouseOverQuicklootContainer = nil " label { area 0 0 422 132 rectangle 0 actionScroll "scrollQuickLootItems()" } label { area 341 16 68 100 encumbrance actionScroll "scrollQuickLootItems()" } label { area 330 53 37 27 mosaic A0BQAR opacity 220 actionScroll "scrollQuickLootItems()" } label { area 273 54 65 24 text lua "getQuickLootPageText()" text style "label" align center center actionScroll "scrollQuickLootItems()" } label { area 283 8 45 48 bam A0BQSV10 sequence 0 frame 1 opacity 180 actionScroll "scrollQuickLootItems()" } label { area 283 76 45 48 bam A0BQSV10 sequence 1 frame 1 opacity 180 actionScroll "scrollQuickLootItems()" } button { area 283 8 45 48 bam A0BQSV10 sequence 0 enabled "worldScreen:GroundScrollEnabled(-1)" action " worldScreen:OnGroundScroll(-1) " actionScroll "scrollQuickLootItems()" } button { area 283 76 45 48 bam A0BQSV10 sequence 1 enabled "worldScreen:GroundScrollEnabled(1)" action " worldScreen:OnGroundScroll(1) " actionScroll "scrollQuickLootItems()" } button { area 13 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(0,'name')" tint lua "getGroundItemProperty(0,'tint')" icon lua "getGroundItemProperty(0,'icon')" count lua "getGroundItemProperty(0,'count')" usages lua "getGroundItemProperty(0,'usages')" action "groundItemClick(0)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(0,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 67 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(1,'name')" tint lua "getGroundItemProperty(1,'tint')" icon lua "getGroundItemProperty(1,'icon')" count lua "getGroundItemProperty(1,'count')" usages lua "getGroundItemProperty(1,'usages')" action "groundItemClick(1)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(1,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 121 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(2,'name')" tint lua "getGroundItemProperty(2,'tint')" icon lua "getGroundItemProperty(2,'icon')" count lua "getGroundItemProperty(2,'count')" usages lua "getGroundItemProperty(2,'usages')" action "groundItemClick(2)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(2,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 175 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(3,'name')" tint lua "getGroundItemProperty(3,'tint')" icon lua "getGroundItemProperty(3,'icon')" count lua "getGroundItemProperty(3,'count')" usages lua "getGroundItemProperty(3,'usages')" action "groundItemClick(3)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(3,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 229 13 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(4,'name')" tint lua "getGroundItemProperty(4,'tint')" icon lua "getGroundItemProperty(4,'icon')" count lua "getGroundItemProperty(4,'count')" usages lua "getGroundItemProperty(4,'usages')" action "groundItemClick(4)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(4,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 13 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(5,'name')" tint lua "getGroundItemProperty(5,'tint')" icon lua "getGroundItemProperty(5,'icon')" count lua "getGroundItemProperty(5,'count')" usages lua "getGroundItemProperty(5,'usages')" action "groundItemClick(5)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(5,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 67 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(6,'name')" tint lua "getGroundItemProperty(6,'tint')" icon lua "getGroundItemProperty(6,'icon')" count lua "getGroundItemProperty(6,'count')" usages lua "getGroundItemProperty(6,'usages')" action "groundItemClick(6)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(6,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 121 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(7,'name')" tint lua "getGroundItemProperty(7,'tint')" icon lua "getGroundItemProperty(7,'icon')" count lua "getGroundItemProperty(7,'count')" usages lua "getGroundItemProperty(7,'usages')" action "groundItemClick(7)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(7,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 175 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(8,'name')" tint lua "getGroundItemProperty(8,'tint')" icon lua "getGroundItemProperty(8,'icon')" count lua "getGroundItemProperty(8,'count')" usages lua "getGroundItemProperty(8,'usages')" action "groundItemClick(8)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(8,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } button { area 229 67 52 52 bam STONSLOT tooltip lua "getGroundItemProperty(9,'name')" tint lua "getGroundItemProperty(9,'tint')" icon lua "getGroundItemProperty(9,'icon')" count lua "getGroundItemProperty(9,'count')" usages lua "getGroundItemProperty(9,'usages')" action "groundItemClick(9)" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(9,'containerId')" actionExit "mouseOverQuicklootContainer = nil" actionScroll "scrollQuickLootItems()" } } ` function setQuickLootPosition(buttonPress) local x,y = Infinity_GetMousePosition() if (buttonPress) then x = x - 39 else x = x + 26 end y = y - 66 local screenWidth,screenHeight = Infinity_GetScreenSize() if (x < (-screenWidth+422)/2 + 10) then x = (-screenWidth+422)/2 + 10 else if (x > (screenWidth+422)/2 - 432) then x = (screenWidth+422)/2 - 432 end end if (y < (-screenHeight+132)/2 + 10) then y = (-screenHeight+132)/2 + 10 else if (y > (screenHeight+132)/2 - 182) then y = (screenHeight+132)/2 - 182 end end Infinity_SetOffset('WORLD_QUICKLOOT',x,y) local i = 0 while (worldScreen:GroundScrollEnabled(i-1)) do i = i - 1 end worldScreen:OnGroundScroll(i) end function scrollQuickLootItems() if scrollDirection > 0 then if worldScreen:GroundScrollEnabled(-1) then worldScreen:OnGroundScroll(-1) end elseif scrollDirection < 0 then if worldScreen:GroundScrollEnabled(1) then worldScreen:OnGroundScroll(1) end end end function getQuickLootPageText() local prev = 0 while (worldScreen:GroundScrollEnabled(-prev-1)) do prev = prev + 1 end local next = 0 while (worldScreen:GroundScrollEnabled(next+1)) do next = next + 1 end return (prev+1) .. "/" .. (prev+next+1) end ` -- END BETTER QUICK LOOT MAIN
Updated the mod for BG:EE v2.5.17 and BG2:EE v2.5.16.
Since I needed my code to reposition the quick loot panel whenever the player uses the quick loot hotkey, I couldn't utilize the game's newly added integrated hotkey. The integrated hotkey can either be disabled or set to the same key as the mod's hotkey, it doesn't matter as the mod overrides its behavior.
Is there a way to make the bar more "capacious".
Let's say 3 rows with 10 squares each?