Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct Pawn Painshock Threshold Values #3562

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

N7Huntsman
Copy link
Contributor

@N7Huntsman N7Huntsman commented Nov 20, 2024

Changes

  • Change pain shock threshold of various pawns.
    • Change values of 99 to 0.99, to be more clear.
    • Change values of 90 to 0.90 so that they're actually less than the max threshold.

Reasoning

While PainShockThreshold will accept any numerical value, it is clamped between 0.01 and 0.99 by the StatDef, so only values in that range have any discrete function. All values < 0.01 are functionally the same as 0.01, and all values > 0.99 are functionally the same as 0.99--see the min and max values below.

<StatDef>
    <defName>PainShockThreshold</defName>
    <label>pain shock threshold</label>
    <description>The pain level at which this creature is downed from pain.</description>
    <category>BasicsPawn</category>
    <minValue>0.01</minValue>
    <maxValue>0.99</maxValue>
    <defaultBaseValue>0.8</defaultBaseValue>
    <toStringStyle>PercentZero</toStringStyle>
    <showOnMechanoids>false</showOnMechanoids>
    <displayPriorityInCategory>2000</displayPriorityInCategory>
  </StatDef>

Since several Entities have been assigned a threshold value of 90, there's the distinct impression they were intended to have a lower shock threshold than the Fleshbeasts, which have been set to 99. However, since both these values end up clamped to 0.99, they are mechanically the same in game, making the xml values misleading.

Alternatives

  • Leave as-is.

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 (about 20 minutes shooting a sightstealer)

@N7Huntsman N7Huntsman requested review from a team as code owners November 20, 2024 02:21
Copy link

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

@github-actions github-actions bot added the Download in Comments This PR has a zipfile download available. label Nov 20, 2024
Copy link

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

Copy link
Contributor

@Airomeda Airomeda left a comment

Choose a reason for hiding this comment

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

Looks more clearer than it was 👍

@N7Huntsman N7Huntsman merged commit 9ef0609 into Development Nov 20, 2024
3 checks passed
@N7Huntsman N7Huntsman deleted the Anomaly-PainShock-Correction branch November 20, 2024 05:17
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants