-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Adds the brimhaven-agility plugin #8889
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
base: master
Are you sure you want to change the base?
Conversation
New plugin |
|
I see the build failure due to a line longer than 120 chars in my build.gradle, I'm updating to fix this and will address @cdfisher's feedback at the same time.
I thought I had already done so, see WorldLines.java, but it looks like I missed
This is a fair critique, I will remove this configuration option for the time being.
I disagree on this front, as for some users it is possible they may want to tune it themselves. For example, users may want to avoid the dart obstacle, as failing it lowers your agility level by 2, in which case giving it a much higher weighting could be useful. Another example is if someone is very AFK and does not want to look to figure out which plank of the 3 to use. I do admit though that the likelihood someone actually cares enough to do this is fairly low. Let me know if you still feel strongly that this weighting configuration should be removed and I can do so. Another option would be to replace the weighting configuration with a checkbox for |
This is probably a lot less confusing to users so I would do that |
* ensures license header is present on all files from Quest Helper * simplifies config * wrap build.gradle lines at 120 chars
Internal use only: Reviewer details Maintainer details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this shouldn't be a blocker, but since reviews of changes down the line might not catch it, can you add something to ensure that the path finding cannot get stuck in an infinite loop? Accidentally freezing the client is just no fun, and as far as I can tell, it could get stuck if you were to add an entry in arena_layout.txt
with the same source and destination coordinates for instance.
You should also probably run this line on the client thread, so you don't accidentally have multiple path finding loops running simultaneously (even though the code seems thread-safe at a glance). Currently, this line can run on Java's Event Dispatch Thread in response to a user changing a config. Keep in mind that clientThread.invokeLater
has a mechanism to retry execution for functions which return booleans, so you'll probably want to also change your recomputePathIfNeeded
to return void, since I don't see you using the return value anywhere anyway.
The plugin looks good otherwise though 🙂
Thanks for the prompt & thorough review @aHooder, very much appreciated. I'll aim to get your feedback addressed shortly.
This is a very good shout. I agree that it can't happen now because the arena layout is valid, but I'd much rather remove the possibility for it to be introduced in the future. I think the following changes should be enough to mitigate this concern, but let me know if you have a better idea:
Makes sense, I'll do this. I believe it should be thread safe as well, but there's no benefit to it running multiple times simultaneously anyways. Forgive the potentially dumb question, as I'm obviously not familiar with the threading model in RuneLite; should I also be wrapping |
Those both sound good to me 🙂
Most events like this run on the client thread already, but things which happen in response to user input might not for instance. If you're not sure, you can always wrap it to be safe in |
* ensures an infinite loop cannot occur in pathfinding * ensures recomputing path runs on client thread * fixes a bug in subPath which was causing incorrect paths for a tick * adds Github action to ensure plugin builds correctly
Thanks for the explanation @aHooder 🙂 I've updated the plugin addressing your feedback (and also fixed a small bug I found along the way). |
Brimhaven Agility Arena plugin
Adds a new plugin to aid with the Brimhaven agility arena. Specifically, it currently computes the shortest path the the active ticket dispenser, and displays that path on the screen for the user. This takes into account whether the user has the agility level for a given obstacle, and is computed using the A* pathfinding algorithm.
(changed following feedback) Line colour, and the ability to avoid specific obstacles are configurable.
Possible future expansions
These are not yet features in this plugin, but I may decide to expand it to include: