Download
(7 Kb)
Download
Updated: 06/09/22 11:06 AM
Compatibility:
High Isle (8.0.0)
Ascending Tide (7.3.5)
Deadlands (7.2.5)
Waking Flame (7.1.5)
Blackwood (7.0.5)
Flames of Ambition (6.3.5)
Markarth (6.2.5)
Stonethorn (6.1.5)
Greymoor (6.0.5)
Updated:06/09/22 11:06 AM
Created:01/24/16 08:12 AM
Monthly downloads:48
Total downloads:8,896
Favorites:19
MD5:
AutoSlotSwitch  Popular! (More than 5000 hits)
Version: 1.4
by: Drakhyr [More]
AutoSlotSwitch

Description

This is a little addon to automatically switch your active Quickslot to a slot of your choice in the radial menu when you engage in combat, and switches it back when going out of combat. It also lets you stay on a slot to finish repairs on a keep door or when trying to put a siege down (for a set time) until it switches back.

Features
  • Choose your target slot, put some potion there, enjoy the comfort :-) Have your potion ready when you need it
  • If the target slot is empty, it automatically searches for other potions (or what you need) in your slots that match a search term you can customize in the addon settings ("health", "magicka", "Chips", "Zwiebelrostbraten", whatever you need)
  • Choose different settings based on location (General PVE, Dungeons, PVP)
  • Option to activate only when getting damage (not when entering combat) with custom HP threshold
  • Adjustable temporary lock if you manually change to another slot (e.g. for a siege weapon or another potion), good for PvP
  • Option to reset that temporary lock timer whenever you use or trying to use sieges or repair kits so you can keep trying to place a siege or keep repairing a wall (it resets on failed attempts as well).

Edit: I updated this addon again after a long while because people still use it. If I get friendly requests for updates I might continue maintaining this addon, no promises.
1.3:
- added new subfeature for the under attack setting to only change the slot when you drop below a custom health threshold

1.3:
- API bump for High Isle
- updated quickslot code to work with ZOS changes to their API

1.25:
- API bump

1.24:
- API bump

1.23:
- API bump

1.22:
- API bump

1.21:
- addition to account for jumping in and out of combat quickly, making templock more robust

1.2:
- changed functionality so that temporary lock still works after going out of combat if it was activated during combat. No more surprise-switching back to potion while you were repairing a door because combat status changed.

1.1:
- added option to reset temporary duration on siege/repair kit use
- setting temporary duration works now without reloadui

1.0:
- added slider to adjust temporary lock duration
- bugfix for temporary lock
- more performance optimizations, less function calls
- added more descriptions in settings for clarity

0.6:
- got rid of old stuff (e.g. LibStub)
- added an event filter for performance
- only roughly tested, so if you find any bugs make a friendly comment and i look into it when i have time

0.5x:
- Bugfixes
- Compatibility with other Addons

0.5:
- Option to activate only when getting damage (not when entering combat), good for PvP
- Temporary lock of 5 seconds to a slot if manually changed (e.g. if a siege weapon is selected), good for PvP

0.4:
- choose different settings based on location (General PVE, Dungeons, PVP)

0.3x:
- optimizations, cleanup

0.3:
- it now automatically searches the other slots for a health potion if the target slot is empty
- toggle the addon on and off with a keybinding (+sound feedback) that you can customize in settings->controls under AutoSlotSwitch

0.2:
- added the possibility to change the slot for the automatic switch in the settings menu.
Archived Files (26)
File Name
Version
Size
Uploader
Date
1.3
6kB
Drakhyr
06/06/22 11:36 AM
1.25
6kB
Drakhyr
03/13/22 05:38 PM
1.24
6kB
Drakhyr
11/01/21 10:11 AM
1.23
6kB
Drakhyr
08/23/21 10:52 AM
1.22
6kB
Drakhyr
05/31/21 02:05 PM
1.21
6kB
Drakhyr
01/14/21 09:32 AM
1.2
6kB
Drakhyr
01/13/21 09:10 AM
1.1
6kB
Drakhyr
11/29/20 08:58 AM
1.0
6kB
Drakhyr
11/28/20 04:42 AM
0.6
6kB
Drakhyr
11/24/20 08:59 AM
0.57
38kB
Drakhyr
04/25/16 03:30 PM
0.56
38kB
Drakhyr
04/19/16 01:54 PM
0.55
37kB
Drakhyr
04/17/16 10:12 AM
0.54
37kB
Drakhyr
04/17/16 07:22 AM
0.53
36kB
Drakhyr
04/11/16 02:26 AM
0.52
36kB
Drakhyr
04/08/16 01:25 AM
0.51
34kB
Drakhyr
03/28/16 01:08 PM
0.5
34kB
Drakhyr
03/27/16 01:46 PM
0.4
33kB
Drakhyr
03/08/16 03:07 PM
0.34
32kB
Drakhyr
02/27/16 10:49 AM
0.33
31kB
Drakhyr
02/07/16 06:33 PM
0.32
31kB
Drakhyr
02/02/16 04:51 PM
0.31
31kB
Drakhyr
02/02/16 08:46 AM
0.3
32kB
Drakhyr
01/31/16 11:09 AM
0.2
30kB
Drakhyr
01/28/16 05:01 PM
0.1
30kB
01/24/16 08:12 AM


Post A Reply Comment Options
Unread 04/08/16, 01:42 AM  
Drakhyr
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 27
Uploads: 2
Thanks for the bug report, it's fixed and updated now - ready for download.
Report comment to moderator  
Reply With Quote
Unread 04/06/16, 10:14 PM  
uladz
AddOn Author - Click to view AddOns

Forum posts: 11
File comments: 223
Uploads: 2
What happened with selecting a slot when out of combat? The new update removed it? This was the main feature why I have installed it at the first place because I was constantly hitting Q out of combat and wasting potions. With this addon I jsut set an empty slot for OOC mode and was happy after. Of cause later I have started to use it for in-combat situation at most . Anyway, can you please bring back out of combat slot selection? Thanks!!!
Report comment to moderator  
Reply With Quote
Unread 03/08/16, 03:09 PM  
Drakhyr
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 27
Uploads: 2
Thanks for the nice feedback, uladz :-)

Originally Posted by Tonyleila
Woud it be possible to check if you are in a PvP zone or dungeon/raid? To switch to different potions for this situations?
I updated the addon for the new patch and implemented your feature request.
Please report any bugs, thanks.
Report comment to moderator  
Reply With Quote
Unread 03/05/16, 08:41 AM  
Tonyleila
 
Tonyleila's Avatar
AddOn Author - Click to view AddOns

Forum posts: 288
File comments: 763
Uploads: 7
Woud it be possible to check if you are in a PvP zone or dungeon/raid? To switch to different potions for this situations?
Report comment to moderator  
Reply With Quote
Unread 03/05/16, 06:02 AM  
uladz
AddOn Author - Click to view AddOns

Forum posts: 11
File comments: 223
Uploads: 2
Wow, just what I needed! Thanks a lot!
Report comment to moderator  
Reply With Quote
Unread 02/01/16, 03:27 PM  
Drakhyr
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 27
Uploads: 2
Very nice, didn't know about the quick slot numbering constants, thanks! Will implement this in the next version.

The delay is an interesting idea, but I'm not sure if that will solve the problem. It might even make it more intransparent. I wouldn't want to look at the icon and hope I can still press the key to deploy my treb, or if it switches in that exact moment. At least with getting into combat you hear the music changing.

Maybe something based on location, treb usage, damage taken or weapon used. Or a combination of that. But it must be clear and simple to not unnecessarily complicate usage.


Edit: Updated to 0.31, cleaned up, implemented constants. But: I still need to hardcode the offset to start at 12 o'clock.
Last edited by Drakhyr : 02/02/16 at 08:52 AM.
Report comment to moderator  
Reply With Quote
Unread 02/01/16, 01:14 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
Dunno about the in combat, out of combat switching in the AvA region. It might happen to quick to react properly so you need to "watch" the active quickslot before using it manually.

Or you can implement a "delay" (by the help of function zo_callLater(function() myfunction() end, delayInMilliseconds) after you get into combat so your active quick slot is not changing directly (but after a delay you are able to setup in the settings).
Lua Code:
  1. --Setup the delay from the settings menu slider control or use a fallback value of 3 seconds
  2. local delay = settings.pvpDelayBeforeQuickslotChange or 3000
  3. function()
  4. d("Changing quickslot now")
  5.  end, settings.pvpDelayBeforeQuickslotChange)

You are able to check if you are in the AvA (PVP) world by using function
Lua Code:
  1. IsPlayerInAvAWorld()

And here is one tip for your quick slot numbering in your addon source:
As the quick slot Ids do not start with 1 but with 9 currently, this is the source code that the game uses to create the slot names:

Lua Code:
  1. for i = ACTION_BAR_FIRST_UTILITY_BAR_SLOT + 1, ACTION_BAR_FIRST_UTILITY_BAR_SLOT + ACTION_BAR_UTILITY_BAR_SIZE do
  2. ..
  3. end

ACTION_BAR_FIRST_UTILITY_BAR_SLOT is currently = 8
ACTION_BAR_UTILITY_BAR_SIZE is currently = 8 (8 possible action bar slots: quickslot, change action bars, actions1 to 5 and ultimate)
So the quickslots currently start at 8 +1 = 9 and go up to 8+8 = 16

Maybe its beter to use these constants from the game instead of "hard coding" your indices with 8 to 16, so you are dynamically changing with the game if something ingame wil be changed in the future.
Last edited by Baertram : 02/01/16 at 01:17 PM.
Report comment to moderator  
Reply With Quote
Unread 01/31/16, 11:18 AM  
Drakhyr
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 27
Uploads: 2
Thanks for all the input :-)
I updated to Version 0.3 and implemented your ideas my way:

It now automatically searches the quickslots for other health potions (or whatever) if your current target slot item is empty. You can also disable this via addon settings. And the addon can be toggled via keybinding (under settings->controls).

The automatic search works by taking a search term you defined in the addon settings and looking for that in other slot item names. The default is "health", and if you have a "tincture of health" somewhere in the quickslots it will switch to that if your first target slot is empty.


After testing the addon I definitely know one thing: It's an addon I can't play without anymore ^^
But there is one case that I'm still unsure about: Sieging. If you have your stone treb as current slot, and a health potion as target slot, you sometimes find yourself drinking a potion when you were just planning to build a treb. It happens due to all the getting in and out of little battles - sometimes it's not even you who are fighting but someone of your group. So it's actually safe to put that treb up. It might just be something to get used to - or there is a better way of handling that situation. I need to think about this.
Maybe you have an idea?
Last edited by Drakhyr : 01/31/16 at 11:29 AM.
Report comment to moderator  
Reply With Quote
Unread 01/29/16, 08:08 AM  
votan
 
votan's Avatar
AddOn Author - Click to view AddOns

Forum posts: 577
File comments: 1667
Uploads: 40
Originally Posted by Baertram
It might be. The quickslots got no bagId and slotIndex where you could test the "potion" etc. which is in that slot afaik. But it might be able to just check if the slot is empty by checking the children of the parent slot and see if they are ~=nil or something like that.

Originally Posted by tobarstep
Originally Posted by Drakhyr
Any other suggestions are welcome, too.
I like the idea of this. I've downloaded it but haven't had a chance to test it out yet. One question/suggestion right off though, if the target slot is empty, will the switch still happen? I think it would be good to stop the switch if there is nothing in the target slot. Is that even possible to code with the API?
Of course, that could be checked. There is GetSlotItemCount(slotIndex), which is a sum of all matching bag items.
But, as a well prepared person, this is properbly a rare case.

I did something similar in my version of Potion Alert: A backup slot for each type of potion.
And it turned out, that the first slot never gets empty before you craft new ones. So, I reverted that.
Maybe this is different, if you don't have an alchemy crafter twink.
Report comment to moderator  
Reply With Quote
Unread 01/29/16, 07:33 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
It might be. The quickslots got no bagId and slotIndex where you could test the "potion" etc. which is in that slot afaik. But it might be able to just check if the slot is empty by checking the children of the parent slot and see if they are ~=nil or something like that.

Originally Posted by tobarstep
Originally Posted by Drakhyr
Any other suggestions are welcome, too.
I like the idea of this. I've downloaded it but haven't had a chance to test it out yet. One question/suggestion right off though, if the target slot is empty, will the switch still happen? I think it would be good to stop the switch if there is nothing in the target slot. Is that even possible to code with the API?
Report comment to moderator  
Reply With Quote
Unread 01/29/16, 07:12 AM  
tobarstep

Forum posts: 0
File comments: 28
Uploads: 0
Originally Posted by Drakhyr
Any other suggestions are welcome, too.
I like the idea of this. I've downloaded it but haven't had a chance to test it out yet. One question/suggestion right off though, if the target slot is empty, will the switch still happen? I think it would be good to stop the switch if there is nothing in the target slot. Is that even possible to code with the API?
Report comment to moderator  
Reply With Quote
Unread 01/26/16, 04:05 PM  
Drakhyr
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 27
Uploads: 2
Hi Baertram,

thanks for your comment. This is indeed possible - I just thought it wouldn't matter and chose a prominent spot that is easy to remember. I will implement this as soon as I find the time (probably not in the next few days).
Any other suggestions are welcome, too.

Cheers
Drakhyr
Report comment to moderator  
Reply With Quote
Unread 01/26/16, 06:41 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
Hi there,

nice addon, I like the idea.
Always wanted to switch to a special potion if I'm in combat, and switch back to my stamina potions after fight (for a longer run ).

Would it be able for your addon to let us choose the "switch slot"?
Like we use a settings menu to select slot 1, 2, 3, 4, 5, etc. and the addon will swithc to this slot (if not already activated) in fight.

Thanks for your idea and the addon!
Baertram
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: