Skip to content

Bring melee stat displays closer to reality#4358

Open
mszabo-wikia wants to merge 1 commit into
Developmentfrom
statworker-cleanup
Open

Bring melee stat displays closer to reality#4358
mszabo-wikia wants to merge 1 commit into
Developmentfrom
statworker-cleanup

Conversation

@mszabo-wikia
Copy link
Copy Markdown
Contributor

@mszabo-wikia mszabo-wikia commented Dec 15, 2025

Changes

  • Patch the MeleeDPS stat to use our StatWorker.
  • In StatWorker_MeleeDamageAverage and StatWorker_MeleeArmorPenetration, use the pawn's list of melee verbs when computing the stat for a pawn, since the available verbs impact their weighting relative to each other. For instance, a pawn wielding a club may still choose to fight with fists some % of the time, but won't do so if wielding a masterwork longsword.
  • Always obtain melee verbs from VerbUtility.GetAllVerbProperties when computing stats for a single weapon (which may be wielded by a pawn), so that damage, cooldown and tool use chance can be computed via VerbProperties helpers that take stuffing into account.
  • Show the chance to use a given tool in the armor penetration stat explainer for clarity.

References

Links to the associated issues or other related pull requests, e.g.

Reasoning

Our current melee stat displays leave much to be desired:

  • The "Melee DPS" stat shown prominently for pawns is an unpatched vanilla stat, which doesn't take CE's damage scaling into account.
  • The stuff a weapon is made of isn't factored into stats, which impacts not just damage and cooldown but also the chance to pick a given tool relative to other tools.
  • The armor penetration stat shown for humans doesn't consider the wielded weapon.

Testing

  • Compiles without warnings
  • Game runs without errors
  • Playtested a colony - tested stat displays for various weapons wielded and unwielded.

@mszabo-wikia mszabo-wikia requested review from a team as code owners December 15, 2025 02:40
@github-actions
Copy link
Copy Markdown

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

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

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

@github-actions
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown

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

@N7Huntsman N7Huntsman moved this to Todo in [7.2] Dec 26, 2025
@N7Huntsman N7Huntsman added this to [7.2] Dec 26, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 8, 2026

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

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.

No issues in my testing, but some small potential improvements that could be made:

  • If the melee attack doesn't have a sharp AP value, we can probably just list "0" instead of displaying the calculation for the AP value (that amounts to 0 anyway).
  • Could hide the 'adjusted for weapon' line in the DPS screen if it's the same as the weapon base damage and/or if it doesn't have quality to factor in (like for natural weapons and implants).
  • Could also hide the "damage variation" line if there's no actual variation (this appears to be the case for pawns that don't actually have a Melee skill, like mechs and animals).

Our current melee stat displays leave much to be desired:

* The "Melee DPS" stat shown prominently for pawns is an unpatched
  vanilla stat, which doesn't take CE's damage scaling into account.
* The stuff a weapon is made of isn't factored into stats, which
  impacts not just damage and cooldown but also the chance to pick
  a given tool relative to other tools.
* The armor penetration stat shown for humans doesn't consider the
  wielded weapon.

So:
* Patch the MeleeDPS stat to use our StatWorker.
* In StatWorker_MeleeDamageAverage and StatWorker_MeleeArmorPenetration,
  use the pawn's list of melee verbs when computing the stat for a pawn,
  since the available verbs impact their weighting relative to each
  other. For instance, a pawn wielding a club may still choose to fight
  with fists some % of the time, but won't do so if wielding a
  masterwork longsword.
* Always obtain melee verbs from `VerbUtility.GetAllVerbProperties`
  when computing stats for a single weapon (which may be wielded by a pawn),
  so that damage, cooldown and tool use chance can be computed via
  `VerbProperties` helpers that take stuffing into account.
* Show the chance to use a given tool in the armor penetration stat
  explainer for clarity.
@github-actions
Copy link
Copy Markdown

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

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: Todo

2 participants