Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing support for more than one click in one game tick #22

Open
Elite-Mercenary-Raven opened this issue Jul 16, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@Elite-Mercenary-Raven
Copy link

The plugin (beneficially) supports clicking on the same equipment item more than once in the same tick, but I noticed that the icon doesn't update to match. This has been coming up a lot while fighting Tormented Demons lately, which reward quick and accurate switches. I might click a weapon and quickly click it again to undo that input (say if I anticipated incorrectly), but the icon doesn't update to reflect this. Rather, the icon only reflects the first input on that item for the duration of the value shown in the "Min Changed Millis" box. Hopefully this is a simple fix, where the icon automatically changes based on the last input rather than the first one in the allotted period. The equipment icon not changing to match my inputs has made me do double takes multiple times, and occasionally click again thinking a click didn't register. For reference I've been using all the default settings on a 20ms ping server.

As a related suggestion, I think other people might also enjoy the ability to toggle off the ability to input more than one interaction for an item in the same game tick. Personally I wouldn't use it, but it's more akin to what the vanilla client does so it has the advantage of familiarity.

Thanks a ton! Great plugin.

@Elite-Mercenary-Raven Elite-Mercenary-Raven added the bug Something isn't working label Jul 16, 2024
@elgbar
Copy link
Owner

elgbar commented Jul 16, 2024

Thanks for your report! Glad you like my plugin :)

If I understood correctly you'd like that clicking twice on an equippable item (e.g., a weapon or armour) within a game tick should be the same as not clicking it at all? I think that should be doable

I cannot stop any actual clicks going to the servers, only predict what the server will respond with. Sometimes this prediction is kinda hard to do, cause there are many exceptions to the general rule of when you can equip items (boss stunning comes to mind).

The Min Changed Millis together with Max Unmodified Ticks is used to correct any wrong predictions the plugin makes.
Maybe double-clicking these items results in a bad predection. I'll look into it.

If you are able, could you upload a video showing the bug? see #11 for an example video, oh and it must be on the webm format. Or Post a youtube link

@Elite-Mercenary-Raven
Copy link
Author

Yeah kind of! I think if you double click, both the first and second click should change the icon. So if I've got a Torva Platebody equipped and click my Masori Top in my inventory, as usual it'll instantly show the platebody in my inventory; but the new behavior would be that if I quickly clicked again, having done so during the delay period, it would still instantly show the Masori top. And so on for more clicks.

It is interesting though that with the plugin on or off the behavior of my clicks is different, if inputs aren't being changed somehow, they're being affected. I experimented for a bit and noticed that spam clicking with the plugin off just changes your equipment once every game tick, flipping between the platebody and top in this case. But spam clicking with the plugin on (with default settings) keeps the same item you have on equipped, if your clicks are consistently fast. It's more consistent the higher the value in Min Unchanged Millis. I actually like this behavior, being able to undo an input in one tick, because it lets me be a bit more predictive with my clicks! But I incorrectly assumed that an odd amount of clicks, usually 3, would produce the same final result as clicking once, and an even amount of clicks would produce the same result as if I hadn't clicked at all. I don't fully understand everything the plugin is doing, but it seems like it's affecting click outputs by changing available inputs. So because the "ghost" equipment icon is given that 300ms delay timer, clicking on that icon any number of times during that duration sends the server the same repeated output: that I want that item equipped again. At least I think that's what's happening!

I think it would be really cool if clicks beyond 2 had the expected behavior! Sometimes my quick clicks would have been benefitted by 3+ rapid inputs, like if I accidentally double click and go back to fix the error. Maybe changing the icon with every subsequent click produces that behavior automatically. If that's not possible then the best behavior would be if the plugin visually represents the maximum number of clicks, I suppose being 2 to undo an input in one game tick, temporarily locking in the icon of the expected final result with that 300ms timer, rather than the opposite result as it is currently.

I can definitely record a video but I think I can explain better what happens in one tick, with a Torva Platebody equipped and a Masori top in my inventory for example. This is all with default settings.

  • 1 click: Expected behavior. The Masori Top icon instantly changes on mouse release, becoming a Torva Platebody. The platebody is slightly transparent for 300ms. My equipment is changed to the Masori Top.
  • 2 clicks: After the first click the Masori Top icon instantly changes to a Torva Platebody. This first click sets that 300ms timer. The second click is on the "ghost" Torva Platebody, but this doesn't change the icon instantly back to a Masori Top. As long as my 2 clicks weren't split between 2 game ticks, I'll end up keeping my Torva Platebody equipped and I won't see my Masori Top on my body. If I do split 2 ticks, I'll see my Masori Top for one tick.
  • 3 clicks: After the first click the Masori Top icon instantly changes to a Torva Platebody, which usually remains for the full 300ms. The second click is on the Torva Platebody, but this doesn't change the icon. The third click is also on the Torva Platebody. Assuming all 3 clicks were in one game tick, the result is that I keep my Torva Platebody on. Again, splitting ticks can make the Masori Top appear for only 1 tick. If my clicks are really slow I can end up landing the final click on my Masori Top and equipping that as it appears after the 300ms timer. If all 3 clicks were in one tick, I'd expect to have my Masori Top equipped, after, in my mind, inputting top>platebody>top, even though the icon wasn't changing. It seems like the actual result is because of the most recent input that was available to me, being the platebody.
  • ***I just noticed that the plugin sometimes shorts the 300ms timer, which can cause the opposite item to be equipped. So in 3 clicks again, I'll click my Masori Top, my Torva Platebody will instantly appear (but for less than 300ms in my inventory), I'll click on my platebody for the 2nd click, and my 3rd click lands on the Masori top. That's a little confusing! I think this might be because of the Max Unmodified Ticks functionality but I'm not sure.
  • 4+ clicks is similar to 3. Any clicks within the 300ms timer clicking on the "ghost" platebody appear to be redundant.
  • Spam clicking favors re-equipping the platebody because its icon appears instantly in the inventory and it has that minimum duration. The Masori Top icon is only occasionally visible very briefly between 300ms periods, if the 300ms timer ends and there's enough time for the game tick to roll over and show the Masori Top icon (I noticed this with the Visual Metronome plugin; if the Top appears, it's in time with the game tick, which makes sense). If your final click is right after the 300ms duration, which allows the Masori Top icon to reappear and the last click to land on it, you equip the Masori Top.

In the attached video I do a single click a few times, a double click a few times, then show different results of triple clicking.

Runelite.2024-07-16.21-45-32-1.webm

@elgbar
Copy link
Owner

elgbar commented Jul 21, 2024

Thanks for the extremely detailed report!
I've also noticed the behaviour you've described, while play testing.

The bug is that the plugin behaves differently to the official client.

The definition of fixed should be that when clicking on an item multiple times in a single tick it should not change the item more than once

@Elite-Mercenary-Raven
Copy link
Author

Elite-Mercenary-Raven commented Jul 21, 2024

I'm glad to help! It's such a cool plugin!

I can't believe the double click functionality isn't intended, because it's so useful! I love that behavior! It is definitely helpful for fast paced content, helping maximize APM. The dream would be if 3+ clicks would be supported too, because then I could instantly fix accidental double clicks manually, and of course still have the freedom to do 2 (intentional) clicks in one tick if needed. I was farming Tormented Demons for maybe 5 hours last night and that triple click feature would have been useful a couple times for sure.

If it's possible I think people would like if both options are available using a toggle--where if someone wants they can opt for behavior that's less advanced like the official client; or they can opt to be able to input more actions in one game tick for tighter decision making.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants