The profile language
Everything a profile does is said with a handful of small rules. This page is each
one: what it means, what it is for, and an example you can move. The words in
bold are the editor's; the ones in code are what
the profile file stores.
Each lamp and backlight on a panel gets a row. The row picks cockpit signals and tests them, and the answer is a brightness, 0 up to what the lamp takes.
A page puts fields on a screen. Each field is a run of cells and a chain of pieces, typed text or readings, and the answer is characters.
Tests: when a signal lights a lamp
A condition is one signal and one test. The signal is anything DCS-BIOS exports for the aircraft, not only its lamps: a switch, a selector, a gauge, a lighting knob. The test is chosen from what that signal can report, so a two position switch is offered is exactly with its positions named, and a gauge is offered numbers inside its range.
On is how bright the lamp goes when the test holds, and at zero is what it shows when the answer is zero. An indicator takes only on or off; a dimmer takes 0 to 255.
| Editor | File | Offered for | Use it for |
|---|---|---|---|
| is exactly | {"equals": 1} |
switches, selectors, lamps | A cockpit lamp copied across, a switch in one position. |
| is not | {"not_equals": 1} |
switches, selectors, lamps | Anything but one value: a station whose light is not green. |
| is one of | {"in": [1, 2]} |
switches, selectors | A selector where several positions mean the same thing to you. |
| is at least | {"gte": 32768} |
gauges, knobs | Past a threshold: a needle over the red line, a flap past half. |
| is at most | {"lte": 1000} |
gauges, knobs | Under a threshold: fuel low, pressure lost. |
| is between | {"between": [100, 4000]} |
gauges, knobs | A band: in the green arc, inside a detent. Both ends count. |
| scaled across | {"scale": [0, 65535]} |
dimmers, knobs, gauges | No threshold: brightness follows the signal. Backlights, and warbird rheostats that dim as they turn up. |
Scaled across ignores On: the lamp goes from off to fully bright as the signal moves through the range you give. To keep a backlight dimmer than full, use Always on with a lower On instead, or scale across a wider range.
A scale's first number is where the lamp is dimmest and its second is where it is
fully bright, so putting the higher number first makes a lamp that dims as the knob
turns up. Some warbird rheostats work that way: the Mosquito's flood lights are black
until 5237, fully bright there, and barely lit at 65535.
Dark below keeps the lamp off under a value, which is how that knob
goes from off straight to full. Pick L_SIDE_L_DIM above to try it. A
plain scale is written [0, 65535] as it always was; one that dims as it
turns up, or has a cut-off, is written by name:
{"dimmest": 65535, "full": 5237, "dark_below": 5237}.
And, or: several tests on one lamp
+ Add condition (and) adds a test that must also hold. + Add alternative (or) adds another way to light the lamp. Together they let you say "light it when this and this are true, or when that is true", which covers any rule you need.
Two rules decide the brightness. Within a group, the dimmest condition wins. For simple on and off lamps that means every condition must hold. For a backlight it works like a switch in front of a dimmer: the switch has to be on before the dimmer counts. Between alternatives, the brightest group wins. For on and off lamps that means any one group is enough.
Each group ends with While this holds, the lamp is: as DCS shows it, flashing slowly (twice a second) or flashing fast (three times a second). As DCS shows it adds nothing: the lamp follows its signal, so it flashes wherever the cockpit lamp does. Every flash is lit for exactly half its time, and every lamp flashing at one rate flashes in step. A flashing group in its dark half counts as not holding, so an unflashed group that also holds keeps the lamp lit. Flash only a lamp DCS keeps steady: where the cockpit lamp already flashes, its signal does too and the lamp follows it, and a flash on top beats against it.
A HALF flaps lamp keyed to flap position alone flickers as the flaps pass the half angle on the way down. Adding the lever as a second condition removes it: by the time the flaps reach that angle, the lever already reads DN.
Numbers are illustrative, to show the idea. Move the lever UP to DN and watch the lamp.
The shipped AH-64D Master Caution. DCS-BIOS exports both crew stations at once,
so each alternative pairs a seat's caution lamp with SEAT_POSITION.
The F-14 has a console knob per seat and no signal saying which seat is taken. With the brightest one, dimming means turning both knobs down. With the one whose signal moved last, the knob in your hand drives the lamp, and in multiplayer either crew takes the panels back by turning theirs.
Until someone actually turns a knob, the brightest one lights the lamp. The knob positions that arrive when the aircraft loads don't count as turning. Which knob moved last is forgotten when you change aircraft.
A hook lamp held steady by the lamp test, and flashing while a warning holds. Both lit, the unflashed group wins.
Other ways to drive a lamp
A row drives its lamp in exactly one of four ways: conditions, alternatives, Always on or Match another lamp. The editor offers each only where it can mean something, so a row never carries two answers to one question.
Always on
Lit whenever the aircraft is loaded, reading nothing. On a dimmer, On sets a fixed brightness.
{ "led": "SL", "always": true }
{ "led": "Backlight", "always": true, "on": 175 }
Use it for a lamp with no cockpit counterpart, or a steady backlight. Every shipped profile holds its backlights at 175 this way.
Match another lamp
Follow another dimmer, on this panel or another, as a link rather than a copy. Change the one, and every lamp matching it follows.
{ "device": "CarrierAce_MFD_L",
"led": "INST_PNL_Backlight",
"same_as": "INST_PNL_Backlight",
"same_as_device": "CarrierAce_MFD_C" }
Use it for every backlight on one knob. Both lamps must be dimmers, and the lamp you match must have its own conditions rather than matching a third one.
At zero: a floor
When a row resolves to zero, the lamp shows its At zero value instead. A lamp matching another keeps its own.
{ "led": "FLAG", "same_as": "Backlight",
"off": 255 }
Use it for lamps that must stay readable by day. On the PTO2,
SL and FLAG control whether other lamps can show at all,
so at 0 they hide them, and the editor warns you.
Not set yet
A row with no conditions is a placeholder: listed, not decided, and driven off. Not the same as Always on, which is a decision.
{ "led": "Master_Caution", "conditions": [] }
Use it for nothing on purpose: it is simply how a lamp nobody has looked at yet reads.
The PTO2 backlight is scaled across the A-10C console knob. The PTO2 FLAG gate and an MFD backlight both Match another lamp. Turn the knob to zero with and without FLAG's floor.
Leaving a panel alone, and one panel under several names
Drive this panel
Untick it and this aircraft never writes to that panel, which keeps whatever was last on it. Its rows stay in the profile, so ticking it again restores them. A panel with no rows at all is different: it is still turned off when the aircraft loads.
"disabled_devices": ["CarrierAce_UFC"]
Use it for the UFC and ICP on one swing arm, where one covers the other, or leaving a panel to another program.
Uses
WinWing sells some panels under several names: the MCDU and each PFP as Captain, Co-Pilot and Observer, the MFD as L, C and R. uses points one name at another of the same hardware, which is then driven with a copy of its lamps, pages and slots.
"follows": {
"MCDU_CoPilot": "MCDU_Captain",
"CarrierAce_MFD_L": "CarrierAce_MFD_C" }
Use it for setting a panel up once. Only one step: a panel that uses another can't itself be used by a third. Every shipped profile does this.
Fields: a run of cells, a chain of pieces
A field names its cells, and fills them with pieces drawn end to end. The MCDU's screen is 24 cells across and 14 rows down, counted from 0, so row 2 is cells 24 to 47.
There are four kinds of piece. + text is characters you type. + a reading is a signal. + a gap draws blanks and takes whatever room the rest of the line leaves. + a rule is a gap drawn as dashes, with an optional label set in its middle.
A chain only holds still at its ends, so a reading that loses a digit pulls everything after it left. Width holds a piece to that many cells whatever it reads, and aligned says where the value sits in its box: right for a number that counts down, so the digits stay pinned.
Some signal names in these line examples stand in for whatever reading you pick; the editor lists your aircraft's own.
Gap
Measured last. Two or more split what is left evenly, the odd cell going to the earlier ones. With a width, a gap is a fixed spacer instead.
Use it for a label at the left and its value hard against the right, without counting blanks.
Rule and label
Dashes corner to corner. A label is centred with a blank each side, the odd dash going left, and needs its own length plus four cells.
Use it for naming a block of rows the way a CDU does:
----- TRIM -----.
Too long
A field has a fixed number of cells. Anything that doesn't fit is cut off on the side away from its alignment, so a right-aligned field loses its left end. The editor tells you ahead of time how many characters won't fit. A decimal point takes a cell of its own.
Use it for nothing: fix it with a width, a shorter label, or a wider run.
Readings: from what DCS sends to what the screen draws
DCS-BIOS sends a needle as a position, 0 to 65535, and says nothing about what the dial is marked with. as sent draws the number it sends, which suits counters and selectors. converted turns the needle's position into the numbers printed on the dial, in a straight line from one end to the other, and then applies each step below in order.
That works when the marks on the dial are evenly spaced. Some are not. On the Mosquito's fuel gauges the marks bunch up towards the top, so the first 20 gallons take up much more of the dial than the last 20. Converting that in one straight line puts the reading off by a dozen gallons.
For a dial like that, give it one row per section between two marks: "from here to here on the dial, it reads 0 to 20", then "from here to here, it reads 20 to 60", and so on. Use Learn to see the number DCS-BIOS sends with the needle on a mark. When your rows don't reach the end of the dial yet, the editor offers a button to add the rest. Each row can also have its own colour and small text, so the last few gallons can show in red.
Gauges lists every gauge in each aircraft that DCS-BIOS
sends: an even dial's reads and an uneven one's rows, worked out from
the module's own files, ready to copy. The editor fills a reading in from them when
you pick a gauge's signal. They are parsed, not flown, so check them with Learn.
A counter that always shows every drum, like 001 on a 000 to 999 barrel, wants digits set to 3. It fills the missing digits with zeros.
| Step | File | What it does |
|---|---|---|
| 1. Convert | reads |
What the dial reads at each end. May start below zero ([-10, 12])
or run backwards ([100, 0]).
|
| 1. Convert | conversions |
Instead of reads, for a dial with uneven marks. One row per
section of the dial: {"raw": [0, 12910], "reads": [0, 20]}. Each
can have its own colour and small text. A part of the dial no row covers shows
the nearest row's end, and the editor warns about it. Rows for many aircraft
are on Gauges.
|
| 2. Round | decimals, round |
To that many places, to the nearest, "down" so a drum shows a
digit only once it has reached it, or "up" to show the next step
as soon as it has started towards it.
|
| 3. Wrap | wrap |
Start again from 0 every this many. After rounding, so 359.7 draws 0, not 360. |
| 4. Draw as | value_aliases |
A word in place of the number, matched against what the face reads.
"3", "0,1,2" or a band "-1.5..-0.1",
ends included. Each may take a colour, small text, or inverse. Tick
the reading to keep the number and only colour it,
such as a radar altimeter turning red below 50:
{"reading": true, "colour": "red"}. A blank drawn inverse is a
solid block, so steps one blank wider each draw a bar: the Huey's ADF signal
strength, red to green.
|
| 5. Sign | abs |
without its sign: only when no alias claimed the reading, so a band written for negatives still matches. |
| 6. Pad | digits |
Fill with zeros up to this many digits, so a 000 to 999 counter at 1 shows
001.
|
Two aliases claiming one reading is a caution, and the lower one draws. An alias
wholly outside
reads is a caution too: it usually means the band was written in
DCS-BIOS's own numbers (0 to 65535) instead of the numbers on the dial. Two rows
covering the same part of the dial is a caution, and the lower one wins. A piece can't
have both reads and conversions, and a row's DCS-BIOS
numbers can't run from higher to lower (the dial's numbers can).
Switches: a reading another knob decides
Some readings only make sense next to a knob. The Huey's ADF needle sends 0 to 65535 whichever band is selected, and the band switch says what that means: 190 to 400 kHz in the first band, 400 to 850 in the second, 850 to 1750 in the third. One reading can't say all three.
A switch is a piece that picks how it draws from another signal's position. You say which signal decides, then give it a case for each position. Each case is a reading, or a short chain of pieces, with every setting a reading has: its own range, rows for an uneven dial, words, colours. Only one case draws at a time.
Each case builds what it draws from the same pieces a field has: a reading, a shared result, text or a gap, each in its own colour.
A position no case names draws nothing, unless there is an else case, which draws for every position the others leave. The field is as wide as its widest case, which is what the fit warning measures.
The signal that decides doesn't have to be a knob. Set it to
converted to and it is read the way a reading is, from one
end of the dial to the other, rounded to a whole number. Cases are then written in
the dial's units, which is how a label turns amber below 3000 lb of fuel and red
below 1000: "0..999", "1000..2999" and else,
each a piece of text in its own colour.
A case can be just text, with no second signal at all: OFF in amber, ADF and ANT in green.
A switch inside a case is refused, and so is a switch with no cases. Two cases naming
one position, a case past the positions the selector sends, and positions with no case
and no else are cautions: the lower case draws, the case never draws, and
those positions draw nothing.
Shared results and conditions: made once, used anywhere
A reading shapes its own number, so two pages showing the same fuel say how in full, twice. A shared result says it once. It sits in Shared Results at the top of the profile, above the panels, and any page on the aircraft can draw it: pick a shared result as a piece of a field.
A shared result is one or more parts, each one DCS-BIOS signal shaped exactly the way a reading is: converted, rounded, wrapped, padded, and given a fixed number of cells. The parts are laid side by side as characters. Three fuel drums, each converted to 0 to 10, rounded down and wrapped at 10, read as one number.
A part can also be a symbol, which reads nothing and is laid down as typed: digits, a point, or a sign. A radio's megahertz, a ., then its hundredths padded to two digits read 30.50, and stay a number its bands can match. Words stay with the piece drawing it.
Each part after the first can be added to the parts before instead of laid beside them. The Mi-8's course arrow rides on a compass card that turns with the heading, so DCS-BIOS sends the arrow's angle from the top of the case, not the course. The heading plus that angle is the course, and each total wrapping at 360 starts again from 0 past north.
The chain runs left to right, so the two mix. The Mi-8's ADF has a hundreds knob, a tens knob and a fine tuning knob. The first two laid side by side read 1 and 50 as 150, and the fine tuning, -10 to 20, added to that reads 155. Each part is still shaped on its own first. A total is drawn to the most decimal places either side of it shows, padded to the total's own digits, and a part laid after it is laid beside the total. A symbol part that is added is a number, such as 180 for the reciprocal.
Adding also counts. The Kiowa shows its rotor RPM as a chiclet ladder, a bar of lamps that fills from the bottom, and DCS-BIOS sends each chiclet as its own signal, 0 to 65535 as the display dims. Read each from 0 to 1, rounded up so a dimmed chiclet still counts, and add them all: the total is how many are lit. An alias for each total turns the count into text, in the colour of the top lit chiclet. The bottom chiclet only shows the ladder is on, so it is left out. The gauges page lists every ladder with its colours, and copies its parts.
A part reading a switch can give each position a number for each position: a switch sending 0 and 1 can read 1 and 5. Each number is drawn as typed, so 05 keeps its zero and 1.50 its two places.
Rounding each drum on its own is the point. A drum that is rolling is already partway to its next digit, so the thousands drum at 1.6 means 1, not 2. Rounded to the nearest, it would show the next thousand while the drum beside it still reads 6.
Only the number lives in the shared result. How it is drawn, its words, colour and small text, belongs to the piece drawing it, so two pages can draw one result two ways. Bands match the characters read as a number. Nothing draws until every part has arrived, since a number missing a digit is a different number. Each one has a note for saying what it is for.
Like a page, a shared result is saved on its own with Save result, and every profile on the aircraft shares it. It travels with a page that is exported, and one that is drawn on a page cannot be deleted until it is taken off.
When one signal is shaped the same way in two or more readings on the aircraft's pages, a banner at the top of Shared Results says so. Make a shared result makes it once and points every one of those readings at it, each keeping its own words, colour and box. It first lists every reading it changes and every slot showing those pages, and saves the result and the pages together, or none of them. Only readings that shape a number count, so a knob drawn as words beside the same knob drawn as a number is left alone. The banner goes once they are made one, or when you close it.
A switch can be decided by a shared result too. Its number
is already shaped, so the cases are written in its units: a FUEL label that reads
..999 in red and 1000.. in green. Each case is a test, in
the words a lamp uses: is exactly, is one of, is between,
is at least, is at most, or is
anything else.
Shared conditions, in their own section under Shared Results, are tests written once, the way a lamp's are, for every lamp that repeats one cockpit lamp. The CH-47's master caution shows on every CDU and on the PTO2, and which cockpit lamp it follows depends on your seat. Write that once, then choose Use shared conditions on each lamp. Each test lights the lamp or leaves it off, and a scale dims it, so the answer is on or off unless it is a dimmer. Every lamp keeps its own brightness.
A lamp lit by shared conditions can add to them, one way or the other. + Add condition (and) adds tests that must hold as well, and + Add alternative (or) adds other ways for it to light. Once you use one, only that one extends; take its last condition away to get both back. A throttle's A/G lamp can light by the BOMB READY shared with the bomb lamps, or by master arm on with the rockets armed, so it says when any air to ground weapon is ready. A flash set on conditions you add takes over from the shared ones, and with alternatives, your choice of the brightest or the latest picks among the shared ones and yours alike.
When two or more lamps in the profile light by exactly the same conditions, a banner at the top of Shared Conditions says so. Make shared conditions lists the lamps, saves the conditions and switches the lamps to them, each keeping its own brightness. The profile is then unsaved, for you to save with the rest of your edits.
A piece drawing a shared result can't also shape the number: decimals or a range on it are refused, since the result already says. It can draw it without its sign: the result keeps the sign, so its aliases still tell left from right, and only the screen loses it. A shared result the aircraft doesn't have is refused too, and so is a part with no signal chosen. A result that adds its parts refuses a symbol part that isn't a number, and a part reading characters, since neither has a number to add. A lamp can't light by a shared result, and a screen can't draw shared conditions. Either one, used by a page or a lamp, can't be deleted until it is taken off.
What each glass can do
Three kinds of screen take pages. The MCDU and the PFPs share a text grid that draws from a font, in colour and in two sizes. The UFC is a segment display, and the ICP's DED a pixel screen. Both the text grid and the DED draw inverse. Some settings mean something on only one of them, and the check refuses them elsewhere rather than drawing nothing.
Colour
Per piece, on a text grid. White when left out. An alias can carry its own, so a reading can turn red in a band.
Small
The small font, for a CDU's labels. Fonts draw fewer characters small than large, so both sizes are checked.
Text grid only.
Colours from a signal
A second signal, one letter per cell, and what each letter means. The CH-47F sends
each CDU line with a _COLOR twin.
"colours": { "source": "PLT_CDU_LINE1_COLOR",
"codes": { "g": "green", "p": "magenta" } }
Substitutions
One character for another inside a line, for symbols a module sends as stand-ins.
The A-10C sends its arrows as » and «.
"replace": { "~": "█" }
Any display. On a text grid every character it writes must be in the font.
Aliases
A whole value the glass cannot draw, swapped for one it can. The Hornet sends its
scratchpad cursor as -- where the cockpit shows _.
"aliases": { "--": "_" }
Not the same as draw as: that one matches a number's reading.
Inverse
A filled box with the character knocked out. inverse draws a whole
piece that way, typed text or a reading. format names a second text
signal marking which cells, as the F-16 DED sends DED_L1_FORMAT.
Glass that draws inverse: the MCDU, the PFPs and the DED.
Seat
Restrict a field to one crew station. Two fields may share cells only when their seats differ, since both stations cannot be occupied at once.
{ "cells": "34", "source": "PLT_CHAN", "seat": 0 },
{ "cells": "34", "source": "OP_CHAN", "seat": 1 }
Only on the five modules that export SEAT_POSITION.
Font
An aircraft with a CDU of its own draws in that CDU's font, which wins. Any other aircraft takes the profile's font, picked in the editor.
Text grid only. Until a font is picked, there is nothing to check a field against.
Pages and slots
A page is a named screen's worth of fields, kept in a library beside the profiles and shared by every profile on the same module. A profile gives each screen one slot per page key, and ticks the one a mission starts on. A slot shows a page, a Blank screen, or is Disabled.
In flight, hold the page modifier from Settings and press a page key. Blank takes the screen dark; Disabled ignores the key and leaves the page up. The modifier counts only when it is the only one of Ctrl, Shift and Alt held, and DCS still sees the press, so keep that combination unbound there.
| Screen | Page keys, slots 1 to 6 |
|---|---|
| MCDU, PFP-3N, PFP-7, PFP-4 | LSK 1L, 2L, 3L, 4L, 5L, 6L |
| CarrierAce UFC | A/P, IFF, TCN, ILS, D/N, BCN |
| ViperAce ICP (DED) | COM 1, COM 2, IFF, LIST, A-A, A-G |
| Kneeboard CDU | 1, 2, 3, 4, 5, 6 on the keyboard's top row |
In the profile
"screens": { "MCDU_Captain": { "start": 1, "slots": [ { "page": "a10c-cdu", "key": null }, { "page": null, "key": null }, // Blank null, null, null, null // Disabled ] } }
What to know
A page works in every profile on its module, and only on the screen it was drawn for. Editing a page changes it everywhere it is used; the editor lists where. Save page writes the page, apart from the profile's Save.
Deleting a page disables its slots rather than blanking them, so no screen goes dark that nobody chose to. The page shown is not remembered: each aircraft load starts on the start slot.