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

Be smarter about marking & unmarking objects & npcs #5

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

pajlada
Copy link
Member

@pajlada pajlada commented Nov 28, 2023

  • Correctly mark varbit
  • Reformat/cleanup
  • Try to be smarter about marking/unmarking objects & NPCs

Bit of a messy PR, refactoring & learning the project at the same time.
Some things have been changed just due to new APIs that are available.

Game object despawns aren't 100% reliable, so we make sure to reset & revalidate game objects on LOADING

This should be thoroughly tested before being merged in - I've done a bunch of runs myself but would happily accept more testing.

The expectation is that it should "just work".
The overlay should only show up when you're inside Port Pisc
NPCs highlights should only highlight the actual NPCs, and they shouldn't keep stacking onto each other
Stair & chest highlights should disappear when you TP away, get caught, or run away to turn in the artefact.
The hint arrows from other areas shouldn't be broken by the plugin. We basically make sure of this now by never setting the arrow in onGameTick - onGameTick is only used to revalidate objects when we hit loading lines or when we log in.

Known issues

We don't clear the hint arrow to a house when you walk out of pisc, which means the minimap arrow will keep pointing towards your house as long as you're still roughly nearby of pisc. North part of Hosidius will show the arrow with the minimap fully zoomed out. We could try to work around this, but the proper solution, imo, is to use our own hint arrow implementation. I'd like to do that in a separate PR

@pajlada pajlada changed the title Be smarted about marking & unmarking objects & npcs Be smarter about marking & unmarking objects & npcs Nov 28, 2023
@pajlada pajlada force-pushed the fix/be-smarter-about-marking-and-unmarking-objects-and-npcs branch from 686fa0f to 14bd863 Compare November 29, 2023 09:18
@Felanbird
Copy link
Member

stealing the object does not unmark the chest/dresser nor the stairs going upstairs, hint arrow is correctly unmarked

image

goal is wrong - I currently get `3440` XP from each artefact steal (100 steals)

image
(runelite actions-left is also wrong, but will be corrected after x amount of actions)

@pajlada
Copy link
Member Author

pajlada commented Nov 29, 2023

Unmarking objects/ladders wasn't done in the original plugin either, so I'll note that down as a future improvement

The XP goal has not been modified, so it was wrong before. I'll add that to a list of known issues to look into after this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants