EZBoards - Generate kneeboards (flights, comms, stpts, weather) from briefings
-
@CriticalMass yes u will have to edit the script for every theater i think.
Like i said i know its not right but it works for panama.Havent tried other theaters .
Remember i have no clue about puters,software etc.
Just an oldfart here .
Theaters without their own object folders,i havent a clue if will work.
Panama has its own objects folders. -
Good morning
I have three cases:
1.- Baltic and Georgia - Using WDP
2.- Korea, using this bat:
@ECHO OFF ECHO [33m------------------------------------------------------------------------------- ECHO [33mEZBoards - Instant single-click briefing to kneeboards conversion for Falcon BMS. ECHO [33mBy "Logic". See ReadMe.txt for documentation. ECHO [33m-------------------------------------------------------------------------------[0m REM /// Get BASEDIR and PILOTBIN from Registry. REM /// Note: This part will need to be updated in future versions of BMS. SET REGPATH="HKLM\SOFTWARE\WOW6432Node\Benchmark Sims\Falcon BMS 4.36" REM /// delims is a TAB followed by a space FOR /F "tokens=2* delims= " %%A IN ('REG QUERY %REGPATH% /v baseDir') DO SET BASEDIR=%%B ECHO BASEDIR=%BASEDIR% FOR /F "tokens=2* delims= " %%A IN ('REG QUERY %REGPATH% /v PilotCallsign') DO SET PILOTBIN=%%B ECHO PILOTBIN=%PILOTBIN% FOR /F "tokens=2* delims= " %%A IN ('REG QUERY %REGPATH% /v curTheater') DO SET THEATER=%%B ECHO THEATER=%THEATER% REM /// Convert the REG_BINARY callsign from Registry to a string SETLOCAL EnableDelayedExpansion ECHO !PILOTBIN!> temp.hex CALL certutil -decodehex temp.hex str.txt >nul ENDLOCAL SET /p PILOTCALLSIGN=<str.txt ( DEL temp.hex & DEL str.txt )>nul ECHO PILOTCALLSIGN=%PILOTCALLSIGN% SET BRIEFINGTXT="%BASEDIR%\User\Briefings\briefing.txt" ECHO BRIEFINGTXT=%BRIEFINGTXT% IF NOT EXIST %BRIEFINGTXT% ( ECHO [91mCould not find briefing.txt file. Did you press PRINT?[0m GOTO ERROR ) SET CALLSIGNINI="%BASEDIR%\User\Config\%PILOTCALLSIGN%.ini" ECHO CALLSIGNINI=%CALLSIGNINI% IF NOT EXIST %CALLSIGNINI% ( ECHO [91mCould not find callsign DTC file. You won't get target steerpoints.[0m SET CALLSIGNINI= ) REM /// Step 1: Generate HTML version of briefing data to briefing.html . ECHO [33mGenerating HTML version of briefing data to briefing.html.[0m bin\xbrief.exe %BRIEFINGTXT% %CALLSIGNINI% > briefing.html IF %ERRORLEVEL% NEQ 0 GOTO ERROR ECHO [32mOk.[0m REM /// If you don't need the kneeboards but just want to have the HTML, REM /// you may as well exit here by uncommenting the following line. REM GOTO SUCCESS REM /// Step 2: Render the HTML file to briefing.png image. ECHO [33mRendering HTML to briefing.png image.[0m bin\wkhtmltoimage.exe --width 2048 --height 1554 --disable-smart-width --enable-local-file-access briefing.html briefing.png IF %ERRORLEVEL% NEQ 0 GOTO ERROR ECHO [32mOk.[0m REM /// Step 3: Convert the briefing.png image file to a DDS texture file briefing.DDS . ECHO [33mConverting the briefing.png image file to a DDS texture file.[0m bin\texconv.exe -f DXT1 -m 1 -y -h 2048 briefing.png IF NOT EXIST briefing.DDS GOTO ERROR ECHO [32mOk.[0m REM /// Step 4: Copy the DDS texture file to the kneeboard texture file in the target path. REM /// Kneeboards textures are in files 7982.dds and following. REM /// One file holds a left+right double page for the kneeboards. SET TARGETFILE=7982.dds REM /// Path to theater dds files. This might not work for every theater. REM /// When in doubt, ask the theater author or the community. SET THEATERPATH=%BASEDIR%\Data\TerrData\Objects\KoreaObj REM /// Might try this alternative for theaters that come with their own dds files: REM SET THEATERPATH=%BASEDIR%\Data\Add-On %THEATER%\TerrData\Objects\KoreaObj SET TARGET="%THEATERPATH%\%TARGETFILE%" ECHO TARGET=%TARGET% IF NOT EXIST %TARGET% ( ECHO [91mTarget file doesn't exist. Check theater.[0m GOTO ERROR ) REM /// Make a backup if not already done. SET BACKUPFILE=%TARGETFILE%.bak SET BACKUPTARGET="%THEATERPATH%\%BACKUPFILE%" IF NOT EXIST %BACKUPTARGET% ( ECHO [33mMaking a backup copy of %TARGETFILE% to %BACKUPTARGET%.[0m COPY /y %TARGET% %BACKUPTARGET% ) REM /// Do the actual copy. ECHO [33mCopying the result to %TARGET%.[0m COPY /y briefing.DDS %TARGET% IF %ERRORLEVEL% NEQ 0 GOTO ERROR ECHO [32mOk.[0m REM /// Successful exit. :SUCCESS ECHO [42m[97mSUCCESS.[0m IF "%~1"=="" PAUSE EXIT 0 REM /// Exit on error. :ERROR ECHO [41m[97m### ERROR ###[0m IF "%~1"=="" PAUSE EXIT 1
3.- Balkans, Israel and now, Panamá, using this bat
@ECHO OFF ECHO [33m------------------------------------------------------------------------------- ECHO [33mEZBoards - Instant single-click briefing to kneeboards conversion for Falcon BMS. ECHO [33mBy "Logic". See ReadMe.txt for documentation. ECHO [33m-------------------------------------------------------------------------------[0m REM /// Get BASEDIR and PILOTBIN from Registry. REM /// Note: This part will need to be updated in future versions of BMS. SET REGPATH="HKLM\SOFTWARE\WOW6432Node\Benchmark Sims\Falcon BMS 4.36" REM /// delims is a TAB followed by a space FOR /F "tokens=2* delims= " %%A IN ('REG QUERY %REGPATH% /v baseDir') DO SET BASEDIR=%%B ECHO BASEDIR=%BASEDIR% FOR /F "tokens=2* delims= " %%A IN ('REG QUERY %REGPATH% /v PilotCallsign') DO SET PILOTBIN=%%B ECHO PILOTBIN=%PILOTBIN% FOR /F "tokens=2* delims= " %%A IN ('REG QUERY %REGPATH% /v curTheater') DO SET THEATER=%%B ECHO THEATER=%THEATER% REM /// Convert the REG_BINARY callsign from Registry to a string SETLOCAL EnableDelayedExpansion ECHO !PILOTBIN!> temp.hex CALL certutil -decodehex temp.hex str.txt >nul ENDLOCAL SET /p PILOTCALLSIGN=<str.txt ( DEL temp.hex & DEL str.txt )>nul ECHO PILOTCALLSIGN=%PILOTCALLSIGN% SET BRIEFINGTXT="%BASEDIR%\User\Briefings\briefing.txt" ECHO BRIEFINGTXT=%BRIEFINGTXT% IF NOT EXIST %BRIEFINGTXT% ( ECHO [91mCould not find briefing.txt file. Did you press PRINT?[0m GOTO ERROR ) SET CALLSIGNINI="%BASEDIR%\User\Config\%PILOTCALLSIGN%.ini" ECHO CALLSIGNINI=%CALLSIGNINI% IF NOT EXIST %CALLSIGNINI% ( ECHO [91mCould not find callsign DTC file. You won't get target steerpoints.[0m SET CALLSIGNINI= ) REM /// Step 1: Generate HTML version of briefing data to briefing.html . ECHO [33mGenerating HTML version of briefing data to briefing.html.[0m bin\xbrief.exe %BRIEFINGTXT% %CALLSIGNINI% > briefing.html IF %ERRORLEVEL% NEQ 0 GOTO ERROR ECHO [32mOk.[0m REM /// If you don't need the kneeboards but just want to have the HTML, REM /// you may as well exit here by uncommenting the following line. REM GOTO SUCCESS REM /// Step 2: Render the HTML file to briefing.png image. ECHO [33mRendering HTML to briefing.png image.[0m bin\wkhtmltoimage.exe --width 2048 --height 1554 --disable-smart-width --enable-local-file-access briefing.html briefing.png IF %ERRORLEVEL% NEQ 0 GOTO ERROR ECHO [32mOk.[0m REM /// Step 3: Convert the briefing.png image file to a DDS texture file briefing.DDS . ECHO [33mConverting the briefing.png image file to a DDS texture file.[0m bin\texconv.exe -f DXT1 -m 1 -y -h 2048 briefing.png IF NOT EXIST briefing.DDS GOTO ERROR ECHO [32mOk.[0m REM /// Step 4: Copy the DDS texture file to the kneeboard texture file in the target path. REM /// Kneeboards textures are in files 7982.dds and following. REM /// One file holds a left+right double page for the kneeboards. SET TARGETFILE=7982.dds REM /// Path to theater dds files. This might not work for every theater. REM /// When in doubt, ask the theater author or the community. REM SET THEATERPATH=%BASEDIR%\Data\TerrData\Objects\KoreaObj REM /// Might try this alternative for theaters that come with their own dds files: SET THEATERPATH=%BASEDIR%\Data\Add-On %THEATER%\TerrData\Objects\KoreaObj SET TARGET="%THEATERPATH%\%TARGETFILE%" ECHO TARGET=%TARGET% IF NOT EXIST %TARGET% ( ECHO [91mTarget file doesn't exist. Check theater.[0m GOTO ERROR ) REM /// Make a backup if not already done. SET BACKUPFILE=%TARGETFILE%.bak SET BACKUPTARGET="%THEATERPATH%\%BACKUPFILE%" IF NOT EXIST %BACKUPTARGET% ( ECHO [33mMaking a backup copy of %TARGETFILE% to %BACKUPTARGET%.[0m COPY /y %TARGET% %BACKUPTARGET% ) REM /// Do the actual copy. ECHO [33mCopying the result to %TARGET%.[0m COPY /y briefing.DDS %TARGET% IF %ERRORLEVEL% NEQ 0 GOTO ERROR ECHO [32mOk.[0m REM /// Successful exit. :SUCCESS ECHO [42m[97mSUCCESS.[0m IF "%~1"=="" PAUSE EXIT 0 REM /// Exit on error. :ERROR ECHO [41m[97m### ERROR ###[0m IF "%~1"=="" PAUSE EXIT 1
-
Hello guys.
I am sorry, but have to admit, this whole theater thing is a mess.
I am not a theater developer and to this day haven’t figured out the many ways the texture files can be scattered across the file tree depending on what theater you run.
I thought the IF-THEN-clause would be sufficiently generic to catch most cases, but it doesnt do it for all.
Unfortunately it also obfuscates the logic for non-programmers.So in the next version of EZBoards, I’ll replace this with a single line that works for KTO and add some REM-comments for other known theaters that would have to be uncommented individually to make it work for others.
(Like in the second BAT @Skorp showed above, which I sent to him)If we could collectively build a list of target locations (of the kneeboards texture file) that work for the 3rd party theaters, that would be awesome! I need your help on this.
-
Hey Logic,
I just tried your tool for the first time over the last couple of days and it’s very useful, thanks for creating it.
Would it be possible to modify the batch script to accept a command line parameter indicating the theatre ezboards should update the kneeboards for? Then maybe we could create a simple map and use some form of gui scripting framework (pyqt comes to mind) to have the user select the theatre and then call ezboards with the correct parameter.
Maybe a simple dictionary could be used like so:
installed_theatres = { kto = { "has_koreaobj" : True, "dds_output_dir : "D:\bms\bms436\Data..." ... }, ito = { "has_koreaobj" : False, "dds_output_dir : "D:\bms\bms436\Data\ITO\..." ...
and so forth. It would also be great if we could pull the current theatre from the registry or wherever it’s stored, and support multiple BMS installs (for those of us who regularly beta test new internal releases, but that’s easily handled by keeping 2 ezboard installs separately).
Just an idea…
All the best,
Uwe
-
@Logic said in EZBoards - Instant single-click briefing to kneeboards conversion:
Hello guys.
I am sorry, but have to admit, this whole theater thing is a mess.
If we could collectively build a list of target locations (of the kneeboards texture file) that work for the 3rd party theaters, that would be awesome! I need your help on this.I feel your pain, but easy to solve as you suggested .
Below is a couple of lines which gets a path from a Theaters.txt file, by finding the name of the theater and comparing with BMS current theater.
In the file EZBOARDS.BAT REPLACE............ IF "%THEATER%"=="Korea KTO" ( SET THEATERPATH=%BASEDIR%\Data\TerrData\Objects\KoreaObj ) ELSE ( IF EXIST %BASEDIR%\Data\Add-On %THEATER%\TerrData\Objects\KoreaObj\ ( SET THEATERPATH=%BASEDIR%\Data\Add-On %THEATER%\TerrData\Objects\KoreaObj ELSE ( SET THEATERPATH=%BASEDIR%\Data\TerrData\Objects\KoreaObj ) ) SET TARGET="%THEATERPATH%\%TARGETFILE%" ECHO TARGET=%TARGET% WITH............... for /F "usebackq tokens=1-2 delims=," %%g in (Theaters.txt) do if %%g == %THEATER% SET THEATERPATH= "%BASEDIR%%%h" ECHO THEATERPATH=%THEATERPATH% for /F "usebackq tokens=1-2 delims=," %%g in (Theaters.txt) do if %%g == %THEATER% SET TARGET= "%BASEDIR%%%h\%TARGETFILE%" ECHO TARGET=%TARGET% Make the file Theaters.TXT with the entries below in the same folder. (Note the theater names must match those in the registry, including Case) "KOREA KTO",\Data\TerrData\Objects\KoreaObj "Korea TvT",\Data\TerrData\Objects\KoreaObj "Balkans",\Data\Add-On Balkans\TerrData\Objects\KoreaObj "Israel",\Data\Add-On Israel\TerrData\Objects\KoreaObj "Kuwait",\Data\Add-On Kuwait\TerrData\Objects\KoreaObj "Battle for Kuwait 1.1.1",\Data\Add-On Battle for Kuwait\TerrData\objects\KoreaObj "EMF",\Data\Add-On emf\TerrData\Objects\KoreaObj "Panama",\Data\Add-On Panama\TerrData\Objects\KoreaObj "Israel 1980s v1.7",\Data\Add-On Israel\TerrData\Objects\KoreaObj "HeliPack 0.1",\Data\Add-On emf\TerrData\Objects\KoreaObj
-
New version v10! (Download link in top post)
Changes:- Added new theater management by look up in external file Theaters.txt (Thanks to Fish44!)
This will not solve all theater problems, but make it easier to help and extend. - Reorder code, so briefing html and png will be generated even if texture file cannot for some reason.
- Added new theater management by look up in external file Theaters.txt (Thanks to Fish44!)
-
@Logic
Thank you very much. -
Running the latest versions. I get an error message “The required library hostfxr.dll could not be found”
Ideas?
According to the error window, this file should be in the ezboards bin folder. It is not.
Running Windows 11. -
@MnMailman `Strange as nothing changed with regard to that. Did it work with previous versions of EZBoards or is this your first time you use it on that PC?
Might be related to missing .NET runtime.
As the Readme says:
EZBoards requires .NET Core Runtime 3.1
You can download and install it from here: https://dotnet.microsoft.com/download/dotnet-core/3.1 .
Tell me if it helped, otherwise might be particular to Win11 which I can’t test. -
@Logic Yes, it worked before on this pc with 11. I’ll try the runtime link anyway though; sometimes windows “updates” screw things up so you never know.
-
@Logic Re-installing both the x64 and x86 .net versions did the trick. Who knows; Windows strikes again.
Thanks for the help and great BMS addition. -
Good morning
Thx for this program, Logic
Unfortunately V10 doesn´t work for me.
Target is always to Korea, in Balcans and Israel theaters.
Only download file and extract in Tools folder.
Regards.
-
@Skorp
Don’t have experience with these theaters.
But the general rule of thumb should always be the same now:
Go to BMS base folder.
Search for the file “7982.dds”.
You will get multiple results. Pick the path adequate for your theater and edit EZBoards “Theaters.txt” accordingly.
Then tell the community if it worked! -
I´m sure I´m an idiot but I´ve had two tests:
“KOREA KTO”,S:\Falcon BMS 4.36\Data\TerrData\Objects\KoreaObj
“Korea TvT”,S:\Falcon BMS 4.36\Data\TerrData\Objects\KoreaObj
“Balkans”,S:\Falcon BMS 4.36\Data\Add-On Balkans\TerrData\Objects\KoreaObjand
S:\Falcon BMS 4.36\Data\TerrData\Objects\KoreaObj
S:\Falcon BMS 4.36\Data\TerrData\Objects\KoreaObj
S:\Falcon BMS 4.36\Data\Add-On Balkans\TerrData\Objects\KoreaObjFail, always copy to Korea theater
-
@Skorp You must check what EZBoards says on the line
THEATER=
(Near to the top in console output). This is the string that must be matched.
(Edit: forget what i set about falcon lounge, i confounded with Baltic) -
No, there seems to be a bug somehwere indeed. Need to look into it.
Edit: Got it. Expect fix this evening.
-
Version 10.1 released (DL link in top post), that fixes the theater bug seen by @Skorp .
-
@Logic okay, thank you.
As far as I’m not an english man sometimes is difficult to understand your instructions
Regards
-
@Skorp I’m neither, so there is good reasons to believe Englishmen wouldn’t understand my instructions any better!
-
@Logic
Tested on Falcon Online a few minutes ago and … it works .
Thanks again.