Development#1815
Conversation
…llenge Co-authored-by: Tormod Aase <tormod.aase@pm.me>
Aggressive NPCs such as the Draynor Manor undead trees attack any player who walks onto a tile next to them (0-3 dmg, aggressive at every combat level). The web walker routes the shortest path straight along the tree line, so long walks take repeated hits and can stall the walker adjacent to a tree. Add an "Avoid dangerous NPCs" pathfinder option (default on): - New dangerous_tiles.tsv lists hazard tiles (the Draynor undead trees). - PathfinderConfig expands each hazard tile to its 8-neighbour aggro ring and exposes isDangerousAdjacentTile(). - CollisionMap applies a g-cost penalty (not a hard block) to stepping into that ring when the option is on, in BOTH the forward (getNeighbors) and reverse (getReverseNeighbors) expansions, so the bidirectional search costs hazard edges consistently and can't pick a hazard-adjacent meeting. Paths keep >=2 tiles from a hazard when a detour exists; a true chokepoint still routes through. The check is a boolean + O(1) set lookup; no client-thread reads. - ShortestPathConfig gains the toggle; the sectionSettings positions are renumbered to stay unique. - Rs2Walker's unreachable-recovery fallback now also respects the ring: the planner avoids hazard tiles, but the runtime recovery click could otherwise park the player next to one and strand it in melee, so the recovery target is stepped back along the path to the nearest non-hazard tile. Data-driven: any hazard can be added by appending tiles to the tsv.
…-walk A plain Rs2Walker.walkTo / "Start path" to a Draynor Manor (Ernest the Chicken) basement tile used to run into a wall and click it: the 9 puzzle doors are FULL_BLOCK in the static collision map, so the pathfinder treated the whole maze as walls and returned UNREACHABLE. Make any walk to a basement tile solve the puzzle and route there: - Register the 9 puzzle doors as varbit-conditional transports (transports.tsv): Open;Door;<id> gated by the lever varbits 1788-1793 that unlock each door, so the stock walker opens + crosses whichever doors the current lever state allows. A transport is a pathfinder edge, so it bypasses the static wall (same mechanism the normal manor doors already use). - Add DraynorBasementSolver (util/walker/puzzles), hooked at the Rs2Walker.processWalk entry: when the target is a basement tile and the player is in the basement, BFS over (lever-combo x room) for the next action and execute it (pull a lever / cross an unlocked door), re-planning after every step so a lever pull re-locking a door cannot strand the walk. Non-basement walks are untouched (the hook is bounds-guarded; the transports are basement-varbit-gated). Uses gameval ObjectID.LEVERA..F / VarbitID.ERNESTLEVER_A..F.
handleDoors' WallObject branch validated a found door against the probe tile instead of the wall's real location, then accepted any door through a pathTouchesBothEnds catch-all. Since the probe-adjacency fallback can land a tile off the wall, a closed shop door one tile beside the route -- e.g. doors by Bob's Brilliant Axes on the Lumbridge net-fishing -> courtyard walk -- got an Open interaction even though the path never crossed it. Intermittent, since it depends on the smoothed segment geometry. - Validate the wall's actual blocked edge against the segment via isDoorOnSegment, matching the GameObject branch and findDoorNearSegment; drop the probe-orientation check and the pathTouchesBothEnds shortcut. - wallDoorTouchesSegment now derives the blocked neighbour from both orientationA and orientationB so an on-path door is never missed.
fix: restore ground item Take fallback
fix(walker): stop opening shop doors beside the path
feat(walker): auto-solve the Draynor Manor (Ernest the Chicken) basement lever puzzle
…npcs feat(shortestpath): avoid pathing next to aggressive NPCs (undead trees)
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (37)
WalkthroughThis PR bumps project and Microbot versions, regenerates a large set of RuneLite API constants (ItemID, NpcID, ObjectID, NullItemID/NullNpcID/NullObjectID, Quest, and multiple gameval classes) for a new game content update centered on Castle Drakan/Maggot King/Vampyrium. It adds a "Maggot King" boss to hiscores, adjusts a clue requirement and a quest-helper step, and extends item_variations.json. Microbot client changes add dangerous-NPC pathfinding avoidance, a Draynor Manor lever puzzle auto-solver, improved door-segment detection in Rs2Walker, hardened ground-item action reflection fallbacks (with new tests), a MenuOpened-based overlay origin-menu hookup, and a cutscene-status render guard for tile indicators. Sequence Diagram(s)See diagrams embedded in the hidden review stack artifact for dangerous-tile avoidance and Draynor basement solving flows. Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.44.0)runelite-api/src/main/java/net/runelite/api/ItemID.javaast-grep timed out on this file runelite-api/src/main/java/net/runelite/api/NpcID.javaast-grep timed out on this file runelite-api/src/main/java/net/runelite/api/NullItemID.javaast-grep timed out on this file
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
No description provided.