Download
(11 Kb)
Download
Updated: 03/14/24 07:34 AM
Pictures
File Info
Compatibility:
Scions of Ithelia (9.3.0)
Updated:03/14/24 07:34 AM
Created:01/03/22 11:39 PM
Monthly downloads:432
Total downloads:9,681
Favorites:13
MD5:
9.3.0
LongPressCtrlToInteract  Popular! (More than 5000 hits)
Version: 2024.03.14
by: Masteroshi430 [More]
Annoyed by Companions, Followers, Seats, Insects, etc interactions at the wrong moment ?

LongPressCtrlToInteract will only allow companion & quest follower (NPCs following you during a quest) interaction if you keep the Ctrl (or Alt/Shift/Cmd) key pressed while using your "Interact with Environment" keybind.

Parts of code were "borrowed" from No Interact by Rhyono and No, thank you! by Garkin, Ayantir and SlippyCheeze.

Note:
The quest follower's name is recorded during the 1st dialogue with him/her/it after him/her/it has acquired his/her/its follower status and the addon starts doing it's magic just after that.
For the companion and the other features, it works instantly.
  • Fully automatic
  • Message in chat to remind you the right keys to press to interact with companion / quest follower if you use use the regular keybind alone on them.


Settings:
  • You can set SHIFT, ALT or CMD instead of the default CTRL as the long press key.
  • Disallow seeing text links and thus interaction with Insects (removed for now)
  • Disallow seeing text links and thus interaction with Empty containers (which means empty backpacks, barrels, urns, baskets, chests, crates, cupboards, drawers, nightstands, etc links all become non displayed/usable)
  • Disallow seeing text links and thus interaction with Seats
  • Disallow seeing text links and thus interaction with cooking fires (outside of town)
  • Auto summon latest companion after 1st fight without him/her (You have to do a combat with him/her first, then he/she will comeback after next fight after being removed) (per character)
Also auto blocks entering the Dark Brotherhood sanctuary with Mirri & Eloise + center screen notification.
Also auto blocks entering Outlaw's refuges with Eloise + center screen notification.

Required Libraries:
2024.03.14
- Don't try to recall companion where they are blocked (solo content, solo arena, battlegrounds and more)

2024.03.08
- Fixed this bug : "when I have Isobel summoned I can't loot the Outlaws in the Inner Sea Armature delve in Stonefalls. It says "Isobel Veloise won't like that! Oh no, she won't!" when I hover over the bodies and there's no option to loot them."

2024.02.01
- Bumped API Version to 101041 (Scions of Ithelia)

2023.09.23
- Bumped API Version to 101040 (Secret of the Telvanni)

2023.07.28
- Bumped API Version to 101039 (base-game patch)

2023.06.07
- Fixed a typo in the API Version of the txt file

2023.04.19-2
- Auto blocks entering the Dark Brotherhood sanctuary with Mirri + center screen notification now works with Eloise
- Auto blocks entering Outlaw's refuges with Eloise + center screen notification.

2023.04.19
- Replacement for a value that has been changed on update 38 (works with U37 and U38)

2023.04.18
- Fixed a bug on update 38 PTS following the removing of FISHING_MANAGER
- Bumped API Version to 101038

2023.02.13
- Bumped API Version to 101037

2022.09.10
- Bumped API Version to 101036 (tested on PTS week 1)
- Removed the "No insect interaction" feature (takes too much time to maintain, will wait for a isAnInsect() type variable from ZoS to bring it back)

2022.07.12
- Bumped APIVersion to 101035
- Removed the "known books" feature

2022.05.07
- Corrections sur la traduction française, merci à Cyronhir ;)

2022.05.05
- Bumped APIVersion to 101034 (Ready for the High Isle chapter)

2022.05.01
- Block entering the Dark Brotherhood sanctuary if with Mirri + center screen notification

2022.04.24
- Avoid calling your companion after combat when group is bigger than 1 indeed.

2022.04.23
- Avoid calling your companion after combat when group is bigger than 3.

2022.04.18
- Avoid calling your companion in AVA zone.

2022.04.16
- Avoid calling your companion when he/she/it is already there.

2022.04.15
- Improved : Auto summon companion after 1st fight without him/her : Will now work with all upcoming companions without updating the addon.

2022.04.14
- Improved : Auto summon companion after 1st fight without him/her : Now saves the latest companion used per character and it survives logout / quit

2022.03.26
- Added : Disallow interactions with cooking fires outside of town (off by default, experimental, report any weird behaviour)

2022.03.14
- Bumped API to 101033 (Ascending Tide)

2022.01.31
- Added: Moon-Kissed Jelly to the insect list (all languages)

2022.01.27
- Solved a bug which was preventing from fishing
- Optimisation filters weren't working, now they are so the add-on should be lighter :-)

2022.01.24
- fixed a typo in all languages for Seht's Dovah-Fly

2022.01.21-2
- Only the actual 2 forbidden insects with Mirri
- Added Blackreach jelly to the list of insects in "no interaction with insects"

2022.01.21
- Fixed a issue where you couldn't loot corpses of giant wasps called "wasp" with the "no interaction with insects" setting on.

2022.01.20
- Excluded Bright Moon Lunar moth from the forbidden insects with Mirri

2022.01.18-2
- Removed the version from the addon name

2022.01.18
- Exclude YOUR assistants (vendors & merchants) from the main feature

2022.01.16
- Bugfix: Yesterday's added feature was working... But with Bastian... NOW FIXED!

2022.01.15
- Added option : Auto disallow interaction with insects when Mirri is around DISABLED BY DEFAULT

2022.01.14-2
- Added Swamp Jelly to the insect list

2022.01.14
- Bugfix: Allowing interactions with insects/bugs now really works (true bug fix indeed :O) )

2022.01.13
- Added: Auto summon companion after 1st fight without him/her (e.g. after a group) DISABLED BY DEFAULT
- Full French Translation

2022.01.12
- Now really stops interactions with empty containers, insects, known books, seats instead of just hiding the interaction text. Oo!

2022.01.11-2
- "disallow interactions with insects": Added some moths in various languages

2022.01.11
- Removed a filter which was causing the "disallow interactions with insects" feature to not work in some languages.

2022.01.09
- Performance optimisations for the "Disallow interactions with known books" feature
- Toggle settings for disallow interactions with : empty containers, insects, known books, seats. ALL DISABLED BY DEFAULT
- Ready for FR, RU, DE translations

2022.01.08-1
- Greatly improved the "Disallow interactions with known books & shelves" performance so yes, it is back!
(there's room to add filters to improve performance again, I'll do it later)

2022.01.08
- Removed: Disallow interactions with known books (after investigations, that feature is a huge FPS eater, removed for now)

2022.01.07-2
- Better colours for chat messages (used game colours)

2022.01.07
- Added: Disallow interactions with known books

2022.01.06
- Tiny icons in chat to identify follower & companion.
- I forgot to change a variable name thus the follower feature wasn't working anymore, this is now fixed.

2022.01.05-2
- You can now set Shift, Alt or Cmd instead of the default Ctrl as the long press key.
- Now requires the LibAddonMenu library

2022.01.05
- I found another way to get the quest follower's name so the addon should now work flawlessly (the previous way was glitchy)
- Applied most of Baertram's advice

2022.01.04-4
- Fixed the typo in the chat message Oo!

2022.01.04-3
- Clarified the code

2022.01.04-2
- Fixed a tiny bug
- Exclude pets from followers to avoid unintended behavior

2022.01.04
- Initial Release
Optional Files (0)


Archived Files (46)
File Name
Version
Size
Uploader
Date
2024.03.08
11kB
Masteroshi430
03/07/24 11:07 PM
2024.02.01
11kB
Masteroshi430
02/01/24 04:40 AM
2023.09.23
11kB
Masteroshi430
09/22/23 11:56 PM
2023.08.27
11kB
Masteroshi430
07/27/23 10:53 PM
2023.06.07
11kB
Masteroshi430
06/07/23 03:00 PM
2023.04.19-2
11kB
Masteroshi430
04/19/23 12:23 PM
2023.04.19
11kB
Masteroshi430
04/19/23 02:42 AM
2023.04.18
11kB
Masteroshi430
04/18/23 12:46 AM
2023.02.13
11kB
Masteroshi430
02/13/23 03:34 PM
2022.09.20
11kB
Masteroshi430
09/20/22 03:23 AM
2022.07.12
11kB
Masteroshi430
07/12/22 03:49 AM
2022.05.07
11kB
Masteroshi430
05/07/22 02:00 PM
2022.05.05
11kB
Masteroshi430
05/05/22 05:43 AM
2022.05.01
11kB
Masteroshi430
05/01/22 08:04 AM
2022.04.24
10kB
Masteroshi430
04/24/22 05:50 AM
2022.04.23
10kB
Masteroshi430
04/23/22 01:46 AM
2022.04.18
10kB
Masteroshi430
04/17/22 11:38 PM
2022.04.16
10kB
Masteroshi430
04/15/22 03:56 PM
2022.04.15
10kB
Masteroshi430
04/14/22 11:54 PM
2022.04.14
10kB
Masteroshi430
04/14/22 02:46 PM
2022.03.26
10kB
Masteroshi430
03/26/22 03:46 PM
2022.03.14
10kB
Masteroshi430
03/14/22 06:12 AM
2022.01.31
10kB
Masteroshi430
01/30/22 05:42 PM
2022.01.27
10kB
Masteroshi430
01/27/22 01:49 PM
2022.01.24
10kB
Masteroshi430
01/24/22 06:53 AM
2022.01.21-2
10kB
Masteroshi430
01/21/22 08:10 AM
2022.01.21
9kB
Masteroshi430
01/21/22 03:26 AM
2022.01.20
9kB
Masteroshi430
01/20/22 02:27 PM
2022.01.18-2
9kB
Masteroshi430
01/18/22 03:27 PM
2022.01.18
9kB
Masteroshi430
01/18/22 02:20 PM
2022.01.16
9kB
Masteroshi430
01/16/22 06:47 AM
2022.01.15
9kB
Masteroshi430
01/15/22 02:43 PM
2022.01.14-2
9kB
Masteroshi430
01/14/22 06:48 AM
2022.01.13
9kB
Masteroshi430
01/13/22 01:52 AM
2022.01.12
8kB
Masteroshi430
01/12/22 12:12 PM
2022.01.11-2
8kB
Masteroshi430
01/11/22 04:49 PM
2022.01.11
8kB
Masteroshi430
01/11/22 01:06 PM
2022.01.09
8kB
Masteroshi430
01/09/22 10:19 AM
2022.01.08-2
5kB
Masteroshi430
01/08/22 03:44 AM
2022.01.08
5kB
Masteroshi430
01/07/22 04:35 PM
2022.01.07-2
4kB
Masteroshi430
01/07/22 05:45 AM
2022.01.07
4kB
Masteroshi430
01/06/22 11:07 PM
2022.01.06
4kB
Masteroshi430
01/06/22 06:51 AM
2022.01.05-2
2kB
Masteroshi430
01/05/22 02:16 PM
2022.01.05
2kB
Masteroshi430
01/04/22 03:06 PM
2022.01.04-4
2kB
Masteroshi430
01/04/22 04:08 AM


Post A Reply Comment Options
Unread 01/04/22, 08:53 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
Oh this sounds nice, thanks for the addon!
Quest follower = NPCs following you during a quest?

A few hints about your code:
":" notation should notbe used for non-ZO_Object stuff!

Code:
LongPressCtrlToInteract:Initialize()
Should be:
Code:
LongPressCtrlToInteract.Initialize()
The : is a notation used for objects created by "classes" where you are able to use "self" properly to point to the object.
Better keep your code clean and not mixed OR create the LongPressCtrlToInteract porperly as an objet of any subclass like ZOs defined it.

And you should use the constants the game provides instead of using numbers.
e.g. at yourGetgameCameraInteractableActionInfo() return value "action":
Instead of 2:
Code:
-- do not display reticle text for empty boxes
			    if empty and addinfo == 2 then
use the constant the game provides:
ADDITIONAL_INTERACT_INFO_EMPTY = 2


And your addon is leaking global variables:
followerName in function DisableReticleTake_Hook
You should define a local followerName at the top of your addon#s lua file to make it local to your addon.


And to speed up things and remove redundancy:
You call IsControlKeyDown() in the same functions multiple times. Just do something like
local ctrlDown = IsControlKeyDown() at the start fo the function and hen check for
and not ctrlDown instead
Last edited by Baertram : 01/04/22 at 09:03 AM.
Report comment to moderator  
Reply With Quote
Unread 01/04/22, 09:09 AM  
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view AddOns

Forum posts: 185
File comments: 667
Uploads: 19
Originally Posted by Baertram
Quest follower = NPCs following you during a quest?
Yes, I use a workaround because there is no unitTag for follower, it has some glitches though, I will try to improve that part...

I will check and apply your advice, thank you!
Report comment to moderator  
Reply With Quote
Unread 01/04/22, 11:01 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
Originally Posted by Masteroshi430
Originally Posted by Baertram
Quest follower = NPCs following you during a quest?
Yes, I use a workaround because there is no unitTag for follower, it has some glitches though, I will try to improve that part...

I will check and apply your advice, thank you!
Would be nice to have that optional or provide a slash command to turn it off. Quest NPCs most of the time stay away and do not block interactions. At least they do not for me
If you add savedvariables please consider using GetWorldName() to differ the SV between the servers (you can pass that in to the "profile" parameter of ZO_SavedVariables:NewAccountWide or NewCharacterIdSettings e.g.)
Last edited by Baertram : 01/04/22 at 11:02 AM.
Report comment to moderator  
Reply With Quote
Unread 01/04/22, 12:29 PM  
DohNotAgain

Forum posts: 1
File comments: 110
Uploads: 0
Originally Posted by Baertram
Originally Posted by Masteroshi430
Originally Posted by Baertram
Quest follower = NPCs following you during a quest?
Yes, I use a workaround because there is no unitTag for follower, it has some glitches though, I will try to improve that part...

I will check and apply your advice, thank you!
Would be nice to have that optional or provide a slash command to turn it off. Quest NPCs most of the time stay away and do not block interactions. At least they do not for me
If you add savedvariables please consider using GetWorldName() to differ the SV between the servers (you can pass that in to the "profile" parameter of ZO_SavedVariables:NewAccountWide or NewCharacterIdSettings e.g.)
Quest NPCs often get in my way.
That is most likely my issue caused by my positioning within the world geometry and NPC group.
It is annoying, but all I need to do is change my location and, voila, the NPC is out of the way.
I'd rather not have to worry about the "in the way" issue, though.
I hate Bastian. His click box is too big, or his positioning logic needs fixed, or both.
Mirri is much less problematic.

Agreed.
A toggle for on and off would be nice.
Slash command, key-bind, or whatever.
Report comment to moderator  
Reply With Quote
Unread 01/04/22, 02:41 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
Somehow got a bug with your addon active.
Mirri was active as companion but no interaction with her was visible (she was behind me).
In front of me was a rune, near an edge of a wall. It always spawns near the wall or even below it but you can easily interact and get it:


If you want to test yourself: It's in murkmire near the outlaws refuge north of Lilmoth:



There was no interaction shown at all for the rune. I was not able to collect it anymore. I had not talked to Mirri before and it was after a reloadui.
Interaction was not possible with Miri until I pressed CTRL key, so this worked.
But interaction with other objects was somehow blocking even the interactable text as it seems?

I've disabled the addon and then it worked again.
Last edited by Baertram : 01/04/22 at 02:48 PM.
Report comment to moderator  
Reply With Quote
Unread 01/04/22, 02:44 PM  
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view AddOns

Forum posts: 185
File comments: 667
Uploads: 19
Originally Posted by Baertram
Somehow got a bug with your addon active.
Yes I think I fixed it just 30mn ago and I will upload it after the test I'm doing right now
(I already changed the changelog )
Report comment to moderator  
Reply With Quote
Unread 01/04/22, 02:49 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
Thanks.

btw:
Please remove the version from the name of the addon (## title: tag) as it's really hard to read the addon manager easily with the version numbers in there. This info is not needed there!
You can put that into the addon description tag in your txt file and it will be shown in the tooltip of the addon at the addon manager then. Thank you.

Feature request:
Let us choose shift or control or alt key for the modifier as ctrl is currently bound to my quickslots and opens my quickslot wheel all the time Shift would be easy to use as well.
This would be perfect, thank you!
Report comment to moderator  
Reply With Quote
Unread 01/04/22, 03:08 PM  
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view AddOns

Forum posts: 185
File comments: 667
Uploads: 19
Originally Posted by Baertram
Thanks.

btw:
Please remove the version from the name of the addon (## title: tag) as it's really hard to read the addon manager easily with the version numbers in there. This info is not needed there!
You can put that into the addon description tag in your txt file and it will be shown in the tooltip of the addon at the addon manager then. Thank you.

Feature request:
Let us choose shift or control or alt key for the modifier as ctrl is currently bound to my quickslots and opens my quickslot wheel all the time Shift would be easy to use as well.
This would be perfect, thank you!
It's on the to-do list for the future updates!
Report comment to moderator  
Reply With Quote
Unread 01/04/22, 03:48 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
Find a worked on version here, hope it explains a bit more than text and provides you some hints how to improve the code via local variables, removing redundancies and changes like described below
LongPressCtrlToInteract - modified by Baertram

Changes:

followerName is still leaking to global table _G

If you do not define it with local up in front it is global to all other addons (stored in table _G) and thus could overwrite vanilla game code or other addons! You need to either add thos varibales to you addon table like this:
Lua Code:
  1. LongPressCtrlToInteract.followerName
Or just put it as local at the top of your lua file
Lua Code:
  1. local LongPressCtrlToInteract = {
  2. Name = "LongPressCtrlToInteract",
  3. Author = "@Masteroshi430",
  4. Version = "2022.01.05"}
  5.  
  6. local followerName
Or if only needed in 1 function define it local in the function scope.


Your function GetThatFollowerName is also leaking to global as it was not defined as local GetThatFollowerName, but maybe that was on purpose.
You maybe should just make your addon table LongPressCtrlToInteract global instead and add the functions to it then, so you are able to globally access the functions via LongPressCtrlToInteract.GetThatFollowerName
One is able to find the functions more easily then as names like GetThatFollowerName are nt unique enough to point to your addon... and it often makes trouble to differe them from vanilla code function names which also begin with Get*.
If you want to leave it global and do not want to populate your addon table LongPressCtrlToInteract maybe rename GetThatFollowerName to something more unique like LPCTRL_GetThatFollowerName instead.


And if you change the function definition from : to . notation you need to change the calls to these functions from : to . as well:
LongPressCtrlToInteract.Initialize()
Last edited by Baertram : 01/04/22 at 04:04 PM.
Report comment to moderator  
Reply With Quote
Unread 01/04/22, 04:41 PM  
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view AddOns

Forum posts: 185
File comments: 667
Uploads: 19
Originally Posted by Baertram
...
Ok thanks, I don't know if you are overenthusiastic about the addon or being bossy but it's funny anyway
I understand and will apply the changes including the pressed key alternatives, just give me a bit of time, I'm not a pro developer.
Report comment to moderator  
Reply With Quote
Unread 01/04/22, 07:10 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
Originally Posted by Masteroshi430
...overenthusiastic about the addon or being bossy...
Neither of both but I often get that reaction Somehow ppl in this world are not used anymore to "someone offering help without being asked", as it seems.
I'm neither a pro developer, just trying to spread the knowledge.
Please always fell free to do it your way and whatever you like to!

And yeah, well maybe I'm also a bit overenthusiastic to get those bitchy companion interactions fixed
Report comment to moderator  
Reply With Quote
Unread 01/04/22, 10:09 PM  
Shadowshire

Forum posts: 1
File comments: 402
Uploads: 0
Future changes

Originally Posted by Masteroshi430
Originally Posted by Baertram
Thanks.

....

Feature request:
Let us choose shift or control or alt key for the modifier as ctrl is currently bound to my quickslots and opens my quickslot wheel all the time Shift would be easy to use as well.
This would be perfect, thank you!
It's on the to-do list for the future updates!
Like Baertram, on my computer < Ctrl + G > is already bound to another use. I press it to toggle between (1) displaying the default Loot dialog and (2) auto-looting containers, which displays the contents in a list on the lower right area of the HUD. If my memory is correct, then < Alt + G > is not currently bound to anything.

In my experience, <Shift + Letter> is processed by the game client the same as pressing a Letter key without <Shift> held down. For example, pressing either <Shift + L> or just <L> opens the Alliance War UI by default. There is also no distinction between <Digit> and <Shift + Digit>.

By default <Shift + W> is bound to the Sprint feature. However, a player can bind another key to Sprint without using <Shift>, then simply depress and hold that key for Sprinting. (The player can either remove the default key-bind for Sprint after creating the alternative or keep the default availabe for use.) Regardless, <Shift> is ordinarily available to combine with other keys which are not Letters or Digits, such as Punctuation keys.

In general, the <Alt> and <Ctrl> keys are available, either as keybinds that are used alone, or in combination with another key. (Note: <Alt> and <Ctrl> should not be bound for use alone if the player also expects to use them in combination with other keys.)

Each of the 12 Function keys can be bound to a game feature or to an add-on, and each can be bound in combination with <Alt> or <Ctrl>. A player can also bind each Navigation key to a game feature or to an add-on(s).

However, I never bind the <ESC> menu key-bind to anything else, or use <ESC> in any combination with another key. In my experience with the game client, it is not possible to bind any key in combination with <Enter>.

Note: how key-binds are recognized (or not recognized) by the game client depends upon several conditions, such as whether the player's computer runs the Windows OS, and which specific keyboard is in use with the system. Further, the default key-binds for the game client differ among early versions of the software.
Report comment to moderator  
Reply With Quote
Unread 01/05/22, 12:34 AM  
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view AddOns

Forum posts: 185
File comments: 667
Uploads: 19
Originally Posted by Baertram
well maybe I'm also a bit overenthusiastic to get those bitchy companion interactions fixed
I published 4 updates the day the addon was released (yesterday) and I have not yet had any complaint about that bug since I changed to a more secure way to get the follower name on last update (the previous way was glitchy and sometimes the feature applied to material nodes, containers or NPCs, this apparently isn't the case anymore).

And yes, your advice is welcome, this is a new language to me, I'm only starting to get used to the API, just give me a bit of time to do things.

I will add an option to choose between Ctrl, Shift, Alt and Cmd for the long press key soon.
Last edited by Masteroshi430 : 01/05/22 at 01:57 AM.
Report comment to moderator  
Reply With Quote
Unread 01/07/22, 08:15 AM  
DohNotAgain

Forum posts: 1
File comments: 110
Uploads: 0
Nice!
I like that disallow interaction with known books option.
Is there any way you could add an option to ignore empty containers?
Report comment to moderator  
Reply With Quote
Unread 01/07/22, 08:16 AM  
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view AddOns

Forum posts: 185
File comments: 667
Uploads: 19
Originally Posted by DohNotAgain
Nice!
I like that disallow interaction with known books option.
Is there any way you could add an option to ignore empty containers?
have you read the description of the addon ?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: