R3vo/Sandbox – User

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
 
(70 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TOC|normal|1|2}}
{{TOC|side}}
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.


= [SPE] Artillery Barrage =
== Getting the correct Version ==
Profiling is enabled in the following {{arma3}} versions
* arma3profiling_x64.exe - '''Part of the Performance Profiling Build'''
* arma3diag_x64.exe - '''Part of the Development Build'''


'''Category:''' [SPE] Fire Support
Read [[Arma_3: Steam Branches]] for a guide on how to access these branches.


'''Available in Zeus:''' true
{{Feature|informative|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''}}


'''Module Description:''' Create an artillery shell on the module position. It will take a few seconds until it hits the ground.
== Frame Capturing ==
== Attributes ==
There are several commands that allow you to capture a frame.
==== Type ====
* [[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.


'''Description:''' N/A
== 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


'''Property:''' N/A
== Capture Frame UI ==
[[File: arma3-capture frame ui overview.png]]


==== Values ====
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}
# {{Wiki|TODO}}


* 81 mm Mortar
== External Viewer ==
* chrome://tracing
* https://ui.perfetto.dev/


* 81 mm Mortar
[[File:Performance_Profiling_04.png|thumb|diag_captureFrame sample output with custom subtree]]
== Creating Your Own Subtree ==


* 81 mm Mortar (WP Smoke)
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>
You can create your own subtree inside siFEH by wrapping your function call inside a [[isNil]] CODE statement like this:<br>
Turn your old call which may look like this:
<sqf>
addMissionEventHandler ["EachFrame", {
call myPFHFunction
}];
</sqf>


* 75 mm Howitzer
Into something like this:
<sqf>
addMissionEventHandler ["EachFrame", {
isNil { call myPFHFunction } // isNil creates the subtree
}];
</sqf>


* 75 mm Howitzer
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.


* 105 mm Howitzer


* 105 mm Howitzer
== Notes ==


* Nebelwerfer 280 mm Rocket
* 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.


* Calliope 114 mm Rocket
== 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
|
|
|}


= [SPE] Ordnance =
<sqf>
private _ctrlTV = ctrlparent (_this select 0) displayCtrl 101;


'''Category:''' [SPE] Effects
private _export = "{| class=""wikitable sortable"""  + endl + "|-" + endl;
_export = _export + "! Technical Name !! Descriptive Name !! Description";


'''Available in Zeus:''' false
private _fnc_logChilden =
{
    params ["_path"];


'''Module Description:''' Create an artillery shell on the module position. It will take a few seconds until it hits the ground.
    for "_i" from 0 to ((_ctrlTV tvCount _path) - 1) do
== Attributes ==
    {
==== Type ====
        private _text = _ctrlTV tvText (_path + [_i]);
        _text = _text splitString " " select 0;


'''Description:''' N/A
        if !(_text in _export) then
        {
            _export = _export + endl + "|-" + endl + "| " + _text + endl + "| " + endl + "| ";
        };


'''Property:''' N/A
        if (_ctrlTV tvCount (_path + [_i]) > 0 ) then
        {
            [_path + [_i]] call _fnc_logChilden;
        };
    };
};


==== Values ====
[[]] call _fnc_logChilden;


* 81 mm Mortar
copyToClipboard (_export + endl + "|}" + endl);
</sqf>


* 81 mm Mortar (WP Smoke)
== See Also ==


* Mortar Smoke (White)
* [[Code Optimisation]]
* [[Mission Optimisation]]


* Artillery Smoke (White)


* 75 mm Howitzer
[[Category:Arma Scripting Tutorials]]
 
* 75 mm Howitzer
 
* 105 mm Howitzer
 
* 105 mm Howitzer
 
* Nebelwerfer 280 mm Rocket
 
* Calliope 114 mm Rocket
 
= [SPE] Illumination Flare (Continuous) =
 
'''Category:''' [SPE] Effects
 
'''Available in Zeus:''' false
 
'''Module Description:''' Creates a signal flare on the module position (visible only at night).
== Attributes ==
==== Color ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Values ====
 
* White Flare
 
* Yellow Flare
 
* Green Flare
 
* Red Flare
 
= [SPE] Ambient War Sounds (Global) =
 
'''Category:''' [SPE] Ambient War Sounds
 
'''Available in Zeus:''' false
 
'''Module Description:''' N/A
== Attributes ==
==== Condition ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Minimum Interval ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Maximum Interval ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Minimum Distance ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Maximum Distance ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Switch Sound Type ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Rifles Presence ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== MG Presence ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== MG42 Presence ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Cannon Presence ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Custom Sounds Presence ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
= [SPE] Ambient War Sounds (Area) =
 
'''Category:''' [SPE] Ambient War Sounds
 
'''Available in Zeus:''' false
 
'''Module Description:''' N/A
== Attributes ==
==== Condition ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Minimum Interval ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Maximum Interval ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Minimum Distance ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Maximum Distance ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Switch Sound Type ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Rifles Presence ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== MG Presence ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== MG42 Presence ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Cannon Presence ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Custom Sounds Presence ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
= [SPE] Flare Illumination =
 
'''Category:''' [SPE] Effects
 
'''Available in Zeus:''' false
 
'''Module Description:''' N/A
== Attributes ==
==== Conditional ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Minimum Interval ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Maximum Interval ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Minimum Distance ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Max Flares Allowed ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Color ====
 
'''Description:''' N/A
 
'''Property:''' N/A
 
==== Values ====
 
* White Flare
 
* Red Flare
 
* Green Flare
 
* Yellow Flare
 
= [SPE] AI Systems =
 
'''Category:''' [SPE] Supports
 
'''Available in Zeus:''' false
 
'''Module Description:''' Enable the AI Tweaks and Retreat-Flee-Surrendering system and customize the setup.
== Attributes ==
==== Affect spawned units ====
 
'''Description:''' Units created during the game will be affected by this module.
 
'''Property:''' SPE_AddSpawnedGroups
 
==== Player Side ====
 
'''Description:''' Which side represents the good guys.
 
'''Property:''' SPE_OurSide
 
==== Values ====
 
* Opfor
 
* Blufor
 
* Independent
 
* Civilian
 
==== Affect Player Side ====
 
'''Description:''' The good guys will be affected by morale simulation.
 
'''Property:''' SPE_AffectOurSide
 
==== Enable Fleeing ====
 
'''Description:''' Possibility of retreat and flee state.
 
'''Property:''' SPE_Active_Flee
 
==== Enable Surrendering ====
 
'''Description:''' Possibility of surrender state.
 
'''Property:''' SPE_Active_Surrender
 
==== Permanent Shock ====
 
'''Description:''' Probability of replacing flee and surrender state with permanent shock.
 
'''Property:''' SPE_PermanentShockProb
 
==== POW Timer ====
 
'''Description:''' Delay after which surrendered units will automatically become a POW.
 
'''Property:''' SPE_RFS_POWWalkTimer
 
==== Non-combatant Kills ====
 
'''Description:''' Can fleeing, surrendered, POWs and shocked units be wounded or killed.
 
'''Property:''' SPE_NonCombatantKillsAllowed
 
==== Clean Up Distance Retreating ====
 
'''Description:''' Minimal distance of the closest player required to delete fleeing or retreating units. Set -1 to never delete.
 
'''Property:''' SPE_CleanUp_Distances_Retreating
 
==== Clean Up Distance Surrendered ====
 
'''Description:''' Minimal distance of the closest player required to delete surrendered or panicked units. Set -1 to never delete.
 
'''Property:''' SPE_CleanUp_Distances_Surrendered
 
==== Clean Up Distance Panicked ====
 
'''Description:''' Minimal distance of the closest player required to delete POW units. Set -1 to never delete.
 
'''Property:''' SPE_CleanUp_Distances_Panicked:
 
==== Threat Range ====
 
'''Description:''' Maximal distance of the threats, that will affect units stress.
 
'''Property:''' SPE_MoraleAffectingTargetsRange
 
==== Flee Threshold ====
 
'''Description:''' Multiplier of the retreat and fleeing stress threshold. The lower, the bigger reatreat and fleeing probability.
 
'''Property:''' SPE_RFSThresholds_MultiplierRF
 
==== Surrender Threshold ====
 
'''Description:''' Multiplier of the surrender stress threshold. The lower, the bigger surrender probability.
 
'''Property:''' SPE_RFSThresholds_Multipliers
 
==== Player Threat ====
 
'''Description:''' Multiplier of players influence on the near enemy stress.
 
'''Property:''' SPE_PlayerStressMultiplier
 
==== Crowd Psyche ====
 
'''Description:''' Near fleeing or surrendered allies will increase the stress (a feedback effect).
 
'''Property:''' SPE_CrowdPsyche
 
==== Enable Unblocking ====
 
'''Description:''' Unblocking AI entities stuck on the move.
 
'''Property:''' SPE_Active_Unstuck
 
==== Hidden only ====
 
'''Description:''' Glaring unblocking techniques will be avoided if a player could see them.
 
'''Property:''' SPE_Unstuck_HiddenOnly
 
==== Hide Foliage ====
 
'''Description:''' Hide blocking foliage in front of the stuck vehicles.
 
'''Property:''' SPE_DoHideBlockingFoliage
 
==== Hide Objects ====
 
'''Description:''' Hide some types of map objects around the stuck vehicles.
 
'''Property:''' SPE_DoHandleBlockingStuff
 
==== Enable AI Tweaks ====
 
'''Description:''' General switch of various scripted AI tweaks.
 
'''Property:''' SPE_Active_TweakAI
 
==== Info Sharing ====
 
'''Description:''' Groups can broadcast limited information about known threats to allied groups in range.
 
'''Property:''' SPE_Active_InfoSharing
 
==== Rearm ====
 
'''Description:''' AI infantry low on ammo will try to get extra magazines from nearby sources, when situation allow.
 
'''Property:''' SPE_Active_TweakAI_Rearm
 
==== Diamond in Combat ====
 
'''Description:''' Infantry groups will use diamond formation in combat.
 
'''Property:''' SPE_DoDiamondInCombat
 
==== Group Cohesion ====
 
'''Description:''' Improved formation cohesion on the move by tweaking group members movement speed.
 
'''Property:''' SPE_DoCatchUp
 
==== Man Vehicle Seats ====
 
'''Description:''' Idle passengers will man important empty seats in the vehicles.
 
'''Property:''' SPE_DoManTurrets
 
==== Reliable Embarking ====
 
'''Description:''' Improve speed and reliability of embarking vehicles by AI units.
 
'''Property:''' SPE_DoReliableEmbarking
 
==== Affected Sides ====
 
'''Description:''' Which sides should be affected by reliable embarking feature.
 
'''Property:''' SPE_ReliableEmbarking
 
==== Disembark in Combat ====
 
'''Description:''' Tweaked rules of disembarking passengers from vehicles in combat.
 
'''Property:''' SPE_DoTweakDisembarkInCombat
 
==== Abandon redundant Crew ====
 
'''Description:''' Vehicle groups will leave behind redundant crewmen.
 
'''Property:''' SPE_DoLeaveFootmobilesBehind
 
= [SPE] Indirect Fire Support =
 
'''Category:''' [SPE] Supports
 
'''Available in Zeus:''' false
 
'''Module Description:''' Enable the Indirect Fire Support system and customize the setup.
== Attributes ==
==== Enable AI-Artillery ====
 
'''Description:''' AI-Artillery assets can perform fire missions against reported enemies.
 
'''Property:''' SPE_IFS_ArtyActive
 
==== Rounds per Salvo ====
 
'''Description:''' Base amount of rounds fired during a single fire mission. Final count of fired rounds depends on target category.
 
'''Property:''' SPE_IFS_Amount
 
==== Rounds Multiplier (Infantry Targets) ====
 
'''Description:''' Multiplier of base rounds amount.
 
'''Property:''' SPE_IFS_AmountMultiplier_Infantry
 
==== Rounds Multiplier (Soft Targets) ====
 
'''Description:''' Multiplier of base rounds amount.
 
'''Property:''' SPE_IFS_AmountMultiplier_Soft
 
==== Rounds Multiplier (Hard Targets) ====
 
'''Description:''' Multiplier of base rounds amount.
 
'''Property:''' SPE_IFS_AmountMultiplier_Hard
 
==== Accuracy Multiplier ====
 
'''Description:''' Multiplier of maximal fire mission aim error (shelled position shift relative to intended position, not ballistic spread).
 
'''Property:''' SPE_IFS_Acc
 
==== Counter-fire Priority ====
 
'''Description:''' Counter-battery fire against known hostile artillery takes priority over opportunity fire against other targets.
 
'''Property:''' SPE_IFS_CounterBatteryFireIsPriority
 
==== Mortar fire on Tanks ====
 
'''Description:''' Mortars will be considered for fire missions against tanks.
 
'''Property:''' SPE_IFS_AllowMortarsAgainstTanks
 
==== Autonomous CAS ====
 
'''Description:''' Temporary aerial assets can occasionally perform CAS missions against known enemy targets.
 
'''Property:''' SPE_IFS_CASActive
 
==== Forward Observer Classes ====
 
'''Description:''' If forward observers array is not empty, groups including units of those classes will be added to this array.
 
'''Property:''' SPE_IFS_FOClass
 
==== Radio Backpacks ====
 
'''Description:''' Backpacks considered as proper radio transmitters used to determine, if player can request a support (all lower case!).
 
'''Property:''' SPE_IFS_AcceptedRadioBackpacks
 
==== Available calls ====
 
'''Description:''' Available amount of calls per side: [east,west,resistance,any other], each side entry includes calls amount for: [CAS,mortar,heavy artillery]; -1 makes support type unlimited. In cadet mode each group has separate limit.
 
'''Property:''' SPE_IFS_AvailableCalls
 
==== Artillery Sides ====
 
'''Description:''' Sets which sides have access to artillery support calls.
 
'''Property:''' SPE_IFS_ArtyAvailability_Side
 
==== CAS Sides ====
 
'''Description:''' Sets which sides have access to CAS support calls.
 
'''Property:''' SPE_IFS_CASAvailability_Side
 
==== Mortar Rounds ====
 
'''Description:''' Count of mortar rounds fired per request.
 
'''Property:''' SPE_IFS_RequestedMortarAmount
 
==== Heavy Artillery Rounds ====
 
'''Description:''' Count of heavy artillery rounds fired per request.
 
'''Property:''' SPE_IFS_RequestedHeavyArtyAmount
 
==== Mortar Spread ====
 
'''Description:''' Maximal mortar rounds ballistic spread. Most often spread is around 1/5 of the maximum.
 
'''Property:''' SPE_IFS_RequestedMortarSpread
 
==== Heavy Artillery Spread ====
 
'''Description:''' Maximal heavy artillry rounds ballistic spread. Most often spread is around 1/5 of the maximum.
 
'''Property:''' SPE_IFS_RequestedHeavyArtySpread
 
==== Mortar ETA ====
 
'''Description:''' Mortar support Estimated Time of Arrival.
 
'''Property:''' SPE_IFS_RequestedMortarETA
 
==== Heavy Artillery ETA ====
 
'''Description:''' Heavy artillery support Estimated Time of Arrival (seconds).
 
'''Property:''' SPE_IFS_RequestedHeavyArtyETA
 
==== Direct Support Sides ====
 
'''Description:''' Sets which sides have access to Direct Support support calls.
 
'''Property:''' SPE_IFS_DSAvailability_Side
 
==== Check for Friendlies ====
 
'''Description:''' Not armored friendly assets presence blocks direct fire support.
 
'''Property:''' SPE_IFS_DS_CheckFriendlyFire
 
==== Incoming Fire Notifications ====
 
'''Description:''' Maximal distance from incoming artillery or CAS fire for warning notification.
 
'''Property:''' SPE_IFS_IncomingNotificationRange
 
==== Incoming Fire Indicators ====
 
'''Description:''' Visibility distance for incoming fire 3D indicators.
 
'''Property:''' SPE_IFS_IncomingMarkRange
 
==== Advanced Hints ====
 
'''Description:''' Show in game advanced hints explaining module features.
 
'''Property:''' SPE_IFS_AllowAdvancedHints
 
= [SPE] Advanced Revive Module =
 
'''Category:''' [SPE] Modules
 
'''Available in Zeus:''' false
 
'''Module Description:''' Enable the Extended Revive system and customize the setup.
== Attributes ==
==== Revive available to players ====
 
'''Description:''' Revive available to players
 
'''Property:''' spe_module_advanced_revive_SPE_ReviveEnabled
 
==== Values ====
 
* Disabled
 
* Enabled
 
==== Revive mode ====
 
'''Description:''' Revive mode
 
'''Property:''' spe_module_advanced_revive_SPE_ReviveMode
 
==== Values ====
 
* Difficulty Based (Basic, Basic, Advanced, Realistic)
 
* Basic
 
* Advanced
 
* Realistic
 
==== Requirement to revive ====
 
'''Description:''' Requirement to revive
 
'''Property:''' spe_module_advanced_revive_SPE_ReviveRequiredTrait
 
==== Values ====
 
* Difficulty Based (FAK, FAK, FAK, Medic)
 
* First Aid Kit
 
* Require Medic Trait
 
* None
 
==== Hold action medic multiplier ====
 
'''Description:''' Hold action medic multiplier
 
'''Property:''' spe_module_advanced_revive_SPE_ReviveMedicSpeedMultiplier
 
==== Hold action delay ====
 
'''Description:''' Hold action delay
 
'''Property:''' spe_module_advanced_revive_SPE_ReviveDelay
 
==== Force respawn delay ====
 
'''Description:''' Force respawn delay
 
'''Property:''' spe_module_advanced_revive_SPE_ReviveForceRespawnDelay
 
==== Bleedout time ====
 
'''Description:''' Bleedout time
 
'''Property:''' spe_module_advanced_revive_SPE_ReviveBleedOutDelay
 
==== Required First Aid Kits ====
 
'''Description:''' Required First Aid Kits
 
'''Property:''' spe_module_advanced_revive_SPE_ReviveFakAmount
 
==== Stop bleeding with FAK ====
 
'''Description:''' Stop bleeding with FAK
 
'''Property:''' spe_module_advanced_revive_SPE_ReviveAutoCall
 
==== Values ====
 
* Disabled
 
* Enabled
 
==== Unconscious unit 3D icons ====
 
'''Description:''' Unconscious unit 3D icons
 
'''Property:''' spe_module_advanced_revive_SPE_ReviveIcons
 
==== Values ====
 
* Difficulty Based (Enabled, Enabled, Medic Only, Disabled)
 
* Enabled
 
* Medic Only
 
* Disabled
 
==== Automatically call for help ====
 
'''Description:''' Automatically call for help
 
'''Property:''' spe_module_advanced_revive_SPE_ReviveAutoCall
 
==== Values ====
 
* Disabled
 
* Enabled
 
* Cadet Only
 
==== AI Automatically withstand ====
 
'''Description:''' AI Automatically withstand
 
'''Property:''' spe_module_advanced_revive_SPE_ReviveAutoWithstand
 
==== Values ====
 
* Disabled
 
* Enabled
 
* Cadet Only
 
==== Extra FAK required for self-revive ====
 
'''Description:''' Extra FAK required for self-revive
 
'''Property:''' spe_module_advanced_revive_SPE_WithstandExtraFAK
 
==== Values ====
 
* Difficulty Based (Enabled, Enabled, Medic Only, Disabled)
 
* Disabled
 
* Enabled
 
==== Self-Revive ====
 
'''Description:''' Self-Revive
 
'''Property:''' spe_module_advanced_revive_SPE_WithstandEnabled
 
==== Values ====
 
* Difficulty Based (Enabled, Enabled, Enabled, Disabled)
 
* Disabled
 
* Enabled
 
==== Self-Revive (AI) ====
 
'''Description:''' Self-Revive (AI)
 
'''Property:''' spe_module_advanced_revive_SPE_WithstandEnabledAI
 
==== Values ====
 
* Difficulty Based (Enabled, Enabled, Enabled, Disabled)
 
* Disabled
 
* Enabled
 
==== Units Affected ====
 
'''Description:''' Units Affected
 
'''Property:''' spe_module_advanced_revive_SPE_ReviveUnits
 
==== Values ====
 
* Playable Units
 
* Player Units
 
[[Category: Spearhead 1944]]

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