R3vo/Sandbox – User

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
 
(105 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TOC|side}}
{{TOC|side}}
{| class="wikitable"
If you have ever wondered why you scenario is running so badly, performance profiling is the way to find it out. It allows you to find bottlenecks and slow code by capturing a "slow" frame.
! colspan=5 |Arma 3 Server Configuration Overview
The captured data can then be viewed and analysed.
|-
 
! Topic !! colspan=4 | Pages
== Getting the correct Version ==
|-
Profiling is enabled in the following {{arma3}} versions
! Setup
* arma3profiling_x64.exe - '''Part of the Performance Profiling Build'''
| [[Arma 3: Dedicated Server]] || [[Arma 3: Dedicated Server (Chinese Simplified)]] || [[Arma 3: Dedicated Server (Chinese Traditional)]]
* arma3diag_x64.exe - '''Part of the Development Build'''
|-
 
! Files
Read [[Arma_3: Steam Branches]] for a guide on how to access these branches.
| [[Arma 3: Server Config File]] || [[basic.cfg]] || [[server.armaprofile]]
 
|-
{{Feature|informative|It is recommended to use the '''Performance Profiling Build''' (arma3profiling_x64.exe) for performance profiling because:
! Other
* Has tools that might not make it into development build
| [[Multiplayer Server Commands]] || [[Arma 3: Mission voting]] || [[Arma 3: Headless Client]]
* Has all the profiling related commands that ''arma3diag_x64.exe'' has
|}
* Its performance is closer to the default ''arma3_x64.exe''}}
 
== Frame Capturing ==
There are several commands that allow you to capture a frame.
* [[diag_captureFrame]]
* [[diag_captureSlowFrame]]
* [[diag_logSlowFrame]] - not available in Arma 3 :(
* [[diag_captureFrameToFile]]
In most cases you do not want to capture any or all frames, you just want to capture "slow" frames. A slow frame is a frame that takes longer than the average frame and slows down the game.


This article deals with the '''basic.cfg''', the name means nothing, and can be called anything. The real name is determined by the [[Arma 3: Startup Parameters|-cfg]] command line option when launching the dedicated server or the game executable - in other words '''it also works for clients'''. When you do not provide a name, the default <tt>Arma3.cfg</tt> file is loaded located in the user profile folder.
== How to Use ==
# Run a mission
# Execute a scripted command <sqf inline>diag_captureSlowFrame ["total", 0.3];</sqf> using any means ([[Arma 3: Debug Console|Debug Console]], mission radio trigger...)
# Once a slow frame is detected, a window will open
# In the window you will be able to browse a lot of performance-related data, which can be interesting
# To export the gathered information for sharing with others:
## Select Main Thread (if not selected yet)
## Press the Copy button
## Open an external text editor
## Paste the text into a new file
## Save the file


In this configuration file you should configure your server's connectivity, mainly for performance tuning.
== Capture Frame UI ==
[[File: arma3-capture frame ui overview.png]]


== Performance Tuning Options ==
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}


There are also some parameters that can be used to fine-tune network performance. You can add following entries to arma.cfg (the main Armed Assault configuration file)
== External Viewer ==
* chrome://tracing
* https://ui.perfetto.dev/


'''MaxMsgSend=<limit>;'''
[[File:Performance_Profiling_04.png|thumb|diag_captureFrame sample output with custom subtree]]
    Maximum number of packets (aggregate messages) that can be sent in one simulation cycle ("frame").
== Creating Your Own Subtree ==
    Increasing this value can decrease lag on high upload bandwidth servers.
    '''Default: 128'''
'''MaxSizeGuaranteed=<limit>;'''
    Maximum size (payload) of guaranteed packet in bytes (without headers).
    Small messages are packed to larger packets (aggregate messages).
    Guaranteed packets (aggregate messages) are used for non-repetitive events like shooting.
    '''Default: 512'''
'''MaxSizeNonguaranteed=<limit>;'''
    Maximum size (payload) of non-guaranteed packet in bytes (without headers).
    Small messages are packed to larger packets (aggregate messages).
    Non-guaranteed packets (aggregate messages) are used  for repetitive updates like soldier or vehicle position.
    Increasing this value may improve bandwidth requirement, but it may increase lag.
    '''Default: 256'''
'''MinBandwidth=<bottom_limit>;'''
    Bandwidth the server is guaranteed to have (in bps).
    This value helps server to estimate bandwidth available.
    Increasing it to too optimistic values can increase lag and CPU load, as too many messages will be sent but discarded.
    '''Default: 131072'''
'''MaxBandwidth=<top_limit>;'''
    Bandwidth the server is guaranteed to never have (in bps).
    This value helps the server to estimate bandwidth available.
'''MinErrorToSend=<limit>;'''
    Minimal error to send updates across network.
    Using a smaller value can make units  observed by binoculars or sniper rifle to move smoother at the trade off of
    increased network traffic.
    '''Default: 0.001''' ('''was 0.01''' until ARMA 2:OA version 1.60, ARMA 2 version 1.11 uses 0.01)
'''MinErrorToSendNear=<limit>;'''
    Minimal error to send updates across network for near units.
    Using larger value can reduce traffic sent for near units. Used to control client to server traffic as well.
    '''Introduced in Arma 2 1.60, Default: 0.01'''


* METS:
When Profiling Per-Frame Eventhandlers (PFH), [[diag_captureFrame]] only shows one blob called siFEH that contains all PFH's so you can't see what part of that is caused by your PFH.<br>
** Example: A unit 1km (distance d = 1km) from the player with MinErrorToSend = 0.001 (METS = 0.001) would send an update when that unit moves 50m (error value E = 50).
You can create your own subtree inside siFEH by wrapping your function call inside a [[isNil]] CODE statement like this:<br>
** Formula: d = sqrt[(20E)/METS] ; 1000 = sqrt[(20E)/0.001] -> E = 50
Turn your old call which may look like this:
** In reality, other factors about the object are taken into effect as well according to a weighted scale.
<sqf>
** When the error value (E) between the master copy of an object (whoever "owns" the object) and a client's perceived/simulated copy of the same object >= MinErrorToSend (METS), a network update message will be sent for it.
addMissionEventHandler ["EachFrame", {
* METSN:
call myPFHFunction
** When using MinErrorToSend alone, for small values of distance (d) the frequency of high errors (E) would cause excessive network messages that are not necessary but could negatively impact FPS.
}];
** Too large of a value for METSN can prevent timely desirable network update messages which can result in units appearing to "warp"
</sqf>
* detailed explanation of METS and METSN by Suma: http://forums.bistudio.com/showthread.php?125396-Arma-2-OA-beta-build-84984&p=2103305&highlight=minerrortosend#post2103305


== Networking Tuning Options ==
Into something like this:
'''class sockets{maxPacketSize = <limit>;};'''
<sqf>
    Maximal size of packet sent over network.
addMissionEventHandler ["EachFrame", {
    This '''can be set for both''' client-to-server AND server-to-client(s) independently''!
isNil { call myPFHFunction } // isNil creates the subtree
    ''see client([[arma2.cfg#Generic_config]] or [[arma2oa.cfg#Generic_config]], )''
}];
    '''Default: 1400'''
</sqf>
    {{Feature|important|Only use in the case your router or ISP enforces lower packet size and you have connectivity issues with the game.}}
    ''Desync might happen if used '''MaxSizeGuaranteed/MaxSizeNonguaranteed values over the maxPacketSize'''.
    maxPacketSize default reduced from 1490 to 1400 since 1.60, thus MaxSize... values over 1300 could be affected negatively.''


== Other Tuning Options ==
Now when you run [[diag_captureFrame]] inside of siPFH you will have a subtree called gsEva and behind that you can see the first line of code inside the isNil statement.<br>
It will only show a part of the first line of that code so you should put something descriptive into the [[isNil]] statement.<br>
You can use the same to create a subtree for any function you like. This will also work inside [[Scheduler#Scheduled_Environment|Scheduled]] ([[spawn]]ed) scripts. <br>
But using this method to "subtree" a function with return values requires a little bit of trickery to get the return value out.


{{Feature|important|NOTE: See the [[Talk:basic.cfg|talk page]] for some more background info by Suma.}}


'''MaxCustomFileSize=<size_in_bits>;'''
== Notes ==
    Users with custom face or custom sound larger than this size are kicked when trying to connect.


'''Note'''
* 0.3 is a time in second used to determine what duration of a frame you consider abnormal, and first such frame will be captured.
The greatest level of optimization can be achieved by setting the MaxMsgSend
* 0.3 is definitely something you should not see in a normal game.
and MinBandwidth parameters. For a server with 1024 kbps we recommend the
* If you do not capture any frames with 0.3, try lowering it to 0.2 or 0.1.  
following values:
* If it triggers too early, before the main slowdown happens, increase it to a higher value, e.g. 1.0.
    MaxMsgSend = 256;
    MinBandwidth = 768000;
While connected to the dedicated server, you can use the [[Multiplayer Server Commands|admin command]] <code>#monitor</code> to monitor server resource usage. (You have to be logged in as or voted as game admin to do this.) The server never runs at more than 50 fps. When running slower, it always uses all available CPU processing power to maintain the smoothest possible gameplay. When running at less than 20 fps, you can consider the server overloaded – the mission currently played is probably too complex for given server. If you see the server is not using bandwidth that it could use, you can try increasing values MaxMsgSend and MinBandwidth.


== Example Configuration File ==
== Scopes ==
{| class="wikitable sortable"
|-
! Technical Name !! Descriptive Name !! Description
|-
| Main
|
|
|-
| total
|
|
|-
| fsPHa
|
|
|-
| winMs
|
|
|-
| dlcSim
|
|
|-
| steamCbk
|
|
|-
| input
|
|
|-
| wSimu
|
|
|-
| docSim
|
|
|-
| wSimDisp
|
|
|-
| MFDManager
|
|
|-
| wDisp
|
|
|-
| EventPrcs
|
|
|-
| gsEva
|
|
|-
| gbFrm
|
|
|-
| memLo
|
|
|-
| siScr
|
|
|-
| scrVM
|
|
|-
| wsSet
|
|
|-
| sLand
|
|
|-
| simSW
|
|
|-
| cLWObj
|
|
|-
| oTemp
|
|
|-
| FPres
|
|
|-
| waitSnd
|
|
|-
| job
|
|
|-
| sound
|
|
|-
| ssAdv
|
|
|-
| snCmt
|
|
|-
| play
|
|
|-
| ARTCpl
|
|
|-
| rendr
|
|
|-
| drwVi
|
|
|-
| txHLi
|
|
|-
| txPMM
|
|
|-
| dsr2t
|
|
|-
| wPrep
|
|
|-
| dPr
|
|
|-
| fmiRun
|
|
|-
| fmiWait
|
|
|-
| fmiMDrw
|
|
|-
| fmiSIns
|
|
|-
| wPrepFtr
|
|
|-
| clPrp
|
|
|-
| oPrep
|
|
|-
| sceAC
|
|
|-
| oSplt
|
|
|-
| sceACTA
|
|
|-
| sceACPrx
|
|
|-
| lodUL
|
|
|-
| PrxObj
|
|
|-
| manAn
|
|
|-
| ppdOT
|
|
|-
| flProx
|
|
|-
| PrxObjTransport
|
|
|-
| oSoSL
|
|
|-
| oSoJE
|
|
|-
| oSoJE1
|
|
|-
| oSoJE2
|
|
|-
| oSo1OFOv
|
|
|-
| oSo1ON
|
|
|-
| sceCLsHSH
|
|
|-
| prpAMCt
|
|
|-
| oSoJEw
|
|
|-
| pDrwFNP
|
|
|-
| oSoSLu
|
|
|-
| lPGCl
|
|
|-
| pdDrw
|
|
|-
| lDGnd
|
|
|-
| lGSMM
|
|
|-
| recCB
|
|
|-
| mtPmj
|
|
|-
| cuDrw
|
|
|-
| prepT
|
|
|-
| drwCB
|
|
|-
| oPasD
|
|
|-
| o1Drw
|
|
|-
| lckDnBf
|
|
|-
| prpTx
|
|
|-
| inst
|
|
|-
| stpSctnTL
|
|
|-
| o1ShV
|
|
|-
| scSVI
|
|
|-
| oPas3
|
|
|-
| sssmC
|
|
|-
| sbDrw
|
|
|-
| aniMt
|
|
|-
| ppSSSM
|
|
|-
| drwROM
|
|
|-
| drwIn
|
|
|-
| wDraw
|
|
|-
| lDPGT
|
|
|-
| oSDrw
|
|
|-
| oPasO
|
|
|-
| lDSky
|
|
|-
| swRdr
|
|
|-
| ppSWDD
|
|
|-
| swRdGeom
|
|
|-
| swRdGeomVB
|
|
|-
| swFillV
|
|
|-
| oPasA
|
|
|-
| ppShrpn
|
|
|-
| lDWat
|
|
|-
| oPas2
|
|
|-
| o2Drw
|
|
|-
| oPas5
|
|
|-
| o5Drw
|
|
|-
| EDraw3D
|
|
|-
| MEventPrcs
|
|
|-
| cLGSY
|
|
|-
| stpAll
|
|
|-
| stpCB
|
|
|-
| stpTxtCS
|
|
|-
| stpUAVsCS
|
|
|-
| ppHDRCL
|
|
|-
| ppGSB
|
|
|-
| ppDOF
|
|
|-
| ppGlwNw
|
|
|-
| ppGLu
|
|
|-
| stpCBUpd
|
|
|-
| ppQWt
|
|
|-
| ppCMAA
|
|
|-
| hudDr
|
|
|-
| 3DEN_UI_OnDraw
|
|
|-
| 3DEN_PrepareDraw
|
|
|-
| clObL
|
|
|-
| 3DEN_Drawing
|
|
|-
| stpTxtGS
|
|
|-
| txt2D
|
|
|-
| mapDr
|
|
|-
| mapSeaAndNormal
|
|
|-
| mapPM
|
|
|-
| lndPM
|
|
|-
| MapObjectsPrepTask
|
|
|-
| mapSeaAndNormalDraw
|
|
|-
| mapCntDraw
|
|
|-
| mapObjectsDraw
|
|
|-
| mapForestShape
|
|
|-
| mapGrid
|
|
|-
| drwFn
|
|
|-
| dtTot
|
|
|-
| wFram
|
|
|-
| 3dSwp
|
|
|-
| preLd
|
|
|-
| preLV
|
|
|-
| actObjPrld
|
|
|-
| hashChk
|
|
|-
| sSim
|
|
|-
| enfWorkShort
|
|
|-
| updAttPos
|
|
|-
| oSo1AN
|
|
|-
| prpAMCf
|
|
|-
| prpAMCSlt
|
|
|-
| prpSDM
|
|
|-
| locL
|
|
|-
| mapSeaAndNormalWork
|
|
|-
| mapObjectsPrepWork
|
|
|-
| drwIdxPrm
|
|
|-
| oSo3
|
|
|-
| lsCVB
|
|
|-
| oSo5
|
|
|-
| oSo2CL
|
|
|-
| oSo1AF
|
|
|-
| Visualize
|
|
|-
| visul
|
|
|-
| txMLo
|
|
|-
| oSo2Srt
|
|
|-
| oSoSdw
|
|
|-
| prpAMCbsi
|
|
|-
| prpAMCp
|
|
|-
| Render
|
|
|-
| bgD3D
|
|
|-
| stpTxtVS
|
|
|-
| ppHBAOPlus
|
|
|}


<pre>
<sqf>
// These options are created by default
private _ctrlTV = ctrlparent (_this select 0) displayCtrl 101;
language="English";
adapter=-1;
3D_Performance=1.000000;
Resolution_W=800;
Resolution_H=600;
Resolution_Bpp=32;


private _export = "{| class=""wikitable sortable"""  + endl + "|-" + endl;
_export = _export + "! Technical Name !! Descriptive Name !! Description";


// These options are important for performance tuning
private _fnc_logChilden =
{
    params ["_path"];


MinBandwidth = 131072; // Bandwidth the server is guaranteed to have (in bps). This value helps server to estimate bandwidth available. Increasing it to too optimistic values can increase lag and CPU load, as too many messages will be sent but discarded. Default: 131072
    for "_i" from 0 to ((_ctrlTV tvCount _path) - 1) do
MaxBandwidth = 10000000000; // Bandwidth the server is guaranteed to never have. This value helps the server to estimate bandwidth available.
    {
        private _text = _ctrlTV tvText (_path + [_i]);
        _text = _text splitString " " select 0;


MaxMsgSend = 128; // Maximum number of messages that can be sent in one simulation cycle. Increasing this value can decrease lag on high upload bandwidth servers. Default: 128
        if !(_text in _export) then
MaxSizeGuaranteed = 512; // Maximum size of guaranteed packet in bytes (without headers). Small messages are packed to larger frames. Guaranteed messages are used for non-repetitive events like shooting. Default: 512
        {
MaxSizeNonguaranteed = 256; // Maximum size of non-guaranteed packet in bytes (without headers). Non-guaranteed messages are used for repetitive updates like soldier or vehicle position. Increasing this value may improve bandwidth requirement, but it may increase lag. Default: 256
            _export = _export + endl + "|-" + endl + "| " + _text + endl + "| " + endl + "| ";
        };


MinErrorToSend = 0.001; // Minimal error to send updates across network. Using a smaller value can make units observed by binoculars or sniper rifle to move smoother. Default: 0.001
        if (_ctrlTV tvCount (_path + [_i]) > 0 ) then
MinErrorToSendNear = 0.01; // Minimal error to send updates across network for near units. Using larger value can reduce traffic sent for near units. Used to control client to server traffic as well. Default: 0.01
        {
            [_path + [_i]] call _fnc_logChilden;
        };
    };
};


MaxCustomFileSize = 0; // (bytes) Users with custom face or custom sound larger than this size are kicked when trying to connect.
[[]] call _fnc_logChilden;


</pre>
copyToClipboard (_export + endl + "|}" + endl);
</sqf>


== See Also ==
== See Also ==


* [[ArmA: Server configuration|Server Configuration]]
* [[Code Optimisation]]
* [[server.cfg|Server Config File]]
* [[Mission Optimisation]]
* [[Arma 2: Startup Parameters|Arma 2 Startup Parameters]]
* [[Arma 3 Startup Parameters|Arma 3 Startup Parameters]]
* [[Arma_3_Dedicated_Server|Arma 3 Dedicated Server]]


* [[Armed Assault:Dedicated Server]]
* [[Operation Flashpoint:Dedicated Server]]


{{GameCategory|arma1| Multiplayer}}
[[Category:Arma Scripting Tutorials]]
{{GameCategory|arma2|Multiplayer}}
{{GameCategory|arma3|Multiplayer}}

Latest revision as of 18:23, 4 November 2024

If you have ever wondered why you scenario is running so badly, performance profiling is the way to find it out. It allows you to find bottlenecks and slow code by capturing a "slow" frame. The captured data can then be viewed and analysed.

Getting the correct Version

Profiling is enabled in the following Arma 3 versions

  • arma3profiling_x64.exe - Part of the Performance Profiling Build
  • arma3diag_x64.exe - Part of the Development Build

Read Arma_3: Steam Branches for a guide on how to access these branches.

It is recommended to use the Performance Profiling Build (arma3profiling_x64.exe) for performance profiling because:
  • Has tools that might not make it into development build
  • Has all the profiling related commands that arma3diag_x64.exe has
  • Its performance is closer to the default arma3_x64.exe

Frame Capturing

There are several commands that allow you to capture a frame.

In most cases you do not want to capture any or all frames, you just want to capture "slow" frames. A slow frame is a frame that takes longer than the average frame and slows down the game.

How to Use

  1. Run a mission
  2. Execute a scripted command diag_captureSlowFrame ["total", 0.3]; using any means (Debug Console, mission radio trigger...)
  3. Once a slow frame is detected, a window will open
  4. In the window you will be able to browse a lot of performance-related data, which can be interesting
  5. To export the gathered information for sharing with others:
    1. Select Main Thread (if not selected yet)
    2. Press the Copy button
    3. Open an external text editor
    4. Paste the text into a new file
    5. Save the file

Capture Frame UI

arma3-capture frame ui overview.png

  1. 🚧
    TODO: this must be updated.
  2. 🚧
    TODO: this must be updated.
  3. 🚧
    TODO: this must be updated.
  4. 🚧
    TODO: this must be updated.
  5. 🚧
    TODO: this must be updated.
  6. 🚧
    TODO: this must be updated.
  7. 🚧
    TODO: this must be updated.
  8. 🚧
    TODO: this must be updated.
  9. 🚧
    TODO: this must be updated.

External Viewer

diag_captureFrame sample output with custom subtree

Creating Your Own Subtree

When Profiling Per-Frame Eventhandlers (PFH), diag_captureFrame only shows one blob called siFEH that contains all PFH's so you can't see what part of that is caused by your PFH.
You can create your own subtree inside siFEH by wrapping your function call inside a isNil CODE statement like this:
Turn your old call which may look like this:

addMissionEventHandler ["EachFrame", { call myPFHFunction }];

Into something like this:

addMissionEventHandler ["EachFrame", { isNil { call myPFHFunction } // isNil creates the subtree }];

Now when you run diag_captureFrame inside of siPFH you will have a subtree called gsEva and behind that you can see the first line of code inside the isNil statement.
It will only show a part of the first line of that code so you should put something descriptive into the isNil statement.
You can use the same to create a subtree for any function you like. This will also work inside Scheduled (spawned) scripts.
But using this method to "subtree" a function with return values requires a little bit of trickery to get the return value out.


Notes

  • 0.3 is a time in second used to determine what duration of a frame you consider abnormal, and first such frame will be captured.
  • 0.3 is definitely something you should not see in a normal game.
  • If you do not capture any frames with 0.3, try lowering it to 0.2 or 0.1.
  • If it triggers too early, before the main slowdown happens, increase it to a higher value, e.g. 1.0.

Scopes

Technical Name Descriptive Name Description
Main
total
fsPHa
winMs
dlcSim
steamCbk
input
wSimu
docSim
wSimDisp
MFDManager
wDisp
EventPrcs
gsEva
gbFrm
memLo
siScr
scrVM
wsSet
sLand
simSW
cLWObj
oTemp
FPres
waitSnd
job
sound
ssAdv
snCmt
play
ARTCpl
rendr
drwVi
txHLi
txPMM
dsr2t
wPrep
dPr
fmiRun
fmiWait
fmiMDrw
fmiSIns
wPrepFtr
clPrp
oPrep
sceAC
oSplt
sceACTA
sceACPrx
lodUL
PrxObj
manAn
ppdOT
flProx
PrxObjTransport
oSoSL
oSoJE
oSoJE1
oSoJE2
oSo1OFOv
oSo1ON
sceCLsHSH
prpAMCt
oSoJEw
pDrwFNP
oSoSLu
lPGCl
pdDrw
lDGnd
lGSMM
recCB
mtPmj
cuDrw
prepT
drwCB
oPasD
o1Drw
lckDnBf
prpTx
inst
stpSctnTL
o1ShV
scSVI
oPas3
sssmC
sbDrw
aniMt
ppSSSM
drwROM
drwIn
wDraw
lDPGT
oSDrw
oPasO
lDSky
swRdr
ppSWDD
swRdGeom
swRdGeomVB
swFillV
oPasA
ppShrpn
lDWat
oPas2
o2Drw
oPas5
o5Drw
EDraw3D
MEventPrcs
cLGSY
stpAll
stpCB
stpTxtCS
stpUAVsCS
ppHDRCL
ppGSB
ppDOF
ppGlwNw
ppGLu
stpCBUpd
ppQWt
ppCMAA
hudDr
3DEN_UI_OnDraw
3DEN_PrepareDraw
clObL
3DEN_Drawing
stpTxtGS
txt2D
mapDr
mapSeaAndNormal
mapPM
lndPM
MapObjectsPrepTask
mapSeaAndNormalDraw
mapCntDraw
mapObjectsDraw
mapForestShape
mapGrid
drwFn
dtTot
wFram
3dSwp
preLd
preLV
actObjPrld
hashChk
sSim
enfWorkShort
updAttPos
oSo1AN
prpAMCf
prpAMCSlt
prpSDM
locL
mapSeaAndNormalWork
mapObjectsPrepWork
drwIdxPrm
oSo3
lsCVB
oSo5
oSo2CL
oSo1AF
Visualize
visul
txMLo
oSo2Srt
oSoSdw
prpAMCbsi
prpAMCp
Render
bgD3D
stpTxtVS
ppHBAOPlus

private _ctrlTV = ctrlparent (_this select 0) displayCtrl 101; private _export = "{| class=""wikitable sortable""" + endl + "|-" + endl; _export = _export + "! Technical Name !! Descriptive Name !! Description"; private _fnc_logChilden = { params ["_path"]; for "_i" from 0 to ((_ctrlTV tvCount _path) - 1) do { private _text = _ctrlTV tvText (_path + [_i]); _text = _text splitString " " select 0; if !(_text in _export) then { _export = _export + endl + "|-" + endl + "| " + _text + endl + "| " + endl + "| "; }; if (_ctrlTV tvCount (_path + [_i]) > 0 ) then { [_path + [_i]] call _fnc_logChilden; }; }; }; [[]] call _fnc_logChilden; copyToClipboard (_export + endl + "|}" + endl);

See Also