From 67cad5120ed5c31258989b74ad4e1fd5d15556cd Mon Sep 17 00:00:00 2001 From: Drofseh Date: Thu, 18 Nov 2021 11:26:31 -0800 Subject: [PATCH 1/3] Documentation - Improve documentation for Rearm & Vehicle Damage (#8588) --- docs/wiki/framework/rearm-framework.md | 47 ++++++++++++------- .../wiki/framework/vehicledamage-framework.md | 8 ++-- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/docs/wiki/framework/rearm-framework.md b/docs/wiki/framework/rearm-framework.md index 1985fdf685..cd31043572 100644 --- a/docs/wiki/framework/rearm-framework.md +++ b/docs/wiki/framework/rearm-framework.md @@ -50,9 +50,24 @@ class MyTruck: Car_F {

Mission makers can also use `this setVariable ["ace_rearm_isSupplyVehicle", true]`

-## 2. Functions +## 2. Variables -### 2.1 Adding specific magazines +### 2.1 Allow Rearming of Scripted Loadouts + +`ace_rearm_scriptedLoadout` + +Normally ACE Rearm evaluates what magazines a vehicle can carry by looking at the turret configs of the vehicle. This means that if a vehicle has a scripted loadout, for example using `addMagazineTurret` to give it different magazines than standard, those scripted magazines cannot be loaded with Rearm and the vehicle may be overloaded by rearming the magazines from the turret configs. + +If a scripted loadout is used, this variable can be set to true to switch the magazines that can be rearmed from the turret configs to any empty magazine in the vehicle. + +```cpp +VEHICLE addMagazineTurret ["SmokeLauncherMag",[0,0]]; +VEHICLE setVariable ["ace_rearm_scriptedLoadout", true, true]; +``` + +## 3. Functions + +### 3.1 Adding specific magazines `ace_rearm_fnc_addMagazineToSupply` @@ -67,7 +82,7 @@ This function is most useful with the module setting `Only specific Magazines`. This function can also be used to increase the supply count on setting `Limited ammo supply based on caliber` by a certain caliber value. -#### 2.1.1 Example +#### 3.1.1 Example `[ammo_truck, "32Rnd_155mm_Mo_shells"] call ace_rearm_fnc_addMagazineToSupply;` @@ -78,7 +93,7 @@ This function can also be used to increase the supply count on setting `Limited The 32 artillery shells are added to the supply count or the magazine storage of the specified ammo truck. -### 2.2 Adding all magazines of a specific vehicle +### 3.2 Adding all magazines of a specific vehicle `ace_rearm_fnc_addVehicleMagazinesToSupply` @@ -90,7 +105,7 @@ The 32 artillery shells are added to the supply count or the magazine storage of This functions wraps `ace_rearm_fnc_addMagazineToSupply` and uses it to add all default magazines of all supported turrets of the vehicle to the ammo truck. -#### 2.2.1 Example 1 +#### 3.2.1 Example 1 `[ammo_truck, tank] call ace_rearm_fnc_addVehicleMagazinesToSupply;` @@ -101,7 +116,7 @@ This functions wraps `ace_rearm_fnc_addMagazineToSupply` and uses it to add all All magazines found in the class config of the object `tank` are made available. -#### 2.2.2 Example 2 +#### 3.2.2 Example 2 `[ammo_truck, "B_MBT_01_arty_F"] call ace_rearm_fnc_addVehicleMagazinesToSupply;` @@ -112,7 +127,7 @@ All magazines found in the class config of the object `tank` are made available. All magazines found in the config of the vehicle class `B_MBT_01_arty_F` are made available. -### 2.3 Enabling / disabling rearming +### 3.3 Enabling / disabling rearming `ace_rearm_fnc_disable` @@ -124,7 +139,7 @@ All magazines found in the config of the vehicle class `B_MBT_01_arty_F` are mad This functions disables rearming for all supported turrets of a certain vehicle. -#### 2.3.1 Example 1 +#### 3.3.1 Example 1 `[tank] call ace_rearm_fnc_disable;` @@ -134,7 +149,7 @@ This functions disables rearming for all supported turrets of a certain vehicle. Disables rearming on the object `tank`. -#### 2.3.2 Example 2 +#### 3.3.2 Example 2 `[tank, false] call ace_rearm_fnc_disable;` @@ -145,7 +160,7 @@ Disables rearming on the object `tank`. Enables rearming on the object `tank`. -### 2.4 Getting the supply count +### 3.4 Getting the supply count `ace_rearm_fnc_getSupplyCount` @@ -156,7 +171,7 @@ Enables rearming on the object `tank`. This functions returns the current supply count of the ammo truck. -#### 2.4.1 Example +#### 3.4.1 Example `[ammo_truck] call ace_rearm_fnc_getSupplyCount;` @@ -166,7 +181,7 @@ This functions returns the current supply count of the ammo truck. The remaining supply count of `ammo_truck` will be returned. -### 2.5 Removing magazines from supply +### 3.5 Removing magazines from supply `ace_rearm_fnc_removeMagazineFromSupply` @@ -177,7 +192,7 @@ The remaining supply count of `ammo_truck` will be returned. 2 | Number of Rounds to withdraw | Number | Optional (default: `-1`) **R** | Magazine could be removed successfully | Boolean | Return value -#### 2.5.1 Example 1 +#### 3.5.1 Example 1 `[ammo_truck, "500Rnd_127x99_mag_Tracer_Red"] call ace_rearm_fnc_removeMagazineFromSupply;` @@ -188,7 +203,7 @@ The remaining supply count of `ammo_truck` will be returned. Removes one ammo box worth of 500Rnd_127x99_mag_Tracer_Red from the supply. Depending on the module setting the ammo box does hold an entire magazine or only the caliber based amount of rounds. -#### 2.5.2 Example 2 +#### 3.5.2 Example 2 `[ammo_truck, "500Rnd_127x99_mag_Tracer_Red", 50] call ace_rearm_fnc_removeMagazineFromSupply;` @@ -200,7 +215,7 @@ Removes one ammo box worth of 500Rnd_127x99_mag_Tracer_Red from the supply. Depe Removes one ammo box with 50 rounds of 500Rnd_127x99_mag_Tracer_Red from the supply. This is 10% of the supply of an entire magazine. -### 2.6 Setting the supply count +### 3.6 Setting the supply count `ace_rearm_fnc_setSupplyCount` @@ -212,7 +227,7 @@ Removes one ammo box with 50 rounds of 500Rnd_127x99_mag_Tracer_Red from the sup This function sets the current supply count of the ammo truck. It can be used to replenish the ammo truck on `Limited ammo supply based on caliber` setting. -#### 2.6.1 Example +#### 3.6.1 Example `[ammo_truck, 1000] call ace_rearm_fnc_setSupplyCount;` diff --git a/docs/wiki/framework/vehicledamage-framework.md b/docs/wiki/framework/vehicledamage-framework.md index c4b86e209f..7e22bccf5d 100644 --- a/docs/wiki/framework/vehicledamage-framework.md +++ b/docs/wiki/framework/vehicledamage-framework.md @@ -101,22 +101,22 @@ Default: "" On vehicle placement the system will iterate through all hitpoints define in `class Turrets` and find the relevant weapons and add their hitpoints. This occurs for ERA and SLAT as well -## CfgAmmo +## 2. CfgAmmo The only configuration needed on ammo is the warhead type (if applicable) and the incendiary value -### 1.1 `ace_vehicle_damage_incendiary` +### 2.1 `ace_vehicle_damage_incendiary` Value in range [0, 1] for how incendiary the ammo is. This is used in calculations to ignite fires. Not based on any real-world value, tweak as feels right. -#### 1.1.1 Default Values +#### 2.1.1 Default Values - Tandem/HEAT: 1 - AP: 0.1 - HE: 0.3 - Incendiary Bullet: 0.7 -### 1.2 `warheadName` +### 2.2 `warheadName` Default ARMA config value. We assume that the warheads are vanilla strings, so options are From 94d0466f17c0fb6150a8c00691148c34810ba0e6 Mon Sep 17 00:00:00 2001 From: Jo David Date: Tue, 23 Nov 2021 16:02:31 +0100 Subject: [PATCH 2/3] GitHub - Improve PR template (#8697) * Update PULL_REQUEST_TEMPLATE.md * Update PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ea83a609e3..2f72a45b3b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,9 @@ **When merged this pull request will:** -- Describe what this pull request will do -- Each change in a separate line -- Include documentation if applicable -- Respect the [Development Guidelines](https://ace3mod.com/wiki/development/) -- Follow title standard `Component - Add|Fix|Improve|Change|Make|Remove bananas` +- _Describe what this pull request will do_ +- _Each change in a separate line_ + +### IMPORTANT + +- [ ] If the contribution affects [the documentation](https://github.com/acemod/ACE3/tree/master/docs), please include your changes in this pull request so the documentation will appear on the [website](https://ace3mod.com/). +- [ ] [Development Guidelines](https://ace3mod.com/wiki/development/) are read, understood and applied. +- [ ] Title of this PR uses our standard template `Component - Add|Fix|Improve|Change|Make|Remove {changes}`. From 24a28da56647dbc581ab77edd4e2ba925851c890 Mon Sep 17 00:00:00 2001 From: diwako Date: Wed, 24 Nov 2021 19:22:17 +0100 Subject: [PATCH 3/3] fix stuck in uncon animation after CfgExtendedAnimation change (#8692) --- addons/medical_engine/XEH_postInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical_engine/XEH_postInit.sqf b/addons/medical_engine/XEH_postInit.sqf index fec92ca620..172e5aedfb 100644 --- a/addons/medical_engine/XEH_postInit.sqf +++ b/addons/medical_engine/XEH_postInit.sqf @@ -66,7 +66,7 @@ // Fixes units being stuck in unconscious animation when being knocked over by a PhysX object ["CAManBase", "AnimDone", { params ["_unit", "_anim"]; - if (local _unit && {_anim find QGVAR(face) != -1 && {lifeState _unit != "INCAPACITATED"}}) then { + if (local _unit && {_anim find QUNCON_ANIM(face) != -1 && {lifeState _unit != "INCAPACITATED"}}) then { [_unit, false] call FUNC(setUnconsciousAnim); }; }] call CBA_fnc_addClassEventHandler;