[Addon] GatherButton
Forum rules
Before posting on this forum, be sure to read the Terms of Use
Before posting on this forum, be sure to read the Terms of Use
Re: [Addon] GatherButton
Thanks for a fantastic addon. No lag from this one like Miracle Grow Remix that made your game stutter more and more for each time you had harvest the seeds. So not only better but easier. Just click one button to harvest and replant. Fantastic
Ads
Re: [Addon] GatherButton
very laggy and alot of game crush this addon need some rework and fixes
Re: [Addon] GatherButton
Hello everyone.
Sorry, I see that some people experience troubles with the addon while other people seem to have it working okay. I am not sure why this is happening. There may be a conflict with another addon (I don't know what would result in the conflict though). Or, uh. I dunno, maybe my code is just wrong somewhere and I just don't see it. (I will always welcome a patch/pull request or a fork, especially since I don't currently play the game.) Maybe I should add a poll to actually see how many people have problems.
Anyways, I can't reproduce the lags/crashes. Works on my machine
I updated the OP and posted 1.0.1 version with mostly code refactoring/formatting changes. If you had troubles, it probably won't fix these.
Sorry, I see that some people experience troubles with the addon while other people seem to have it working okay. I am not sure why this is happening. There may be a conflict with another addon (I don't know what would result in the conflict though). Or, uh. I dunno, maybe my code is just wrong somewhere and I just don't see it. (I will always welcome a patch/pull request or a fork, especially since I don't currently play the game.) Maybe I should add a poll to actually see how many people have problems.
Anyways, I can't reproduce the lags/crashes. Works on my machine
I updated the OP and posted 1.0.1 version with mostly code refactoring/formatting changes. If you had troubles, it probably won't fix these.
Re: [Addon] GatherButton
the problem i have is that it takes over control of all my macros. It doesn't change any, but at the same time I can't go in and add or change any myself.
-= Agony =-
Re: [Addon] GatherButton
Oh, that's the strangest one yet. I played a bit on my profile, and on a new profile with only my addon enabled, but I didn't encounter any problems with the macro window. Does the addon break the 'Save' button? Can you press 'Save' and it just doesn't save the new name/text values? Or does it break the text/name fields? Or something I didn't think of?
Here's the related macro code:
Code: Select all
function GatherButton.GetMacroId(text)
local macros = DataUtils.GetMacros()
for slot = 1, EA_Window_Macro.NUM_MACROS do
if macros[slot].text == text then
return slot
end
end
return nil
end
function GatherButton.SetMacro(slot, name, text, iconId)
SetMacroData(name, text, iconId, slot)
EA_Window_Macro.UpdateDetails(slot)
end
function GatherButton.CreateMacro(name, text, iconId)
--[[find macro by text and return it (and also reset its icon and name).
or make a new one.
--]]
local slot = GatherButton.GetMacroId(text)
if (slot) then
GatherButton.SetMacro(slot, name, text, iconId) -- set icon and name
return slot
end
local macros = DataUtils.GetMacros()
for slot = 1, EA_Window_Macro.NUM_MACROS do
if (macros[slot].text == L"") then
GatherButton.SetMacro(slot, name, text, iconId)
return slot
end
end
return nil
end
function GatherButton.SetMacroName(newname)
GatherButton.SetMacro(MACRO_ID, newname, MACRO_TEXT, ICON)
end
There are 4 places where I interact with the macro system:
- call and read the result of DataUtils.GetMacros()
- read EA_Window_Macro.NUM_MACROS
- call SetMacroData(name, text, iconId, slot)
- call EA_Window_Macro.UpdateDetails(slot)
By the way, the standard macro window has a bug in .xml with two rows of macros overlapping (see weird inconsistent borders on the picture). If you don't see a macro created by the addon, it's possible that it was created in these cells.
Spoiler:
Re: [Addon] GatherButton
wdesu wrote: ↑Wed Nov 06, 2019 1:18 amOh, that's the strangest one yet. I played a bit on my profile, and on a new profile with only my addon enabled, but I didn't encounter any problems with the macro window. Does the addon break the 'Save' button? Can you press 'Save' and it just doesn't save the new name/text values? Or does it break the text/name fields? Or something I didn't think of?
Here's the related macro code:(newer revision (the only new thing is status messages): https://gitlab.com/cupnoodles14/gatherb ... n.lua#L377 )Code: Select all
function GatherButton.GetMacroId(text) local macros = DataUtils.GetMacros() for slot = 1, EA_Window_Macro.NUM_MACROS do if macros[slot].text == text then return slot end end return nil end function GatherButton.SetMacro(slot, name, text, iconId) SetMacroData(name, text, iconId, slot) EA_Window_Macro.UpdateDetails(slot) end function GatherButton.CreateMacro(name, text, iconId) --[[find macro by text and return it (and also reset its icon and name). or make a new one. --]] local slot = GatherButton.GetMacroId(text) if (slot) then GatherButton.SetMacro(slot, name, text, iconId) -- set icon and name return slot end local macros = DataUtils.GetMacros() for slot = 1, EA_Window_Macro.NUM_MACROS do if (macros[slot].text == L"") then GatherButton.SetMacro(slot, name, text, iconId) return slot end end return nil end function GatherButton.SetMacroName(newname) GatherButton.SetMacro(MACRO_ID, newname, MACRO_TEXT, ICON) end
There are 4 places where I interact with the macro system:None of it should result in the described behavior. I could just comment out parts of code and hope that it fixes the problem but I can't do it because I can't reproduce the issue, sorry.
- call and read the result of DataUtils.GetMacros()
- read EA_Window_Macro.NUM_MACROS
- call SetMacroData(name, text, iconId, slot)
- call EA_Window_Macro.UpdateDetails(slot)
By the way, the standard macro window has a bug in .xml with two rows of macros overlapping (see weird inconsistent borders on the picture). If you don't see a macro created by the addon, it's possible that it was created in these cells.Spoiler:
I appreciate the response, I run a lot of addons so it could just be a conflict somewhere. I will try to get a video and share a link to it. It doesn't break any existing macros, but i can't create or change any either. I will try to do tonight. If you don't want to mess with it, no worries. Just thought it a weird occurence.
-= Agony =-
Re: [Addon] GatherButton
I suggest cheking your user folder and make sure the files and folders there are not write protected
Ethreal Corque Urgiz Loxley Chilli Maduza
Re: [Addon] GatherButton
this addon is absolutely amazing, is there a way to like flash the button if its time to gather? or any other way to inform the user visually if its time to gather?
Ads
Re: [Addon] GatherButton
This addon was working great for me but lately it has been harvesting way too many seeds up to stacks of 40 seeds after a long RvR session. I checked the lua file and the seed count is set to 7 (default, I did not change any settings simply followed instructions to drag and drop the macros to hotbar)
Any help is appreciated!
Any help is appreciated!
Re: [Addon] GatherButton
Oh, it may be that I call Refine() without any guards preventing it from making 40 requests at once. In 1.0.2 I've added a limit of max pending refine requests and each second i decrement the counter of currently pending requests by 1 (as I don't know of a way to check if some requests were dropped). This seems like the most simple solution. The seed count will still fluctuate a bit but hopefully not by 40 seeds. Thanks for reporting it.Drewsephy wrote: ↑Thu Apr 09, 2020 1:27 am This addon was working great for me but lately it has been harvesting way too many seeds up to stacks of 40 seeds after a long RvR session. I checked the lua file and the seed count is set to 7 (default, I did not change any settings simply followed instructions to drag and drop the macros to hotbar)
Any help is appreciated!
Thanks. The macro button should have a glow effect by default, as I thought it was more noticeable than a flash. I've added a flash and also hacked together a notification setting by reusing some default UI components that I could think of (like chat/chat bubbles). It's disabled by default since I think such notifications may be a little too intrusive for some people.
I've updated the addon.
Source: https://gitlab.com/cupnoodles14/gatherbutton
Download: 1.0.2 release
Didn't test it very thoroughly though .
Who is online
Users browsing this forum: No registered users and 6 guests