Skip to content

Adjust working ranges of forester, woodcutter and stonemason (3 Addons)#1941

Merged
Flamefire merged 7 commits into
Return-To-The-Roots:masterfrom
MichalLabuda:adjust-fws-reach-ranges-addons
May 20, 2026
Merged

Adjust working ranges of forester, woodcutter and stonemason (3 Addons)#1941
Flamefire merged 7 commits into
Return-To-The-Roots:masterfrom
MichalLabuda:adjust-fws-reach-ranges-addons

Conversation

@MichalLabuda
Copy link
Copy Markdown
Contributor

Summary

This PR adds three gameplay addons that allow players to customize the working radius of forester, woodcutter, and stonemason.

The default gameplay behavior remains unchanged because all three addons default to the original radii.

These addons introduce selectable radius presets expressed in percentages that increase the worker’s effective reach, making it possible to interact with resources that were previously just out of range on certain maps or simply for fun. Each addon provides several percentage‑based increments, with the default option matching the original game values.

Forester and Woodcutter share identical radius presets:

Default (6), +33% (8), +66% (10), +100% (12), +150% (15), +200% (18)

Stonemason uses slightly different values:

Default (8), +25% (10), +50% (12), +75% (14), +100% (15), +150% (20), +200% (24)

Motivation

On some maps, it can be frustrating when a worker cannot reach a single tree or a lone granite deposit that is only slightly outside the default radius.

For personal gameplay, I previously increased these radii locally. This PR formalizes that idea by implementing it as proper optional addons so that all players can benefit from the feature without altering the default gameplay balance.


Implementation details

  • Addon author list entry: 012 MichalLabuda
  • New addon IDs:
    • AddonId::FORESTER_REACH_RADIUS = 0x01200000
    • AddonId::WOODCUTTER_REACH_RADIUS = 0x01200001
    • AddonId::STONEMASON_REACH_RADIUS = 0x01200002
  • New addon classes:
    • AddonForesterReachRadius.h
    • AddonWoodcutterReachRadius.h
    • AddonStonemasonReachRadius.h
  • nofFarmhand::GetWorkRadius() was updated to use the selected addon values instead of hardcoded constants.
  • Original gameplay is preserved when the default option is selected.

Copy link
Copy Markdown
Member

@Flamefire Flamefire left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, looks good, just minor nits which you can apply from the UI here.

I'm thinking about making the description more explicit to avoid just repeating the name, i.e. change "Adjust the stonemason's mining range" to something like "Increase the radius in which the stonemason searches for stone" or "(possible) work area", but that doesn't sound much easier so I guess the "xxx range" is enough to understand the effect and we can keep that, unless you have an idea.

Comment thread libs/s25main/addons/AddonStonemasonReachRadius.h Outdated
Comment thread libs/s25main/figures/nofFarmhand.cpp Outdated
Comment thread libs/s25main/figures/nofFarmhand.cpp Outdated
Comment thread libs/s25main/figures/nofFarmhand.cpp Outdated
MichalLabuda and others added 4 commits May 20, 2026 10:20
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

@MichalLabuda MichalLabuda left a comment

Choose a reason for hiding this comment

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

I've committed the suggestions regarding the const and good catch with the stonemason's 100% range - thanks.

I've also modified the descriptions according to your suggestion.

I added the actual work names to the addon names for clarity.

Comment thread libs/s25main/addons/AddonForesterReachRadius.h Outdated
Comment thread libs/s25main/addons/AddonStonemasonReachRadius.h Outdated
Comment thread libs/s25main/addons/AddonWoodcutterReachRadius.h Outdated
Comment thread libs/s25main/addons/AddonForesterReachRadius.h Outdated
Comment thread libs/s25main/addons/AddonStonemasonReachRadius.h Outdated
Comment thread libs/s25main/addons/AddonWoodcutterReachRadius.h Outdated
Co-authored-by: Michał Łabuda <michal_labuda@tlen.pl>
@Flamefire
Copy link
Copy Markdown
Member

I'm fine with the current short addon names like "Adjust xxx's range", clear for those who know and if in doubt the tooltip provides a longer variant. I think this makes the addon list easier to read.

You need to run clang-format, e.g. via make clangFormat, see the failing CI check

@Flamefire Flamefire self-requested a review May 20, 2026 13:30
@Flamefire Flamefire enabled auto-merge May 20, 2026 13:30
@Flamefire Flamefire disabled auto-merge May 20, 2026 13:30
@Flamefire Flamefire enabled auto-merge May 20, 2026 13:31
@Flamefire Flamefire merged commit 64b706b into Return-To-The-Roots:master May 20, 2026
20 checks passed
@MichalLabuda MichalLabuda deleted the adjust-fws-reach-ranges-addons branch May 20, 2026 14:23
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.

2 participants