Skip to content

Commit 33d54b2

Browse files
committed
Merge master
2 parents fd7feb8 + fc33bae commit 33d54b2

17 files changed

+397
-104
lines changed

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
"mathjax",
8080
"Matra",
8181
"mdbook",
82+
"MFCD",
8283
"modders",
8384
"Modelviewer",
8485
"MSFS",
@@ -141,6 +142,7 @@
141142
"TISEO",
142143
"uncaging",
143144
"undervoltage",
145+
"Viewports",
144146
"VISIDENT",
145147
"Vought",
146148
"waveplate",

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Each commit should be small, self-contained, and should solve only one problem.
105105

106106
Each commit name and message should be clear, concise, and informative: Please
107107
consider checking these resources:
108-
[writing a commit message](https://chris.beams.io/posts/git-commit/) and
108+
[writing a commit message](https://www.w3schools.com/git/git_commit.asp) and
109109
[writing a good commit message](https://dev.to/chrissiemhrk/git-commit-message-5e21)
110110

111111
### Create a pull request

src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
- [Character](./dcs/character.md)
186186
- [Mission Editor](./dcs/mission_editor.md)
187187
- [Training Missions](./dcs/training_missions.md)
188+
- [Screen Export](./dcs/screen_export.md)
188189
- [Modding](./dcs/modding/overview.md)
189190
- [Jester](./dcs/modding/jester/overview.md)
190191
- [Voice Files](./dcs/modding/jester/voice_files.md)

src/cockpit/pilot/left_console/front_section.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,22 +131,25 @@ the lower UHF antenna.
131131

132132
### LCOSS Switch
133133

134-
A two position switch (<num>3</num>) that selects which computer system is installed on this
135-
aircraft.
134+
A two position switch (<num>3</num>) that would select which
135+
system displays their output on the gunsights combining glass.
136136

137-
- ARS-107
138-
- ASG-26
137+
- ARS-107, an older RWR system
138+
- ASG-26, the F-4Es original gunsight system
139139

140-
The switch is a leftover and not connected.
140+
The switch is a leftover and was only used on
141+
aircraft equipped with the APS-107 RWR system.
141142

142143
### DVST Switch
143144

144-
A two-position switch (<num>4</num>) that selects which radar system is installed on this aircraft.
145+
A two-position switch (<num>4</num>) that would select
146+
which system displays their output on the DVST screen.
145147

146-
- APS-107
147-
- APQ-120
148+
- APS-107, an older RWR system
149+
- APQ-120, the radar system
148150

149-
The switch is a leftover and not connected.
151+
The switch is a leftover and not connected on aircraft equipped
152+
with the DSCG instead of the previous DVST screen.
150153

151154
## Inboard Engine Control Panel
152155

src/dcs/efb.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,13 @@ blocking flow through the pipe.
122122

123123
Further, the following flags can be displayed in the lower left corner:
124124

125-
- AAR; the door for
125+
* AAR; the door for
126126
[air-to-air-refueling](../systems/engines_and_fuel_systems/fuel_system.md#air-refueling-system)
127127
is open
128-
- DUMP;
128+
* DUMP;
129129
[fuel dumping](../systems/engines_and_fuel_systems/fuel_system.md#fuel-dump-system)
130130
is active
131-
- AUTO-XFER; the system for
131+
* AUTO-XFER; the system for
132132
[automatic-transfer](../systems/engines_and_fuel_systems/fuel_system.md#transfer-sequence)
133133
is active (a low fuel emergency system)
134134

@@ -148,9 +148,9 @@ half.
148148
Wires connecting the generators and buses indicate if and how power is supplied,
149149
with color representing the rating:
150150

151-
- Red; 3-phased 115V AC
152-
- Green; 1-phased 14/28V AC
153-
- Blue; 1-phased 28V DC
151+
* Red; 3-phased 115V AC
152+
* Green; 1-phased 14/28V AC
153+
* Blue; 1-phased 28V DC
154154

155155
### Transformers
156156

src/dcs/screen_export.md

Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
# Screen Export
2+
3+
DCS offers exporting and arranging in-game screens on multi-monitor setups. For
4+
example displaying the content of the DSCG screen on a second monitor.
5+
6+
![Setup with exported RWR](../img/screen_export_f4_rwr.jpg) (_Setup with RWR
7+
exported to a small monitor_)
8+
9+
This allows for making great setups, in particular when owning some smaller
10+
extra monitors; and is especially useful for SimPit builders.
11+
12+
![SimPit Example](../img/screen_export_simpit.jpg)
13+
14+
DCS interface for this expects users to define what is called a **Viewport**.
15+
The F-4E currently supports this feature for the following screens:
16+
17+
| Screen | Viewport Name |
18+
| ------------ | ------------------- |
19+
| DSCG (Pilot) | `F4E_Dscg_Pilot` |
20+
| DSCG (WSO) | `F4E_Dscg_Wso` |
21+
| HUD | `F4E_HeadUpDisplay` |
22+
| RWR | `F4E_Rwr` |
23+
24+
> 💡 The DSCG screen of the cockpit the player is currently not sitting in will
25+
> not render any content.
26+
>
27+
> In order to work, the DSCG screens currently require also exporting the
28+
> viewport `F4E_Dscg_Tv`, a width and height of `1` pixel suffices though.
29+
30+
> 🚧 Support for other screens is in development:
31+
>
32+
> - `F4E_Cameras_AvtrTimeIndicatorPilot`
33+
> - `F4E_Cameras_AvtrTimeIndicatorWso`
34+
> - `F4E_EoTgtDesignatorSystem_BitDisplay`
35+
> - `F4E_EoTgtDesignatorSystem_RangeIndicator`
36+
> - `F4E_UhfRadio_FrequencyChannelIndicator`
37+
38+
Of special interest are also programs such as
39+
[Helios](https://github.com/HeliosVirtualCockpit/Helios/wiki) which simplify the
40+
entire process and lets users create even complex setups with ease.
41+
42+
## Viewport
43+
44+
In order to make use of the feature, players can define a special file in their
45+
Saved Games `MonitorSetup` folder for DCS, for example:
46+
47+
> `C:\Users\John Doe\Saved Games\DCS\Config\MonitorSetup\`
48+
49+
Such a file would for example be called `MySetup.lua` and look similar to this:
50+
51+
```lua
52+
_ = function(p)
53+
return p
54+
end
55+
56+
name = _("MySetup")
57+
Description = "This is my setup"
58+
59+
Viewports = {
60+
Center = {
61+
x = 0,
62+
y = 0,
63+
width = 3840,
64+
height = 2160,
65+
viewDx = 0,
66+
viewDy = 0,
67+
aspect = 3840 / 2160
68+
}
69+
}
70+
71+
GU_MAIN_VIEWPORT = {
72+
x = 0,
73+
y = 0,
74+
width = 3840,
75+
height = 2160
76+
}
77+
78+
UIMainView = {
79+
x = 0,
80+
y = 0,
81+
width = 3840,
82+
height = 2160
83+
}
84+
85+
function reconfigure_for_unit(unit_type)
86+
if unit_type == "F-14B" or unit_type == "F-14A-135-GR" or unit_type == "F-14A-135-GR-Early" then
87+
F14_VDI = {
88+
x = 1016,
89+
y = 1450,
90+
width = 525,
91+
height = 525
92+
}
93+
94+
F14_HSD = {
95+
x = 1016,
96+
y = 1985,
97+
width = 525,
98+
height = 525
99+
}
100+
elseif unit_type == "M-2000C" then
101+
RIGHT_MFCD = {
102+
x = 879,
103+
y = 1580,
104+
width = 800,
105+
height = 800
106+
}
107+
elseif unit_type == "F-4E-45MC" then
108+
F4E_Dscg_Pilot = {
109+
x = 3840,
110+
y = 2160 - 1527,
111+
width = 300,
112+
height = 300
113+
}
114+
F4E_Dscg_Wso = {
115+
x = 3840 + 300,
116+
y = 2160 - 1527,
117+
width = 300,
118+
height = 300
119+
}
120+
F4E_HeadUpDisplay = {
121+
x = 3840 + 300 + 300,
122+
y = 2160 - 1527,
123+
width = 300,
124+
height = 300
125+
}
126+
F4E_Rwr = {
127+
x = 3840 + 300 + 300 + 300,
128+
y = 2160 - 1527,
129+
width = 300,
130+
height = 300
131+
}
132+
133+
F4E_Dscg_Tv = {
134+
x = 3840,
135+
y = 2160 - 1527 + 300,
136+
width = 1,
137+
height = 1
138+
}
139+
else
140+
LEFT_MFCD = {
141+
x = 3840,
142+
y = 2160 - 1527,
143+
width = 700,
144+
height = 700
145+
}
146+
147+
RIGHT_MFCD = {
148+
x = 3840 + 700,
149+
y = 2160 - 1527,
150+
width = 700,
151+
height = 700
152+
}
153+
end
154+
end
155+
```
156+
157+
Once created, this setup will now appear within DCS for selection in the
158+
graphics settings:
159+
160+
![DCS Settings](../img/screen_export_dcs_settings.jpg)
161+
162+
The way the setup works is that you first sum up the resolution of all monitors
163+
that you want to use combined. This will be the target resolution to render DCS
164+
at. The example uses two monitors, one at a `3840x2160` resolution and the other
165+
at `2715x1527`, combined that makes a virtual monitor resolution of `6555x2160`.
166+
167+
![Multi-Monitor Setup](../img/screen_export_multi_monitor_resolutions.jpg)
168+
169+
The exact arrangement is defined in the Windows Display Settings:
170+
171+
![Windows Settings](../img/screen_export_windows_monitor.jpg)
172+
173+
In the setup-file, one has to now define several viewports for DCS. This tells
174+
the game where on the virtual monitor to render which scene. The format looks as
175+
follows:
176+
177+
```lua
178+
NAME_OF_THE_VIEWPORT = {
179+
x = ..., -- x-coordinate of top left corner, in pixels
180+
y = ..., -- y-coordinate of top left corner, in pixels
181+
width = ..., -- width to use for the scene, in pixels
182+
height = ... -- height to use for the scene, in pixels
183+
}
184+
```
185+
186+
The main scenery of DCS is defined and placed on the virtual monitor through the
187+
following viewports:
188+
189+
```lua
190+
Viewports = {
191+
Center = {
192+
x = 0,
193+
y = 0,
194+
width = 3840,
195+
height = 2160,
196+
viewDx = 0,
197+
viewDy = 0,
198+
aspect = 3840 / 2160
199+
}
200+
}
201+
202+
GU_MAIN_VIEWPORT = {
203+
x = 0,
204+
y = 0,
205+
width = 3840,
206+
height = 2160
207+
}
208+
209+
UIMainView = {
210+
x = 0,
211+
y = 0,
212+
width = 3840,
213+
height = 2160
214+
}
215+
```
216+
217+
In the example setup this will render the main scenery of the game on the
218+
`3840x2160` monitor arranged on the left.
219+
220+
The following section in the file lets you define custom viewports per aircraft
221+
type:
222+
223+
```lua
224+
function reconfigure_for_unit(unit_type)
225+
if unit_type == "F-14B" or unit_type == "F-14A-135-GR" or unit_type == "F-14A-135-GR-Early" then
226+
...
227+
elseif unit_type == "M-2000C" then
228+
...
229+
elseif unit_type == "F-4E-45MC" then
230+
...
231+
else
232+
... -- any other aircraft
233+
end
234+
end
235+
```
236+
237+
Within this construct one can now declare custom viewports, for example
238+
239+
```lua
240+
F4E_Dscg_Pilot = {
241+
x = 3840,
242+
y = 2160 - 1527,
243+
width = 300,
244+
height = 300
245+
}
246+
```
247+
248+
will place the DSCG screen on the second monitor as follows:
249+
250+
![DSCG Placement](../img/screen_export_multi_dscg_example.jpg)
251+
252+
## Modding
253+
254+
Viewports, once defined by users in their monitor setups, are then picked up by
255+
the modules code in the respective _Indicator-lua-files_, which can be found for
256+
example in:
257+
258+
> `C:\Programs\DCS\Mods\aircraft\F-4E\Cockpit\Scripts`
259+
260+
As an example, the HUD declares at the end of
261+
`Scripts\HeadUpDisplay\Indicator\init.lua` the following two lines
262+
263+
```lua
264+
dofile(LockOn_Options.common_script_path .. "ViewportHandling.lua")
265+
try_find_assigned_viewport("F4E_HeadUpDisplay")
266+
```
267+
268+
which will try to see if the user created a viewport called `F4E_HeadUpDisplay`
269+
and if so, render the scene there.
270+
271+
Modders can follow this approach to easily create new viewports in modules that
272+
do not officially support them yet.

src/dcs/special_options.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ This file is automatically created at
178178

179179
when launching the Phantom for the first time.
180180

181+
> 💡 Deleting the file will lead to it being recreated on the next launch.
182+
> That way, one can have it updated to the newest set of rules -
183+
> should there have been any changes.
184+
181185
Selecting **Offline** will disable the Virtual Browser and any other HB UI
182186
features and elements that require an active online connection.
183187

29.2 KB
Loading

src/img/screen_export_f4_rwr.jpg

97.5 KB
Loading
19.7 KB
Loading

0 commit comments

Comments
 (0)