Tagging - Add support for mission Tags (#7710)

* [Tagging] Added ability to specify custom model

* Update Tagging Framework doc

* [Tagging] Added parsing tags from missionConfig

* Update Tagging Framework doc

* Apply suggestions from code review

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Forgot passing a variable to WAE

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
Dedmen Miller
2020-06-19 17:36:47 +02:00
committed by GitHub
parent 553bba8ece
commit c1b906c29d
9 changed files with 146 additions and 39 deletions

View File

@ -27,7 +27,9 @@ class ACE_Tags {
displayName = "My Tag"; // Name of your tag being displayed in the interaction menu
requiredItem = "ACE_SpraypaintBlack"; // Required item to have in the inventory to be able to spray your tag (eg. `"ACE_SpraypaintBlack"`, `"ACE_SpraypaintRed"`, `"ACE_SpraypaintGreen"`, `"ACE_SpraypaintBlue"` or any custom item from `CfgWeapons`)
textures[] = {"path\to\texture1.paa", "path\to\texture2.paa"}; // List of texture variations (one is randomly selected when tagging)
materials[] = {"path\to\material.rvmat"}; // Optional: List of material variations (one is randomly selected). Keep empty if you don't need a custom material.
icon = "path\to\icon.paa"; // Icon being displayed in the interaction menu
tagModel = "UserTexture1m_F"; // Optional: The 3D Model that will be spawned with the texture on it, can either be CfgVehicles classname or P3D file path.
};
};
```
@ -46,6 +48,8 @@ class ACE_Tags {
2 | Required Item | String | Required
3 | Textures | Array | Required
4 | Icon | String | Optional (default: `""` - Default white point)
5 | Material Paths | Array | Optional (default: `[]] - No custom material)
6 | Tag Model | String | Optional (default: `"UserTexture1m_F"` - 1x1m texture surface)
**R** | Successfully Added Tag | Boolean | Return value
#### 2.1.1 Example
@ -59,3 +63,24 @@ class ACE_Tags {
2 | `"ACE_SpraypaintRed"` | Required item to have in the inventory to be able to spray your tag
3 | `["tagTexture1.paa", "tagTexture2.paa"]` | List of texture variants (one is randomly selected when tagging)
4 | `"icon.paa"` | Icon being displayed in the interaction menu
### 2.2 Tags in description.ext
Tags can also be configured in description.ext like shown above.
File Paths will be relative to your mission, if you want to define Tags inside description.ext but use Addon paths for `Texture`/`Material`/`TagModel` you need to prefix the path with `@`.
This is how above config would look when using Addon paths from description.ext:
```cpp
class ACE_Tags {
class yourTagClass {
displayName = "My Tag"; // Name of your tag being displayed in the interaction menu
requiredItem = "ACE_SpraypaintBlack"; // Required item to have in the inventory to be able to spray your tag (eg. `"ACE_SpraypaintBlack"`, `"ACE_SpraypaintRed"`, `"ACE_SpraypaintGreen"`, `"ACE_SpraypaintBlue"` or any custom item from `CfgWeapons`)
textures[] = {"@path\to\texture1.paa", "@path\to\texture2.paa"}; // List of texture variations (one is randomly selected when tagging)
materials[] = {"@path\to\material.rvmat"}; // Optional: List of material variations (one is randomly selected). Keep empty if you don't need a custom material.
icon = "@path\to\icon.paa"; // Icon being displayed in the interaction menu
tagModel = "UserTexture1m_F"; // Optional: The 3D Model that will be spawned with the texture on it, can either be CfgVehicles classname or P3D file path.
};
};
```