From eef506b7eb99939d40121788b49835947bb9861b Mon Sep 17 00:00:00 2001 From: TACHarsis <101965352+TACHarsis@users.noreply.github.com> Date: Mon, 6 Mar 2023 01:12:23 +0100 Subject: [PATCH] Update repair framework docs (#9123) * Hopefully improved usability and appeal --- docs/wiki/framework/repair-framework.md | 67 +++++++++++++++++-------- 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/docs/wiki/framework/repair-framework.md b/docs/wiki/framework/repair-framework.md index 16d8a76d7c..d825aa0372 100644 --- a/docs/wiki/framework/repair-framework.md +++ b/docs/wiki/framework/repair-framework.md @@ -12,29 +12,54 @@ version: patch: 0 --- -## 1. Object Variables / Configs +## 1. Config Values -### 1.1 Unit's Repair Training +### 1.2 Setting Vehicle As Repair Location -- Determines if a unit can repair damaged hitpoints and if so, how much can be restored. +A vehicle will be set as a repair truck based on the config `ace_repair_canRepair`. +Setting `fullRepairLocation` needs to be enabled and is by *disabled* default. + +```cpp +class CfgVehicles: Car_F{ + class MyRepairTruck { + ace_repair_canRepair = 1; // Make repair vehicle + }; +}; +``` + +## 2. Variables + +## 2.1 Make A Vehicle Into A Repair Truck + +A vehicle can be turned into a repair truck by setting the variable `ace_repair_canRepair` to `1` to enable, `0` to disable. +- Setting `fullRepairLocation` needs to be enabled and is by *disabled* default. +- Can be set via 3den attribute. + +```cpp +VEHICLE setVariable ["ace_repair_canRepair", 1, true]; +``` + +## 2.2 Make An Object Into A Repair Facility + +An object can be turned into a repair facility by setting the variable `ace_isRepairFacility` to `1` to enable, `0` to disable. +- Setting `fullRepairLocation` needs to be enabled and is by *disabled* default. +- Can be set via 3den attribute. +- Object cannot be a vehicle. + +```cpp +OBJECT setVariable ["ace_isRepairFacility", 1, true]; +``` + +## 2.3 Set Engineer Trait Level On Unit + +Determines if a unit can repair damaged hitpoints and if so, how much can be restored. See ACE - Logistics settings for more details. - Can easily be set via 3den attribute. -SetVar: `"ACE_IsEngineer"` - number 0 - 2 (can also be true/false) -- 0 / false: Untrained (by default settings will only be able to replace wheels) -- 1 / true: Engineer -- 2: Advanced Engineer (allowing a higher level of repairs, based on settings) (by default settings is the only one with access to full repair) +To set a units engineer trait level set the variable `ace_isEngineer` to: +- `0` / false: Untrained, only be able to replace wheels, based on settings. +- `1` / true: Engineer. +- `2` : Advanced Engineer, allowing a higher level of repairs, based on settings. (by default settings is the only one with access to full repair) -### 1.2 Repair Vehicles - -- Allows full repair based on setting `fullRepairLocation` (not enabled by default) -- Can easily be set via 3den attribute. - -SetVar: `"ACE_isRepairVehicle"` - true or false - -Config: `ace_repair_canRepair` - 0 or 1 - -### 1.3 Repair Facilities - -- Allows full repair based on setting `fullRepairLocation` (on by default) - -SetVar: `"ACE_isRepairFacility"` - true or false +```cpp +UNIT setVariable ["ace_isEngineer", 1, true]; +```