Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@diwako
Copy link
Contributor

@diwako diwako commented Jan 12, 2020

When merged this pull request will:

  • Allows mission makers to set damage threshold per unit
  • added macro to get damage threshold
  • if no variable is set on the unit the global CBA setting value will be used

The new macro differentiates between AI and player.

The variable name for this is currently ace_medical_unitDamageThreshold. This is the same name the old medical system used. However the value was an array of 3 values in the old system. Now it is just a number.
So, it is debatable which name for the variable should be used.

@mharis001 mharis001 added the kind/feature Release Notes: **ADDED:** label Jan 12, 2020
@mharis001 mharis001 added this to the 3.13.1 milestone Jan 12, 2020
@veteran29
Copy link
Member

WDYT about adding eden attribute for this?

@diwako
Copy link
Contributor Author

diwako commented Jan 13, 2020

@veteran29 question is how. It would not make sense to do a 1:1 threshold translation.
Basically I imaging the default threshold is 1, then all units placed in editor would have 1 as their default value. It would always use the per unit set value instead of the cba setting,
Maybe it is because I never added an eden attribute to a class so I do not really know if the value is always set, thus I have my concerns.

@diwako
Copy link
Contributor Author

diwako commented Jan 13, 2020

Added threshold slider to units
Min value 0, max value 10

@dedmen
Copy link
Contributor

dedmen commented Jan 16, 2020

Basically I imaging the default threshold is 1, then all units placed in editor would have 1 as their default

attribute setters are code. Can check for == default and just not set the var

@diwako
Copy link
Contributor Author

diwako commented Jan 16, 2020

Basically I imaging the default threshold is 1, then all units placed in editor would have 1 as their default

attribute setters are code. Can check for == default and just not set the var

I've done it now a bit differently, as the slider is more precise than what is shown on the number selector, anything below 0.1, which shows as 0 on the selector, will be seen as "use cba settings threshold value".

commy2
commy2 previously requested changes Feb 22, 2020
Copy link
Contributor

@commy2 commy2 left a comment

Choose a reason for hiding this comment

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

comment

@PabstMirror PabstMirror modified the milestones: 3.13.1, Ongoing Feb 22, 2020
@jonpas jonpas modified the milestones: Ongoing, 3.14.0 Feb 22, 2020
@diwako diwako force-pushed the individual_damage_thresholds branch from 2b22428 to bce9047 Compare April 19, 2020 08:47
@diwako
Copy link
Contributor Author

diwako commented Apr 19, 2020

Can the label "status/WIP" be removed? This was done some time ago.

@PabstMirror PabstMirror modified the milestones: 3.14.0, 3.13.3, 3.13.2 Apr 19, 2020
Copy link
Contributor

@PabstMirror PabstMirror left a comment

Choose a reason for hiding this comment

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

looks good

@PabstMirror PabstMirror requested a review from commy2 April 19, 2020 23:27
@jonpas jonpas merged commit 142fc1e into acemod:master Apr 20, 2020
@diwako diwako deleted the individual_damage_thresholds branch April 20, 2020 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Release Notes: **ADDED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants