Skip to content

feat: add Auto Firemaking Plus plugin#478

Merged
chsami merged 2 commits into
chsami:developmentfrom
pjmarz:feat/firemakingplus-plugin
Jun 16, 2026
Merged

feat: add Auto Firemaking Plus plugin#478
chsami merged 2 commits into
chsami:developmentfrom
pjmarz:feat/firemakingplus-plugin

Conversation

@pjmarz

@pjmarz pjmarz commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

New plugin: Auto Firemaking Plus, a firemaking trainer with two methods behind an activity picker:

  • Campfire (default): burns logs on a Forester's Campfire; when none is nearby it banks for a tinderbox, lights its own fire (stepping to a lightable tile when needed), and burns on that. Confirmed against both the campfire object (49927) and plain fires (ObjectID.FIRE); both share the same Burn make-X dialog.
  • Line: classic light-and-step-west line firemaking with a tile scanner that finds open rows, avoids blocked lines, and walks back to bank.

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.png

Testing

  • ./gradlew clean build green on JDK 11 (Temurin), matching CI; generatePluginsJson metadata correct.
  • Manual soak at the Grand Exchange: campfire loop runs unattended at roughly 90-100k XP/hr with maples including bank trips; verified the light-own-fire recovery when no campfire exists, the existing-campfire path, the burn dialog re-initiation when a batch stalls, and stop conditions triggering a clean shutdown. Line method verified in an open area: scan, burn, step west, walk back.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 9, 2026 23:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment on lines +111 to +125
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;
}
}
Comment on lines +54 to +61
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());
Comment on lines +38 to +57
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;
});
Comment on lines +282 to +291
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;
}
Comment on lines +98 to +101
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>
@pjmarz

pjmarz commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

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 chsami left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed for critical/security issues, malicious code, and plugin version bump. No blocking issues found.

@chsami chsami merged commit afa15a5 into chsami:development Jun 16, 2026
1 check passed
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.

3 participants