Holding shift and moving mouse over an item transfers it (technically acts as a double click) for Anomaly 1.5.1
Tired of clicking ? This mod helps reduce the amount of mouse clicks when looting / transferring inventory. If you don't mind clicking many times, this mod is not for you.
Simply hold shift and move the mouse pointer over the stuff you want to transfer. This works as well during buying / selling.
My first mod, feedback is welcome !
Version history:
- Initial
- Update 2021_04_27
reset the shift pressed state in the reset method of the ui container. Should fix the issues of the code thinking shift is pressed when it is not.
- Update 2021 05 07
Small fix (thanks Asshall) to not be active when only the players inventory is open
- Update 2021 05 17
Now using left alt + shift will disassemble the item. Technically holding left alt (not sure about right alt) and double clicking will also disassemble the item.
Also note that if you hold ctrl+shift, it will transfer the entire stack. Once you do this once, even if you let go of Ctrl, it will continuing transferring the entire stack. This is existing code so not sure why this is, but anyway, can be handy to transfer big stacks (like ammo, etc.) a bit faster.
(buried)
Hmmm, theres already a right click and transfer all.
It's true. However, for example, when I loot, often I want most of their stuff, except like 2 things. If I use transfer all, then I have to drop those 2 things by hand.
It can be nice too in merchants, like sell 10 kinds of artifacts, just shift glide over the 10 things, instead of clicking 20 times.
2% faster tho
what exactly did you add/change in the "utils_ui.script" ?
the artifact renovation mod modifies this same script and they appear to conflict.
I recommend doing the following --
Use the converter tool to get the unmodded config files
So running
```
converter.exe -unpack -xdb .\db\configs\config.db0 -dir .\unpacked
converter.exe -unpack -xdb .\db\configs\scripts.db0 -dir .\unpacked
```
Most mods change things in one of these 2. The exception are animations,sounds,models, but these are binary so the diff is not very useful.
Then using a tool like winmerge to visualize the changes. This is really nice since the tool does a directory diff, including sub directories. So you can easily see what any mod actually changed.
I added code to function UICellContainer:On_Hover(idx), UICellContainer:OnKeyboard(dik, keyboard_action), UICellContainer:Reset, and __init
So what's the difference in the values between the utils_ui_script and it's backup? There's a pretty huge difference there.
example: ["power_restore_speed"] under stats_table["artefact"] = { goes from 17850 in the backup to 30000... help us understand this, and please add it to the description of the mod, because it's a file that is changed and it needs to be documented for everyone's sanity.
An absolute must! Thanks a lot!
EDIT 7/8/21: I've written this in another mod, might as well write in this one too.
This addon really changed the way I visually approach item management, which takes a big, big chunk of time in any Stalker game.
For anyone wondering, it goes exceptionally well with three other addons, the "Alt Stacking", the "Sorting Plus", and the "New Item Highlight". If memory serves me well, all of them by author RavenAscendant.
And again, thanks to eric7237cire. In all my Stalker playing time, managing items never was this easy!
You're welcome ! And my thanks goes to the developers who made this game so easy to mod. I don't know LUA personally (which I think is the scripting language this game uses) but it was thankfully not too different than other languages I do know.
Вы абсолютно правы! Возможность модификации даёт долгую жизнь игре и простор творчеству.
i mean, to add to what i said, its faster sure, but then it gets stuck and i keep unequipping and reequipping my backpack because its stuck.
Ah yes, I uploaded a new version that should help that.
Thanks. Turns out, I was having the same problem and couldn't figure out what was happening 'till coming back here.
Very nice
Lol you save my live for reduce sound pollution when I sell lots weapon parts to mechanics on 3 AM.
splendid mod! super useful, thx alot :)
my mouse says also thx ^^
Great work.... but I get a CTD when push shift on new game loadout menu... how to stop? Thanks.
Do you have the crash log handy? A workaround is to only use shift in the game's vendor & inventory screens and to double click in the new game menu.
Here is the relevant portion of my log when this occurred for me. I may have written a comment or two so the line number is probably off slightly.
LUA error: c:/stalker anomaly\gamedata\scripts\utils_ui.script:2008: attempt to index field 'actor' (a nil value)
The issue is with this portion of the script:
if idx and (self.hover.idx ~= idx) and self.shift_transfer_mode and ( (not db.actor:has_info("inventory_wnd_open")) or
Doing a nil check for actor fixes the issue in the new game screen but prevents function in a normal inventory screen. I'm not that great at scripting, so hopefully some of this information can be helpful to you.
Thx for this mod. Can you make mode like this but for disassemble items? I realy tired for monotonous actions. I think press right alt for this so good idea
Ah yes, I can. I used shift + left alt. I had the same issue. The downside is this will have more conflicts since it touches another script file. I'll release this when I get a chance.
Another trick is if you press Ctrl and shift, it will transfer all the items. But to go back to single transfer you have to quit and re-enter inventory.
Ok, I uploaded the version that should do this. Let me know if this works for you. I also get tired of monotonous actions :)
Perfecto! Now the battle between greed and laziness is over
Very useful mod made even better with this update. Fantastic!
Could you make a version which transfers items whilst already pushing shift *on* the item? As it stands, you hold shift, then the next item you move to transfers. But what about the item transfering the moment you push shift? If not that's OK, because this is simply an excellent mod that will go a long way to reducing RSI and carpal tunnel issues in many players. You are literally helping players medical problems with a mod like this and you should be commended for it.
The mod worked fine until i decided to change some mods. The shift+t to grab all works fine but not tthe shift+hover function.
Load order:
JSRS P.1 - Main Addon
JSRS P.2 - Cracks + Impacts Patch
JSRS P.3 - New Tracers Patch
SCO3 Addon - Anomaly Sounds
SCO3 Addon - New Footsteps
SCO3 Addon - New Object Sounds
SCO3 Addon - Stereo Thunder (non directional)
SCO3 P.1 Real Mutant Sounds
SCO3 P.2 New Outdoor Sounds
SCO3 P.3 New Underground Sounds
AI_Upscaled_ALL_Anomaly_weapons_scopes_attachments_knivesaxesgrenades
01. Boomsticks and Sharpsticks 23-Apr-2021_1.5.1
03. Quick_Melee_Food_Drug_and_drinks_REQUIRED!!!!!!!!
07. Patch_AFTER_JSRS_Port_3.6_Sound_Overhaul
Food_drug_and_drinks_animations_v0.8.6.8
Trader Overhaul (Main Folder)
B&S Patch
Vivid Icons
Main Compatibility Patch
FasterTooltips
Fillable_canteens_v_0.4
Knife-Binoc-pistol
00 SIDHUD MAIN FILE [INSTALL FIRST ALWAYS]
02 Different Color Scheme [DARK]
99 Minimalist Psybar Fix
shift_hover_transfer_2021_05_17
*Edit
I just set up a spam mouse 1 macro on my keyboard:)
Hey eric7237cire I was playing with your mod yesterday and I encountered/experienced a CTD while trying to use a improvised stimpack (via the shortcut), don't know if it was just a fluke or not, but I thought I should post the fatal error part for you, regardless:
! [LUA] SCRIPT RUNTIME ERROR
! [LUA] c:/games/anomaly\gamedata\scripts\ui_inventory.script:2819: attempt to index a nil value
! [SCRIPT ERROR]: c:/games/anomaly\gamedata\scripts\ui_inventory.script:2819: attempt to index a nil value
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_error
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 191
[error]Description : fatal error
[error]Arguments : LUA error: c:/games/anomaly\gamedata\scripts\ui_inventory.script:2819: attempt to index a nil value
stack trace:
hopefully this has helped you in someway or another
Excuse me sir, is possible the fix artefact renovation overwrite problem ?
Moddb.com
I just made a patch for this mod and Artefact Renovation. LMK if you want to include it as an optional patch with the downlaod, and I can remove my upload. Thanks for the mod, I've wanted this for a while now!
Moddb.com
could you make a version where instead of shift acting as double click it acts as a single click?
the issue ive noticed with the current version is that the shift function doesent work if your cursor is currently over an item, you have to move it to a blank space in the inventory then back.
if the items your wanting to transfer are towards the middle of the list you end up transferring items you didn't want to move.
That functionality is available in Modular Miscellaneous Tweaks - Moddb.com
I actually prefer this mod's functionality since it allows me to just slide my mouse around over all the items I want. You can avoid the problem you're talking about by hovering over an item you don't want to transfer that is next to the item you do want to transfer.
I just wish the "take full stack" method disabled when releasing Ctrl, but it's not a big deal.
Hey, despite what I posted to the other user above, I found the solution to the Ctrl bug where it doesn't revert to "single" item mode if you use Shift+Ctrl.
It works fine if you separate out the conditionals instead of having them part of the elseif chain. For example:
if dik == K_CTRL then
self.holding_ctrl = false
end
if dik == K_SHFT then
self.holding_shift = false
end
if dik == K_ALT then
self.holding_alt = false
end
I wish someone posted something like this but a fix to ammunition stacks suddenly disappearing if you move the whole stack FROM the stash TO your backpack.
Amazing work, hope this works in my heavily modified mo2 load order
cheers
Strangely enough, I'm still unequipping stuff despite this bug being corrected earlier. I think this occurs when I'm opening containers while pressing shift (arrive running and opening), but i'm not sure.
Is someone experiencing something similar?
Yes I'm also getting items transferring out of my inventory when I'm not holding Shift. Happens when I open stashes/loot corpses. Doesn't happen all the time, not sure what causes it. Maybe I just need to make sure I'm never holding Shift down when I try to loot.
I just did a little testing and I can't seem to trigger it, IDK.
I have a hunch that it has something to do with shift binded to run. I tried fiddling with the script to change the transfer button but couldnt succeed.
EDIT: Found a workaround. As soon as you open a stash/corpse/trader, press shift one time without moving the mouse. It won't unequip stuff anymore.
Every day addons come out, some are stupid, some are good, only some are very good and imaginative. This one is in the latter category, it is amazing, but it conflicts with "Artefact renovation" and makes it unusable. In comments above I read that someone left a patch (my own) but the link doesn't work, can you help me?
Is it possible to program the movement of one element to a clamped shift + 1 left-click? And could you do it or explain how?
I got this in the nitpicked pack.
was searching google to try and make my own hotkey for transferring items.
just saw this listed while browsing and haad to com in to add a big thankyou comment
so THANKYOU so much, great QOL mod
This comment is currently awaiting admin approval, join now to view.
An absolute must have - thank you, thank you, thank you!
I made a patch for this to work alongside Inventory Weights addon (the Total item stack weight inventory mod). For some reason when one was being overwritten by the other, the losing file would lose functionality. I copied over some of the files from the utils_ui.script xml file. Simply place this after both inventory weights and shift hover transfer in your mod organizer.
Drive.google.com
TYSM.
This comment is currently awaiting admin approval, join now to view.
Great work. But the game keeps crushed if I use shift &alt; to dissemble the weapon, so this function is bit unstable.
i think i might be having the same issue, when i try disassembling things with alt+click it doesnt let me loot bodies, command companions or switch ammo types afterwards. Do you get these issues too?
Very convenient, usefully mod,but in some cases can be a bit annoying coze you can transfer pieces of equipment from time to time but eventually maybe SHIFT can be changed to some other key didnt try that one but still maybe is an option for some!
This comment is currently awaiting admin approval, join now to view.
Хороший аддон