mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Documentation - Fix Medical Framework page parsing (#8823)
This commit is contained in:
parent
73a7dbdc1e
commit
dcdb241836
@ -75,9 +75,12 @@ When damage of this type is dealt, the wound handler scans through this array to
|
||||
For specific details, look at `ace_medical_damage_fnc_interpolatePoints`.
|
||||
|
||||
Example:
|
||||
{% raw %}
|
||||
```cpp
|
||||
thresholds[] = {{0.7, 3}, {0.5, 2}, {0.3, 1}};
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
- `damage = 0.65`
|
||||
- 0.65 75% of the way from 0.5 to 0.7, so the interpolated value is 2.75
|
||||
- this has a 75% chance to create 3 wounds, and a 25% chance to create 2 wounds
|
||||
@ -95,6 +98,7 @@ This entry is used to determine the chance for a damage type to produce each wou
|
||||
- The damage value used is the damage _per wound_, which is the total damage divided by the number of wounds.
|
||||
|
||||
Example:
|
||||
{% raw %}
|
||||
```cpp
|
||||
class Contusion {
|
||||
weighting[] = {{0.35, 0}, {0, 2}};
|
||||
@ -103,6 +107,7 @@ class VelocityWound {
|
||||
weighting[] = {{0.35, 2}, {0, 0}};
|
||||
};
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
- `damage = 0.6` and `nWounds = 3`, therefore `damagePerWound = 0.2`
|
||||
- 0.2 is 4/7 of the way from 0 to 0.35
|
||||
@ -143,6 +148,7 @@ class ACE_Medical_Injuries {
|
||||
|
||||
### 4.3 ACE_Medical_Injuries >> damageTypes
|
||||
See above for full explanations of [thresholds](#331-thresholds) and [weighting](#332-weighting).
|
||||
{% raw %}
|
||||
```cpp
|
||||
class ACE_Medical_Injuries {
|
||||
class damageTypes {
|
||||
@ -203,6 +209,7 @@ class ACE_Medical_Injuries {
|
||||
};
|
||||
};
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
## 4.4 Wound Handler Function
|
||||
Custom wound handlers should follow the same spec as the built-in handler:
|
||||
@ -225,4 +232,4 @@ The damage elements are sorted in descending order according to how much damage
|
||||
---| --------- | -----------
|
||||
0 | `player` | Unit that was hit
|
||||
1 | `[[0.5, "Body", 1], [0.3, "Head", 0.6]]` | 0.5 damage to body (was 1 before armor), 0.3 damage to head (was 0.6 before armor)
|
||||
2 | `"grenade"` | type grenade (non-selection-specific)
|
||||
2 | `"grenade"` | type grenade (non-selection-specific)
|
||||
|
Loading…
Reference in New Issue
Block a user