EZBoards - Generate kneeboards (flights, comms, stpts, weather) from briefings
-
@anthonc9647 Sorry, Sir, I snipped a picture of the message :
-
@anthonc9647 Hi. Is the briefing.txt file at the exact path as written?
-
@Logic Yes, sir.
-
@anthonc9647 said in EZBoards - Instant single-click briefing to kneeboards conversion:
@Logic Yes, sir.
you have
Falcon BMS 4.36
insideFalcon BMS 4.36
insidefalcon
?!please tell me
falcon
isn’t theFalcon 4.0
install - if so it will lead to much anguish, and why the two nested BMS folders? -
For selecting the correct object folder to save to, I think this works
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: REM SET THEATERPATH=%BASEDIR%\Data\Add-On %THEATER%\TerrData\Objects\KoreaObj IF EXIST "%BASEDIR%\Data\Add-On %THEATER%\TerrData\Objects\KoreaObj\%TARGETFILE%" ( SET THEATERPATH=%BASEDIR%\Data\Add-On %THEATER%\TerrData\Objects\KoreaObj ) ELSE ( SET THEATERPATH=%BASEDIR%\Data\TerrData\Objects\KoreaObj )
I’ve included the REM block to show I have REMed one line.
-
@CriticalMass So, I have a falcon folder which holds 4.36, inside 4.36 holds all folder concerning 4.36 and then the subfolder which actually holds the game. Falcon/Falcon 4.36 has the setup file and falcon 4.36 main folder (the game). This is so I can keep my setup folder and game folder together.
-
@CriticalMass So no, original Falcon 4.0 is not in the 4.36 folder.
-
@Logic hello logic,cant get this to work in panama. i just cant get it show on my knee boards in sim,what am i missing ?
its version 9,works in korea.
thx
Wait,i might have got it,wont know till i jump in the pit.
At least i got it to regonize panama in the target list.
yep, i got it working,thanks anyhow. -
@oldtommyboy said in EZBoards - Instant single-click briefing to kneeboards conversion:
@Logic hello logic,cant get this to work in panama. i just cant get it show on my knee boards in sim,what am i missing ?
its version 9,works in korea.
thx
Wait,i might have got it,wont know till i jump in the pit.
At least i got it to regonize panama in the target list.
yep, i got it working,thanks anyhow.Can you let the community know how you got it to work as it may inform others.
As you can see from my previous post, I changed the script for EZBOARDS to make certain theatres work,
-
@CriticalMass yep, i followed your script.
I edited my file like yours.
Except i edited the target line too. Fiqured if i messed up,just delete it and open a fresh download of the script.
Im sure i shouldnt have to do this but until logic fixes the problem,it works for me.
Let me check something today.
Im hesitant to tell others this works when im sure its not right .
Im assuming every theater would have to be edited in the script that you want to play.
Hopefully logic will chime in with the correct procedure. -
@CriticalMass ok,all i did was edit the target line.
Im not saying its right but it works for me. -
@oldtommyboy This will only work for the Panama theatre though, you’ll need to change the Target path every time you change the theatre, but if it works…
Also, I believe the IF block is redundant in this case.
tl;dr
Some theatres have their ownTerrData\Objects\KoreaObj
folders, this is where the Kneeboards DDS files will be stored. I’m testing to see if this is true then if so I’m making sure the DDS are created there, if not they are created in the standard (KTO) folder. -
@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.