mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Ace arsenal doc improvement (#6251)
* Add a part of the stats documentation * Finish documenting stats It's barebone but it'll do. * Add EH list to ace arsenal framework doc * Remove I form in framework doc, capitalize default loadouts * Add section about importing BI VA loadouts
This commit is contained in:
parent
ec8115d2a4
commit
704dd66d38
@ -55,6 +55,15 @@ The color coding for loadouts is as follows:
|
||||
- Grey: Some items in that loadout are not available in that box.
|
||||
- Red: Missing mods / class not defined, this takes precedence over grey if there is also unavailable items.
|
||||
|
||||
#### 1.2.1 Importing loadouts from Virtual Arsenal
|
||||
|
||||
You can import loadouts from Virtual Arsenal into ACE Arsenal, face, voice, insignias, and items from mods that aren't loaded won't be ported.
|
||||
|
||||
- Go in 3DEN
|
||||
- Place down a player unit
|
||||
- In the 3DEN top toolbar, click on the `TOOLS` tab
|
||||
- Click on `Import BI VA Loadouts to Ace Arsenal`
|
||||
|
||||
## 2. Shortcuts
|
||||
|
||||
<div class="panel callout">
|
||||
|
@ -117,5 +117,127 @@ Both of them are optional.
|
||||
## 4. Default loadouts
|
||||
|
||||
While in 3DEN you have the ability to save default loadouts in ACE Arsenal, doing so will make the saved loadouts available to all players (those loadouts are still subject to loadout verification).
|
||||
To do so:
|
||||
- Open ACE Arsenal in 3DEN by editing a unit's loadout.
|
||||
- Click on the "Loadouts" tab.
|
||||
- Click on the "Default Loadouts" tab.
|
||||
- Enter a loadout name and save.
|
||||
|
||||
This loadout list can be exported to the clipboard by using <kbd>Shift</kbd>. + <kbd>LMB</kbd>. on the export button, doing the same on the import button will import the list currently in the clipboard.
|
||||
|
||||
## 5. Stats
|
||||
|
||||
ACE Arsenal stats are customizable, this will show you how.
|
||||
|
||||
### 5.1. Adding stats via config
|
||||
|
||||
```cpp
|
||||
class ace_arsenal_stats {
|
||||
class statBase;
|
||||
|
||||
class TAG_myStat: statBase {
|
||||
scope = 2; // Only scope 2 show up in arsenal, scope 1 is used for base classes.
|
||||
displayName= "Test entry title"; // Title of the stat.
|
||||
priority = 0; // A higher value means the stat will be displayed higher on the page.
|
||||
stats[] = {"mySuperStat"}; // Array of strings to pass to the statements, typically
|
||||
showBar = 1; // 0 disabled; 1 enabled;
|
||||
showText = 1; // 0 disabled; 1 enabled;
|
||||
barStatement = "1"; // Statement evaluated to set the bar progress, needs to return a NUMBER.
|
||||
textStatement = "test entry" // statement evaluated to set the text entry, can return anything.
|
||||
condition = "true"; // Condition for the stats to be displayed, default is true if not defined, needs to return a BOOL.
|
||||
tabs[] = { {0,1,2}, { } }; // Arrays of tabs, left array is left tabs, right array is right tabs.
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
The arguments passed to the bar, text and condition statements are:
|
||||
- The stats array `<ARRAY of STRINGS>`
|
||||
- The config entry of the weapon `<CONFIG>`
|
||||
|
||||
### 5.2 Adding stats via a function
|
||||
|
||||
To add a stat simply call `ace_arsenal_fnc_addStat`
|
||||
```cpp
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Add a stat to ACE Arsenal.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Tabs to add the stat to (ARRAY of ARRAYS)
|
||||
* 0.1: Left tab indexes (ARRAY of NUMBERS)
|
||||
* 0.2 Right tab indexes (ARRAY of NUMBERS)
|
||||
* 1: Stat class (STRING) (A unique string for each stat)
|
||||
* 2: Config entries to pass (ARRAY of STRINGS)
|
||||
* 3: Title (STRING)
|
||||
* 4: Show bar / show text bools (ARRAY of BOOLS)
|
||||
* 4.1 Show bar (BOOL)
|
||||
* 4.2 Show text (BOOL)
|
||||
* 5: Array of statements (ARRAY of ARRAYS)
|
||||
* 5.1: Bar code (CODE)
|
||||
* 5.2 Text code (CODE)
|
||||
* 5.3 Condition code (CODE)
|
||||
* 6: Priority (NUMBER) (Optional)
|
||||
*
|
||||
* Return Value:
|
||||
* 0: Array of IDs (ARRAY of STRINGS)
|
||||
*
|
||||
* Example:
|
||||
* [[[0,1,2], [7]], "scopeStat", ["scope"], "Scope", [false, true], [{}, {
|
||||
params ["_statsArray", "_itemCfg"];
|
||||
getNumber (_itemCfg >> _statsArray select 0)
|
||||
}, {true}]] call ACE_arsenal_fnc_addStat
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
```
|
||||
|
||||
### 5.3 Removing stats via a function
|
||||
|
||||
Removing a stat is as simple as adding one, call `ace_arsenal_fnc_removeStat`
|
||||
|
||||
Stats IDs are unique, IDs are generated as follows:
|
||||
|
||||
`Class + side + tab`
|
||||
|
||||
For example: `testClassL03`
|
||||
- Class: `testClass`
|
||||
- Side: `L` for the left panel
|
||||
- Tab: `03` for the 3rd tab
|
||||
|
||||
For config added stats the classname is used, for function added ones the string provided is used.
|
||||
|
||||
```cpp
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Remove a stat from ACE Arsenal.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Array of IDs (ARRAY)
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [["scopeStatL00","scopeStatL01","scopeStatL02","scopeStatR07"]] call ace_arsenal_fnc_removeStat;
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
```
|
||||
|
||||
#### 6.0 Eventhandlers
|
||||
|
||||
All are local.
|
||||
|
||||
| Name | Arguments |
|
||||
| ------------- | ------------- |
|
||||
| ace_arsenal_displayOpened | Arsenal display (DISPLAY) |
|
||||
| ace_arsenal_displayClosed | None |
|
||||
| ace_arsenal_leftPanelFilled | Arsenal display (DISPLAY), current left panel IDC (SCALAR), current right panel IDC (SCALAR) |
|
||||
| ace_arsenal_rightPanelFilled | Arsenal display (DISPLAY), current left panel IDC (SCALAR), current right panel IDC (SCALAR) |
|
||||
| ace_arsenal_onLoadoutSave | Loadout index (SCALAR), [loadout name (STRING), loadout data (ARRAY)] |
|
||||
| ace_arsenal_onLoadoutLoad | loadout data (ARRAY), loadout name (STRING) |
|
||||
| ace_arsenal_loadoutShared | Loadouts list listnBox control (CONTROL),, [loadout author (STRING), loadout name (STRING), loadout data (ARRAY)] |
|
||||
| ace_arsenal_loadoutUnshared | Loadouts list listnBox control (CONTROL), loadout name (STRING) |
|
||||
| ace_arsenal_cargoChanged | Arsenal display (DISPLAY), item (STRING), add or remove (BOOL), shiftState (BOOL) |
|
||||
| ace_arsenal_loadoutImported | Arsenal display (DISPLAY), (import list (BOOL) |
|
||||
| ace_arsenal_loadoutExported | Arsenal display (DISPLAY), export list (BOOL) |
|
||||
|
Loading…
Reference in New Issue
Block a user