Go to Page... |
Compatibility: | Scribes of Fate (8.3.5) Firesong (8.2.5) Lost Depths (8.1.5) High Isle (8.0.0) |
Updated: | 03/20/23 10:54 PM |
Created: | 02/01/23 11:04 AM |
Monthly downloads: | 916 |
Total downloads: | 1,325 |
Favorites: | 4 |
MD5: |
File Name |
Version |
Size |
Uploader |
Date |
2023.3.20 |
7kB |
sinnereso |
03/20/23 07:32 AM |
![]() |
Comment Options |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
||
|
could i now trim it down to this since the filters are inplace?: Code:
--addonloaded EVENT_MANAGER:RegisterForEvent("RidinDirty", EVENT_INVENTORY_SINGLE_SLOT_UPDATE, RidinDirty.InventoryUpdate) EVENT_MANAGER:AddFilterForEvent("RidinDirty", EVENT_INVENTORY_SINGLE_SLOT_UPDATE, REGISTER_FILTER_INVENTORY_UPDATE_REASON, INVENTORY_UPDATE_REASON_ITEM_CHARGE, REGISTER_FILTER_BAG_ID, BAG_WORN) --functions function RidinDirty.InventoryUpdate() if not IsUnitDead("player") then RidinDirty.AutoRecharge() else return end end I'm going with it for now.. if you think its bad i welcome imput but otherwise seems to be perfect.
Last edited by sinnereso : 03/14/23 at 12:04 PM.
|
|
![]() |
![]() |
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |
![]() |
|
|
ty ill look into it. I was trying to keep the performance high by only checking on charge use which only happens every few seconds while in combat usually. Ill see what i can do with this.
Last edited by sinnereso : 03/14/23 at 08:50 AM.
|
![]() |
![]() |
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |
![]() |
|
|
Another hint for your performance:
EVENT_INVENTORY_SINGLE_SLOT_UPDATE Events like these fire very often, for different kind of tasks. e.g. some fire for the durability or item charge value -> your auto recharge check. But they also fire for stack split, item move, etc. If you only want to have it fire for your addon for some of these cases use event filters to filter the events accordingly to your needs: https://wiki.esoui.com/AddFilterForEvent The event EVENT_INVENTORY_SINGLE_SLOT_UPDATE can use e.g. the REGISTER_FILTER_INVENTORY_UPDATE_REASON filter type. Possible update reasons are: https://wiki.esoui.com/Globals#InventoryUpdateReason If you add an eventfilter make sure the name passed in as 1st parameter is the exactly same as used for your normal event, that you want to filter! e.g. Lua Code:
You could also check for the bagID be BAG_WORN so no items in your inventory will be checked which currently are not equipped. This will make your addon not listen (and the event for your addon not even fire) for the other non-filtered inventory update reasons. And this will make your callback function used in the event no need to check for parameter inventoryUpdateReason anymore! As it's prefiltered in C code, before it even hits lua code, already. -> Big performance gain and very needed as ppl run multiple addons at the same time and each addon in combination with vanilla game code slows down the stuff a bit, more and more and more...
Last edited by Baertram : 03/14/23 at 08:12 AM.
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|
|
Well.. because im still weak on tables! I only recently figure out what and how this works
![]() If i dont fully understand it then its not going in is my general rule ![]() I expect overtime ill be cleaning stuff up as it makes sense to me because Im the one that has to track down any bugs. This hasn't been forgotten though from the previous mention of it and is on my todo list. **EDIT OK added it that way and appears to be working.. ill leave my original stuff commented out for the moment incase of any issues. Code:
RidinDirty = { name = "RidinDirty", author = "Michael Cullen(@sinnereso)", version = "2023.3.13", svName = "RidinDirtyVars", svVersion = 2, }
Last edited by sinnereso : 03/13/23 at 11:06 AM.
|
![]() |
![]() |
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |
![]() |
|
|
Code:
RidinDirty.savedVariables = ZO_SavedVars:NewAccountWide( RidinDirty.svName, RidinDirty.svVersion, nil, { savedPlayer = nil }) RidinDirty.savedVariables = ZO_SavedVars:NewAccountWide( RidinDirty.svName, RidinDirty.svVersion, nil, { autoRepair = nil }) RidinDirty.savedVariables = ZO_SavedVars:NewAccountWide( RidinDirty.svName, RidinDirty.svVersion, nil, { autoRecharge = nil }) RidinDirty.savedVariables = ZO_SavedVars:NewAccountWide( RidinDirty.svName, RidinDirty.svVersion, nil, { autoBank = nil }) RidinDirty.savedVariables = ZO_SavedVars:NewAccountWide( RidinDirty.svName, RidinDirty.svVersion, nil, { autoQueue = nil }) RidinDirty.savedVariables = ZO_SavedVars:NewAccountWide( RidinDirty.svName, RidinDirty.svVersion, nil, { effectId = nil }) RidinDirty.savedVariables = ZO_SavedVars:NewAccountWide( RidinDirty.svName, RidinDirty.svVersion, nil, { effectDelay = nil }) RidinDirty.savedVariables = ZO_SavedVars:NewAccountWide( RidinDirty.svName, RidinDirty.svVersion, nil, { travelOutside = nil }) RidinDirty.savedVariables = ZO_SavedVars:NewAccountWide( RidinDirty.svName, RidinDirty.svVersion, nil, { fontBoost = nil }) ![]() ![]() Just call it ONCE with all that needed default values in 1 table: RidinDirty.savedVariables = ZO_SavedVars:NewAccountWide( RidinDirty.svName, RidinDirty.svVersion, nil, { savedPlayer = nil, autoRepair= nil, ... }) And if the defalt values are all nil you do not even need to explicitly set them, just use RidinDirty.savedVariables = ZO_SavedVars:NewAccountWide( RidinDirty.svName, RidinDirty.svVersion, nil, { } ) |
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|
|
I currently have chat window context menu disabled but guild, group and friends list working amazing with optional LibCustomMenu. TY Votan for the upgrades to it.
I may remove the chat window feature since you need to be in group, guild or friends to be able to travel to anyone and in group to mount them anyway making it a nearly useless feature saving total randoms from chat. I've left the original save reticle target with keybind as a backup leaving LibCustomMenu as optional instead of required. Most wont be changing they're saved player often and likely are playing with significant other. For those that require more hardcore use, LibCustomMenu is available to take it next level ![]()
Last edited by sinnereso : 03/12/23 at 05:36 AM.
|
![]() |
![]() |
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |
![]() |
|||
|
![]()
Last edited by sinnereso : 02/28/23 at 10:48 AM.
|
||
![]() |
![]() |
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |
![]() |
||
|
Last edited by Baertram : 02/28/23 at 10:29 AM.
|
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|
|
ok got her all fixed up and caught a telvar bank bug in the process.. was displaying previous balance after depositing..
![]() posting.. |
![]() |
![]() |
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |
![]() |
||
|
Code:
df("|c9900FF[RidinDirty]|r Teleport Effect: %s" effectEnabled) in this since changing them to local. its not liking the %s' effectEnabled) portion any longer: Code:
if effectToggle == nil or effectToggle == "" or effectToggle == 0 then df("|c9900FF[RidinDirty]|r Teleport Effects Disabled") else if effectToggle == 347 then local effectEnabled = "Fetish of Anger" df("|c9900FF[RidinDirty]|r Teleport Effect: %s" effectEnabled) end if effectToggle == 349 then local effectEnabled = "Token of Root Sunder" df("|c9900FF[RidinDirty]|r Teleport Effect: %s" effectEnabled) end if effectToggle == 1228 then local effectEnabled = "Neramo's Lightning" df("|c9900FF[RidinDirty]|r Teleport Effect: %s" effectEnabled) end if effectToggle == 6046 then local effectEnabled = "Dragon Flight Illusion" df("|c9900FF[RidinDirty]|r Teleport Effect: %s" effectEnabled) end end
Last edited by sinnereso : 02/27/23 at 11:43 AM.
|
|
![]() |
![]() |
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |
![]() |
||
|
additional isunitdead check on the recharge execute CHECK!! slash commands moved into onload CHECK! hourglass converted into RidinDirty.HourGlass.... CHECK working on all local variables now and done ![]() OK!!! all variables now LOCAL with the exception of: 1. houglass lines are all RidinDirty.HourGlass.. now 2 RidinDirty.savedVariables.xxxxxxxxx = line are not as theyre just saving variables but if needs let me know 3. SetNameplateKeyboardFont(string.format(xxxxxxxx lines are not as well cuz theyre just setting the nameplate font I think I got everything... one last test and uploading.. if you see anything else i apreciate the advice so noone has any issues.
Last edited by sinnereso : 02/27/23 at 10:46 AM.
|
|
![]() |
![]() |
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |
![]() |
||
|
|
|
![]() |
![]() |
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |
![]() |
|
|
Your addon leaks variables to the global namespace and their name is not unique enough, so they might destroy other addons!
Please do a decent variable check ebfore releasing your addons, and add the local in front of them properly! e.g. hourglass -> Solution: Add that to RidinDirty.hourglass instead and it will be a least below your 1 global table! effectEnabled -> Add a local in front and check where it's needed to be used. If more than 1 function need it define it at the top of your file as local. If only the 1 function needs it define it at the top of hat function as local And your slash commands should be defined in your EVENT_ADD_ON_LOADED callback function first, and not before (makes no sense, in your addon's case, as your addon is not ready before that and your addon's code was not run properly before).
Last edited by Baertram : 02/27/23 at 03:38 AM.
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
||
|
|
|
![]() |
![]() |
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |
![]() |