Download
(23 Kb)
Download
Updated: 04/29/24 07:29 PM
Compatibility:
Scions of Ithelia (9.3.0)
Endless Archive (9.2.5)
base-game patch (9.1.5)
Necrom (9.0.0)
Scribes of Fate (8.3.5)
Updated:04/29/24 07:29 PM
Created:10/06/22 09:53 PM
Monthly downloads:899
Total downloads:7,663
Favorites:14
MD5:
Categories:Combat Mods, DPS, Healers, Tank
9.3.0
Skill Blocker  Updated this week!  Popular! (More than 5000 hits)
Version: 3.7.0
by: notnear [More]
Dependencies:
LibAddonMenu and LibSkillBlocker

Compatible with Keyboard/Mouse and Gamepad mode

Features:
  • All active skills can be selected on the addon menu
  • Block recast of skills when the option is selected*
  • Block cast of skills based on stacks
  • Unblock cast of skills while in PvP zones when the options are selected**

  • Blocks of Crystal Fragments and other "proc" skills will block skill only if not procced
All options are turned OFF by default.

*Action Bar Timers setting must be ON
**for that make sure to turn OFF the PvP blocking option (ON by default), can be toggled with a keybind, command or on the menu.
[list][*]Version 3.7.0
  • Added configurable threshold for block recasts
  • Added option to hide base game Ability Bar Timers
  • Added extra ability ids for "Fatecarver"
  • Code optimizations
[*]Version 3.6.0
  • Added extra ability ids for removing "Guard" and morphs
  • Code optimizations
[*]Version 3.5.0
  • Added block on stacks for "Bound Armaments" and "Venom Skull"
  • Code optimizations
[*]Version 3.4.2
  • Improved string formatting for non english clients
  • API bump to U41
[*]Version 3.4.1
  • Added support for combining 'Block when out of combat' with other options
  • Code optimizations
[*]Version 3.4.0
  • Added option to block arcanist skill use if player doesn't have max stacks of Crux (request by kalitva)
  • Added option to block skill use if player is out of combat (request by kalitva)
  • Added support for the "Block in PvP" option for all types of skill blocking
[*]Version 3.3.0
  • Added option to block arcanist skill use if player has max stacks of Crux (request by XoloD89)
  • Updated "Currently Registered" function to sort abilities alphabetically
  • Code optimizations
  • API bump to U40
[*]Version 3.2.2
  • Updated strings with zo_strformat to cleanup the menu a bit on non english clients, some words on some languages might still be on the wrong order tho
  • API bump to U39
[*]Version 3.2.1
  • Added an "Alert type" option for keybind/slash command output, because the chat spam got really annoying one trial too fast
  • Added option to auto reset "Block Suppression" on addon load, turned OFF by default.
  • Updated some strings for better understanding of what that option will do
  • Fixed a typo
  • Updated code for performance improvements
  • Version 3.2.0
    • Added a "Block Suppression" option, turned OFF by default. More info on addon menu tooptips
    • Removed a callback for an old function left inside of the keybind/slash command "Block PvP" function
  • Version 3.1.1
    • Added extra ability ids for sorcerer pets
    • Added PT-BR translation
    • Updated register and block handler functions to improve performance
  • Version 3.1.0
    • Fixed PvP messages not showing up properly
    • Updated "PvP" handler to not need EVENT_ZONE_CHANGED, fixing the Imperial City problem (described by hurry143, for more info check comments) which will also help with performance
  • Version 3.0.1
    • Updated Saved Variables to save per server (EU/NA/PTS)
  • Version 3.0.0
    • Added Arcanist abilities
    • Added option to disable "Invalid ability" alerts
    • Added "Currently Registered" section to addon menu
    • Updated "Class" section on addon menu
    • Updated "Recast" handler, now use Ability Bar Timers so it should be able to block any skill that adds a timer at cast as long as you have Ability Bar Timers turned ON on game combat settings *
    • Updated LibSkillBlocker minimum version required to 1.0.8
    • Updated Saved Variables version, previous settings will be reset upon game launch or ReloadUI
    • Updated code for performance improvements
    • API bump to U38
    • * Trap Beast and morphs is known to not be working, if you find other skills please post in the comments!
  • Version 2.0.3
    • Added extra ability ids for destruction staff skill line
    • Added DE translation (Thanks to Baertram!)
    • Updated code for performance improvements
  • Version 2.0.2
    • Added option to unregister events used to block recasts (EVENT_EFFECT_CHANGED, EVENT_PLAYER_ALIVE and EVENT_PLAYER_ACTIVATED) that was causing fps drops during trials
    • API bump to U37
  • Version 2.0.1
    • Fixed localization not defaulting the english file in non english clients as described by Saenic
  • Version 2.0.0
    • Added list of all active skills
    • Fixed recast skills not being unregistered if player was on a load screen when the effect ended
    • Updated Saved Variables version, previous settings will be reset upon game launch or ReloadUI
    • Updated overall code structure to support the added skills and improve performance
    • Removed toggle block/unblock keybinds and slash commands
  • Version 1.3.3
    • Added option (at least as a temporary fix) to unregister recast skills if player was on a load screen when the effect ended
  • Version 1.3.2
    • Added option to block Revealing Flare (and morphs) and Temporal Guard (Undo morph) by request
    • Updated Dawnbreaker to block all variations instead of just Flawless Dawnbreaker
    • Added the missing binding for Dawnbreaker
  • Version 1.3.1
    • Added option to block Flawless Dawnbreaker by request
    • Updated how Block PvP blocks/unblocks skills, now will not make changes to saved variables
  • Version 1.3.0
    • Added option to block Grim Focus and its morphs by request
    • Added keybinds for the blocking options
    • Rearranged the code structure
    • Updated Saved Variables version, previous settings will be reset upon game launch or ReloadUI
  • Version 1.2.0
    • Initial release
Optional Files (0)


Archived Files (22)
File Name
Version
Size
Uploader
Date
3.6.0
23kB
notnear
04/12/24 11:35 PM
3.5.0
23kB
notnear
04/04/24 09:58 PM
3.4.2
22kB
notnear
03/11/24 10:07 AM
3.4.1
22kB
notnear
03/05/24 07:58 PM
3.4.0
22kB
notnear
03/04/24 08:27 PM
3.3.0
21kB
notnear
10/24/23 01:42 PM
3.2.2
27kB
notnear
08/28/23 04:50 PM
3.2.1
27kB
notnear
07/17/23 12:17 PM
3.2.0
25kB
notnear
07/16/23 06:06 PM
3.1.1
24kB
notnear
06/11/23 12:34 AM
3.1.0
23kB
notnear
06/08/23 04:05 AM
3.0.1
23kB
notnear
05/08/23 12:01 PM
3.0.0
23kB
notnear
05/08/23 11:22 AM
2.0.3
23kB
notnear
04/16/23 05:38 PM
2.0.2
23kB
notnear
03/27/23 11:21 AM
2.0.1
24kB
notnear
11/08/22 08:44 PM
2.0.0
24kB
notnear
11/04/22 11:25 PM
1.3.3
7kB
notnear
10/23/22 03:48 PM
1.3.2
6kB
notnear
10/21/22 07:20 PM
1.3.1
6kB
notnear
10/20/22 12:46 AM
1.3.0
6kB
notnear
10/17/22 07:25 PM
1.2.0
4kB
10/06/22 09:53 PM


Post A Reply Comment Options
Unread 06/08/23, 10:01 AM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 64
Uploads: 10
Originally Posted by hurry143
Thanks, notnear!

I get what you're saying now. Even when I port into Cyrodil, the skill doesn't become unblocked until I move to a different zone. I guess I assumed that a zone change event would be triggered just by the act of porting into Cyrodil/IC

I should have just waited for Skill Blocker to eventually do the right thing as I moved to another zone, instead of checking immediately after entering Cyrodil/IC (and then just unblocking the skill myself altogether).

Thanks again for the explanation!
For IC it was still unreliable tho, since there are not many zone changes, 3.1.0 fixed that and should have better performance as it is not calling the whole Initialize function every time the event is triggered

Have a good one and thanks for the help figuring out the issue!
Report comment to moderator  
Reply With Quote
Unread 06/08/23, 05:48 AM  
hurry143

Forum posts: 0
File comments: 31
Uploads: 0
Thanks, notnear!

I get what you're saying now. Even when I port into Cyrodil, the skill doesn't become unblocked until I move to a different zone. I guess I assumed that a zone change event would be triggered just by the act of porting into Cyrodil/IC

I should have just waited for Skill Blocker to eventually do the right thing as I moved to another zone, instead of checking immediately after entering Cyrodil/IC (and then just unblocking the skill myself altogether).

Thanks again for the explanation!
Report comment to moderator  
Reply With Quote
Unread 06/08/23, 02:08 AM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 64
Uploads: 10
Originally Posted by hurry143
Hey notnear,

The following are the exact steps I used to reproduce the issue that I'm facing.

1. Exited game.
2. Told Minion to ignore updates for Skill Blocker.
3. Removed NearSkillBlocker folder from the AddOns folder.
4. Removed NearSkillBlocker.lua from the SavedVariables folder.
5. Installed Skill Blocker manually.
6. Started game and disabled literally every addon/library except for Near's Skill Blocker, LibSkillBlocker, and LibAddonMenu-2.0.
7. Logged into game in PVE zone (Vivec City).
8. Opened Settings->Addons->Near's Skill Blocker and set "Toggle block on PVP zones" to OFF.
9. Added Inner Light with the following settings:
  • Block cast - ON
  • Block recast - OFF
  • Block in PVP - OFF
10. Inner Light is blocked as expected at this point.
11. Ported in to Imperial City Sewers.
12. Inner Light is still blocked at this point.
13. I ran reloadui and see that NearSkillBlocker.lua is created for the first time in the SavedVariables folder, with the following:

14. I opened up Settings->Addons->Near's Skill Blocker and saw that the settings have not changed. Strangely though, the Currently Registered list showed nothing.
15. However, Inner Light is no longer blocked in Imperial City Sewers.
16. I exited Imperial City Sewers and returned to Vivec City.
17. Inner Light remains unblocked.
18. I logged out of the game and log back in.
19. Inner Light is once again blocked in Vivec City.
20. I returned to IC Sewers and, again, Inner Light remains blocked.
Interesting, my tests were in Cyrodiil and not Imperial City Sewers so that's why I was not getting this result.

What happens is that the check for pvp/pve zones is done when the EVENT_ZONE_CHANGED is triggered, which isn't the case for IC (unless you move between districts using the doors for eg, which will give you a message on the top left with your current region) so that's why it is not immediately unregistering, only when you toggle the option already inside or reload the ui, as the function is called on these situations.
The same applies to returning to Vivec City in this case, you need to go past a region "border" for it to try to block, for eg go from inside the city to the Vivec City Wayshrine.

Hopefully my explanation makes sense xD

I'll work on a different handler for the pve/pvp check when I have some free time, thank you for the feedback!

Edit:
Also for 14, "Currently Registered" is missing Inner Light because its the list of registered abilities returned by LibSkillBlocker
Last edited by notnear : 06/08/23 at 02:52 AM.
Report comment to moderator  
Reply With Quote
Unread 06/07/23, 11:29 PM  
hurry143

Forum posts: 0
File comments: 31
Uploads: 0
Hey notnear,

The following are the exact steps I used to reproduce the issue that I'm facing.

1. Exited game.
2. Told Minion to ignore updates for Skill Blocker.
3. Removed NearSkillBlocker folder from the AddOns folder.
4. Removed NearSkillBlocker.lua from the SavedVariables folder.
5. Installed Skill Blocker manually.
6. Started game and disabled literally every addon/library except for Near's Skill Blocker, LibSkillBlocker, and LibAddonMenu-2.0.
7. Logged into game in PVE zone (Vivec City).
8. Opened Settings->Addons->Near's Skill Blocker and set "Toggle block on PVP zones" to OFF.
9. Added Inner Light with the following settings:
  • Block cast - ON
  • Block recast - OFF
  • Block in PVP - OFF
10. Inner Light is blocked as expected at this point.
11. Ported in to Imperial City Sewers.
12. Inner Light is still blocked at this point.
13. I ran reloadui and see that NearSkillBlocker.lua is created for the first time in the SavedVariables folder, with the following:

14. I opened up Settings->Addons->Near's Skill Blocker and saw that the settings have not changed. Strangely though, the Currently Registered list showed nothing.
15. However, Inner Light is no longer blocked in Imperial City Sewers.
16. I exited Imperial City Sewers and returned to Vivec City.
17. Inner Light remains unblocked.
18. I logged out of the game and log back in.
19. Inner Light is once again blocked in Vivec City.
20. I returned to IC Sewers and, again, Inner Light remains blocked.
Last edited by hurry143 : 06/07/23 at 11:44 PM.
Report comment to moderator  
Reply With Quote
Unread 06/07/23, 10:58 AM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 64
Uploads: 10
Re:

Originally Posted by hurry143
Hi,

Thank you for this useful addon, and it has always worked as expected for me in PVE.
My issue has always been with PVP, where a skill would remain blocked in Cyrodil/IC even though I have "Block in PVP" turned OFF for that skill.

For example, these are my settings for Magelight:

and here I have "Toggle block on PVP zones" turned OFF:


Even with the above settings, Magelight would stay blocked even after I entered Cyrodil/IC. It would behave like this no matter how many times I changed "Toggle block on PVP zones" in the addon settings menu.

Today, I decided to finally assign a keybind to "Toggle PVP". Once I used the keybind to turn "Block in PVP" ON and then OFF (even in a PVE zone), Magelight remained unblocked as expected as I ported between Cyrodil and IC.

Unfortunately, I have to use the keybind to toggle "Block in PVP" ON then OFF each time I log into the game (or after a reloadui), since the addon appears to forget that "Block in PVP" is set to OFF when it reloads.
Hi hurry143, thank you for using the addon

I made some tests but couldn't replicate your problem, tho I realized that the message "Unregistered ability *PvP" is not showing up since 3.0, but the un/registers are still working fine, so I'll take a look at that.

Could you please try the following:
1. Disable all of your other addons and test the Toggle PvP options again
- You can also open your saved vars file after a reload ui (Documents\Elder Scrolls Online\live\SavedVariables\NearSkillBlocker.lua) with notepad, hit CTRL+F and look for "blockpvp" to check if its set true or false, according to what you left it at.

2. Reinstall the addon manually just in case it was a problem with Minion if you use it?
- Delete the whole "NearSkillBlocker" folder (located at Documents\Elder Scrolls Online\live\AddOns), then get the folder from the downloaded zip and paste there, if the game is open reload the ui after. (if in doubt check this link)
Last edited by notnear : 06/07/23 at 02:14 PM.
Report comment to moderator  
Reply With Quote
Unread 06/06/23, 06:11 PM  
hurry143

Forum posts: 0
File comments: 31
Uploads: 0
"Toggle block on PVP zones" doesn't work without using keybind first

Hi,

Thank you for this useful addon, and it has always worked as expected for me in PVE.
My issue has always been with PVP, where a skill would remain blocked in Cyrodil/IC even though I have "Block in PVP" turned OFF for that skill.

For example, these are my settings for Magelight:

and here I have "Toggle block on PVP zones" turned OFF:


Even with the above settings, Magelight would stay blocked even after I entered Cyrodil/IC. It would behave like this no matter how many times I changed "Toggle block on PVP zones" in the addon settings menu.

Today, I decided to finally assign a keybind to "Toggle PVP". Once I used the keybind to turn "Block in PVP" ON and then OFF (even in a PVE zone), Magelight remained unblocked as expected as I ported between Cyrodil and IC.

Unfortunately, I have to use the keybind to toggle "Block in PVP" ON then OFF each time I log into the game (or after a reloadui), since the addon appears to forget that "Block in PVP" is set to OFF when it reloads.
Last edited by hurry143 : 06/06/23 at 08:41 PM.
Report comment to moderator  
Reply With Quote
Unread 05/08/23, 11:41 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4993
File comments: 6047
Uploads: 78
Hi, your savedvariables is not respecting the "server" and thus the same account on EU and NA server cannot have different settings.
Would have been cool if you add the GetWorldName() as 3rd param where currently the nil entry exists. This will create a subtable "NA Megaserver" or "EU Megaserver" or "PTS" instead if "Defaults" in the SV table.

Lua Code:
  1. addon.ASV = ZO_SavedVars:NewAccountWide(addon.name .. "_Data", 4, GetWorldName(), addon.defaults)

Maybe a good time to do so now as you have reset the SV recently
Last edited by Baertram : 05/08/23 at 11:42 AM.
Report comment to moderator  
Reply With Quote
Unread 05/06/23, 09:12 AM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 64
Uploads: 10
Originally Posted by kalitva
Hi, great mod, works really well on sorcerer.
Is there a reason most of the self buff spells dont work on the dragon knight? i tested 3 spells (weapons, armor and the heart one) and only the armor buff spell worked.
Hi! Currently the addon can only block recast of skills that give you a buff with the same ID as the skill on the bar. I'm finishing a version that will rely on Action Bar Timers instead, should be up in the next days!
Last edited by notnear : 05/06/23 at 09:34 AM.
Report comment to moderator  
Reply With Quote
Unread 05/04/23, 12:35 PM  
kalitva

Forum posts: 0
File comments: 16
Uploads: 0
Hi, great mod, works really well on sorcerer.
Is there a reason most of the self buff spells dont work on the dragon knight? i tested 3 spells (weapons, armor and the heart one) and only the armor buff spell worked.
Report comment to moderator  
Reply With Quote
Unread 04/14/23, 02:27 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4993
File comments: 6047
Uploads: 78
Originally Posted by notnear
Hello Baertram, I'm taking a look at the things you listed but most of my code was while learning so I'll need some more help here.
Hi there, yeah my file hoster had some difficulties and I needed to reupload them and sync.
Here are the links again with the changes I did:
Skill Blocker - With global var fixes, LibAddonMenu LAM-PanelClosed callback and event filtering
https://drive.shadow.tech/s/LfTjbm7Q...n_Baertram.zip
LibSkillBlocker 1.0.7
https://drive.shadow.tech/s/45fHmXy3...cker_1_0_7.zip


Users reported me thought that it's still performance wise a mess with my version LibSkillBlocker_1_0_7 so 1_0_6 (which basically is the old 1_0_4) works best for the moment.
But AS this only seems to be a mess if "re Cast block" is enabled it's about your EVENT_EFFECT_CHANGED for sure, I'd say
So ths definately needs to improve and my event filters already helped there a lot I think -> only player effects tracked.

But maybe we can talk about that more in detail, to find out what other filters may help and how to improve this. And I'll also change LibSkillBlocker again and test what's the performance loss at the moment. Maybe the added "asserts" are, maybe other checks.

[quote=notnear]Hello Baertram, I'm taking a look at the things you listed but most of my code was while learning so I'll need some more help here.



Originally Posted by notnear
I didn't think I would be overwriting something here since these were returned by the GetUnitBuffInfo and inside the function, if it's not already on the file mentioned above what would be the proper way to assign these? just adding the same names as a local var inside of that?
All variables are global unless you define them as local, no matetr what the scope is (anonymous functions, outside of functions, within loops etc.). So ys, adding a local in front of the line fixes this as you only need the abilityId there I think, and the line where it's needed is within the same if ... end closure.

Originally Posted by notnear
Didn't notice I was creating a global function here, fixed them following your example!
Just for future reference, would making these (that are only called by events) into local functions work the same as adding them to NEAR_SB? Like how it's done for the OnAddonLoaded one, or it's best to just add them to the global.
Making them local functions would be not the same as they would not be accessible from other addons then. But as you do not seem to need this it would be okay for your usecase! NEAR_SB is a global variable so all other addons would have acces to that table and it's contents, e.g. function NEAR_SB.EVENT_*whatever

Originally Posted by notnear
About the performance issues, I started having FPS drops with this addon only after update 37, in case this could help find out why it is happening.

I'll look into the event filters etc to try to understand how it works and also the other things you pointed out!
Check my version, I've added an event filter on "player" already so only your own effect changes are tracked now and all ohers are skipped by C code already even ebfore it will be throwing any callback in lua code!
This definately makes a differenece as your code before was executed like every ms many times, for surround players buff changes, pets, companions etc. :-(

Originally Posted by notnear
It doesn't need to keep track of the effects, currently I'm using it just to define what to do on the "customBlockHandler", if it should/shouldn't block the skill based on if you have the buff or not.
That's somethign you need to explain more in detail I think so I get the purpose. At best at gittereim/esoui, I saw you joined the channel. Will contact you there.
Last edited by Baertram : 04/14/23 at 04:59 PM.
Report comment to moderator  
Reply With Quote
Unread 04/14/23, 12:25 PM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 64
Uploads: 10
Hello Baertram, I'm taking a look at the things you listed but most of my code was while learning so I'll need some more help here.

Originally Posted by Baertram
Here is a version wtih those lines fixed/changed, and a German translation file de.lua adde.

It's UNTESTED so please test.
I'm not sure if you removed the link here or if I'm just checking on the wrong place, I can't find the files.

Originally Posted by Baertram
your addon is leakig many variables to the global namespace, and teh names of those are not unique, and should be fixed!
e.g.
Code:
for i = 1, numBuffs do
			buffName, timeStarted, timeEnding, _, stackCount, _, _, effectType, abilityType, _, abilityId, _, castByPlayer = GetUnitBuffInfo('player', i)
			table.insert(activeBuffs, abilityId, true)
		end
All the variables buffName, timeStarted, timeEnding, _, stackCount, _, _, effectType, abilityType, _, abilityId, _, castByPlayer are global and overwrite other addons variables with the same name that way!
I didn't think I would be overwriting something here since these were returned by the GetUnitBuffInfo and inside the function, if it's not already on the file mentioned above what would be the proper way to assign these? just adding the same names as a local var inside of that?



Originally Posted by Baertram
And your functions like OnPlayerActivatedAlive_EffectChanged should be added to your global variable NEAR_SB instead, OR at leasz contain some info where they origin from, like NEAR_SB_OnPlayerActivatedAlive_EffectChanged. At best add them to
NEAR_SB.OnPlayerActivatedAlive_EffectChanged instead of defining them globally like this. Makes no sense if you got 1 global where all shuld belong to, and one searches for.
Didn't notice I was creating a global function here, fixed them following your example!
Just for future reference, would making these (that are only called by events) into local functions work the same as adding them to NEAR_SB? Like how it's done for the OnAddonLoaded one, or it's best to just add them to the global.


About the performance issues, I started having FPS drops with this addon only after update 37, in case this could help find out why it is happening.

I'll look into the event filters etc to try to understand how it works and also the other things you pointed out!


Originally Posted by Baertram
And if this skill recast block really needs to keep track of all effects (Wouldn't it be enough to track the abilityId at the action slot button pressed and if someone tries to press it again it forbids this? Maybe we can add another API function to LibSkillBlocker for that so that you just register a block, and the lib checks if you are trying to press the same action button again, where the same abilityId that last time was used is still available).
It doesn't need to keep track of the effects, currently I'm using it just to define what to do on the "customBlockHandler", if it should/shouldn't block the skill based on if you have the buff or not.
Last edited by notnear : 04/14/23 at 02:15 PM.
Report comment to moderator  
Reply With Quote
Unread 04/14/23, 10:59 AM  
julivity
 
julivity's Avatar

Forum posts: 1
File comments: 26
Uploads: 0
Hallelujah! I'm happy to see Baertram here because my game started performing horribly yesterday. At Alikr dolmens the frames would drop to zero and game would basically pause or black the screen until the dolmen was over. I started disabling addons and found this is the culprit! Hope you can fix it
Report comment to moderator  
Reply With Quote
Unread 04/14/23, 09:56 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4993
File comments: 6047
Uploads: 78
Hi Notnear,

your addon is leakig many variables to the global namespace, and teh names of those are not unique, and should be fixed!
e.g.
Code:
for i = 1, numBuffs do
			buffName, timeStarted, timeEnding, _, stackCount, _, _, effectType, abilityType, _, abilityId, _, castByPlayer = GetUnitBuffInfo('player', i)
			table.insert(activeBuffs, abilityId, true)
		end
All the variables buffName, timeStarted, timeEnding, _, stackCount, _, _, effectType, abilityType, _, abilityId, _, castByPlayer are global and overwrite other addons variables with the same name that way!

The other files also contain such global leaking ones.

Also your translation file en.lua contains strings like class, armor, weapon etc. which are provided by the game itsself already and thus are available in client languages de, en, es, fr, jp and zh via GetString constant: SI_SKILLTYPE1 to SI_SKILLTYPE6
If you change that you do not need to translate those anymore.


And your functions like OnPlayerActivatedAlive_EffectChanged should be added to your global variable NEAR_SB instead, OR at leasz contain some info where they origin from, like NEAR_SB_OnPlayerActivatedAlive_EffectChanged. At best add them to
NEAR_SB.OnPlayerActivatedAlive_EffectChanged instead of defining them globally like this. Makes no sense if you got 1 global where all shuld belong to, and one searches for.

Would be really happy if you could fix this.
Here is a version wtih those lines fixed/changed, and a German translation file de.lua adde.

It's UNTESTED so please test.

IMPORTANT - Performance:
I'm currentl checking why the version 1.0.5 of LibSkillBlocker drops FPS if your addon is enabled, even without actually blocking anything or wirhout pressing action buttons.
I think it's because your addon registers and unregisters LibSkillBlocker too often!

Currently if block recast is enabled it uses EVENT_EFFECT_CHANGED which will trigger for about EACH of your player buffs, and also buffs or group members, your pets, companins, and maybe even others (enemies)?
And in there, for each single buff update!, you call OnPlayerActivatedAlive_EffectChanged(), and this will recreate the functions buffs.class etc and update tables and then, each call!, will call your "addon:Initialize()" function which does the total LibSkillBlocker.Register and Unregister block again and again.

Imagine you got like 30 player buffs on you and that will trigger each second, or mabye more often this whole register and unregister?
Why is this needed for the skill blocks? Can't you change that to be more performant by any other way, like for AT LEAST only check the same buffId change every 1 second, or if the buffId is gained, and not if it's updated or fades away?
Maybe use event filter to only check your player buffs at least and only some of them?

This will speed it up a lot already:
https://wiki.esoui.com/AddFilterForEvent
with e.g. REGISTER_FILTER_ABILITY_ID and/or REGISTER_FILTER_SOURCE_COMBAT_UNIT_TYPE
Also 2nd parameter "changeType" could be checked against EFFECT_RESULT_GAINED etc.


Please find my changed files with example about the event filtering etc. here:
Skill Blocker Baertram with event filters and LAM panel close callback

And here is an updated version 1.0.7 of LibSkillBlocker with some more performance improvements. Hopefully it will fix the issues too somehow:
LibSkillBlocker 1.0.7

If you want to talk about it you can reach me/us here:
https://app.gitter.im/#/room/#esoui_esoui:gitter.im

Hope it will fix a bit the performance and help as currently it seems to just run the addon:initialize() function WAY too often
I'd improve that, if possible. Registering/Unregistering the abilityIds should only happen once they are added to the settings menu (and that as the settings menu closes so your addon:initialize() function onlyruns once and not for each added skill once! -> You can use LibAddonMenu's callbacks for that, there is the LAM-OnPanelClosed callback e.g.!) and once at the event_player_activated I'd recommand.

And if this skill recast block really needs to keep track of all effects (Wouldn't it be enough to track the abilityId at the action slot button pressed and if someone tries to press it again it forbids this? Maybe we can add another API function to LibSkillBlocker for that so that you just register a block, and the lib checks if you are trying to press the same action button again, where the same abilityId that last time was used is still available).
Last edited by Baertram : 04/14/23 at 10:55 AM.
Report comment to moderator  
Reply With Quote
Unread 04/09/23, 01:12 PM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 64
Uploads: 10
Re: Not all skills can be blocked, why ?

Originally Posted by ESO_Pizza
All, How come I am only able to block the recast of some skills and not others?

For example, Bladecloak can be blocked from recast but mystic orb will not be

does they type of skill matter ?
Currently I could only get the "recast" block to work on skills that give you a buff with the same id as the skill on the bar, basically skills that give you a buff on the character page I believe
Report comment to moderator  
Reply With Quote
Unread 04/08/23, 08:20 PM  
ESO_Pizza

Forum posts: 0
File comments: 2
Uploads: 0
Not all skills can be blocked, why ?

All, How come I am only able to block the recast of some skills and not others?

For example, Bladecloak can be blocked from recast but mystic orb will not be

does they type of skill matter ?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: