BEHAVIOR VIEWS
The Behaviors Debug window is mainly comprised of the different views that can be used to see and debug the contents of a model behavior XML file. The available view tabs will change depending on the XML that is chosen from the Global Filters section of the window, however you can open/close any of them - whether appropriate or not - from the View menu. Below you can find information on each of the tabs.
Logs
From this tab view you can revise model verification and the XML parsing logs (per file). These logs will display information, warnings, and errors related to the parsing of the XML file(s). You can filter these logs by type using the corresponding check boxes at the top, or you filter using a specific word or phrase. Note that you can hover the mouse over an error or warning to get more information on where that event occurred, getting more context in the process.
If the XML has any models associated with it, then you will have a Model Loading Info tab, which shows all the missing nodes and animation warnings related to the model. Note that you can you can right-click the tab header to filter the output, as well as copy the entire output to the clipboard.
Parameters
This tab will usually need to be enabled from the View menu and before it will show any information you will need to go to the Parser and enabled Parameter Logging. Once you have done that, you should rebuild the package to populate the window with parameters (if available). Note that after enabling the option (and before rebuilding the package), you can select a specific SimObject XML to get the parameters from in the Parsing menu. This is recommended when working in areas with a large number of SimObjects otherwise there could be an overwhelming number of parameters shown.
Parameters are listed in a hierarchical tree structure, and yellow entries correspond to scopes. To see what type of scope the parameter name refers to, you can hover the mouse over it:
Parameters come in 4 "types", with each one being coloured as follows:
- White: This the default and denotes a parameter created in place within a given scope
- Pink: This is for a parameter which has been saved in the corresponding scope, and will only ever be visible inside of
<SaveParameters>
scopes.
- Red: This is a parameter which has been loaded from a save.
- Green: This denotes a parameter returned by a
<ParametersFn>
.
Inspector
The inspector is a convenient view that gives you a quick and easy-to-parse overview of any given component structure. The view is made up of two parts, the component access list on the left, and the data overview on the right. Clicking any option in the component access list will open the corresponding data overview with the component path as the filter. Note that you can filter the list view by using a string in the input field at the top (which can be cleared using the Clear
button).
Listed components can be inspected using the following different methods:
- By selecting the component from the list on the left.
- By selecting the component in the list from the History menu.
- By clicking on a child or parent component name in the data overview on the right.
- By right clicking and selecting the option "Open in inspector" in the data overview list on the right (when appropriate).
- By hovering over a mouserect in the simulation view and then pressing
Ctrl
+G
on the keyboard.
Components
The component tab overview is a quick way to access any relevant information about all the components. This view can be filtered by either component name or by node name using the input fields at the top (and you can use the Clear
button to remove the filter). Each component listed can be expanded to show the following information:
- ID: This shows the component ID as defined in XML.
- Path: This shows the full component ID, formulated as a "path" of concatenated ID's from the component root.
- Parent Component: The parent component of the selected component (if any).
- Child Component(s): Then child or children component(s) of the selected component (if any).
Note that you can right-click on any component to get the following pop-up menu:
From this menu you can open the component in the Inspector view, or set the component name as a filter.
Animations
The animation view tab is a quick way to access any relevant information about an animation from the model behavior. This view can be filtered by either component name or by animation name using the input fields at the top (and you can use the Clear
button to remove the filter). Clicking on any listed component will expand it's information and present the following data:
- Common Data: This shows data that is common to all animation nodes.
- Autoplay - Will be True if the animation plays automatically, or False otherwise.
- Random Start - Will be True if the animation start percentage is random, or False otherwise.
- Blend Weight - This shows the animation blend weight from 0.0 to 1.0.
- Framerate - This shows the animation frame rate.
- Events: This shows any events associated with the animation, as defined by the
<EventTrigger>
element.- SoundEvent - This shows
<SoundEvent />
data. - EffectEvent - This shows
<EffectEvent />
data.
- SoundEvent - This shows
- Interpolation Data: This section shows a number of data points related to the way the animation will be interpolated.
- Accumulate - This will be True if the value is accumulated, or False if it is set.
- Wrap - This will be True if the animation should wrap (ie: going over the given range will carry over to the other extreme of the range), or False otherwise.
- Lag - This gives the current animation lag, clamped to the maximum delta an animation can execute per second. For example, a value of 300 means 300 units/second maximum, and so to move from 0 to 100 the animation will take
(1/300) * 100s = 1/3
of a second. - Value Range - This shows the range of the computed value. The current value will be divided by the range to drive the animation percentage.
- Code: Here you can see the governing code for the animation. You can right-click on the code to get the option to copy it to the clipboard, or to open it in the Code Editor (this will additionally update any dynamic parameters - see the Note On Dynamic Parameters).
- Current Value: This shows the current value over the range, with the corresponding percentage value in parenthesis. You can right click this field to be shown a slider that can then be used to set an override for the value (useful for testing).
If you change the value in this way, there will be a button showingClear Force Value
, which can be used to remove the forced value and return it to the current simulation state.
Mouserects
The mouserect data overview is a quick way to access any relevant information about a mouserect. This view can be filtered by either component name or by node name using the input fields at the top (and you can use the Clear
button to remove the filter).
- Mouse Flags: Here you get a list of the different mouse flags that the mouserect will react to.
- Temporary Lock Flags: This lists the mouse flags which will trigger a lock when not using the locked control scheme.
- Cursor: This shows the different cursor status for the node.
- Default: the default cursor is being displayed.
- Position (Up/Down/Left/Right): the cursor to display at the given position relative to the node. If it says "None" then this is unused.
- Center Radius: The radius around the node for which the cursor is considered centered.
- Lock Enabled: If True then the lock should be enabled for this mouserect, and if False then lock is disabled.
- Disabled: This will be True if the mouserect is disabled, or False otherwise.
- Disabled In VR: This will be True if the mouserect is disabled while in VR, or False otherwise.
- Disabled With Motion Controllers: This will be True if the mouserect is disabled while using motion controllers, or False otherwise.
- Highlight Node ID: This shows the ID of the Node to highlight when the cursor hovers over this mouserect.
- Code: Here you can see the governing code for the mouserect. You can right-click on the code to get the option to copy it to the clipboard, or to open it in the Code Editor (this will additionally update any dynamic parameters - see the Note On Dynamic Parameters).
- Tooltip Title: This shows the localised tooltip title.
- Tooltip Table: This is a table showing information about the tooltip for the mouserect.
- Description: Localized tooltip description.
- Value: The tooltip value field.
- InputEvent Value: The value of the corresponding input event.
Material
The materials overview is a quick way to access relevant information about a material being used by the selected component. This view can be filtered by either component name or by node name using the input fields at the top (and you can use the Clear
button to remove the filter). Each component with a material will show the following details:
- Common Data: This section shows some common data that all materials all have in common.
- Override base emissive: If set to True, the original node emissive has been normalized, if False it has not.
- Materials Data: This will list the material emissives of the node currently loaded. Values shown will be RGB values, in nits.
- Interpolation Data: This section shows a number of data points related to the way the material animation will be interpolated.
- Accumulate - This will be True if the value is accumulated, or False if it is set.
- Wrap - This will be True if the animation should wrap (ie: going over the given range will carry over to the other extreme of the range), or False otherwise.
- Lag - This gives the current animation lag, clamped to the maximum delta an animation can execute per second. For example, a value of 300 means 300 units/second maximum, and so to move from 0 to 100 the animation will take
(1/300) * 100s = 1/3
of a second. - Value Range - This shows the range of the computed value. The current value will be divided by the range to drive the animation percentage.
- Code: Here you can see the governing code for the animation. You can right-click on the code to get the option to copy it to the clipboard, or to open it in the Code Editor (this will additionally update any dynamic parameters - see the Note On Dynamic Parameters).
- Current Value: This shows the current value over the range, with the corresponding percentage value in parenthesis. You can right click this field to be shown a slider that can then be used to set an override for the value (useful for testing).
If you change the value in this way, there will be a button showingClear Force Value
, which can be used to remove the forced value and return it to the current simulation state.
- Photogrammetric Scaled Value: This is the end value after the scaled photogrammetric value has been applied (the value depends on the time of day).
Visibility
The visibility codes overview is a quick way to access any relevant information about the visibility of a node. This view can be filtered by either component name or by node name using the input fields at the top (and you can use the Clear
button to remove the filter). Each component with a visibility data will show the following details:
- Common Data: This section shows some common data that all nodes with visibility calls have in common.
- Default Visible: True if the node is visible by default
- Update Once: True is the code is only executed once
- Interpolation Data: This section shows a number of data points related to the way the visibility will be interpolated.
- Accumulate - This will be True if the value is accumulated, or False if it is set.
- Wrap - This will be True if the animation should wrap (ie: going over the given range will carry over to the other extreme of the range), or False otherwise.
- Lag - This gives the current animation lag, clamped to the maximum delta an animation can execute per second. For example, a value of 300 means 300 units/second maximum, and so to move from 0 to 100 the animation will take
(1/300) * 100s = 1/3
of a second. - Value Range - This shows the range of the computed value. The current value will be divided by the range to drive the animation percentage.
- Code: Here you can see the governing code for the visibility. You can right-click on the code to get the option to copy it to the clipboard, or to open it in the Code Editor (this will additionally update any dynamic parameters - see the Note On Dynamic Parameters).
- Current Value: This shows the current value over the range, with the corresponding percentage value in parenthesis. You can right click this field to be shown a slider that can then be used to set an override for the value (useful for testing).
If you change the value in this way, there will be a button showingClear Force Value
, which can be used to remove the forced value and return it to the current simulation state.
Updates
The updates data overview is a quick way to access any relevant information about the update code for a component. This view can be filtered by component name using the input field at the top (and you can use the Clear
button to remove the filter). Each component with code will show the following details:
- Common Data: This section shows some common data for the nodes with code.
- Update once - If this is shown, then the update code is only run once.
- Update Frequency - If this is shown, then the update code runs at the given frequency.
- InteractionFlags - This set of flags show their interaction model for which the update will run.
- Last update: If the node has run this code, then this will show the time since the last update occurred.
- Code: Here you can see the governing code for the node. You can right-click on the code to get the option to copy it to the clipboard, or to open it in the Code Editor (this will additionally update any dynamic parameters - see the Note On Dynamic Parameters).
Exec
: You can click this button to execute the code immediately.
VFX
The VFXs data overview is a quick way to access any relevant information about VFX that are assigned to a node. This view can be filtered by component name using the input field at the top (and you can use the Clear
button to remove the filter). Each component with code will show the following details:
- Common Data: This section shows some common data for the nodes with VFX.
- GUID - This shows the GUID of the VFX, which can be copied to the clipboard using right-click.
- MinEmissionTime - Here you can see the minimum time the VFX has to be emitting when activated. If this is not applicable to the VFX (ie: it is a burst effect), then a value of -1 will be shown.
- ContactPoint - This shows the ID value of the contact point that the VFX is attached to. If no contact point is used then -1 will be shown.
- Location Data: This section shows location information for where the VFX is being spawned, as defined by the
<Offset>
element.- Offset - This is the offset position fom the origin or the contact point, expressed a an XYZ vector.
- Rotation - This is the offset rotation fom the origin or the contact point, expressed using the PBH format.
- Graph Parameters: This section is shown when the VFX node has
<GraphParameters>
defined, and it shows the various parameters and their values.
- Enabled Entries: This section lists the type of ground contact that will spawn the VFX (see
<SurfaceTypeFXEntry />
for more information).
- VisualEffect handle: Here you can find information about the current status of the VFX.
- Valid - This will show True if the VFX handle is valid, ie: it has been spawned in the world.
- Playing - This will show True if the VFX is currently playing.
- DoneEmitting - This will show True if the VFX is finished emitting.
Input Events
The Input Events data overview is a quick way to access any relevant information about the different defined input events. This view can be filtered by event name using the input field at the top (and you can use the Clear
button to remove the filter). Each component with code will show the following details:
- Value: The very first set of input fields are the current input event value, and the units it should be consider using. Both these are settable for debugging purposes.
- ValueCode: The value code is the code that will be executed whenever the input event runs the
<Init>
code or receives an event (<Inc>
,<Dec>
, or<Set>
). If you right click on the shown code, you will get the following options:- Copy To Clipboard
- Format code (this simply prettifies the code a bit)
- Open in Code Editor (this will additionally update any dynamic parameters - see the Note On Dynamic Parameters).
- Data: This section offers a more expansive view of the input event data such as the code for each event and the associated tooltips info. It can have the following sub-sections:
<Inc>
,<Dec>
, or<Set>
: For each of the events the code will be shown, and you can right-click the snippet to edit it in the Code Editor (this will additionally update any dynamic parameters - see the Note On Dynamic Parameters). Each event will also display any associated parameters, showing the last value the parameter held, which will be updated in realtime.<Init>
: For the initialisation event the code will be shown, and you can right-click the snippet to edit it in the Code Editor.<Tooltip>
: This section will show information about tooltips associated with the input event.- Default and Lockable interactions: These can be expanded to show the associated icon, tooltip and flags for each one.
- Additionally the view shows the tooltip description and value. If the tooltip is dynamic, this will be the current one.
- Binding(s): This sub-section will list all of the available bindings by name. For each binding all the information that pertains to it - such as the event it’s targeting (Inc Dec, Set) and the parameters it is setting - will be shown, and there will be an input field that can be used to set a specific value if required for debugging (add the value then press
Execute
). For dynamic parameters - such as a toggle event - the code and value evaluated is shown instead of an input field, and you can right-click on the code to open it in the Code Editor. Any edited code can then be executed by pressing theExecute
button. Using theExecute
button works the same way as triggering them directly from a mouserect interaction.
Bindings are all colour coded as follows:- Orange bindings are the base bindings for Inc, Dec and Set events (if used directly).
- White bindings (no background) are aliases.
- Blue bindings are event IDs.
- Variable(s): Here the view lists all of the variables being watched by the debug view, and any changes in a variables value will trigger the Init code to run again. Variables will be coloured as follows:
- Orange variables are local variables
- Green variables are SimVars
Variables
The variables view list all global, local, and component variables used by the SimObject being debugged (these can be either get or set in the behavior XML). Each listed variable has its own input field so that you can edit the value for debugging and testing.
Tooltips
This view shows a list of all of the tooltips currently in use by the selected behavior SimObject. You can right-click an ID to copy it to your clipboard. Note that an ID displayed in red means that it wasn't found, and you will need to make sure that the tooltip has been created and the package it belongs to has been rebuilt.