Skip to content

Reload feature#4376

Merged
N7Huntsman merged 40 commits intoDevelopmentfrom
ReloadGizmoFeature
Mar 3, 2026
Merged

Reload feature#4376
N7Huntsman merged 40 commits intoDevelopmentfrom
ReloadGizmoFeature

Conversation

@MaxDorob
Copy link
Copy Markdown
Contributor

@MaxDorob MaxDorob commented Dec 18, 2025

Additions

Describe new functionality added by your code, e.g.

  • Ammo gizmo now has slider that regulates minimal ammo to reload;
  • Drafted pawn will reload if all the following conditions are met:
    • Current ammo count is less than selected via slider;
    • Pawn is not in the fight for some time;
    • There's no visible enemies around (no LoS required).
image

Changes

  • Undrafted pawns won't reload until they reach the limit. (Maybe there must be some setting about that)

Reasoning

  • I'm tired of pawns with 1 bullet in the middle of the fight;
  • Pawn reloads after 1 shot in training (and will go to restock after it).

Alternatives

Testing

Check tests you have performed:

  • Compiles without warnings
  • Game runs without errors
  • (For compatibility patches) ...with and without patched mod loaded
  • Playtested a colony (specify how long)

@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20377180648.zip

@github-actions github-actions Bot added the Download in Comments This PR has a zipfile download available. label Dec 19, 2025
@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20377314605.zip

@MaxDorob MaxDorob marked this pull request as ready for review December 19, 2025 17:27
@MaxDorob MaxDorob requested review from a team as code owners December 19, 2025 17:27
@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20426013787.zip

@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20426122746.zip

@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20471376365.zip

@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20471390514.zip

@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-22244367343.zip

@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-22274460816.zip

@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-22279514901.zip

@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-22281861188.zip

@MaxDorob
Copy link
Copy Markdown
Contributor Author

  • To give the player further options, I'd extend the maximum allowable combat delay from 15s to 60s and max allowable range from 34 to 50. I think the defaults values (12 tiles and 5s) are fine.

Done

  • If a pawn doesn't have enough ammo (counting partial mag + what's in inventory) to have a full magazine, they won't opportunistically reload at all, which isn't desirable.

Pawns will reload now even if they have not enough ammo for full mag.

  • It would be convenient to have a weaponTag we can manually assign that prevents a weapon being able to use opportunistically reload, so that we can selectively disable it for weapons if necessary.

Done - add "OpportunisticReloadDisabled" in weapon tags. (tho I didn't test it)

  • Unmanned turrets, since they lack an inventory to pull from, probably shouldn't display a threshold to avoid creating confusion. Maybe it's visible if there's an autoloader connected to the turret?

Now must be fixed. The slider now will show up for turrets if there are autoloader around (I didn't test it)

  • One issue I'm not quite sure how to handle is that it causes the ammo gizmo to be displayed for each selected pawn, which causes quite a mess when multi-selecting pawns.
    202601~1

Now if there are more than 1 object selected title will show object's name (hold mouse over the header to see original title, that represents ammo class)
image

@MaxDorob MaxDorob requested a review from N7Huntsman February 22, 2026 17:41
Copy link
Copy Markdown
Contributor

@N7Huntsman N7Huntsman left a comment

Choose a reason for hiding this comment

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

Works, except for underbarrel threshold not tracking separately from the main weapon.

@MaxDorob
Copy link
Copy Markdown
Contributor Author

Works, except for underbarrel threshold not tracking separately from the main weapon.

Now must be fixed

@github-actions
Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-22462998486.zip

perkinslr
perkinslr previously approved these changes Mar 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 2, 2026

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-22597981179.zip

@N7Huntsman N7Huntsman merged commit 4f9cd6f into Development Mar 3, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in [7.2] Mar 3, 2026
@N7Huntsman N7Huntsman deleted the ReloadGizmoFeature branch March 3, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Download in Comments This PR has a zipfile download available.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants