I have absolutely no idea how to program something in LUA but I'm betting my request is pretty simple.
I'm looking for a module that will automatically pause the bot when I HOLD the shift key down and resume the bot when I lift my finger off the shift key.
If nobody is willing to make a module like this, maybe someone could show me where I can get started making something like this?
Thanks
Posts: 694
Threads: 38
Joined: Jan 2013
Doing this from lua is trickier than it sounds...you would need to hook every gameloop_update callback and disable it while the shift key is pressed. A solution from the C++ side might be more appropriate. I'll discuss it with the team and see what they think.
Posts: 694
Threads: 38
Joined: Jan 2013
11-11-2013, 12:07 AM
(This post was last modified: 11-11-2013, 12:16 AM by ferenz.)
Turning off the bot only stops the Gameloop.Update handler in ffxiv_task_lua. There's absolutely no requirement that all lua code uses the same update handler function therefore by only stopping one of them you open up the possibility of having severe sync issues and possibly even crashes if one module expects certain data to be available/updated that is no longer valid due to having stopped the update handler that maintains that data.
We're not dummies, we know how this stuff works. If we say something is tricky its because we've considered it long ago and haven't decided on a good, safe implementation of it yet. An easy three minute hack is not the kind of code that we put into the main bot lua without considering all the implications (or at least that should be the ideal we strive for, if sometimes unfortunately fall short of). The reason I suggested the possibility of a solution from the C++ side is that we can simply stop the update loop pulse from being passed to the lua modules completely, which removes the possibility of one module getting updated while another does not. That's the only safe solution that won't lead to addon errors and maintainability problems down the road.
Edit: If that wasn't enough reason not to use this solution, the bot also resets all its data when its toggled on and off. Therefore you're not actually "pausing" it, you're "resetting" it, and there's a good possibility that the bot will not continue the action you were in the middle of when you start again.
Edit Again: Also, you can already do this. It's called "Ctrl-S" and works by default.
Posts: 694
Threads: 38
Joined: Jan 2013
I've tried to write most of the bot logic so that the behavior system will always revert to the appropriate location based on where its at in a task, and for gathering it should be fine. I can't say for certain that it would work for something more complex like fates, but generally if the cne priorities are written properly it should fall into the correct conditional to continue the task. The reason we're so picky about that stuff (and it might seem like we're just being lazy or missing an obvious solution) is that we have to think about the bigger picture all the time, which means making sure that any solution we provide will work with every addon that might be created down the road without crashing (and even in gw2minion we have multiple gameloop.update callbacks running in the main bot lua alone).
If the bot was designed perfectly so that every update pulse always came through the same function and the bot always reverted to the correct stage of its task 100% then your solution would work perfectly. So maybe I should really be scolding myself for not making the system better that you have to work with. Please continue to help with requests and don't take my sour response to indicate that I'm not hugely appreciative of your contributions.
Wow I didn't think I would get so many responses, nor did I think it would be complicated lol. I actually didn't follow most of the explanations but I'd like to thank both of you for taking a look into it for me. I appreciate it.
Posts: 694
Threads: 38
Joined: Jan 2013
(11-11-2013, 06:00 AM)OogieBoogie Wrote: Wow I didn't think I would get so many responses, nor did I think it would be complicated lol. I actually didn't follow most of the explanations but I'd like to thank both of you for taking a look into it for me. I appreciate it.
You should probably check out ymko's attachment, it might very well work great for what you're looking for. I may see about doing something on the c++ side in the future.