Skip to content

Dash Studio Bindings

Morgan Gardner edited this page Nov 11, 2018 · 11 revisions

Dash Studio offers a way to change dynamically any property of a component when a dash is running.

Binding Button and binding status

Basically you can make any component property dynamic, offering a fx (function) button in the property grid :

The binding buttons appears in two colours defining the binding status of the property :

  • Gray : Notifies when there is no binding defined on the property, the value will not change when the dash is running
  • Green : Notifies when a binding is defined on the property, the value will change when the dash is running using the binding formula.

Binding Editor overview

When you click on the binding button the binding editor will open :

  1. Binding mode :
    • None : No binding, The property will be "static" (gray)
    • Formula : Define a binding. The property will be "dynamic" (green)
  2. Ncalc Formula : You define here the formula which will get evaluated when the dash is running.
  3. Insert function : Opens a ncalc function reference library
  4. Insert property : Opens the available properties list, default display mode will hide game specific properties,check Show game specific properties to show them.
  5. Result format *: Allows to define a format string compliant with the .net framework strings. Some common formats are suggested in the dropdown list. See "Result formatting" for detailed informations
  6. Raw Result : Will show the result (or errors) of the ncalc formula.
  7. Formatted result *: Allows to preview the result after formatting.

*Only available when the target component property is a text property

Result formatting

The data coming from the game or as a result of a formula may not display properly. You may want to format it. There are differently formatted strings depending of the data types.

  • Numbers :
Format string Result
0 123
0.00 123.45
00000 00123
0\% 123%
0000.0000 0123.4568
#,#.00 1,234.46
#.######## 123.45678

Bindings refresh rate

When you define a binding on a property the formula will be evaluated for each data refresh incoming from the game up to the display refresh rate (~60 FPS).

Sometimes, you may want a component to refresh slower :

  • For readability
  • For performances

The common property RenderingSkip allows you to change this behavior. Here how RenderingSkip influences the refresh rate of the component

  • A value if 1 will tell the binding engine to skip 1 frame on 2.
  • A value if 2 will tell the binding engine to skip 2 frames on 3.
  • A value if 10 will tell the binding engine to skip 9 frames on 10.
  • ....
Clone this wiki locally