feat: add Auto Firemaking Plus plugin#478
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new “Auto Firemaking Plus” Microbot plugin that supports two firemaking methods (Forester’s Campfire and line firemaking) with Progressive logs, stop conditions, and a stats overlay.
Changes:
- Introduces the core script/state machine for campfire + line firemaking, including banking and stop-condition handling.
- Adds tile scanning utilities (fire/blocked detection + line scoring) and domain enums/models (Logs, FireLine, method/state).
- Adds plugin wiring (config + overlay) and end-user documentation.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/net/runelite/client/plugins/microbot/firemakingplus/docs/README.md | Adds end-user documentation for methods, configuration, and limitations. |
| src/main/java/net/runelite/client/plugins/microbot/firemakingplus/TileScanner.java | Implements fire-tile detection and open-line scanning/scoring for line firemaking. |
| src/main/java/net/runelite/client/plugins/microbot/firemakingplus/State.java | Adds the script state model used by the line method workflow. |
| src/main/java/net/runelite/client/plugins/microbot/firemakingplus/Logs.java | Defines burnable logs with level requirements and progressive selection. |
| src/main/java/net/runelite/client/plugins/microbot/firemakingplus/FiremakingMethod.java | Defines user-selectable methods (campfire vs line). |
| src/main/java/net/runelite/client/plugins/microbot/firemakingplus/FireLine.java | Adds a data model representing a horizontal run of open tiles. |
| src/main/java/net/runelite/client/plugins/microbot/firemakingplus/AutoFiremakingPlusScript.java | Adds the main automation logic, banking, and stop conditions. |
| src/main/java/net/runelite/client/plugins/microbot/firemakingplus/AutoFiremakingPlusPlugin.java | Wires plugin lifecycle, overlay setup, and script start/stop. |
| src/main/java/net/runelite/client/plugins/microbot/firemakingplus/AutoFiremakingPlusOverlay.java | Adds a live overlay with stats + pause/resume. |
| src/main/java/net/runelite/client/plugins/microbot/firemakingplus/AutoFiremakingPlusConfig.java | Adds configuration options (method, logs, progressive, scan radius, stop conditions, league/speed mode). |
| if (config.stopAfterMinutes() > 0 | ||
| && (System.currentTimeMillis() - startTimeMillis) / 60000 >= config.stopAfterMinutes()) { | ||
| Microbot.log("AutoFiremakingPlus: reached stopAfterMinutes. Shutting down."); | ||
| super.shutdown(); | ||
| return; | ||
| } | ||
| if (config.stopAfterXp() > 0) { | ||
| int currentXp = Microbot.getClientThread().runOnClientThreadOptional(() -> | ||
| Microbot.getClient().getSkillExperience(Skill.FIREMAKING)).orElse(startSkillXp); | ||
| if (currentXp - startSkillXp >= config.stopAfterXp()) { | ||
| Microbot.log("AutoFiremakingPlus: reached stopAfterXp. Shutting down."); | ||
| super.shutdown(); | ||
| return; | ||
| } | ||
| } |
| public Dimension render(Graphics2D graphics) { | ||
| try { | ||
| panelComponent.setPreferredSize(new Dimension(240, 300)); | ||
|
|
||
| panelComponent.getChildren().add(TitleComponent.builder() | ||
| .text("AutoFiremakingPlus v" + AutoFiremakingPlusPlugin.version) | ||
| .color(TITLE_COLOR) | ||
| .build()); |
| public static List<FireLine> findFireLines(WorldPoint center, int radius) { | ||
| final Set<WorldPoint> fireTiles = new HashSet<>(); | ||
| final Set<WorldPoint> objectTiles = new HashSet<>(); | ||
|
|
||
| // Consume the live scene stream on the client thread; the grid loop below is safe off-thread | ||
| // because classifyTile's Rs2Tile.isWalkable self-guards to the client thread per tile. | ||
| Microbot.getClientThread().runOnClientThreadOptional(() -> { | ||
| Microbot.getRs2TileObjectCache().getStream() | ||
| .filter(obj -> obj.getWorldLocation().distanceTo(center) <= radius) | ||
| .forEach(obj -> { | ||
| int id = obj.getId(); | ||
| WorldPoint loc = obj.getWorldLocation(); | ||
| if (id == FIRE_ID || id == FIRE_ID_ALT) { | ||
| fireTiles.add(loc); | ||
| } else { | ||
| objectTiles.add(loc); | ||
| } | ||
| }); | ||
| return Boolean.TRUE; | ||
| }); |
| private WorldPoint findLightableTile(WorldPoint from) { | ||
| int[][] offsets = { {-1, 0}, {1, 0}, {0, -1}, {0, 1}, {-1, -1}, {1, 1}, {-1, 1}, {1, -1} }; | ||
| for (int[] o : offsets) { | ||
| WorldPoint p = new WorldPoint(from.getX() + o[0], from.getY() + o[1], from.getPlane()); | ||
| if (Rs2Tile.isWalkable(p) && !TileScanner.hasFire(p)) { | ||
| return p; | ||
| } | ||
| } | ||
| return null; | ||
| } |
| lines.sort(Comparator.comparingDouble((FireLine l) -> { | ||
| int distance = center.distanceTo(l.getEastEnd()); | ||
| return -(l.getLength() - distance * 0.5); | ||
| })); |
…scans, clearer line scoring Stop conditions now route through the banking cleanup like targetLevel; TileScanner returns its sets from the client-thread call (proper happens-before) and exposes a one-scan fire lookup for findLightableTile. Addresses Copilot review feedback on chsami#478. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Addressed: all stop conditions now route through the banking cleanup before shutdown (matching the README), TileScanner builds and returns its snapshots inside the client-thread call (proper happens-before edge), findLightableTile does one fire scan plus local membership checks, and the line scoring uses comparingDouble(...).reversed(). On the overlay comment: the class extends RuneLite's OverlayPanel, which clears panelComponent children after every render by default, so components do not accumulate. |
chsami
left a comment
There was a problem hiding this comment.
Reviewed for critical/security issues, malicious code, and plugin version bump. No blocking issues found.
Summary
New plugin: Auto Firemaking Plus, a firemaking trainer with two methods behind an activity picker:
ObjectID.FIRE); both share the same Burn make-X dialog.Plus layer: progressive log selection by Firemaking level, stop conditions (time, XP, target level), a pausable stats overlay with cost/hr and ETA, clean shutdown that banks leftovers, and an optional "maximize log space" toggle (banks the tinderbox while a campfire is up to carry 28 logs).
Tile-object cache reads are wrapped on the client thread (the scene-walk-off-thread hazard).
Contents
firemakingplus/(9 classes: Plugin, Config, Script, Overlay, FiremakingMethod, Logs, State, TileScanner, FireLine; the line-fire tile scanning is adapted from the leaguesfiremaking plugin, credited in-file)resources/.../firemakingplus/docs/README.md+assets/icon.png+assets/card.pngTesting
./gradlew clean buildgreen on JDK 11 (Temurin), matching CI;generatePluginsJsonmetadata correct.🤖 Generated with Claude Code