Skip to content

DCS BIOS Decoder

Jerker Dahlblom edited this page Nov 14, 2023 · 15 revisions

DCS-BIOS Decoder (Stream Deck & DCS-BIOS)

This function enables Stream Deck to show different button images and display dynamic text based on current DCS-BIOS values. Additionally it provides the option to "decode" DCS-BIOS values, apply mathematical transformations and produce custom output based on user defined formulas.

Take a look at this video (the link is timestamped the next few minutes shows off the feature) for a great example of this feature in action. https://youtu.be/lgTJa-NUnM8?t=573

You'll notice the images on the buttons are automatically synced with the actual status of the buttons and switches in game which unleashes the real power of the Stream Deck.

Getting started

Select a Stream Deck Button and choose DCS-BIOS Decoder.

dcs_bios_decoder_sd_ui

The DCS-BIOS Decoder window will be shown.

dcs_bios_decoder_ui

DCS-BIOS Data Type

The DCS-BIOS Control Type option declares how the incoming DCS-BIOS value should be treated, is it a number or a string of text.

dcs_bios_decoder_ui_datatypes

Depending which type is chosen some functionality will be enabled or disabled. Particularly Rule Formatting and Formulas perform arithmetic functions so can only operate with numbers.

If DCS-BIOS sends an integer type all options will be available.

If DCS-BIOS sends a string type e.g. "Open" or "Closed" or "Locked" then Rule Formatting and Formulas will be disabled.

If DCS-BIOS sends a string which is always a string representation of a number e.g. "1" then that can be converted into a number by selecting the check box and thus can be used with Rule Formatting and Formulas. Be careful though as using this with strings that are not numbers can cause errors.

Formulas

You can use a formula to transform the DCS-BIOS value before it is further processed by the DCS-BIOS Decoder.

Raw Decoding Example

dcs_bios_decoder_ui_raw

This DCS-BIOS Decoder is configured to show the raw DCS-BIOS value for ALT_MSL_FT. It will show this suffixed with "ft".

So if the value from DCS-BIOS is 20000 the button will show 20000 ft.

The actual DCS-BIOS value is held by the placeholder {dcs-bios}. To get the placeholder inserted click Click to Insert {dcs-bios} or type it manually.

Rule Formatting

By setting up rules you can have different outputs depending on what the value of the DCS-BIOS value is. You can have a set of images for each position a cockpit switch has and have them shown as in the cockpit. You can also have different text associated with DCS-BIOS values or a combination of the two with text overlays on custom images.

Add first rule

Click here to add new rule.

dcs_bios_decoder_ui_rules_chosen

dcs_bios_encoder_ui_in_the_air

This rule will check whether the DCS-BIOS value for ALT_MSL_FT is greater than 0, if it is then the text "We are in the air!" will be shown. You could also chose an image to be shown when this rule is true, or text overlaid on an image. Note that here we do not show the actual value, only the text.

Click Ok to save the rule.

Add second rule

dcs_bios_encoder_ui_rules_on_the_ground

And this rule will check whether the DCS-BIOS value for ALT_MSL_FT is equal to 0 and show the text "We are on the ground!" if the rule is true.

Final DCS-BIOS Decoder configuration

dcs_bios_decoder_ui_rules_added

Here both rules are now listed and it clearly states the condition and output for each rule.

Click Ok to save the DCS-BIOS Decoder configuration.

Then click Accept Changes and save the profile.

It should now look like this.

dcs_bios_decoder_sd_ui_added