generated from runelite/example-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 40
Add Trawling feature #189
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
Open
mcscoobe
wants to merge
159
commits into
LlemonDuck:main
Choose a base branch
from
mcscoobe:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Trawling feature #189
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mcscoobe
commented
Dec 13, 2025
- Path Tracker
- Path tracker is used to generate the required world points to add a shoal path to the overlay.
- It is only available in developer mode and can be toggles on then off with chat commander ::track routes.
- After it is disabled logs will show the route, stop points, and fishing area needed to setup a new shoal.
- Path Overlay
- Draws an overlay on the ocean that can be used to easily follow fishing shoals.
- There are also red markers along the path to indicate an upcoming stop point.
- Overlay is only rendered when it is detected that the player is in the correct area for a given shoal route.
- There was an initial concern that the hard coded routes were consuming too much memory but thanks to a contribution from rmobis the size has been reduced significantly. Each Shoal is about 800 bytes. There are further optimizations that can be made here if desired, but I don't think it's an issue considering all shoals is only a few kb.
- Shoal Overlay
- Simple 10x10 overlay that shows the approximate area to be within to fish from the shoal.
- Overlay uses default configuration color unless it changes to a mixed fish shoal, which has bonus rates in which case it turns green.
- Future enhancement change highlight to red when nets are not at correct depth.
- Button Highlighting
- Outline net buttons to indicate which to click to adjust nets to the correct depth
- Color can be configured in config settings
- Trawling Overlay
- All overlay components can be enabled ot disabled
- Net Capacity displays how many fish are currently in the net(s)
- Total fish caught displays how many of each fish type have been caught during the session
- Net Depth Timer displays a timer in game ticks of how long until the depth change will occur after a shoal has stopped moving. This feature is automatically disabled when located in a fishing area with only 1 depth (krill/haddock)
- Add nets to the boat - Create FishingNetTracker class
- Add nets to the boat - Create FishingNetTracker class
basic trawling functionality
- Add new config option "Record Shoal Routes" to enable route tracking - Implement route tracking system using Map<Integer, List<WorldPoint>> to record shoal movement paths by object ID - Add GameTick subscriber to continuously record shoal positions during sailing - Track only unique consecutive positions to avoid duplicate waypoints - Export recorded routes to console log on overlay shutdown for route analysis - Update overlay enable condition to activate when either highlighting or recording is enabled - Add null safety checks for player and worldview in WorldViewUnloaded event - Improve logging to distinguish between debug and info level messages based on recording mode - Routes are organized by shoal object ID since shoals of the same type follow identical paths
- Remove trawlingRecordShoalRoutes config option from SailingConfig - Delete route tracking logic and GameTick event handler from ShoalOverlay - Remove unused imports (WorldPoint, GameTick, ArrayList, HashMap, List, Map) - Simplify isEnabled() to only check trawlingHighlightShoals config - Remove route export functionality and related logging - Optimize render() to prevent overlay stacking by tracking rendered object IDs - Rename renderShoal() to renderShoalHighlight() for clarity - Add PRIORITY_HIGH to overlay initialization - Simplify spawn/despawn logging to use debug level consistently
…tants - Remove unused imports (BoatTracker, Boat, GameObject, Point, ChatMessageType, SpriteID, OverlayPriority, ArrayList) - Extract chat message patterns into named constants for better maintainability - Remove unused sprite detection logic and widget indices (STARBOARD_SPRITE_INDEX, PORT_SPRITE_INDEX, CREWMATE_SPRITE_ID, PLAYER_SPRITE_ID) - Remove BoatTracker dependency from constructor and class fields - Add @singleton annotation to class - Reorganize imports to follow conventional ordering - Replace hardcoded chat message strings with constant references in message detection logic - Improves code readability and reduces duplication of chat message patterns
- Add tests for fromGameObjectId() method covering all net tiers (Rope, Linen, Hemp, Cotton) - Add tests for port and starboard net variants to ensure proper tier identification - Add test for invalid object ID returning null - Add tests for getCapacity() method verifying all tiers return 125 capacity - Add tests for getGameObjectIds() method verifying each tier has three IDs - Add test verifying all four tiers exist and are in correct order - Ensures FishingNetTier model behaves correctly across all supported net types
… component - Extract fish count tracking from NetCapacityOverlay into new NetCapacityTracker singleton - Create NetDepthTimer component for managing net depth timing mechanics - Remove chat message handling and fish parsing logic from overlay - Update NetCapacityOverlay to delegate capacity tracking to NetCapacityTracker - Register new components in SailingModule for dependency injection - Improve separation of concerns by isolating tracking logic from UI rendering - Remove old net tracker that ran on chat messages
- Improved accuracy of net timing on halibut - Update readme
- Add player location validation to prevent null pointer exceptions - Implement isInPathRegion() method to check if player is in same region as path - Only render shoal paths when player is within the same 64x64 tile region - Add HALIBUT_PORT_ROBERTS path with 392 waypoints and 9 stop points - Expand path rendering to include Port Roberts location in addition to Southern Expanse - Update path labels to include location names for better clarity - Improve performance by skipping path rendering when player is in different regions
- Replace hardcoded widget indices with dynamic initialization based on boat size class - Add SetWidgetIndexForSloop() method to dynamically locate net sprites and button indices for sloops - Add SetWidgetIndexForSkiff() method to dynamically locate net sprites and button indices for skiff - Refactor renderStarboardHighlight() and renderPortHighlight() into single renderNetHighlight() method
Updated 4 paths Giant Krill
track net being emptied on logout/hop
More paths
- resolve issue with movement notification not firing
- Create ShoalWaypoint.java class to represent individual waypoints with stop indicators - Add trawlingShowShoalDirectionArrows config option to display directional arrows - Refactor ShoalPathTracker to support waypoint-based path tracking - Update ShoalPathOverlay to render direction arrows along shoal routes - Updated movement notifcation to trigger off of the shoal health bar instead of detected movement
- Update Southern Expanse Halibut to use new tracker output and remove old data from ShoalPaths - Correct comments that references "traceroutes" to be the correct "trackroutes" - Add interface for the generated ShoalPath classes to simplify FishingAreas
- Update both Marlin routes to use new ShoalWaypoint - Update Bluefin Buccaneers Haven to use ShoalWaypoint - Remove StopDuration from generated path classes, this data can be accessed through the Shoal class - Make directional arrows on the path overlay more distinct
- reduce arrow size on path rendering and reduce their frequency - update port roberts halibut to use new class - remove verbose logging used for debugging - fix warnings
- fix warnings
- add missing path file
update fishtracker to use Shoal
simpler way to check net capacity
Update branch
- Add GameObjectDespawned event handler to properly track shoal lifecycle - Add getShoalObjectsDebugInfo() method for debugging shoal state - Add debug logging for shoal GameObject spawn and despawn events - Enhance shoal tracking to handle both spawn and despawn events consistently
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.