[MOD] Smooth Selling v1.3
Adul
Member Posts: 2,002
Current version: 1.3
This mod aims to make it easier and less time-consuming to perform common tasks in stores and item bags, such as selling or moving whole stacks of items.
Features:
You can add these changes by making the following edits to the UI.menu file (which you can export from NearInfinity):
This mod aims to make it easier and less time-consuming to perform common tasks in stores and item bags, such as selling or moving whole stacks of items.
Features:
- [Store UI] Single-clicking a stack of items in the Sell pane selects the whole stack (this includes selling items from bags)
- [Item Bag UI] Single-clicking a stack of items (in either pane) selects the whole stack
- [Choose Amount UI] The default split stack item amount is set to 1 consistently
- [Choose Amount UI] Pressing Enter closes the window and selects the specified amount
- [Choose Amount UI] Closing the window with Escape or Cancel deselects the item
You can add these changes by making the following edits to the UI.menu file (which you can export from NearInfinity):
1. Find this code segment:
2. Find this code segment:
3. Find this code segment:
4. Find this code segment:
And... you're done. Enjoy!
action " local cnt = tonumber(itemRequestAmt) Infinity_PopMenu() if(cnt and cnt > 0 and cnt <= requester.requesterMax) then requester.requesterFunc(cnt) end "Insert before the above code segment:
on return
2. Find this code segment:
action " if store.storeItems[storeItemsVar].clickable == 1 then if not storeScreen:IsCloseBagButtonClickable() or store.storeItems[storeItemsVar].valid == 1 then local highlight = true if(store.storeItems[storeItemsVar].highlight == 1) then highlight = false end storeScreen:SelectStoreItem( storeItemsVar - 1, highlight) end end " actionalt " showItemDescription(store.storeItems[storeItemsVar].item, 1) " actionDbl " if store.storeItems[storeItemsVar].clickable == 1 then if not storeScreen:IsCloseBagButtonClickable() or store.storeItems[storeItemsVar].valid == 1 then local maxCount = store.storeItems[storeItemsVar].maxCount if(maxCount > 1) then popupRequester(maxCount, storeSplitStack, false) end end end "Replace the above code segment with:
action " if store.storeItems[storeItemsVar].clickable == 1 then if not storeScreen:IsContainer() then if not storeScreen:IsCloseBagButtonClickable() or store.storeItems[storeItemsVar].valid == 1 then local highlight = true if(store.storeItems[storeItemsVar].highlight == 1) then highlight = false end storeScreen:SelectStoreItem(storeItemsVar - 1, highlight) end elseif (store.storeItems[storeItemsVar].highlight == 1) then storeScreen:SelectStoreItem(storeItemsVar - 1, false) else storeScreen:SelectStoreItem(storeItemsVar - 1, true) local count = store.storeItems[storeItemsVar].item.count local stock = store.storeItems[storeItemsVar].numInStock if (count > 1) then storeScreen:SetStoreItemCount(storeItemsVar - 1, count) elseif (stock > 1) then storeScreen:SetStoreItemCount(storeItemsVar - 1, stock) end end end " actionalt " showItemDescription(store.storeItems[storeItemsVar].item, 1) " actionDbl " if store.storeItems[storeItemsVar].clickable == 1 then if not storeScreen:IsCloseBagButtonClickable() or store.storeItems[storeItemsVar].valid == 1 then local maxCount = store.storeItems[storeItemsVar].maxCount if(maxCount > 1) then popupRequester(maxCount, storeSplitStack, false) storeScreen:SelectStoreItem(storeItemsVar - 1, false) end end end "
3. Find this code segment:
action " if store.groupItems[storeGroupItemsVar].valid ~= 0 then local selected = true if(store.groupItems[storeGroupItemsVar].highlight == 1) then selected = false end storeScreen:SelectGroupItem( storeGroupItemsVar - 1, selected) end " actionalt " showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) " actionDbl " if(store.groupItems[storeGroupItemsVar].item.isBag == 1) then showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) itemDescLeftButtonAction() else if store.groupItems[storeGroupItemsVar].valid ~= 0 then local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock if(count > 1) then popupRequester(count, groupSplitStack, true) elseif stock > 1 then popupRequester(stock, groupSplitStack, true) end end end "Replace the above code segment with:
action " if store.groupItems[storeGroupItemsVar].valid ~= 0 then if (store.groupItems[storeGroupItemsVar].highlight == 1) then storeScreen:SelectGroupItem(storeGroupItemsVar - 1, false) else storeScreen:SelectGroupItem(storeGroupItemsVar - 1, true) local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock if (count > 1) then storeScreen:SetGroupItemCount(storeGroupItemsVar - 1, count) elseif (stock > 1) then storeScreen:SetGroupItemCount(storeGroupItemsVar - 1, stock) end end end " actionalt " showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) " actionDbl " if(store.groupItems[storeGroupItemsVar].item.isBag == 1) then showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) itemDescLeftButtonAction() else if store.groupItems[storeGroupItemsVar].valid ~= 0 then local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock if(count > 1) then popupRequester(count, groupSplitStack, false) elseif stock > 1 then popupRequester(stock, groupSplitStack, false) end storeScreen:SelectGroupItem(storeGroupItemsVar - 1, false) end end "
4. Find this code segment:
action " if store.groupItems[storeGroupItemsVar].valid ~= 0 then local selected = true if(store.groupItems[storeGroupItemsVar].highlight == 1) then selected = false end storeScreen:SelectGroupItem( storeGroupItemsVar - 1, selected) end " actionalt " showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) " actionDbl " if store.groupItems[storeGroupItemsVar].valid ~= 0 then local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock if(count > 1) then popupRequester(count, groupSplitStack, true) elseif stock > 1 then popupRequester(stock, groupSplitStack, true) end end "Replace the above code segment with:
action " if store.groupItems[storeGroupItemsVar].valid ~= 0 then if (store.groupItems[storeGroupItemsVar].highlight == 1) then storeScreen:SelectGroupItem(storeGroupItemsVar - 1, false) else storeScreen:SelectGroupItem(storeGroupItemsVar - 1, true) local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock if (count > 1) then storeScreen:SetGroupItemCount(storeGroupItemsVar - 1, count) elseif (stock > 1) then storeScreen:SetGroupItemCount(storeGroupItemsVar - 1, stock) end end end " actionalt " showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) " actionDbl " if store.groupItems[storeGroupItemsVar].valid ~= 0 then local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock if(count > 1) then popupRequester(count, groupSplitStack, false) elseif stock > 1 then popupRequester(stock, groupSplitStack, false) end storeScreen:SelectGroupItem(storeGroupItemsVar - 1, false) end "
And... you're done. Enjoy!
Post edited by Adul on
7
Comments
- Extended the single-click-selects-entire-stack behavior to all bag interactions
- Changed the default split stack amounts to the max number of items (in all situations, except in the store Buy pane, where the default amount is 1)
Now single click stack selection is consistent across all item management interactions, except for buying items from stores (where it isn't practical to select all items in stock).- New feature: [Choose Amount UI] The default split stack item amount is set to 1 consistently
- Fixed a patch incompatibility error that caused the Choose Amount window to open twice when trying to split item stacks in the most recent EE version (v2.3)
- Name changed to "Smooth Selling" (original name: "Improved Store Usability")
Choose Amount behavior is now improved. Now when you double-click an item stack in the store window or item bag window, the item stack is immediately deselected and the Choose Amount window opens. If you accept the selected amount, the window closes and the item stack is reselected with the specified amount. But if you cancel out of the window, the item stack will remain not selected.I also restructured the code in some places, and as a result the install process had become a little simpler (only 4 steps instead of the prior 6).
Old mod version 1.2 instructions:
2. Find this code segment: Replace the above code segment with:
3. Find this code segment: Replace the above code segment with:
4. Find this code segment: Replace the above code segment with:
And... you're done. Enjoy!
Does it also give you an error if you try to install the mod by itself on a clean (UI-mod-free) install?
The other mods I have in my modded installation are not UI related: Ascension, Tweaks Anthology, SCS, Portraits everywhere, Lighting pack and Jimfix. Could there be a conflict with any of these?