Diag Menu – DayZ

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{TOC|side}} The Diag Menu is a menu listing many options used to debug game scripting and assets. It is available in the diagnostic version of the game executable (DayZDiag_x...")
 
mNo edit summary
Line 487: Line 487:


== Enfusion World ==
== Enfusion World ==
* Show Bullet
* > Bullet
** Draw Char Ctrl
** Draw Simple Char Ctrl
** Max. Collider Distance
** Draw Bullet shape
** Draw Bullet wireframe
** Draw Bullet shape AABB
** Draw obj center of mass
** Draw Bullet contacts
** Force sleep Bullet
** Show stats
* Show bodies {{Controls|LAlt|}} + {{Controls|NUM6|}}
=== Show Bullet ===
Turns on the debug visualization of Bullet.
{{Feature|informative|
Bullet as in the physics engine, not the ammunition of a weapon.
}}
=== Bullet ===
Settings to tweak the debug visualization of Bullet.
==== Draw Char Ctrl ====
Enable/disable the visualizations for the character controller used by the player.
Depends on Draw Bullet shape.
==== Draw Simple Char Ctrl ====
Enable/disable the visualizations for the character controller used by AI.
Depends on Draw Bullet shape.
==== Max. Collider Distance ====
The maximum distance between an object and the player to visualize the collider.
Depends on Draw Bullet shape.
{{Feature|informative|
Available options: 0, 1, 2, 5, 10, 20, 50, 100, 200, 500
}}
{{Feature|important|
This is 0 by default, since this visualization is quite expensive.
Game performance might be compromised when setting this to a large distance.
}}
==== Draw Bullet shape ====
Enable/disable the visualizations of bullet colliders.
==== Draw Bullet wireframe ====
Enable/disable the visualizations of bullet colliders to be only wireframe.
Depends on Draw Bullet shape.
==== Draw Bullet shape AABB ====
Enable/disable the visualizations of axis aligned bounding box of colliders.
==== Draw obj center of mass ====
Enable/disable the visualizations of objects center of mass.
==== Draw Bullet contacts ====
Enable/disable the visualizations of colliders making contact.
==== Force sleep Bullet ====
Enable/disable force sleeping all bodies.
==== Show stats ====
Enable/disable showing debug stats.
When disabling, the last shown stats will be shown for 10 more seconds before disappearing.
{{Feature|informative|
Available Options: disabled, basic, all
}}
=== Show bodies ===
Enable/disable the visualizations of Bullet bodies.
{{Feature|informative|
Available Options: disabled, only, all
}}


== DayZ render ==
== DayZ render ==

Revision as of 14:37, 22 September 2022

The Diag Menu is a menu listing many options used to debug game scripting and assets. It is available in the diagnostic version of the game executable (DayZDiag_x64.exe).

Main menu of the DayZ diag debug

  • Statistics
  • Enfusion render
  • Enfusion world
  • DayZ render
  • Game
  • AI
  • Sounds
Usage
  • To open the Diag Menu, press ⊞ Win + Alt (alternatively, Ctrl + ⊞ Win but this shortcut conflicts with Windows 11's shortcut) in any 3D viewport
  • To enter a sub-menu, press
  • To leave a sub-menu, press
  • To change a value, use and .
When available options are being shown, it is in the order they are listed in the menu, the first usually being the default.
Some options may require you to be able to use your mouse on the screen.

This can be toggled by pressing Ctrl + NUM 9

This key binding is registered through script. (PluginKeyBinding)
Any mention of "Cheat Inputs" are inputs hardcoded on C++ side.

Statistics

  • FPS |LCtrl| + |NUM1|
  • Script profiler UI
  • > Script profiler settings
    • Always enabled
    • Flags
    • Module
    • Update interval
    • Average
    • Time resolution
    • (UI) Scale

FPS

Enables the showing of FPS in the top left corner of the screen.

The FPS is calculated from the time between last 10 frames.

DayZ debug FPS counter

Script profiler UI

Turns on the on-screen Script Profiler.

For more information regarding the script profiler, also read the documentation in EnProfiler.c.
This will only profile script, proto methods are not measured as separate entries. They will however add up to the total time it takes to run a script method when it is called inside one.

DayZ Script profiler

Section Info
Time per class The total time of all function calls belonging to this class.

Shows the top 20 times.

Time per function The total time of all calls to a function.

Shows the top 20 times.

Class allocations The amount of allocations of a class.

Shows the top 20 allocations.

Count per function The amount of times a function was called.

Shows the top 20 counts.

Class count The amount of instances of a class.

Shows the top 40 counts.

Stats and settings
Section Info More Info
UI enabled (DIAG) Whether the script profiler UI is active. Script profiler settings : Always enabled
Profiling enabled (SCRP) Whether the script will be profiled even when the UI is not active. Script profiler settings : Always enabled
Profiling enabled (SCRC) Whether the script is actually being profiled or not. Script profiler settings : Always enabled
Flags The current set of flags. Script profiler settings : Flags
Module The currently profiled module. Script profiler settings : Module
Interval The current set update interval. Script profiler settings : Update Interval
Time Resolution The currently set time resolution. Script profiler settings : Time Resolution
Average Whether the values displayed are an average of the actual values. Script profiler settings : Average
Game Frame The total amount of frames passed. EnProfiler.c : Enprofiler.GetGameFrame
Session Frame The total amount of frames in this profiling session. EnProfiler.c : Enprofiler.GetSessionFrame
Total Frames The total amount of frames across all profiling sessions. EnProfiler.c : Enprofiler.GetTotalFrames
Profiled Sess Frms The total amount of frames profiled in this profiling session. EnProfiler.c : Enprofiler.GetProfiledSessionFrames
Profiled Frames The total amount of frames profiled across all profiling session. EnProfiler.c : Enprofiler.GetProfiledSessionFrames
For Stats and settings it is best to also read the following "Script profiler sessions" and also EnProfiler.c.

Script Profiler UI

A set of settings to tweak the gathering of script profiling data.

These can also be tweaked by script through the EnProfiler API.

It is recommended to first read the documentation here before using the API.

For more information regarding the script profiler, also read the documentation in EnProfiler.c.
The EnProfiler API and the script profiler itself are only available on the diagnostic game executable.

Always Enabled

Gathering of script profiling data is not enabled by default, this bool displays whether it is currently enabled or not. If it is desired that the script profiler is enabled at start, the launch parameter "-profile" can be used to achieve this.

EnProfiler API Related:
  • EnProfiler.c : enum EnProfilerEnabledFlags
  • EnProfiler.c : EnProfiler.Enable
  • EnProfiler.c : EnProfiler.IsEnabled
Do note that the Script Profiler UI does not care about this bool and will always force the profiling to happen as long as the on-screen UI is visible.

So when the Script Profiler UI is turned on, it will not set this bool to true, since as soon as the UI is turned off, the profiling stops again.

Which is why the name is "Always enabled" and not "Currently enabled".

Flags

The set of flags that define how data is gathered.

Available options Info
SPF_RECURSIVE Data is gathered from the currently selected module and its children

Data is per frame

SPF_RECURSIVE Data is gathered from the currently selected module and its children

Data is accumulated across frames

SPF_RESET Data is only gathered from the currently selected module

Data is per frame

SPF_NONE Data is only gathered from the currently selected module

Data is accumulated across frames

The meaning of flags:

  • SPF_RECURSIVE: Enables profiling of child modules (recursively goes through them)
  • SPF_RESET: Enables the clearing of data at the end of the frame (resets the data)
EnProfiler API Related:
  • EnProfiler.c : enum EnProfilerFlags
  • EnProfiler.c : EnProfiler EnProfilerFlags methods group

Module

The module to be profiled.

Available options Info
CORE 1_Core
GAMELIB 2_GameLib
GAME 3_Game
WORLD 4_World
MISSION 5_Mission
MISSION_CUSTOM init.c
EnProfiler API Related:
  • EnProfiler.c : enum EnProfilerModule
  • EnProfiler.c : EnProfiler EnProfilerModule methods group

Update Interval

The amount of frames to wait before updating the sorted data. This also delays the reset caused by SPF_RESET.

Available options: 0, 5, 10, 20, 30, 50, 60, 120, 144
EnProfiler API Related:
  • EnProfiler.c : EnProfiler.SetInterval
  • EnProfiler.c : EnProfiler.GetInterval

Average

Enable/disable the displaying and returning of averages. Of course, when the SPF_RESET flag is present and there is no interval, this will be the value itself.

When SPF_RESET flag is not present, it will divide by the session frame. When an interval is set, it will divide by the interval.

Class count will never be an average, it will always be the current count of the instance, allocations will be the average value of how many times an instance was created.

EnProfiler API Related:
  • EnProfiler.c : EnProfiler.EnableAverage
  • EnProfiler.c : EnProfiler.IsAverage

Time resolution

Set the time resolution to display time in. This is in the form of nth of a second.

So that means that 1 means in seconds and 1000 means in milliseconds.

Available options: 100000, 1000000, 1, 10, 100, 1000, 10000
EnProfiler API Related:
  • EnProfiler.c : EnProfiler.SetTimeResolution
  • EnProfiler.c : EnProfiler.GetTimeResolution

(UI) scale

Sets the scale of the on-screen script profiler UI. Simply because there are different screens and resolutions, and this way you can tweak it to be better visible if necessary.

There is no EnProfiler API equivalent for this, as it is purely for the on-screen UI.

Available options: Range: Start: 1; Min: 0.5; Max: 1.5; Step: 0.05

Enfusion Renderer

  • Lights
  • > Lighting
    • Ambient lighting
    • Ground lighting
    • Directional lighting
    • Bidirectional lighting
    • Specular lighting
    • Reflection
    • Emission lighting
  • Shadows
  • Terrain shadows
  • Render debug mode RCtrl + AltGr + W
  • Occluders
  • Occlude entities
  • Occlude proxies
  • Show occluder volumes
  • Show active occluders
  • Show occluded
  • Widgets
  • Postprocess Ctrl + LAlt + P
  • Terrain
  • > Materials
    • Common
    • TreeTrunk
    • TreeCrown
    • Grass
    • Basic
    • Normal
    • Super
    • Skin
    • Multi
    • Old Terrain
    • Old Roads
    • Water
    • Sky
    • Sky clouds
    • Sky stars
    • Sky flares
    • Particle Sprite
    • Particle Streak

Lights

Enable/disable lights. This only affects actual light sources such as the PersonalLight or in-game items, not the environment lights. For the environmental lighting, there is the following submenu.

Lighting

The following toggles toggle the respective lighting.

Ambient lighting

Toggles the general ambient lighting.

Default lighting example Ambient Lighting example

Ground lighting

Toggles the lighting reflected from the ground. Noticeable difference is on the roof and the character's underarms.

Default lighting example Ground lighting Example

Directional lighting

Toggles the general directional lighting of the world. Without this, the bidirectional lighting is actually also turned off, as it depends on this.

Default lighting example Directional Lighting Example

Bidirectional lighting

Toggles the general bidirectional lighting of the world.

Default lighting example Bidirectional lighting Example

Specular lighting

Toggles the specular lighting. Noticeable differences are on the side of the cupboard and on the car.

Default lighting example Specular Lighting Example

Reflection

Toggles the reflection lighting. Noticeable differences are on the side of the cupboard and on the car.

Default lighting example Reflection Lighting Example

Emission lighting

Toggles the emission lighting.

Shadows

Enables/disables shadows. Additionally, this also disables the culling of rain inside of objects.

Shadows on shadows off

Terrain shadows

Changes the setting for how terrain shadows are generated.

Available options: on (slice), on (full), no update, disabled

Render debug mode

Special render settings to see how the mesh wireframe looks like in game.

Available options: normal, wire, wire only, overdraw, overdrawZ

Different materials have a different wire colour.

Material Color (RGB)
TreeTrunk 179, 126, 55
TreeCrown 143, 227, 94
Grass 41, 194, 53
Grass Material 61, 194, 83
Basic 208, 87, 87
Normal 204, 66, 107
Super 234, 181, 181
Super Ext 234, 181, 0
Skin 252, 170, 18
Multi 143, 185, 248
Terrain 255, 127, 127
Old Terrain 122, 148, 129
Old Terrain Simple 96, 128, 105
Old Roads 173, 188, 177
Old Sprite 242, 247, 210
Water 51, 51, 255
Ocean 51, 128, 255
Ocean Shore 30, 193, 177
Sky 143, 185, 248
Sky clouds 193, 247, 253
Sky stars 255, 255, 255
Sky flares 201, 206, 245
Particle sprite 128, 128, 255
Particle streak 255, 128, 128

Without render debug Render Debug on

Occluders

Enable/disable the occluding of objects. This is more visible when paired with for example Show occluded.

Occlude entities

Enable/disable the occluding of entities.

Occlude proxies

Enable/disable the occluding of proxies.

Show occluder volumes

When enabled, takes a snapshot of the moment and draws debug shapes visualizing the occluding. Disabling it clears the debug shapes.

Show active occluders

When enabled, shows the currently active occluders by visualizing them with debug shapes.

Show occluded

Visualizes the occluded objects by using debug shapes.

Widgets

Enable/disable the rendering of widgets.

Postprocess

Enable/disable the rendering of post process effects.

Terrain

Enable/disable the rendering of terrain.

Materials

Enable/disable the rendering of specific materials. Most are self-explanatory.

Common

TreeTrunk

TreeCrown

Grass

Basic

Normal

Super

This is an overarching one which contains every material related to super.

Skin

Multi

Old Terrain

This is both Terrain and Terrain Simple.

Old Roads

Water

This is an overarching one which contains every material related to water.

Sky

Sky clouds

Sky stars

Sky flares

Particle Sprite

Particle Streak

Enfusion World

  • Show Bullet
  • > Bullet
    • Draw Char Ctrl
    • Draw Simple Char Ctrl
    • Max. Collider Distance
    • Draw Bullet shape
    • Draw Bullet wireframe
    • Draw Bullet shape AABB
    • Draw obj center of mass
    • Draw Bullet contacts
    • Force sleep Bullet
    • Show stats
  • Show bodies LAlt + NUM 6

Show Bullet

Turns on the debug visualization of Bullet.

Bullet as in the physics engine, not the ammunition of a weapon.

Bullet

Settings to tweak the debug visualization of Bullet.

Draw Char Ctrl

Enable/disable the visualizations for the character controller used by the player. Depends on Draw Bullet shape.

Draw Simple Char Ctrl

Enable/disable the visualizations for the character controller used by AI. Depends on Draw Bullet shape.

Max. Collider Distance

The maximum distance between an object and the player to visualize the collider. Depends on Draw Bullet shape.

Available options: 0, 1, 2, 5, 10, 20, 50, 100, 200, 500
This is 0 by default, since this visualization is quite expensive. Game performance might be compromised when setting this to a large distance.

Draw Bullet shape

Enable/disable the visualizations of bullet colliders.

Draw Bullet wireframe

Enable/disable the visualizations of bullet colliders to be only wireframe. Depends on Draw Bullet shape.

Draw Bullet shape AABB

Enable/disable the visualizations of axis aligned bounding box of colliders.

Draw obj center of mass

Enable/disable the visualizations of objects center of mass.

Draw Bullet contacts

Enable/disable the visualizations of colliders making contact.

Force sleep Bullet

Enable/disable force sleeping all bodies.

Show stats

Enable/disable showing debug stats. When disabling, the last shown stats will be shown for 10 more seconds before disappearing.

Available Options: disabled, basic, all

Show bodies

Enable/disable the visualizations of Bullet bodies.

Available Options: disabled, only, all

DayZ render

Game

AI

Sounds

  • Show playing samples
  • Show system info

Show playing samples

Debug for debugging playing sounds.

Available options: none, ImGui, DbgUI, Engine
Option Info
none Default: no debug
ImGui Separate screen debug made with dear ImGui, newest iteration, created to have all pros of the other two while fixing the cons.

The settings of the separate window will be stored in profiles under the names "playing_sounds_imgui.ini" and "playing_sounds_imgui.bin"

DbgUI Legacy
  • Pros: Filtering by category, more readable
  • Cons: Goes off screen, does not include vehicle category
Engine Legacy
  • Pros: Includes stats at the top, shows in real time what is happening with colour coding, contains a lot of data
  • Cons: Goes off screen, no legend for the colour coding

Show system info

Shows on-screen debug stats of the sound system. Used to be paired with "Show playing samples" DbgUI option, is also visible in the other two "Show playing samples" options.

Sound system info