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:409
Total downloads:8,325
Favorites:14
MD5:
Categories:Combat Mods, DPS, Healers, Tank
Skill Blocker  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 11/03/22, 05:52 PM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 71
Uploads: 11
Yes, I have it working and am just trying to finish another part before updating since I changed a lot and am trying to add all active skills, if I see it'll take long I'll get the current version and add just this part. Got delayed because of the event + work, sorry for the wait.

Originally Posted by RedX2104
Originally Posted by notnear
Hi Shadeous, added a way to unblock them o 1.3.3, at least as a temporary fix. You can use a keybind, command or the button on the addon menu.
The problem is that if the ability effect ends while on a load screen the event for changing effect doesn't trigger so I can't unregister the skill block.

Originally Posted by Shadeous
If I change zones with merciless resolve or siphoning attacks active I cannot cast them at all unless I relog/reloadui.
Wouldnt it be possible to auto unblock with every zone switch? Since with every zoneswitch buffs and casts ar automatically removed.
Report comment to moderator  
Reply With Quote
Unread 11/04/22, 11:06 PM  
gangrena

Forum posts: 0
File comments: 1
Uploads: 0
Very useful, thanks!
Report comment to moderator  
Reply With Quote
Unread 11/05/22, 08:00 AM  
Saenic
 
Saenic's Avatar
AddOn Author - Click to view AddOns

Forum posts: 7
File comments: 129
Uploads: 2
Originally Posted by Rizz
hey, do you think it's possible to add a function which prevents ground targeting skills like winter's revenge to double cast when weaving?
Perfect Weave prevents that.
Report comment to moderator  
Reply With Quote
Unread 11/05/22, 08:36 PM  
RedX2104

Forum posts: 0
File comments: 6
Uploads: 0
Originally Posted by notnear
Yes, I have it working and am just trying to finish another part before updating since I changed a lot and am trying to add all active skills, if I see it'll take long I'll get the current version and add just this part. Got delayed because of the event + work, sorry for the wait.

No need to apologize coding can be hard and its people like you making the games more accessible. Even fixing bugs in the process. Thank you for your time.
Report comment to moderator  
Reply With Quote
Unread 11/06/22, 08:44 AM  
Saenic
 
Saenic's Avatar
AddOn Author - Click to view AddOns

Forum posts: 7
File comments: 129
Uploads: 2
Originally Posted by notnear
Yes, I have it working and am just trying to finish another part before updating since I changed a lot and am trying to add all active skills, if I see it'll take long I'll get the current version and add just this part. Got delayed because of the event + work, sorry for the wait.
Your NearSkillBlocker.txt only references
Code:
i18n/$(language).lua
But you should be doing
Code:
i18n\en.lua
i18n\$(language).lua
So it uses english as default locale. Currently I see only black AddonMenu on my german client
Report comment to moderator  
Reply With Quote
Unread 11/08/22, 08:39 PM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 71
Uploads: 11
Sorry for the delay I just saw you comment now, updated with the fix, thank you!!

Question: I had changed the language using /script SetCVar("language.2", "xx") and it was showing even without that line, is it because the client itself was in english? Just to understand why that could've happened.

Originally Posted by Saenic
Your NearSkillBlocker.txt only references
Code:
i18n/$(language).lua
But you should be doing
Code:
i18n\en.lua
i18n\$(language).lua
So it uses english as default locale. Currently I see only black AddonMenu on my german client
Last edited by notnear : 11/08/22 at 08:51 PM.
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
Unread 04/09/23, 01:12 PM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 71
Uploads: 11
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/14/23, 09:56 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 5067
File comments: 6141
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/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, 12:25 PM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 71
Uploads: 11
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, 02:27 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 5067
File comments: 6141
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 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 05/06/23, 09:12 AM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 71
Uploads: 11
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/08/23, 11:41 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 5067
File comments: 6141
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
Post A Reply



Category Jump: