Jump to content

TM Warthog/MFD Layout Tool + Vector Templates


Recommended Posts

Hi all

 

I wrote a little tool in AHK to generate SVG layout charts for the TM Warthog and F16 MFD:s.

 

The tool takes a .csv file in which the key mappings are defined and generates several SVG files in different formats from a set of templates.

 

NEW in V2:

Added a script to autogenerate key map definition files from DCS via the exported HTML key mapping files. Do you bindings in DCS, export the bindings as HTML and run the scripts andyou will have a nice layout in about 2 min.

 

All the graphics are vectors => you can scale as much as you like without any loss in quality.

 

If you change a binding, simply update the .csv file and generate an updated set of SVG.

 

The SVG:s are generated from templates that you can change the layout in if you like, or you can make you own templates for other joysticks/controllers.

 

/Oakes

 

--------------------------

Readme.txt

 

Version history

1_00

Initial Release

 

1_01

Added US size templates

Added MFD 3 and 4 Templates

Added MFD 3 and 4 tags to TMWH_F16MFD_Template_v1_01.csv

Added MFD 3 and 4 tags to Example_DCSA10C_v2_01.csv

 

1_02

Fix for XML/SVG escaped characters ( &"<> )

 

V2_00

Added a script to autogenerate definition files from DCS exported HTML files.

Added several new templates.

Code cleanup

 

Readme:

To run the scrips, either run the .exe or download and install AutoHotkey from

https://www.autohotkey.com/ and run the .ahk files.

 

---------------------------------------------------------------------------------------

---GenerateLayout_vx_xx (.ahk or .exe)---

---------------------------------------------------------------------------------------

 

This script will ask for a .csv file that contains the keywords to replace

for the .svg files in the folder /scriptroot/Templates_Sorted.

 

The script will then create a new folder in the script folder and name it

according to the "GameName" tag in the .cvs file.

 

The script will then generate .svg files into the “GameName” folder based on the .svg

templates found in the Templates_Sorted folder.

 

The generated files will mirror the folder structure in Templates_Sorted folder.

You can rearrange templates/folders and/or add or delete templates to suit you needs.

You can as an example remove all the US sized templates if you use A3/A4 sizes.

 

In the generated files the @something@ tags in the template *.svg files will be replaced

with the matching entry in the .cvs file.

 

Currently there are templates for the Thrustmaster Warthog and the Thrustmaster

F16 MFD's

 

I've included two examples .cvs file for the DCS A10C and X4 (DCSA10C_Demo_A.cvs

and X4.cvs) in the Defintion Files folder. Try running them as per the instructions

below to generate layouts for the Warthog.

 

-----------------------------------------------------------------------------

Usage:

 

1. Extract the files to a suitable folder.

 

2. Create a definition.csv file with your button assignments in the format detailed

below.

 

You can use the included .cvs template as a start (Template_TMWH_4MFD.csv).

You can leave any entry blank if you don't have the hardware or haven't

assigned the button within the game.

 

3. Run GenerateLayout_vx_xx (.ahk or .exe).

 

4. Select the .cvs you created. Previously generated SVG layouts will be overwritten.

 

5. Wait for the message "Done etc".

 

6. Open the Layouts"GameName" folder and open the desired svg file, print etc

Included files are in A4, A3, Letter and Tabloid formats + MFD Inserts + 3:4 format

usable as a KneeBoard plate in DCS (KB in the filename/directory).

For Kneeboard you need to save/convert the svg. to jpeg.

 

 

 

-----------------------------------------------------------------------------

 

CVS format:

[svg tag],[button number],[replace svg tag with this]

 

-----------------------------------------------------------------------------

 

Example, the line:

 

S1,1,Gun First Stage

 

Tells GenerateLayout_vx_xx (.ahk or .exe) to replace the @S1@ tag with

"Gun First Stage" in all the template svg:s when generating a corresponding .svg files

in the "GameName" folder.

 

-----------------------------------------------------------------------------

 

The (1) and (2) suffix in the tags denotes shifted buttons (by using a modifier in DCS

or TARGET)

 

In order for the script to work the .csv file needs the following entries (at a minimum)

GameName,,[gamename]

 

Use # for comments

 

The [button number] is not currently used by the GenerateLayout_vx_xx script,

but is included as a convenient way to match the game mapping (since games

generally only tell you the DX button number) to the .cvs file.

You can leave this blank if you do your own files etc, example below:

 

S1,,Gun First Stage

S1,1,Gun First Stage

 

are both valid CSV files.

 

Note: The [button number] is used by the DCSMapper script to auto-generate definition

files by exporting the DCS mappings to html (this is done within DCS under controls).

See more below.

 

----------------------------------------------------------------------

 

---Custom SVG files---

 

Size, layout etc can be changed in the included templates. All the graphics have been

converted to vector format and can be scaled freely without loss of quality.

You can make you own layout templates for other joysticks / controllers etc

I use Inkscape for svg work.

 

---------------------------------------------------------------------------------------

---FindTags_vx_xx (.ahk or .exe)---

---------------------------------------------------------------------------------------

 

This script will look through a folder with .svg files to find all

the @something@ tags in the files.

Output is a file called tags.txt.

Use this to as a helper generate a list of tags if you make you own .svg files for other

joysticks/controllers or if you add tags to the included svg files.

 

 

---------------------------------------------------------------------------------------

---DCSMapper_vx_xx (.ahk or .exe)---

---------------------------------------------------------------------------------------

 

DCSMapper will create a definition file from the exported key bindings in DCS.

 

Usage:

1. First, start DCS and do all the bindings you need, including any modifiers.

 

2. Under controls click the "Make HTML" and save the file/files to a folder.

 

3. Copy the Template_TMWH_4MFD.csv to a suitable location and rename it.

Example: DCSA10C_V1.csv (example file located in \Definition Files\DCS)

 

4. Open the renamed definition file in Notepad or similar and change:

a) [GameName], this can be anything, ex DCS_A10C

b) Add any modifiers that you have used when binding

 

"Modifier,[modifier number],[modifier button]

 

[modifier number] corresponds to the number in parenthesis in the

definition files.

 

[modifier button] is the button used as a modifier in DCS.

 

Example, you use JOY_BTN 4 as a modifier nbr 1, and when you press both

the modifier and the Master Mode Control Button on the Warthog Stick

(aka button S5 or DX 5) you go to the Weapon View.

 

This will look like this in the exported HTML for the :´

"JOY_BTN4 - JOY_BTN5" F6 Released weapon view View

 

DCSMapper will detect this when going through the exported HTML file

and write the line "S5 (1),5,Weapon view" in the generated definition file.

 

5. Save the file.

 

6. Run DCSMapper and select the renamed definition file.

Example: DCSA10C_V1.csv (example file located in \Definition Files\DCS).

 

7. Select the folder where you saved the exported HTML files.

Example: \DCS Exported Keybinds\A-10CKEYMAPS\A-10C_2019_05_23

 

8. DCSMapper will now go through the selected definition file and the exported

HTML files and map the bindings in the HTML files into a copy of

the definition file.

The new definition file has the same name as the file picked in step 6 but

with the suffix "A" added to the end of the filename.

The new definition file is in the same directory as the file picked in step 6.

Example: DCSA10C_V1_A.csv (example file located in \Definition Files\DCS)

 

9. Run GenerateLayout_vx_xx and select the file generated in step 8.

Example: DCSA10C_V1_A.csv (example file located in \Definition Files\DCS)

 

Note: You can use -IGNORE- to stop DCSMapper adding the binding from the exported

HTML file.

Example EAC UP,24,,-IGNORE-

 

I've included my own .cvs definition file and exported HTML for the DCS A10C

as an example. Try running it (by following as per the instructions above to

generate layoutsfor the Warthog.

 

-------------------------------------------------------------------------

Example .cvs file (excerpt):

 

#,,

#,, Instructions: Replace text within [] with the appropriate info/button etc

#,,

#,,

# Details,,

#,,

GameName,,DCS A10C

Version,,V1

Author,,Oakes

#,,

# ----------------Modifiers (for DCSMapper only)---------------------,,

#,, Modifiers can be used with DCS Mapper to auto-generate

#,, definition files. Put the name of the buttons you use as

#,, modifiers in DCS here. Check the exported html file for the correct

#,, name.

#,,

Modifier,1,JOY_BTN4

Modifier,2,JOY_BTN3

#,, .....

#,, Modifier,[x],JOY_BTN[x]

#,,

# ----------------------------Stick-------------------------------,,

#,,

#,, For DCSMapperOnly. KeyMapFile tells DCSMapper where to look for

#,, Modifiers can be used with DCS Mapper to auto-generate the mappings

#,, made in DCS for the specific device. Do not use .html to the end of the file name.

#,,

KeyMapFile,Joystick - HOTAS Warthog {D8CE4CE0-2963-11e8-8001-444553540000}

#,,

#,,

#,, Button Format

#,, [tag],[button Nbr (used for auto mappers like DCS Mapper)],[replacement text]

#,,

#,, Example: S2,2,Weapon release will replace all instances of the text "@S2@" with

#,, the text "Weapons release" for all the .SVG files in the Templates directory.

#,,

#,,

# ---Stick Buttons---,,

#,,

#,,

# Trigger Stage 1,,

#,,

S1,1,Gun First Stage

S1 (1),1,

S1 (2),1,

#,,

# Weapon Release Button,,

#,,

S2,2,Weapon release

S2 (1),2,Weapon release

S2 (2),2,Weapon release

#,,

# Nosewheel Steering Button - NSB,,

#,,

S3,3,NWS/Lase

S3 (1),3,

S3 (2),3,

#,,

# Pinkie Lever,,

#,,

S4,4,LAAP Engage/Disengage

S4 (1),4,

S4 (2),4,Time normal

#,,

# Master Mode Control Button,,

#,,

S5,5,Cycle Master Mode

S5 (1),5,Weapon view

S5 (2),5,WPN to TGT View

#,,

# Trigger Stage 2,,

#,,

S6,6,Gun Second Stage

S6 (1),6,

S6 (2),6,

before.thumb.jpg.661e14883b0a70ead8d22a80334e8cc8.jpg

after.thumb.jpg.fd396dbb6bdddbabed0ed8ecd6085648.jpg

Readme_V2.txt

GL_DCSMap_Release_V2.rar


Edited by Oakes
New version
Link to comment
Share on other sites

Oakes

Great Idea. I think I got it to work on the first attempt. I will now try to duplicate my F18.

Two questions.

First, is there a way to print the joystick and throttle on separate 81/2 by 11 inch paper so that each take up the full page? My eyes are not great and it is hard to read small type.

 

Second, I have 4 MFDs. Can the program be modified to label 4 MFDs? This is really not a big deal as I can use MFD1 as my fourth MFD as the 3 MFDs for the F18 are already used directly in the game with the same button assignments as the cockpit.

Trackir4 using the latest Trackir 5 software, Win10 Pro [Creator Update] updated from Win7Pro Pro 64Bit, Intel® Core™ i5-2500 3.30 GHz 6M Intel Smart Cache LGA115 , GigaByte GA-Z68XP-UD4 Intel Z68 Chipset DDR3 16GB Ram, GTX MSI Gaming 1060 [6 GB] Video Card, Main Monitor 1 on left 1920x1080 Touchscreen Monitor 2 on right 1920x1080 .

Link to comment
Share on other sites

Hi mate

 

Updated version above with USLetter (8.5x11 inch) templates.

 

TMWH_SK_USLetter.SVG

and

TMWH_THR_USLetter.SVG

are the ones you need.

 

I also added templates + tags etc for MFD3 and 4

 

Note:

I haven't changed any code to add this, only added templates with the correct tags + added the same tags to the .cvs files.

 

/Oakes

Link to comment
Share on other sites

Printing Issues

 

Oaks

Thanks for making the changes. However, I seemed to have made an error in my F18 excel file which I have attached.

 

 

 

When I print your A10 joystick on the new letter size, I get a perfect copy of the joystick and labels just the way I want it.

 

 

 

However, when I try to print my F18 file in the same manner, I get just the joystick with the only labels appearing on the TMS button. I used your A10 profile, copied it and then changed it to my F18 profile. I am not sure why it is not printing correctly. Any help you can provide would be appreciated.

F-18 V1.zip

Trackir4 using the latest Trackir 5 software, Win10 Pro [Creator Update] updated from Win7Pro Pro 64Bit, Intel® Core™ i5-2500 3.30 GHz 6M Intel Smart Cache LGA115 , GigaByte GA-Z68XP-UD4 Intel Z68 Chipset DDR3 16GB Ram, GTX MSI Gaming 1060 [6 GB] Video Card, Main Monitor 1 on left 1920x1080 Touchscreen Monitor 2 on right 1920x1080 .

Link to comment
Share on other sites

Here is the zip file for printing the Joystick on letter size paper that only prints the picture of the joystick and the labels for the TMS button.

DCS F18C-V1-F-18 V1-TMWH_SK_USLetter.zip

Trackir4 using the latest Trackir 5 software, Win10 Pro [Creator Update] updated from Win7Pro Pro 64Bit, Intel® Core™ i5-2500 3.30 GHz 6M Intel Smart Cache LGA115 , GigaByte GA-Z68XP-UD4 Intel Z68 Chipset DDR3 16GB Ram, GTX MSI Gaming 1060 [6 GB] Video Card, Main Monitor 1 on left 1920x1080 Touchscreen Monitor 2 on right 1920x1080 .

Link to comment
Share on other sites

hi sobe

 

Good job breaking the script :)

 

Turns out, SVG/XML doesn't like &"<> => CMS UP,15,P5 1&1x2 or CHAFF breaks the generated SVG file.

 

Fixed in v 1.02

 

btw, you have some " in your comments in the F18 cvs file, doesn't matter since they are in the comments (#) but it is still odd that they are there. Which program do you use to edit the files? I suggest using a text editor like notepad or notepad++ for editing.

 

/Oakes


Edited by Oakes
Link to comment
Share on other sites

Oakes

 

 

Sorry about breaking your baby.

 

The only comments I added were to change the following and I just used Excel:

GameName DCS F18C

Version V1

Author SHK

 

What comments were you referring to?

 

I also noticed that it did not pick up the modifier on the EFFL

EFFL UP 16 R &R

EFFL UP (1) 16 Briefing

I had added the UP(1) to your list so did I make a mistake?

 

The printing came out fine for the joystick and throttle. I just wish it was a little bit bigger for my eyes.

 

Again, I want to thank you for this program and hopefully others will begin to use it.


Edited by sobe

Trackir4 using the latest Trackir 5 software, Win10 Pro [Creator Update] updated from Win7Pro Pro 64Bit, Intel® Core™ i5-2500 3.30 GHz 6M Intel Smart Cache LGA115 , GigaByte GA-Z68XP-UD4 Intel Z68 Chipset DDR3 16GB Ram, GTX MSI Gaming 1060 [6 GB] Video Card, Main Monitor 1 on left 1920x1080 Touchscreen Monitor 2 on right 1920x1080 .

Link to comment
Share on other sites

hi sobe

 

Aha...excel has probably added those " characters, no worries. You can see these if you open up the cvs file with notepad.

 

EFFL UP (1) 16 Briefing won't show up because there is no matching tag in the svg templates.

 

The script is only doing "search and replace" in the template files, if it cant find the tag nothing will happen.

 

You need to edit the .svg files in the Templates folder (with Inkscape) in order to add the tag.

 

Attached are files for the TMWarthog with bigger fonts (I had to split this up into 4 parts to fit the bigger font). Unpack these into the Templates folder and run the script again.

 

/Oakes

bigfont.zip

Link to comment
Share on other sites

Oakes

I think that does it perfectly.

 

I don't have Inkscape so I just wrote in RED the missing label.

Trackir4 using the latest Trackir 5 software, Win10 Pro [Creator Update] updated from Win7Pro Pro 64Bit, Intel® Core™ i5-2500 3.30 GHz 6M Intel Smart Cache LGA115 , GigaByte GA-Z68XP-UD4 Intel Z68 Chipset DDR3 16GB Ram, GTX MSI Gaming 1060 [6 GB] Video Card, Main Monitor 1 on left 1920x1080 Touchscreen Monitor 2 on right 1920x1080 .

Link to comment
Share on other sites

  • 2 months later...

Hi Oakes, sorry to bother but searching to Hide my Stick in the A10C i found your post and you seam to know how to Hide the Stick. I tryed the ingame general set up but the stick is still there. Can you pls let me know how you hide and show the stick? Tks!

Link to comment
Share on other sites

  • 3 months later...

Oakes

Just wanted to let you know that I am still using your program and will use it a lot more when the F14 is released.

Trackir4 using the latest Trackir 5 software, Win10 Pro [Creator Update] updated from Win7Pro Pro 64Bit, Intel® Core™ i5-2500 3.30 GHz 6M Intel Smart Cache LGA115 , GigaByte GA-Z68XP-UD4 Intel Z68 Chipset DDR3 16GB Ram, GTX MSI Gaming 1060 [6 GB] Video Card, Main Monitor 1 on left 1920x1080 Touchscreen Monitor 2 on right 1920x1080 .

Link to comment
Share on other sites

Wow, just ran across this. This looks great and far better than doing it manually in Powerpoint or Keynote like I used to do in the past.

 

Might I suggest this become a sticky and be moved to the Thrustmaster forum?

DEFENSOR FORTIS

Spoiler

Systems: Falcon NW Talon: Ryzen 9 5950X @4.9GHz, 64GB DDR4, RTX 3090 FE; Falcon NW Mach V: Core i7 3930K @3.2GHz, 32GB DDR3, GTX 1080 FE

Cockpit: MonsterTech MTX F, 42" 4K TV, HP Reverb G2, Oculus Rift S, PointCTRL

Controls: RS F16SGRH CE, RS F18CGRH, VPC T-50CM2, VFX, WarBRD (Grips); VPC T-50CM2, RS FSSB R3L (Bases); Winwing F/A-18C, VPC T-50CM3, VPC T-50CM, TM Warthog, Cougar (Throttles); VPC ACE2 (Rudders)

 

Link to comment
Share on other sites

  • 1 year later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...