diff --git a/Changelog.txt b/Changelog.txt index 999cc87..7e367b6 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,6 +1,6 @@ -Update 4.2.0: CARRIER ME HOME (Update #23) +Update 4.2.1: VOID ALIGNMENT PROTOCOL (Update #24) --> This month's update marks 3 years since I first shared my script with the ED Community. Who would have known I would still be working on it.. LOL! This installment addresses a few minor issues from the previous release, few general improvements & some further user customisation options for you to play with. Thanks as always to all the CMDRs feedback and help reporting & fixing issues. +-> Some small improvements based on user feedback, plus some remaining 'missed' VoiceAttack keybinds have now been added. New to the script? Be sure to also check out the Beginners Reference Map in the download pack to get started. @@ -8,17 +8,13 @@ New to the script? Be sure to also check out the Beginners Reference Map in the List of Changes: -SPECIAL: Amazing Custom Warthog Throttle Facia Plates (designed by Tekadept) are now available! Please visit GitHub or Frontier Forums for more info. (Thx Tekadept!) +IMPROVEMENT: CruiseOnThrottle now works in both directions! When holding a Modifier and hitting 0% throttle you can engage or disengage Supercruise, just like you could previously at 100%. +IMPROVEMENT: ED-BAT updated to v0.4, now has an alternative startup link for Steam based EDLauncher, to allow use of Steam Overlay & Screenshot Capture. (This needs to be manually edited per instructions in BAT if you use Steam) (Thx SpinCykle) -NEW: The 3-Way Throttle & Joystick Axis Preset Toggles can now be customised. If you find you do use the Throttle or Joystick presets very often, you can replace them with your own custom commands. Both Up and Down directions can be mapped to any Pulse commands, with Middle considered Off. (Thx scottdruck for the idea!) -NEW: Added Boost Brake Macro! This will fire on the boost button when also holding the Pinky Trigger Modifier. Acting somewhat like an Air brake, this will push your ship by boosting then engaging your landing gear, quickly decreasing your speed, and allowing for some tight tactics (with or without FAOff).. or perhaps for some more extreme docking :) (Thx sw33tp34!) +FIXED: Reset HMD Orientation now mapped correctly in binding file to CTRL+HOME. (Thx T4k3shi47) +FIXED: VoiceAttack Update: Added explicit mapping for SRV Throttle Reverse (CTRL+R), same as Ship. (Thx SpinCykle) +FIXED: VoiceAttack Update: Added keybind mapping for Primary/Secondary Fire (SHIFT+1/SHIFT+2). (Note, this removes the Mouse 1/2 bindings) (Thx SpinCykle) +FIXED: VoiceAttack Update: Added keybind mapping for Exit FSS (SHIFT+F). (Note, this removes the Exit FSS mapped (Joy28+Joy4) on the Enter FSS button) (Thx SpinCykle) -NEW : Turret Mode Macros added under mNextTurretModeX1 & mNextTurretModeX2. Due to the way the panel works, you cannot select a specific Turret Mode, instead the macro will select the next mode in the cyclable list (1 or 2 positions forward). *Currently Unmapped by Default* The timings/alignment may still require work & as with other macros dependent on the panels, these will not work if you manually move the cursor postion in the panels during flight or a fight. Recommend using to set Turret behaviour prior to engagement. Feedback appreciated. - -IMPROVEMENT: Enforce both Throttle axes being mapped to Throttle presets, plus an option in user preferences to disable the secondary Throttle LEFT axis to free it up another device. (Thx dtdionne for the idea!) -IMPROVEMENT: Added Throttle & Joystick Override values, plus Throttle & Joystick Deadzone values to the Script Startup Printout. - -FIXED: Combined Fire mode will now ensure Primary fire remains active when releasing Secondary fire stage (when combinePriSecFire = 1). (Thx sw33tp34!) -FIXED: Mic Push-To-Talk fix for the controls becoming inverted using multiple channels (I think?!) (please report back if its still an issue). Fly Safe CMDRs! \ No newline at end of file diff --git a/ED Bindings/WITH MFG Crosswind/Aussiedroid Warthog Enhanced 4.2.1.binds b/ED Bindings/WITH MFG Crosswind/Aussiedroid Warthog Enhanced 4.2.1.binds new file mode 100644 index 0000000..baa1002 --- /dev/null +++ b/ED Bindings/WITH MFG Crosswind/Aussiedroid Warthog Enhanced 4.2.1.binds @@ -0,0 +1,1643 @@ + + + en-US + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ED Bindings/WITHOUT MFG Crosswind/Aussiedroid Warthog Enhanced 4.2.1.binds b/ED Bindings/WITHOUT MFG Crosswind/Aussiedroid Warthog Enhanced 4.2.1.binds new file mode 100644 index 0000000..131e151 --- /dev/null +++ b/ED Bindings/WITHOUT MFG Crosswind/Aussiedroid Warthog Enhanced 4.2.1.binds @@ -0,0 +1,1643 @@ + + + en-US + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ED Startup Batch Script/ED-BAT README.txt b/ED Startup Batch Script/ED-BAT README.txt index b611fcc..3ce8316 100644 --- a/ED Startup Batch Script/ED-BAT README.txt +++ b/ED Startup Batch Script/ED-BAT README.txt @@ -1,5 +1,5 @@ ----------------------------------------------------------- -AUSSIEDROID'S ENHANCED ED-BAT MULTI-LAUNCHER + BACKUP v0.3: +AUSSIEDROID'S ENHANCED ED-BAT MULTI-LAUNCHER + BACKUP v0.4: ----------------------------------------------------------- WHAT DOES IT DO? @@ -30,13 +30,16 @@ Note 4: Creating a shortcut of your .bat file will allow you to change its icon Note 5: Will never delete a backup. Backups are small, but remember to delete old versions periodically as required. +Note 6: If you use Steam version of the EDLauncher, some modification is required to swap launcher versions in script. Please read instructions in BAT. + + Run as Administrator, else some programs may not start. WHAT APPS DOES THE SCRIPT SUPPORT? -EDLauncher +EDLauncher (Both Steam and Standalone) Thrustmaster Target GUI + Will Open/Run Script TrackIR VoiceAttack diff --git a/ED Startup Batch Script/Launch ED-BAT Basic.bat b/ED Startup Batch Script/Launch ED-BAT Basic.bat index 4193adb..2ed859b 100644 --- a/ED Startup Batch Script/Launch ED-BAT Basic.bat +++ b/ED Startup Batch Script/Launch ED-BAT Basic.bat @@ -14,7 +14,14 @@ : FOLDER PATHS: <- Update these paths for the Apps you use. "Take note where quotations " " are/aren't used" : ============= -SET EDLAUNCHER-PATH="%PROGRAMFILES(X86)%\Steam\steamapps\common\Elite Dangerous" +: Steam User Instructions (How to Swap ED-LAUNCHER to STEAM Version): +: - If you use Steam version of ED, you will need to REMOVE the comments ':' for STEAM-PATH below. +: - If you do not update path comments, the Screenshot & other Steam features may not work when launching via the BAT. +: - REMOVE the comments for app launch section towards the end of the BAT for STEAM (Steam.exe). +: - Then, ADD the comments to EDLAUNCHER-PATH section, and EDLaunch.exe in the app launch section towards the end of the BAT. Save. + +SET EDLAUNCHER-PATH="%PROGRAMFILES(X86)%\Elite Dangerous" +:SET STEAM-PATH="%PROGRAMFILES(X86)%\Steam" SET TARGET-GUI-PATH="%PROGRAMFILES(X86)%\Thrustmaster\TARGET\x64" SET TARGET-SCRIPT-FILE="C:\GAME TOOLS\Elite Dangerous\Aussiedroid-ED-Warthog-Script-4.0.0\Warthog Script\AD_ED_v4.0.0.tmc" SET REFERENCE-MAP-PATH=C:\GAME TOOLS\Elite Dangerous\Aussiedroid-ED-Warthog-Script-4.0.0\Maps\Beginners-Map.jpg @@ -29,7 +36,7 @@ SET /A AppCount=5 ECHO. ECHO -------------------------------------------------------- -ECHO AUSSIEDROID'S ENHANCED ED-BAT MULTI-LAUNCHER BASIC v0.3: +ECHO AUSSIEDROID'S ENHANCED ED-BAT MULTI-LAUNCHER BASIC v0.4: ECHO -------------------------------------------------------- ECHO. ECHO Creating Immersion Platform... Please wait.. @@ -96,6 +103,17 @@ If ERRORLEVEL 1 ECHO ...ERROR!!! ~Check EDLaunch.exe path/installed/already run PING -n 2 localhost>nul ECHO. +:ECHO LAUNCHING: STEAM +:CD %STEAM-PATH% +:If NOT ERRORLEVEL 1 START /d %STEAM-PATH% Steam.exe steam://rungameid/359320 +:PING -n 2 localhost>nul +:TASKLIST | FIND /I "Steam.exe" +:If NOT ERRORLEVEL 1 ECHO ...SUCCESS! +:If NOT ERRORLEVEL 1 SET /A AppSuccessCount+=1 +:If ERRORLEVEL 1 ECHO ...ERROR!!! ~Check Steam.exe path/installed/already running~ +:PING -n 2 localhost>nul +:ECHO. + ECHO. ECHO STATUS UPDATE: (%AppSuccessCount% of %AppCount% Apps Loaded Successfully) ECHO. diff --git a/ED Startup Batch Script/Launch ED-BAT Full + Backup.bat b/ED Startup Batch Script/Launch ED-BAT Full + Backup.bat index a6c7b8d..d94bc95 100644 --- a/ED Startup Batch Script/Launch ED-BAT Full + Backup.bat +++ b/ED Startup Batch Script/Launch ED-BAT Full + Backup.bat @@ -22,9 +22,16 @@ : FOLDER PATHS: <- Update these paths for the Apps you use. "Take note where quotations " " are/aren't used" : ============= +: Steam User Instructions (How to Swap ED-LAUNCHER to STEAM Version): +: - If you use Steam version of ED, you will need to REMOVE the comments ':' for STEAM-PATH below. +: - If you do not update path comments, the Screenshot & other Steam features may not work when launching via the BAT. +: - REMOVE the comments for app launch section towards the end of the BAT for STEAM (Steam.exe). +: - Then, ADD the comments to EDLAUNCHER-PATH section, and EDLaunch.exe in the app launch section towards the end of the BAT. Save. + SET BINDS-BACKUP-FOLDER="D:\Backups\ED-BINDS-BACKUP\Bindings" SET BINDINGS-PATH="%LOCALAPPDATA%\Frontier Developments\Elite Dangerous\Options\Bindings\*.*" SET EDLAUNCHER-PATH="%PROGRAMFILES(X86)%\Steam\steamapps\common\Elite Dangerous" +:SET STEAM-PATH="%PROGRAMFILES(X86)%\Steam" SET TARGET-GUI-PATH="%PROGRAMFILES(X86)%\Thrustmaster\TARGET\x64" SET TARGET-SCRIPT-FILE="C:\GAME TOOLS\Elite Dangerous\Aussiedroid-ED-Warthog-Script-4.0.0\Warthog Script\AD_ED_v4.0.0.tmc" SET REFERENCE-MAP-PATH=C:\GAME TOOLS\Elite Dangerous\Aussiedroid-ED-Warthog-Script-4.0.0\Maps\Advanced-Map.jpg @@ -56,7 +63,7 @@ SET "DIR-DATE_TIME=%YYYY%-%MM%-%DD%_%HH%.%Min%" ECHO. ECHO ---------------------------------------------------------------- -ECHO AUSSIEDROID'S ENHANCED ED-BAT MULTI-LAUNCHER FULL + BACKUP v0.3: +ECHO AUSSIEDROID'S ENHANCED ED-BAT MULTI-LAUNCHER FULL + BACKUP v0.4: ECHO ---------------------------------------------------------------- ECHO. ECHO Creating Immersion Platform... Please wait.. @@ -197,6 +204,17 @@ If ERRORLEVEL 1 ECHO ...ERROR!!! ~Check EDLaunch.exe path/installed/already run PING -n 2 localhost>nul ECHO. +:ECHO LAUNCHING: STEAM +:CD %STEAM-PATH% +:If NOT ERRORLEVEL 1 START /d %STEAM-PATH% Steam.exe steam://rungameid/359320 +:PING -n 2 localhost>nul +:TASKLIST | FIND /I "Steam.exe" +:If NOT ERRORLEVEL 1 ECHO ...SUCCESS! +:If NOT ERRORLEVEL 1 SET /A AppSuccessCount+=1 +:If ERRORLEVEL 1 ECHO ...ERROR!!! ~Check Steam.exe path/installed/already running~ +:PING -n 2 localhost>nul +:ECHO. + ECHO. ECHO STATUS UPDATE: (%AppSuccessCount% of %AppCount% Apps Loaded Successfully) ECHO. diff --git a/ED Startup Batch Script/Launch ED-BAT Full.bat b/ED Startup Batch Script/Launch ED-BAT Full.bat index 0ed2d69..4329fe0 100644 --- a/ED Startup Batch Script/Launch ED-BAT Full.bat +++ b/ED Startup Batch Script/Launch ED-BAT Full.bat @@ -18,7 +18,14 @@ : FOLDER PATHS: <- Update these paths for the Apps you use. "Take note where quotations " " are/aren't used" : ============= +: Steam User Instructions (How to Swap ED-LAUNCHER to STEAM Version): +: - If you use Steam version of ED, you will need to REMOVE the comments ':' for STEAM-PATH below. +: - If you do not update path comments, the Screenshot & other Steam features may not work when launching via the BAT. +: - REMOVE the comments for app launch section towards the end of the BAT for STEAM (Steam.exe). +: - Then, ADD the comments to EDLAUNCHER-PATH section, and EDLaunch.exe in the app launch section towards the end of the BAT. Save. + SET EDLAUNCHER-PATH="%PROGRAMFILES(X86)%\Steam\steamapps\common\Elite Dangerous" +:SET STEAM-PATH="%PROGRAMFILES(X86)%\Steam" SET TARGET-GUI-PATH="%PROGRAMFILES(X86)%\Thrustmaster\TARGET\x64" SET TARGET-SCRIPT-FILE="C:\GAME TOOLS\Elite Dangerous\Aussiedroid-ED-Warthog-Script-4.0.0\Warthog Script\AD_ED_v4.0.0.tmc" SET REFERENCE-MAP-PATH=C:\GAME TOOLS\Elite Dangerous\Aussiedroid-ED-Warthog-Script-4.0.0\Maps\Advanced-Map.jpg @@ -41,7 +48,7 @@ SET /A AppCount=11 ECHO. ECHO ------------------------------------------------------- -ECHO AUSSIEDROID'S ENHANCED ED-BAT MULTI-LAUNCHER FULL v0.3: +ECHO AUSSIEDROID'S ENHANCED ED-BAT MULTI-LAUNCHER FULL v0.4: ECHO ------------------------------------------------------- ECHO. ECHO Creating Immersion Platform... Please wait.. @@ -169,6 +176,17 @@ If ERRORLEVEL 1 ECHO ...ERROR!!! ~Check EDLaunch.exe path/installed/already run PING -n 2 localhost>nul ECHO. +:ECHO LAUNCHING: STEAM +:CD %STEAM-PATH% +:If NOT ERRORLEVEL 1 START /d %STEAM-PATH% Steam.exe steam://rungameid/359320 +:PING -n 2 localhost>nul +:TASKLIST | FIND /I "Steam.exe" +:If NOT ERRORLEVEL 1 ECHO ...SUCCESS! +:If NOT ERRORLEVEL 1 SET /A AppSuccessCount+=1 +:If ERRORLEVEL 1 ECHO ...ERROR!!! ~Check Steam.exe path/installed/already running~ +:PING -n 2 localhost>nul +:ECHO. + ECHO. ECHO STATUS UPDATE: (%AppSuccessCount% of %AppCount% Apps Loaded Successfully) ECHO. diff --git a/ED Startup Batch Script/Readme.md b/ED Startup Batch Script/Readme.md index 6d48b3e..a63fbf9 100644 --- a/ED Startup Batch Script/Readme.md +++ b/ED Startup Batch Script/Readme.md @@ -1,6 +1,6 @@ # ED-BAT: Elite Dangerous Startup Batch File # -## VERSION 0.3 ## +## VERSION 0.4 ## Simplify & speed up loading of Elite Dangerous, and setting up your hardware & apps. Allows you to run many 3rd party apps plus the ED Launcher in a single shortcut. @@ -43,11 +43,13 @@ _[Note 4]_ Creating a shortcut of your .bat file will allow you to change its ic _[Note 5]_ Will never delete a backup. Backups are small, but remember to delete old versions periodically as required. +_[Note 6]_ If you use Steam version of the EDLauncher, some modification is required to swap launcher versions in script. Please read instructions in BAT. + ## WHAT APPS DOES ED-BAT SUPPORT? ## -- EDLauncher +- EDLauncher _(Both Steam and Standalone)_ - Thrustmaster Target GUI + Will Open/Run Script - TrackIR - VoiceAttack diff --git a/History.txt b/History.txt index 4d2bfef..48f01f7 100644 --- a/History.txt +++ b/History.txt @@ -19,8 +19,9 @@ // ** RECOMMENDED RUNNING SCRIPT IN TARGET GUI ** // // ** REMINDER: CUSTOMISE/SET YOUR USER PREFERENCES IN AD_EDUSERPREFS FILE ** // //--------------------------------------------------------------------------------------------------------------------------------------------------------------// -// VERSION HISTORY // Version 4.2.0 \\ Released Sept 2016 | Updated Sept 2019 // \\ Public Release #23 // +// VERSION HISTORY // Version 4.2.1 \\ Released Sept 2016 | Updated Oct 2019 // \\ Public Release #24 // // =============================================================================================================================================================// +// v4.2.1-IMPROVED: CruiseOnThrottle now works @ 0% position. FIX: VA Keymappings for Reset HMD Orientation, SRV Throttle Reverse, Exit FSS & Pri/Sec. Fire. // // v4.2.0-NEW: Throttle/Joystick Axis Preset Toggles can now be user defined. NEW: Boost Brake & Turret Mode Cycle Macros. NEW: Disable Left Throttle Axis pref.// // v4.2.0-FIXED: Throttle Modes enforced on both axes, Combined Fire mode now utilises 2-Stage Trigger properly & Mic Push-To-Talk invert fix. // // v4.1.0-APRIL UPDATE NEW: Axis Deadzone Customisation + Disable Message Text Output in TARGET Window via User Prefs. FIXED: UseRudderAxisCurves axis configs. // diff --git a/Maps/Advanced-Map.jpg b/Maps/Advanced-Map.jpg index cd73ed3..fd17677 100644 Binary files a/Maps/Advanced-Map.jpg and b/Maps/Advanced-Map.jpg differ diff --git a/Maps/Beginners-Map.jpg b/Maps/Beginners-Map.jpg index d43a843..34eb75b 100644 Binary files a/Maps/Beginners-Map.jpg and b/Maps/Beginners-Map.jpg differ diff --git a/Maps/Keyboard.jpg b/Maps/Keyboard.jpg index bc11a2c..bdefd86 100644 Binary files a/Maps/Keyboard.jpg and b/Maps/Keyboard.jpg differ diff --git a/Maps/Printable-Joystick.jpg b/Maps/Printable-Joystick.jpg index 6804082..d4ae07a 100644 Binary files a/Maps/Printable-Joystick.jpg and b/Maps/Printable-Joystick.jpg differ diff --git a/Maps/Printable-Throttle.jpg b/Maps/Printable-Throttle.jpg index 7da7f8c..d734b37 100644 Binary files a/Maps/Printable-Throttle.jpg and b/Maps/Printable-Throttle.jpg differ diff --git a/Readme.md b/Readme.md index cd5b237..6d762a2 100644 --- a/Readme.md +++ b/Readme.md @@ -7,7 +7,7 @@ ------------ | ------------- ![Logo](https://github.com/Aussiedroid/AD-EDWarthogEnhancedScript/blob/master/Maps/folder-small.jpg) | ![Specs](https://github.com/Aussiedroid/AD-EDWarthogEnhancedScript/blob/master/Maps/Supported.png) -### LATEST BUILD | [v4.2.0](https://github.com/Aussiedroid/AD-EDWarthogEnhancedScript/releases/latest "Latest Official Build") | Updated for [Elite Dangerous](https://www.elitedangerous.com/ "Frontier's Official Website"): Beyond 3.4+ "April Update" ### +### LATEST BUILD | [v4.2.1](https://github.com/Aussiedroid/AD-EDWarthogEnhancedScript/releases/latest "Latest Official Build") | Updated for [Elite Dangerous](https://www.elitedangerous.com/ "Frontier's Official Website"): Beyond 3.4+ "September Update" ### ### REQUIREMENTS | TARGET Software, Drivers & Firmware, 2018 Update ([v3.0.18.328](https://support.thrustmaster.com/en/product/hotaswarthog-en/ "Official Thrustmaster Warthog Support Portal") _or higher_) ### @@ -95,7 +95,7 @@ To further enhance the Modifier button system, some buttons have also been desig ![Joystick](https://steamuserimages-a.akamaihd.net/ugc/814499055605975953/038DB3B4E1B37F6E6F1B2841334BD405283FCEC6/ "Joystick") -![Throttle Base](https://steamuserimages-a.akamaihd.net/ugc/980002135582653970/604A396AD537FADA0CF4D5CF68CD1064A94A3765/ "Throttle Base") +![Throttle Base](https://steamuserimages-a.akamaihd.net/ugc/762722972705654792/56A0BD9CA306AA36C0C25048250469CB5D712C3C/ "Throttle Base") ![Throttle Arm](https://steamuserimages-a.akamaihd.net/ugc/771726115414976689/421594AD1B8AE2033BA1E1D3C44F235E1C852CA3/ "Throttle Arm") diff --git a/Warthog Script/AD_EDDefaults_v4.2.1.tmh b/Warthog Script/AD_EDDefaults_v4.2.1.tmh new file mode 100644 index 0000000..402a131 --- /dev/null +++ b/Warthog Script/AD_EDDefaults_v4.2.1.tmh @@ -0,0 +1,76 @@ +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// DEFAULT SETTINGS // // ** YOU SHOULDN'T NEED TO CHANGE THE DEFAULTS STORED IN THIS FILE ** +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + define ADVersionMajor 4 // Script Version Major Value ie. 3.x.x + define ADVersionMinor 2 // Script Version Minor Value ie. x.4.x + define ADVersionPoint 1 // Script Version Point Update ie. x.x.5 + + int profile = 1 ;// Set initial joystick profile global variable for joystick curves (Options: 0, 1, 2) (default = 1) + + define SYS 1 // Used in initPIPMapper() for managing System PIPs (see AD_EDFunctions_v4.x.x.tmh) (DO NOT modify!) + define ENG 2 // Used in initPIPMapper() for managing Engine PIPs (see AD_EDFunctions_v4.x.x.tmh) (DO NOT modify!) + define WEP 3 // Used in initPIPMapper() for managing Weapon PIPs (see AD_EDFunctions_v4.x.x.tmh) (DO NOT modify!) + define MID 4 // Used in initPIPMapper() for managing Balance PIPs (see AD_EDFunctions_v4.x.x.tmh) (DO NOT modify!) + + char ca_pulseChar[] = "0" ;// Used in Auto-Text Chat Presets (DO NOT modify!) + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// DEFAULT TIMINGS // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + define PulseTime 25 // PULSE+ Delay time (ms) (default = 25ms) + define DelayTime 75 // D() Delay time (ms) (default = 75ms) + + define MiniPressDelay 110 // Shortest Delay (ms) (default = 110ms) + define ShortPressDelay 250 // Shorter Delay (ms) (default = 250ms) + define PIPPressDelay 333 // Timing for PIPs (ms) (default = 333ms) + define DTPressDelay 365 // Timing for Pinky Double Tap (ms) (default = 365ms) + define LongPressDelay 500 // Standard Delay (ms) (default = 500ms) + define ExtraPressDelay 1500 // Longest Delay (Safety Press) (ms) (default = 1500ms) + + define ScanTimer 6000 // Set the Delay Timer for Explorer Scanner to auto-disengage (default = 6000ms) [Note: Should only need to change this if you use Engineered Fast Scanners or Using Wake Scanners which need up to 9000ms] + define MineTimer 6200 // Set the Delay Timer for Mining Pulse Wave Scanner to auto-disengage (default = 6200ms) + + define ChatKeyRepeatTime 70 // Auto-Text Chat Preset time (ms) (default = 70ms) + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// DEFAULT STATES (1 = Yes, 0 = No) // // VARIABLE DESCRIPTION & USAGE +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + // *[Set your toggles before you start Elite Dangerous to align default toggle states]* + // NOTE: If your switches aren't set to match, then you may need to use a toggle override, or have to do an extra key toggle/key press to "catch up" + + int AxisCurveMod; // Initiates variable to be used for custom axis curve preset on Throttle. (used in initSetThrottleCurves()) + int StartupLock = 1; // Script Loading Function Lock (During Boot of Script this flag will prevent some code from triggering keystrokes) + int RCorrection = 1; // Rotational Correction ON (Press 'F4' to align as required in-game) (used in initToggleRotationCorrection()) + int SRunning = 0; // Silent Running OFF (Press 'DEL' to toggle manually if misaligned) (used in initToggleSilentRunning()) + int Gears = 0; // Landing Gears set to ON (Assumes docked in station on Start. Press 'L' to align as required) (used in initToggleLandingGear()) + int Lights = 0; // Ship Lights OFF (Press 'INSERT' to align if SRV takes out of alignment) (used in initToggleShipLights()) + int NightVisionStatus = 0; // Tracks if Night Vision is enabled (for LED backlight)(used in initNightVisionEnhancer()) + int AltFlightToggle = 0; // Tracks Alternative Flight Controls Toggle Status OFF (used in initEnhancedFAOFF()) + int AltFlightHold = 0; // Tracks Alternative Flight Controls Hold Status OFF (used in initEnhancedFAOFF()) + int FAOFFToggle = 0; // Tracks Flight Assist Off Controls Toggle Status OFF (used in initEnhancedFAOFF()) + int FAOFFHold = 0; // Tracks Flight Assist Off Controls Hold Status OFF (used in initEnhancedFAOFF()) + int CargoSc = 0; // Cargo Scoop Deployed OFF (used in initToggleCargoScoop()) + int HPoints = 0; // Hardpoints Deployed OFF (used in initEscapeVector()) + int APSeqLong = 0; // Tracks Long Press for Autopilot Engage Button (used in initAPEngageEnhancer()) + int APSeqShort = 0; // Tracks Short Press for Autopilot Engage Button (used in initAPEngageEnhancer()) + int MicCheckHold = 0; // Tracks if Microphone PTT Hold is engaged (used in initMicCommander()) + int MicCheckToggle = 0; // Tracks if Microphone Toggle is engaged (used in initMicCommander()) + int MicExtPulseCheck = 0; // Tracks state of PTT Microphone Pulse action (used in initMicCommander()) + int MicExtHoldCheck = 0; // Tracks state of PTT Microphone Down/Up action (used in initMicCommander()) + int MicExtPulseCheckALT = 0; // Tracks state of Alt. PTT Microphone Pulse action (used in initMicCommander()) + int MicExtHoldCheckALT = 0; // Tracks state of Alt. PTT Microphone Down/Up action (used in initMicCommander()) + int MicExtToggleCheck = 0; // Tracks state of Toggle Microphone action (used in initMicCommander()) + int MicExtToggleCheckALT = 0; // Tracks state of Alt. Toggle Microphone action (used in initMicCommander()) + int MicExtToggleCombo = 0; // Tracks state of Toggle Microphone Combo action (used in initMicCommander()) + int DoubleTapPT = 0; // Tracks state of Double Tap function on Pinky Trigger (used in initUserHotSlotPinkyTrigger()) + int ReportCrimeState = 0; // Tracks state of Report Crimes Against Me Toggle (used in AD_ED_v4.x.x.tmc) + int ShowGameStatState = 0; // Tracks state of OSD FPS/Bandwidth Monitor Toggle (used in AD_ED_v4.x.x.tmc) + int EndlessStatePri = 0; // Tracks state of Repeater Fire Combat-Endless Mode Pri(used in AD_ED_v4.x.x.tmc) + int EndlessStateSec = 0; // Tracks state of Repeater Fire Combat-Endless Mode Sec(used in AD_ED_v4.x.x.tmc) + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// diff --git a/Warthog Script/AD_EDFunctions_v4.2.1.tmh b/Warthog Script/AD_EDFunctions_v4.2.1.tmh new file mode 100644 index 0000000..15d4c89 --- /dev/null +++ b/Warthog Script/AD_EDFunctions_v4.2.1.tmh @@ -0,0 +1,610 @@ +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// FUNCTIONS: TABLE OF CONTENTS // // FUNCTIONS Include logic to customise specific Button/Toggle functionality // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// [1. FIRE & HARDPOINT CONTROLS (line 15)] [3. SPECIALISED FEATURES (line 103)] [4. TOGGLE CONTROLS (line 220)] [5. REPORT STATES (line 590)] // +// - initHardpointManagement - initLEDController - initEnhancedFAOFF - initPrintState // +// - initSetCombinedFire - initNightVisionEnhancer - initToggleRotationCorrection // +// - initExplorerScannerDisengage - initAPEngageEnhancer - initToggleSilentRunning // +// - initIDLEMaster - initToggleCargoScoop // +// - initUserHotSlotPinkyTrigger - initToggleLandingGear // +// [2. PIP & TEXT CHAT CONTROLS (line 55)] - initToggleShipLights // +// - initPIPMapper - initHeadlookModeSelect // +// - initSendChatString - initMicCommander // +// // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// 1. FUNCTIONS: FIRE & HARDPOINT CONTROLS // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + int initHardpointManagement() { // FUNCTION: Manage Hardpoint Deployment & Associated Menu Mappings + if(Joystick[S4] & !Joystick[H4P]) { // This check forces Hardpoints to be deployed so Escape Vector is always in the right state. + if(!HPoints) { // (It will result in the hardpoints appearing to deploy in your HUD, but does not slow macro down) + HPoints = 1; + ActKey(KEYON+PULSE+DeployHardpoints); } + initEscapeVector(); } // Disengage & Escape Vector Macro + if(Joystick[H4P] & !Joystick[S4]) { + ActKey(KEYON+PULSE+UIEscape); } // EXIT to MENU (Hold Modifier 2) + if(Joystick[H4P] & Joystick[S4]) { + ActKey(KEYON+PULSE+mFastModeSwitch); } // EXIT to MENU + Fast Game Mode Switch (Hold Modifier 1+2) + if(!Joystick[H4P] & !Joystick[S4]) { // Standard Hardpoint Deploy/Retract + if(!StartupLock) { + ActKey(KEYON+PULSE+DeployHardpoints); // If in Ship: Deploy/Retract Hardpoints + HPoints=!HPoints; + ActKey(KEYON+DOWN+ShowCQCScoreboard); } } } // If in CQC: Show Scoreboard (Hold) + + + + int initSetCombinedFire(int toggleValue) { // FUNCTION: Calculate Combined Fire Status (Default = ON (Combined)) + if(toggleValue) { // When disabled, Trigger 2 is independant on Pinky Button (DX3) only + combinePriSecFire = !combinePriSecFire; } + if(combinePriSecFire){ + if(!StartupLock & VerboseOutput) printf("Dual-Stage Trigger: Set to COMBINED Primary + Secondary Fire\x0a"); + MapKey(&Joystick, TG2, CHAIN(PrimaryFire, SecondaryFire)); } + else { + if(!StartupLock & VerboseOutput) printf("Dual-Stage Trigger: Set to SEPARATE Fire\x0a"); + MapKey(&Joystick, TG2, 0); } } + + + + int initExplorerScannerDisengage() { // FUNCTION: Simply Defers Print Out of Explorer-Scanner Release + if(!StartupLock) { // [Gets around the no EXEC in EXEC limitation] + if(Joystick[TG1] & VerboseOutput) DeferCall(ScanTimer, &ActKey, KEYON+PULSE+EXEC("printf(\"Repeater Fire: EXPLORER-SCANNER [OFF] (PRIMARY)\\x0a\");")); + if(Joystick[S3] & VerboseOutput) DeferCall(ScanTimer, &ActKey, KEYON+PULSE+EXEC("printf(\"Repeater Fire: EXPLORER-SCANNER [OFF] (SECONDARY)\\x0a\");")); } } + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// 2. FUNCTIONS: PIP & TEXT CHAT CONTROLS // // HAT SWITCHES +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + int initPIPMapper(int maxPIPx=0, int minPIPy=0, int balPIPz=0) { // FUNCTION: Sets Auto-PIP Mapping & then Sends Keystrokes (Max, Min, Bal) + int PIPx, PIPy, PIPz; // Parameters = SYS, ENG, WEP, MID (See AD_EDSettings file) + + if (maxPIPx == 0) PIPx = 0; // maxPIPx gets 4 PIPs (balanced 1 PIP on others if no 2nd parameter set) + else if (maxPIPx == SYS) PIPx = PULSE+PowerSys; + else if (maxPIPx == ENG) PIPx = PULSE+PowerEng; + else if (maxPIPx == WEP) PIPx = PULSE+PowerWep; + + if (minPIPy == 0) PIPy = 0; // minPIPy gets 2 PIPs + else if (minPIPy == SYS) PIPy = PULSE+PowerSys; + else if (minPIPy == ENG) PIPy = PULSE+PowerEng; + else if (minPIPy == WEP) PIPy = PULSE+PowerWep; + + if (balPIPz == 0) PIPz = 0; // balPIPz overrides minPIPy and sets 3 PIPs each 'balanced' for max & min PIPs + else if (balPIPz == MID) PIPz = PIPy; + + if(!StartupLock) { + ActKey(KEYON+CHAIN( // MACRO: Send PIP Configuration + PULSE+BalancePower, D(), // If NO other parameters set, only Balance Power + PIPx, D(), + PIPy, D(), + PIPx, D(), + PIPx, D(), + PIPz)); } } + + + // FUNCTION: Send String of Predefined Characters to Cockpit Comms Panel + int initSendChatString(alias string) { // [NOTE 1: Set ChatPresetMode in the AD_EDSettings file] + int length, pos = 0; // [NOTE 2: LOCK function does not work with this, so if you press a button which sends keys to the game whilst the routine is typing into the chat window, these will get inserted into the text stream and will not go to the game.] + + length = strlen(&string); // Determine Length of the Chat String (used to set number of loops needed in while statement below) + + ActKey(KEYON+PULSE+mChatPanelGrab); // PANEL RESET + strsub(&ca_pulseChar, &string, pos, pos); // FIRST CHAR: Before Entering Loop, Set String Value and.. + ActKey(KEYON+PULSE+ca_pulseChar[0]); pos = pos + 1; // ..Pulse First Keypress without Delay (Prevents issues with Capitals 'sticking' for first letters) + while (pos < length) { // REMAINING CHARS: WHILE there are characters to output, loop. + strsub(&ca_pulseChar, &string, pos, pos); // Update pulseChar key + DeferCall(ChatKeyRepeatTime * (pos + 1), &ActKey, KEYON+PULSE+ca_pulseChar[0]); // Output pulseChar key to Comms Panel + pos = pos + 1; } // Next character/key + DeferCall(ChatKeyRepeatTime * (pos + 2), &ActKey, KEYON+PULSE+QuickCommsPanel); // Prepare to Close Text Box/Comms + Sleep(250); DeferCall(ChatKeyRepeatTime * (pos + 2), &ActKey, KEYON+PULSE+CommsPanel); // CLOSE Comms Panel (+UI Delay - Default: 250ms) + if(VerboseOutput) { printf("Comms Auto-Text :SENT: \""); printf(&string); printf("\" \x0a"); } } // Display Full Chat String to TARGET Output Panel + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// 3. FUNCTIONS: SPECIALISED FEATURES // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + int initLEDController(int x) { // FUNCTION: LED Controller provides flashing LED feedback on Toggle switching & will initiate a startup up sequence patter for LEDs when script starts. + int counter = 0; // [Set BlingLEDBling=1 in User Preferences to Enable Function] + if(!StartupLock) { + while (counter < 6) { // Flash LED Sequencer (Approx 3 times) (Change counter value & counter*xx in Defercall to change timings/duration) (Default values are 6 and 60) + DeferCall(counter*60, &ActKey, KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT^x)); // Usage example: if(BlingLEDBling) initLEDController(LED1); + counter = counter + 1; } } + else { // Startup LED Sequencer (This will leave LED 1 & 2 active for FAOFF & Rotational Correction at end of script launch) + ActKey(PULSE+KEYON+LED(&Throttle, LED_INTENSITY, SetLED)); // Enable LED Backlight on Start & then Initiate LED status below: + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1)); // Disable any active LEDs 1-5, Ready For Sequencing. + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2)); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED3)); // set LED 3 OFF [Silent Running] + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED4)); // set LED 4 OFF [Cargo Scoop] + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED5)); // set LED 5 OFF [Landing Gear] + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1)); // Start Sequence + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED2)); Sleep(20); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED3)); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1)); Sleep(33); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED4)); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2)); Sleep(33); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED5)); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED3)); Sleep(33); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED4)); Sleep(120); // End of Reverse Sequence + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED4)); Sleep(33); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED3)); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED5)); Sleep(33); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED2)); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED4)); Sleep(33); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1)); // set LED 1 ON [Flight Assist] + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED3)); Sleep(33); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2)); Sleep(20); + ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED2)); } } // set LED 2 ON [Rotational Correction] + // End of Forward Sequence + + + int initNightVisionEnhancer(int toggleValue) { // FUNCTION: Calculate Night Vision state. + if(toggleValue) { // Dims Throttle LED Backlight intensity when active. + NightVisionStatus=!NightVisionStatus; } + if(NightVisionStatus){ + if(VerboseOutput) printf("Night Vision: ^^ ACTIVE ^^\x0a"); + ActKey(KEYON+PULSE+NightVision); + if(NightVisionHUD) ActKey(KEYON+PULSE+HideShipGUI); // If enabled in User Preferences, Hide the Ship/SRV HUD when enabling Night Vision. + ActKey(KEYON+PULSE+LED(&Throttle, LED_INTENSITY, 50)); } // Dim Throttle Lights + if(!NightVisionStatus) { + if(VerboseOutput) printf("Night Vision: DEACTIVATED!\x0a"); + ActKey(KEYON+PULSE+NightVision); + if(NightVisionHUD) ActKey(KEYON+PULSE+HideShipGUI); // If enabled in User Preferences, Show the Ship/SRV HUD when disabling Night Vision. + ActKey(KEYON+PULSE+LED(&Throttle, LED_INTENSITY, 172)); } } // Return Throttle Lights to Default + + + + int initAPEngageEnhancer() { // FUNCTION: User Definable Autopilot Engage Button providing a total of Six inputs; a Short & Long Press option for Standalone, Pinky Modifier & CMS Hat Modifier combinations. + if(Joystick[H4P]) { // Defaults: Include the Autodock, Signal Light Sequences (Flashing ShipLights) & Basic Text Comms. + if(APSeqShort) { // [Short+CMS: Text "CMDR o7" (default)] + ActKey(KEYON+PULSE+APEngageCMSShort); // Set custom APEngageCMSShort value in the User Preferences + APSeqShort=!APSeqShort; } + if(APSeqLong) { // [Long+CMS: Text "Fly Safe CMDR" (default)] + ActKey(KEYON+PULSE+APEngageCMSLong); // Set custom APEngageCMSLong value in the User Preferences + APSeqLong=!APSeqLong; } } + if(Joystick[S4]) { + if(APSeqShort) { // [Short+Pinky: Auto-Dock Request (default)] + ActKey(KEYON+PULSE+APEngagePinkyShort); // Set custom APEngagePinkyShort value in the User Preferences + if(APEngagePinkyShort == mRequestDock & VerboseOutput) printf("Attempting Auto-Dock Procedure...\x0a"); + APSeqShort=!APSeqShort; } + if(APSeqLong) { // [Long+Pinky: Auto-Dock Request (default)] + ActKey(KEYON+PULSE+APEngagePinkyLong); // Set custom APEngagePinkyLong value in the User Preferences + if(APEngagePinkyLong == mRequestDock & VerboseOutput) printf("Attempting Auto-Dock Procedure...\x0a"); + APSeqLong=!APSeqLong; } } + if(!Joystick[S4] & !Joystick[H4P]) { + if(APSeqShort) { // [Short: Short Signal Light Sequence (default)] + ActKey(KEYON+PULSE+APEngageShort); // Set custom APEngageShort value in the User Preferences + if(APEngageShort == mSignalLights & VerboseOutput) printf("Lights: ^ SHORT SIGNAL SEQUENCE ACTIVATED ^\x0a"); + APSeqShort=!APSeqShort; } + if(APSeqLong) { // [Long: Long Signal Light Sequence (default)] + ActKey(KEYON+PULSE+APEngageLong); // Set custom APEngageLong value in the User Preferences + if(APEngageLong == mSignalLightsLong & VerboseOutput) printf("Lights: ^ LONG SIGNAL SEQUENCE ACTIVATED ^\x0a"); + APSeqLong=!APSeqLong; } } } + + + + int initIDLEMaster() { // FUNCTION: Enforce Throttle IDLE (Stationary) on any Throttle Mode + if(!StartupLock) { + if(Throttle[IDLELON]) { + if(!Throttle[FLAPU]) { // Resets Throttle Axis to 0 for Full Range Throttle Modes + DXAxis(DX_ZROT_AXIS, 0); // Prevents issues launching from stations etc + DXAxis(DX_Z_AXIS, 0); + LockAxis(&Throttle, THR_LEFT, 1); // Lock Axes to keep null value + LockAxis(&Throttle, THR_RIGHT, 1); + ActKey(KEYON+PULSE+SRVHandbrake); } // IDLE Doubles as SRV Handbrake ON when on surface + if(Throttle[FLAPU]) { // Resets Throttle Axis to 0 for Forward Only Throttle Mode + DXAxis(DX_ZROT_AXIS, 32767); + DXAxis(DX_Z_AXIS, 32767); + LockAxis(&Throttle, THR_LEFT, 1); // Lock Axes to keep null value + LockAxis(&Throttle, THR_RIGHT, 1); + ActKey(KEYON+PULSE+SRVHandbrake); } } // IDLE Doubles as SRV Handbrake ON when on surface + if(!Throttle[IDLELON]) { + LockAxis(&Throttle, THR_LEFT, 0); // Unlocks the Throttle Axes when exiting IDLE + LockAxis(&Throttle, THR_RIGHT, 0); + ActKey(KEYON+PULSE+SRVHandbrake); } } } // Release the SRV Handbrake + + + + int initUserHotSlotPinkyTrigger() { // FUNCTION: Enables User Definable 'Double Tap' functionality on the Pinky Trigger [S4] + if(!StartupLock) { // *This line is only required to prevent running on startup + if(DoubleTapPT == 0) { // IF Single (First) Press (DoubleTapPT starts at 0) + ActKey(KEYON+DOWN+PinkyTriggerDefault); // Trigger Standard DX4/JOY 4 mapping + DoubleTapPT = 1; // Increment DoubleTapPT counter + DeferCall(DTPressDelay, &ActKey, KEYON+PULSE+EXEC("DoubleTapPT = 0;")); } // Sets Double Tap Speed: After delay of 365ms, reset DoubleTapPT counter to 0 (This is your window to press Pinky Trigger again for double tap) + else if(DoubleTapPT == 1) { // IF Double (Second) Press + DoubleTapPT = 2; // Increment DoubleTapPT counter (prevents further triggers until DoubleTapPT delay timer cycle completes) + ActKey(KEYON+PULSE+UserDTPinkyKeyBind); } } } // Trigger User Hot Slot Preference (*see User Preferences to set*) +// ActKey(KEYON+DOWN+UserDTPinkyKeyBind); } } } // ALTERNATE Config (enable if Double Tap Pinky Trigger needs a Hold action - remember to disable the line above!) + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// 4. FUNCTIONS: TOGGLE CONTROLS // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + int initEnhancedFAOFF() { // FUNCTION: Enhanced Joystick Curves tailored for Flight Assist Off (TOGGLE) + if(Throttle[SPDF]) { // AKA "FAOFF LIKE A BOSS!" + if(Joystick[S4]) { // FA OFF: TOGGLE + ActKey(KEYON+PULSE+AlternativeFlightMode); // Enables Alternative Flight Control Mappings (when using the Pinky Trigger). + AltFlightToggle = 1; } + if(!Joystick[S4]) { + ActKey(KEYON+PULSE+FlightAssist); + SetSCurve(&Joystick, JOYX, 0, 1, 0, 2, -1); // Reduces the Joystick sensitivity on Forward TOGGLE on FA Off + SetSCurve(&Joystick, JOYY, 0, 1, 0, 2, -1); // Full Joystick sensitivity remains on Back HOLD on FA Off for quick turns in combat + if(UseRuddersTPR & UseRudderAxisCurves) SetSCurve(&TFRPHARudder, TRUDDER, 0, 10, 0, 3, -1); + if(UseRuddersT16000 & UseRudderAxisCurves) SetSCurve(&TFRPRudder, TFRPHA_RUDDER, 0, 10, 0, 3, -1); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1)); // set LED 1 OFF + if(BlingLEDBling) initLEDController(LED1); + FAOFFToggle = 1; + if(UseRudderAxisCurves & VerboseOutput) printf("Joystick Profile[%d]: Yaw=%d, Curve=%d, Zoom=%d\x0a", profile, YAW_CURVE[profile], JS_CURVE[profile], JS_ZOOM[profile]); + if(!UseRudderAxisCurves & VerboseOutput) printf("Joystick Profile[%d]: Curve=%d, Zoom=%d\x0a", profile, JS_CURVE[profile], JS_ZOOM[profile]); } } + if(!Throttle[SPDF]) { + if(AltFlightToggle) { + ActKey(KEYON+PULSE+AlternativeFlightMode); // Disables Alternative Flight Control Mappings (works with both Pinky Trigger & Without!). + AltFlightToggle=!AltFlightToggle; } + if(FAOFFToggle) { + ActKey(KEYON+PULSE+FlightAssist); + initSetJoystickCurves(); // Return Joystick Curve back to previous preset (based on toggle position) + if(BlingLEDBling) initLEDController(LED1); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1)); // set LED 1 ON you will need to toggle back to center, then UP/DOWN again to reapply settings. + FAOFFToggle=!FAOFFToggle; + if(UseRudderAxisCurves & VerboseOutput) printf("Returning to Joystick Profile [%d]: Yaw=%d, Curve=%d, Zoom=%d\x0a", profile, YAW_CURVE[profile], JS_CURVE[profile], JS_ZOOM[profile]); + if(!UseRudderAxisCurves & VerboseOutput) printf("Returning to Joystick Profile [%d]: Curve=%d, Zoom=%d\x0a", profile, JS_CURVE[profile], JS_ZOOM[profile]); } } + if(Throttle[SPDB]) { // FA OFF: HOLD + if(Joystick[S4]) { + ActKey(KEYON+PULSE+AlternativeFlightMode); + AltFlightHold = 1; } + if(!Joystick[S4]) { + ActKey(KEYON+PULSE+FlightAssist); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1)); // set LED 1 OFF + FAOFFHold = 1; } } + if(!Throttle[SPDB]) { + if(AltFlightHold) { + ActKey(KEYON+PULSE+AlternativeFlightMode); // Disables Alternative Flight Control Mappings (works with both Pinky Trigger & Without!). + AltFlightHold=!AltFlightHold; } + if(FAOFFHold) { + ActKey(KEYON+PULSE+FlightAssist); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1)); // set LED 1 ON + FAOFFHold=!FAOFFHold; } } } + + + + int initToggleRotationCorrection() { // TOGGLE: Rotational Correction + if(Throttle[EORMOTOR]) { // Default: ON (Position toggle switch DOWN to disable) + if(!RCorrection) { // Press 'F4' to toggle manually if misaligned, or change in Sys Panel. + RCorrection = 1; + if(!StartupLock & VerboseOutput) printf("Rotation Correction: DISABLED !!\x0a"); + ActKey(KEYON+PULSE+RotationalCorrection); + if(BlingLEDBling) initLEDController(LED2); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2)); } } // set LED 2 OFF + if(!Throttle[EORMOTOR]) { + if(RCorrection) { + RCorrection = 0; + if(!StartupLock & VerboseOutput) printf("Rotation Correction: ENABLED ^^\x0a"); + if(!StartupLock) ActKey(KEYON+PULSE+RotationalCorrection); + if(BlingLEDBling) initLEDController(LED2); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED2)); } } } // set LED 2 ON + + + + int initToggleSilentRunning() { // TOGGLE: Silent Running + if(Throttle[APUON]) { // Default: OFF (Exhaust Vents Open) + if(!SRunning) { // Press 'DEL' to toggle manually if misaligned, or change in Sys Panel. + if(!Joystick[S4]) { + ActKey(KEYON+PULSE+SilentRunning); // [Toggle Hold] + if(VerboseOutput) printf("Silent Running: ACTIVATED !!\x0a"); } + if(Joystick[S4]) { // Heat Sink + Silent Running Combo [Pinky+Silent Running] + ActKey(KEYON+PULSE+DeployHeatSink); + ActKey(KEYON+PULSE+SilentRunning); + if(VerboseOutput) printf("Silent Running: COOL RUNNINGS (Heat Sink Combo Sequence Activated!)\x0a"); } + SRunning = 1; + if(BlingLEDBling) initLEDController(LED3); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED3)); } } // set LED 3 ON + if(!Throttle[APUON]) { + if(SRunning) { + ActKey(KEYON+PULSE+SilentRunning); // [Toggle Release] + if(VerboseOutput) printf("Silent Running: DEACTIVATED <<\x0a"); + SRunning = 0; + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED3)); // set LED 3 OFF + if(BlingLEDBling) initLEDController(LED3); } } } + + + + int initToggleCargoScoop() { // TOGGLE: Cargo Scoop + if(Throttle[RDRNRM]){ // UP (ON) + if(Joystick[S4] & !Joystick[H4P]) { // UP/TOGGLE OVERRIDE: If Pinky Trigger + Cargo Scoop UP, then override Cargo Scoop. + CargoSc=!CargoSc; + if(VerboseOutput) printf("Cargo Scoop: !! Toggle RESET !!\x0a"); } + if(!Joystick[S4] & Joystick[H4P]) { // UP/TOGGLE PRECISION MODE: If CMS Hat Switch + Cargo Scoop UP, then toggle Throttle Precision Mode when Cargo Scoop is Open. + CargoPrecisionMode=!CargoPrecisionMode; + if(CargoPrecisionMode & VerboseOutput) printf("Cargo Scoop Precision Mode: ENABLED! [Throttle Limiter ACTIVE]\x0a"); + else if(VerboseOutput) printf("Cargo Scoop Precision Mode: DISABLED <<\x0a"); } + if(!Joystick[S4] & !Joystick[H4P]) { // UP/OPEN CARGO SCOOP: If No Modifiers are pressed, then open Cargo Scoop + if(!CargoSc) { + if(VerboseOutput) printf("Cargo Scoop: DEPLOYED >>\x0a"); + CargoSc = 1; + ActKey(KEYON+PULSE+CargoScoop); + if(BlingLEDBling) initLEDController(LED4); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED4)); // set LED 4 ON + if(CargoPrecisionMode) { // UP/ENABLE PRECISION MODE: If Precision Mode is ON, then limit Throttle axis to 50% (Blue Zone). + TrimDXAxis(DX_Z_AXIS, SET(0)); + SetSCurve(&Throttle, THR_RIGHT, 0, 2, 0, 2, -2); + if(VerboseOutput) printf("Throttle Profile: CARGO SCOOP OVERRIDE PRECISION [-50 -> 50]\x0a"); + SetThrottle(); } } } } + if(!Throttle[RDRNRM]) { // DOWN (OFF) + if(Joystick[S4] & !Joystick[H4P]) { // DOWN/TOGGLE OVERRIDE: If Pinky Trigger + Cargo Scoop DOWN, then override Cargo Scoop. + CargoSc=!CargoSc; + if(VerboseOutput) printf("Cargo Scoop: !! Toggle RESET !!\x0a"); } + if(!Joystick[S4] & Joystick[H4P]) { // DOWN/TOGGLE PRECISION MODE: If CMS Hat Switch + Cargo Scoop DOWN, then toggle Throttle Precision Mode when Cargo Scoop is Open. + CargoPrecisionMode=!CargoPrecisionMode; + if(CargoPrecisionMode & VerboseOutput) printf("Cargo Scoop Precision Mode: ENABLED! [Throttle Limiter ACTIVE]\x0a"); + else if(VerboseOutput) printf("Cargo Scoop Precision Mode: DISABLED <<\x0a"); } + if(!Joystick[S4] & !Joystick[H4P]) { // DOWN/CLOSE CARGO SCOOP: If No Modifiers are pressed, then close Cargo Scoop + if(CargoSc) { + CargoSc = 0; + ActKey(KEYON+PULSE+CargoScoop); + if(VerboseOutput) printf("Cargo Scoop: RETRACTED <<\x0a"); + if(CargoPrecisionMode) { // DOWN/TOGGLE PRECISION MODE: If Precision Mode is ON, then remove Throttle axis limitation & return axis to user's preference. + if(CargoReturnMode == 0) { + TrimDXAxis(DX_Z_AXIS, SET(-1024)); + if(CruiseOnThrottle == 0) SetSCurve(&Throttle, THR_RIGHT, 0, -100, 0, 0); + if(CruiseOnThrottle == 1) SetSCurve(&Throttle, THR_RIGHT, 0, -90, 0, 0); + if(VerboseOutput) printf("Throttle Profile: CARGO SCOOP REVERT FORWARD ONLY [0 -> 100]\x0a"); } + if(CargoReturnMode == 1) { + TrimDXAxis(DX_Z_AXIS, SET(0)); + if(CruiseOnThrottle == 0) SetSCurve(&Throttle, THR_RIGHT, 0, 5, 0, 0); + if(CruiseOnThrottle == 1) SetJCurve(&Throttle, THR_RIGHT, 90, 100); + if(VerboseOutput) printf("Throttle Profile: CARGO SCOOP REVERT FULL SCALE [-100 -> 100]\x0a"); } + if(CargoReturnMode == 2) { + TrimDXAxis(DX_Z_AXIS, SET(0)); + SetJCurve(&Throttle, THR_RIGHT, 80, 100); + if(VerboseOutput) printf("Throttle Profile: CARGO SCOOP REVERT FULL SCALE CUSTOM [-100 -> 80]\x0a"); } + if(CargoReturnMode == 3) { + TrimDXAxis(DX_Z_AXIS, SET(0)); + SetSCurve(&Throttle, THR_RIGHT, -25, 0, -25, 0); + if(VerboseOutput) printf("Throttle Profile: CARGO SCOOP REVERT TRIMMED [-75 -> 75]\x0a"); } + SetThrottle(); } } } + if(Joystick[S4] & Joystick[H4P]) { // DOWN/JETTISON ALL CARGO: If BOTH CMS Hat Switch & Pinky Trigger Modifier are held + Cargo Scoop is DOWN, the activate Jettison All Cargo & close Cargo Scoop. + if(CargoSc) { + CargoSc = 0; + ActKey(KEYON+PULSE+JettisonAllCargo); + if(VerboseOutput) printf("Cargo Scoop: JETTISON ALL CARGO !!\x0a"); + if(CargoPrecisionMode) { // DOWN/TOGGLE PRECISION MODE: If Precision Mode is ON & BOTH CMS Hat Switch & Pinky Trigger Modifier are held, then remove Throttle axis limitation & return axis to user's preference. + if(CargoReturnMode == 0) { + TrimDXAxis(DX_Z_AXIS, SET(-1024)); + if(CruiseOnThrottle == 0) SetSCurve(&Throttle, THR_RIGHT, 0, -100, 0, 0); + if(CruiseOnThrottle == 1) SetSCurve(&Throttle, THR_RIGHT, 0, -90, 0, 0); + if(VerboseOutput) printf("Throttle Profile: CARGO SCOOP REVERT FORWARD ONLY [0 -> 100]\x0a"); } + if(CargoReturnMode == 1) { + TrimDXAxis(DX_Z_AXIS, SET(0)); + if(CruiseOnThrottle == 0) SetSCurve(&Throttle, THR_RIGHT, 0, 5, 0, 0); + if(CruiseOnThrottle == 1) SetJCurve(&Throttle, THR_RIGHT, 90, 100); + if(VerboseOutput) printf("Throttle Profile: CARGO SCOOP REVERT FULL SCALE [-100 -> 100]\x0a"); } + if(CargoReturnMode == 2) { + TrimDXAxis(DX_Z_AXIS, SET(0)); + SetJCurve(&Throttle, THR_RIGHT, 80, 100); + if(VerboseOutput) printf("Throttle Profile: CARGO SCOOP REVERT FULL SCALE CUSTOM [-100 -> 80]\x0a"); } + if(CargoReturnMode == 3) { + TrimDXAxis(DX_Z_AXIS, SET(0)); + SetSCurve(&Throttle, THR_RIGHT, -25, 0, -25, 0); + if(VerboseOutput) printf("Throttle Profile: CARGO SCOOP REVERT TRIMMED [-75 -> 75]\x0a"); } + SetThrottle(); } + DeferCall(5000, &ActKey, KEYON+PULSE+CargoScoop); + if(VerboseOutput) DeferCall(5050, &ActKey, KEYON+PULSE+EXEC("printf(\"Cargo Scoop: RETRACTED <<\\x0a\");")); } } + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED4)); // set LED 4 OFF + if(BlingLEDBling) initLEDController(LED4); } } + + + + int initToggleLandingGear() { // TOGGLE: Landing Gear + if(Throttle[EACON]) { // Default: ON (Assumes you are docked when loading into ED) + if(Joystick[S4]) { // Hold Pinky Trigger to toggle manual position reset, or change in Sys Panel. + Gears=!Gears; + if(VerboseOutput) printf("Landing Gear: !! Toggle RESET !!\x0a"); } + if(Joystick[H4P]) { // Hold CMS Hat Switch to Initiate Take Off Procedure (This will hold Vert. Thrust up, toggle Landing Gear & Set PIPs for Launch at Station or Planet Surface) + Gears = 0; // (Mapped to work in either toggle direction) + if(VerboseOutput) ActKey(KEYON+PULSE+EXEC("initPIPMapper(SYS,ENG);")); // Set PIPs to SYSx4 ENGx2 - Protect Ship on Launch + ActKey(KEYON+DOWN+ThrustUp); + DeferCall(3500, &ActKey, KEYON+PULSE+LandingGear); // Retract Landing Gear shortly after leaving pad/surface + DeferCall(4000, &ActKey, KEYON+UP+ThrustUp); // Releases Vertical Thrust after 4 seconds + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED5)); // set LED 5 OFF + if(BlingLEDBling) initLEDController(LED5); + if(VerboseOutput) printf("Landing Gear: LAUNCH SEQUENCE ACTIVATED >>\x0a"); + if(VerboseOutput) printf("Landing Gear: RETRACTED <<\x0a"); } + if((!Joystick[S4]) & (!Joystick[H4P])) { + if(!Gears) { + if(VerboseOutput) printf("Landing Gear: DEPLOYED >>\x0a"); + Gears = 1; + ActKey(KEYON+PULSE+LandingGear); + if(BlingLEDBling) initLEDController(LED5); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED5)); } } } // set LED 5 ON + if(!Throttle[EACON]) { + if(Joystick[S4]) { // Hold Pinky Trigger to toggle manual position reset, or change in Sys Panel. + Gears=!Gears; + if(VerboseOutput) printf("Landing Gear: !! Toggle RESET !!\x0a"); } + if(Joystick[H4P]) { // Hold CMS Hat Switch to Initiate Take Off Procedure (This will hold Vert. Thrust up, toggle Landing Gear & Set PIPs for Launch at Station or Planet Surface) + Gears = 0; // (Mapped to work in either toggle direction) + ActKey(KEYON+PULSE+EXEC("initPIPMapper(SYS,ENG);")); // Set PIPs to SYSx4 ENGx2 - Protect Ship on Launch + ActKey(KEYON+DOWN+ThrustUp); + DeferCall(3500, &ActKey, KEYON+PULSE+LandingGear); // Retract Landing Gear shortly after leaving pad/surface + DeferCall(4000, &ActKey, KEYON+UP+ThrustUp); // Releases Vertical Thrust after 4 seconds + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED5)); // set LED 5 OFF + if(BlingLEDBling) initLEDController(LED5); + if(VerboseOutput) printf("Landing Gear: LAUNCH SEQUENCE ACTIVATED >>\x0a"); + if(VerboseOutput) printf("Landing Gear: RETRACTED <<\x0a"); } + if((!Joystick[S4]) & (!Joystick[H4P])) { + if(Gears) { + if(VerboseOutput) printf("Landing Gear: RETRACTED <<\x0a"); + Gears = 0; + ActKey(KEYON+PULSE+LandingGear); + ActKey(KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED5)); // set LED 5 OFF + if(BlingLEDBling) initLEDController(LED5); } } } } + + + + int initToggleShipLights(int toggleValue) { // FUNCTION: Calculate ShipLights state. + if(toggleValue) { // Dims Throttle LED Backlight intensity when active. + Lights=!Lights; } // Note: This can get a little buggy with the SRV multiple lighting levels. + if(Lights){ // Press 'INSERT' to toggle manually if SRV has messed things up or extra long hold to reset. + if(VerboseOutput) printf("Lights: ^^ ILLUMINATE! ^^\x0a"); + ActKey(KEYON+PULSE+ShipLights); + ActKey(KEYON+PULSE+LED(&Throttle, LED_INTENSITY, 50)); } // Dim Throttle Lights + if(!Lights) { + if(VerboseOutput) printf("Lights: DELUMINATE!\x0a"); + ActKey(KEYON+PULSE+ShipLights); + ActKey(KEYON+PULSE+LED(&Throttle, LED_INTENSITY, 172)); } } // Return Throttle Lights to Default + + + + int initHeadlookModeSelect() { // FUNCTION: Choose Headlook Center Method, based on hardware preference + if(!StartupLock) { + if(HeadtrackPref == 0) { // (Maps to the Engine Operate Ign/Norm LEFT UP) + if(!Joystick[S4]) ActKey(KEYON+PULSE+LookCenter); // [Short: Headlook Center Toggle] [MOUSE] + if(Joystick[S4]) ActKey(KEYON+PULSE+ToggleVoiceAttackGlobal); } // [Short+Pinky: VA Toggle] + if(HeadtrackPref == 1) { + if(!Joystick[S4]) ActKey(KEYON+PULSE+TrackIRCenter); // [Short: TIR Center] [TRACKIR/TOBI EYE/EDTRACKER] + if(Joystick[S4]) ActKey(KEYON+PULSE+ToggleVoiceAttackGlobal); } // [Short+Pinky: VA Toggle] + if(HeadtrackPref == 2) { + if(!Joystick[S4]) ActKey(KEYON+PULSE+ResetHMDOrientation); // [Short: Reset HMD Orientation] [VR/VIVE/OCCULUS RIFT] + if(Joystick[S4]) ActKey(KEYON+PULSE+ToggleVoiceAttackGlobal); } } } // [Short+Pinky: VA Toggle] + + + + int initMicCommander() { // FUNCTION: Manages Microphone Internal/External Push-to-Talk buttons + if(Throttle[MSP]) { // [HOLD PTT] + MicCheckHold = 1; // Enable PTT Buttons + if(Throttle[EFROVER]) { // If Mic Toggle OFF: Use Internal PTT Voice Comms/Open Comms + if(ExternalMicInverse) { // Will Invert VoiceAttack listening when Internal Comms are used + ActKey(KEYON+PULSE+ToggleVoiceAttackGlobal); + ActKey(KEYON+PULSE+InternalVoiceCommsPTT); } + else { ActKey(KEYON+PULSE+InternalVoiceCommsPTT); } } + if(Throttle[EFRNORM]) { // If Mic Toggle ON: Use External PTT Voice Comms/Open Comms + if(ExternalMicInverse) { // Enables Inversed External PTT Channels (Enabling Discord will Disable VoiceAttack) + if(!MicExternalAction) { // Check if user preference match requirements for 'ExternalMicInverse' functionality (See NOTE 2 in AD_EDSettings.tmh file) + ActKey(KEYON+PULSE+ToggleVoiceAttackGlobal); // NOTE: This will only work correctly if Listening is enabled (ALT+F2) in VoiceAttack prior to first press of the PTT button + ActKey(KEYON+DOWN+ExternalVoiceCommsPTT); + MicExtHoldCheck = 1; } } + if(!ExternalMicInverse) { // Enables Independant External PTT Channels (Each channel separated by Pinky Trigger and can be used in any combination) + if(!Joystick[S4]) { + if(MicExternalAction) { // Check if user preference for External Voice is Toggle or PTT + ActKey(KEYON+PULSE+ExternalVoiceCommsPTT); + MicExtPulseCheck = 1; } + else { ActKey(KEYON+DOWN+ExternalVoiceCommsPTT); + MicExtHoldCheck = 1; } } + if(Joystick[S4]) { // If Mic Toggle ON + Pinky Trigger Held: Use Alternative External PTT Voice Comms Open Comms + if(MicExternalActionALT) { // Check if user preference for Alt. External Voice is Toggle or PTT + ActKey(KEYON+PULSE+ExternalVoiceCommsPTT_ALT); + MicExtPulseCheckALT = 1; } + else { ActKey(KEYON+DOWN+ExternalVoiceCommsPTT_ALT); + MicExtHoldCheckALT = 1; } } } } } + if(!Throttle[MSP] & MicCheckHold) { // [HOLD PTT] + MicCheckHold=!MicCheckHold; // Release PTT Buttons + if(Throttle[EFROVER]) { // If Mic Toggle OFF: Release Internal PTT Voice Comms Open Comms + if(ExternalMicInverse) { // Will Invert VoiceAttack listening when Internal Comms are used + ActKey(KEYON+PULSE+ToggleVoiceAttackGlobal); } } + if(Throttle[EFRNORM]) { + if(MicExtPulseCheck) { // Check if Internal, External or Alt. External was pressed, then release accordingly. + ActKey(KEYON+PULSE+ExternalVoiceCommsPTT); // If Mic Toggle ON: Release External PTT Voice Comms Open Comms + MicExtPulseCheck = 0; } + if(MicExtPulseCheckALT) { + ActKey(KEYON+PULSE+ExternalVoiceCommsPTT_ALT); // If Mic Toggle ON: Release Alternative External PTT Voice Comms Open Comms + MicExtPulseCheckALT = 0; } + if(ExternalMicInverse & MicExtHoldCheck) { + ActKey(KEYON+PULSE+ToggleVoiceAttackGlobal); } // Toggles VoiceAttack Back ON + if(MicExtHoldCheck | MicExtHoldCheckALT) { + ActKey(KEYON+UP+ExternalVoiceCommsPTT); // Release HOLDS + ActKey(KEYON+UP+ExternalVoiceCommsPTT_ALT); + MicExtHoldCheck = 0; + MicExtHoldCheckALT = 0; } } } + if(Throttle[EOLMOTOR]) { // [TOGGLE PTT] + MicCheckToggle = 1; // Enable Toggle + if(Throttle[EFROVER]) { + if(VerboseOutput) printf("Voice Comms: ^^ INTERNAL MIC OPEN ^^\x0a"); + ActKey(KEYON+PULSE+InternalVoiceCommsPTT); } // If Mic Toggle OFF: Use Internal PTT Voice Comms Open Comms + if(Throttle[EFRNORM]) { + if(!Joystick[S4]) { + if(VerboseOutput) printf("Voice Comms: ^^ MAIN EXTERNAL MIC OPEN ^^\x0a"); + if(MicExternalAction) ActKey(KEYON+PULSE+ExternalVoiceCommsPTT); // If Mic Toggle ON: Use External PTT Voice Comms Open Comms + if(!MicExternalAction) ActKey(KEYON+DOWN+ExternalVoiceCommsPTT); + MicExtToggleCheck = 1; } + if(Joystick[S4]) { + if(ExternalMicCombined) { // Check if user preference for External Voice Comms is Combined or Separate + if(VerboseOutput) printf("Voice Comms: ^^ BOTH EXTERNAL MICS OPEN ^^\x0a"); + MicExtToggleCombo = 1; + if(MicExternalAction & MicExternalActionALT) { // Depending on the user preferences, enable the correct combination of External Voice Comms + ActKey(KEYON+PULSE+ExternalVoiceCommsPTT); + ActKey(KEYON+PULSE+ExternalVoiceCommsPTT_ALT); } + if(!MicExternalAction & MicExternalActionALT) { + ActKey(KEYON+DOWN+ExternalVoiceCommsPTT); + ActKey(KEYON+PULSE+ExternalVoiceCommsPTT_ALT); } + if(MicExternalAction & !MicExternalActionALT) { + ActKey(KEYON+PULSE+ExternalVoiceCommsPTT); + ActKey(KEYON+DOWN+ExternalVoiceCommsPTT_ALT); } + if(!MicExternalAction & !MicExternalActionALT) { + ActKey(KEYON+DOWN+ExternalVoiceCommsPTT); + ActKey(KEYON+DOWN+ExternalVoiceCommsPTT_ALT); } } + if(!ExternalMicCombined) { + if(VerboseOutput) printf("Voice Comms: ^^ ALT EXTERNAL MIC OPEN ^^\x0a"); + if(MicExternalActionALT) ActKey(KEYON+PULSE+ExternalVoiceCommsPTT_ALT);// If Mic Toggle ON: Use Alternative External PTT Voice Comms Open Comms + if(!MicExternalActionALT) ActKey(KEYON+DOWN+ExternalVoiceCommsPTT_ALT); + MicExtToggleCheckALT = 1; } } } } + if(!Throttle[EOLMOTOR] & MicCheckToggle) { // [TOGGLE PTT] + MicCheckToggle=!MicCheckToggle; // Release Toggle + if(Throttle[EFROVER]) { + if(VerboseOutput) printf("Voice Comms: << INTERNAL MIC CLOSED <<\x0a"); + ActKey(KEYON+PULSE+InternalVoiceCommsPTT); } // If Mic Toggle OFF: Release Internal PTT Voice Comms Open Comms + if(Throttle[EFRNORM]) { + if(ExternalMicCombined) { // Check if user preference for External Voice Comms is Combined + if(MicExtToggleCombo) { // If Mic Toggle ON + Combined External: Release External PTT Voice Comms Open Comms + if(VerboseOutput) printf("Voice Comms: << BOTH EXTERNAL MICS CLOSED <<\x0a"); + MicExtToggleCombo = 0; + if(MicExternalAction & MicExternalActionALT) { // Depending on the user preferences, release the correct combination of External Voice Comms + ActKey(KEYON+PULSE+ExternalVoiceCommsPTT); + ActKey(KEYON+PULSE+ExternalVoiceCommsPTT_ALT); } + if(!MicExternalAction & MicExternalActionALT) { + ActKey(KEYON+UP+ExternalVoiceCommsPTT); + ActKey(KEYON+PULSE+ExternalVoiceCommsPTT_ALT); } + if(MicExternalAction & !MicExternalActionALT) { + ActKey(KEYON+PULSE+ExternalVoiceCommsPTT); + ActKey(KEYON+UP+ExternalVoiceCommsPTT_ALT); } + if(!MicExternalAction & !MicExternalActionALT) { + ActKey(KEYON+UP+ExternalVoiceCommsPTT); + ActKey(KEYON+UP+ExternalVoiceCommsPTT_ALT); } } + if(MicExtToggleCheck) { // If Mic Toggle ON + Combined External: Release External PTT Voice Comms Open Comms + if(VerboseOutput) printf("Voice Comms: << MAIN EXTERNAL MIC CLOSED <<\x0a"); + if(MicExternalAction) ActKey(KEYON+PULSE+ExternalVoiceCommsPTT); + if(!MicExternalAction) ActKey(KEYON+UP+ExternalVoiceCommsPTT); + MicExtToggleCheck = 0; } } + if(!ExternalMicCombined) { // Check if user preference for External Voice Comms is Separate + if(MicExtToggleCheck) { // If Mic Toggle ON + Not Combined External: Release External PTT Voice Comms Open Comms + if(VerboseOutput) printf("Voice Comms: << MAIN EXTERNAL MIC CLOSED <<\x0a"); + if(MicExternalAction) ActKey(KEYON+PULSE+ExternalVoiceCommsPTT); + if(!MicExternalAction) ActKey(KEYON+UP+ExternalVoiceCommsPTT); + MicExtToggleCheck = 0; } + if(MicExtToggleCheckALT) { // If Mic Toggle ON + Not Combined External: Release Alt. External PTT Voice Comms Open Comms + if(VerboseOutput) printf("Voice Comms: << ALT EXTERNAL MIC CLOSED <<\x0a"); + if(MicExternalActionALT) ActKey(KEYON+PULSE+ExternalVoiceCommsPTT_ALT); + if(!MicExternalActionALT) ActKey(KEYON+UP+ExternalVoiceCommsPTT_ALT); + MicExtToggleCheckALT = 0; } } } } } + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// 5. START-UP: REPORT SCRIPT STATES // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + int initPrintState() { // Display the status of the macro toggles & user prefs on run. + printf("-----------------------------------------------------------------------------------------------------------------------------------------------\x0a"); + printf(">> ENHANCEMENTS LOADING: v%d.%d.%d TARGET Mappings, Macros & Functions Decrypted <|>\x0a", ADVersionMajor, ADVersionMinor, ADVersionPoint); + printf("-----------------------------------------------------------------------------------------------------------------------------------------------\x0a"); + if(VerboseOutput) printf(":....USER PREFERENCES....:\x0a"); + printf("[Run Software @ Start = %d] [Custom Slider Curve = %d] [PIP Mgt. Preset = %d] [MFD Active = %d]\x0a", StartSoftware, CustomDXSliderCurve, UserPIPPref, UseMFD); + printf("[Cargo Precision Mode = %d] [S/Cruise @ Throttle = %d] [Chaff @ Escape = %d] [Boost @ Esc = %d]\x0a", CargoPrecisionMode, CruiseOnThrottle, AutoChaffOnEscape, AutoBoostOnEscape); + printf("[Combine External Mic = %d] [Sec. Fire Override = %d] [NightVision HUD = %d] [Ext Mic+Mic = %d]\x0a", ExternalMicCombined, SecFirePinkyPref, NightVisionHUD, ExternalMicCombined); + printf("[Headtrak Center Mode = %d] [Ship Utility Mode = %d] [LED Backlight = %d] [LED ¡Bling! = %d]\x0a", HeadtrackPref, ShipUtilityPref, SetLED, BlingLEDBling); + printf("[Throttle Axis O/ride = %d] [Joystik Axis O/ride = %d] [Throttle D/zone = %d] [Joys D/zone = %d]\x0a", ThrottleOverride, JoystickOverride, TFULL_DEADZONE, JS_DEADZONE); + if(VerboseOutput) printf("\x0a"); + if(VerboseOutput) printf(":..DEFAULT TOGGLE STATE..:\x0a"); + if(VerboseOutput) printf("[Combine Pri+Sec Fire = %d] [Rot. Correction = %d] [C/ Scoop = %d] [L/ Gear = %d] [Lights = %d]\x0a", combinePriSecFire, RCorrection, CargoSc, Gears, Lights); + printf("-----------------------------------------------------------------------------------------------------------------------------------------------\x0a"); + if(VerboseOutput) printf("Starting Macros... Compiling Functions... "); } + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// \ No newline at end of file diff --git a/Warthog Script/AD_EDHardware_v4.2.1.tmh b/Warthog Script/AD_EDHardware_v4.2.1.tmh new file mode 100644 index 0000000..e9b3169 --- /dev/null +++ b/Warthog Script/AD_EDHardware_v4.2.1.tmh @@ -0,0 +1,127 @@ +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// HARDWARE: JOYSTICK AXIS CURVES // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// Up,MVR,DN + short JS_CURVE[] = {0, 1, 2}; // Set via the Autopilot Switch (UP is most aggresive, DOWN is least aggressive) + short JS_ZOOM[] = {0, 0,-1}; + short YAW_CURVE[] = {0, 2, 3}; + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// HARDWARE: JOYSTICK AXIS MAPPINGS // // Define All Axis Curves/Trim/Deadzones for Device +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + int initSetJoystickCurves() { // Autopilot Select Switch position sets Joystick Curve Profile + profile = 1; // [APAH] // Three different presets are selectable On-The-Fly + if(Throttle[APPAT]) profile = 0; + if(Throttle[APALT]) profile = 2; + SetSCurve(&Joystick, JOYX, 0, JS_DEADZONE, 0, JS_CURVE[profile], JS_ZOOM[profile]); + SetSCurve(&Joystick, JOYY, 0, JS_DEADZONE, 0, JS_CURVE[profile], JS_ZOOM[profile]); + if(UseRuddersT16000 & UseRudderAxisCurves) SetSCurve(&TFRPRudder, TRUDDER, 0, TR_DEADZONE, 0, YAW_CURVE[profile], JS_ZOOM[profile]); + else if(UseRuddersTPR & UseRudderAxisCurves)SetSCurve(&TFRPHARudder, TFRPHA_RUDDER, 0, TR_DEADZONE, 0, YAW_CURVE[profile], JS_ZOOM[profile]); + if(!FAOFFToggle) { + if(UseRudderAxisCurves & VerboseOutput) printf("Joystick Profile[%d]: Yaw=%d, Curve=%d, Zoom=%d\x0a", profile, YAW_CURVE[profile], JS_CURVE[profile], JS_ZOOM[profile]); + else if(VerboseOutput) printf("Joystick Profile[%d]: Curve=%d, Zoom=%d\x0a", profile, JS_CURVE[profile], JS_ZOOM[profile]); } } + + + + int initJoystickAxis() { // Set Default Joystick Axis + if(VerboseOutput) printf("Initialising Joystick Axis... "); + MapAxis(&Joystick, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // JOY-X Axis + SetSCurve(&Joystick, JOYX, 0, 0, 0, 0, 0); + MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // JOY-Y Axis + SetSCurve(&Joystick, JOYY, 0, 0, 0, 0, 0); } + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// HARDWARE: THROTTLE AXIS MAPPINGS // // Define All Axis Curves/Trim/Deadzones for Device +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + // FLAP position sets Throttle Curve Profile + int initSetThrottleCurves() { // Three different presets are selectable On-The-Fly + mThrottleFwdOnly = EXEC( // Initialising Throttle Forward Only Preset (SRV etc) + "TrimDXAxis(DX_Z_AXIS, SET(-1024));" "TrimDXAxis(DX_ZROT_AXIS, SET(-1024));" // *TrimDXAxis(axis, +/-1024) trim is additive, SET forces trim value, CURRENT reads axis.pos + "if(CruiseOnThrottle == 0) { SetSCurve(&Throttle, THR_RIGHT, 0, -100, 0, 0); SetSCurve(&Throttle, THR_LEFT, 0, -100, 0, 0); }" // *SetSCurve(&Device, axis, left_deadzone%, center_deadzone%, right_deadzone%, curve(-20...20), scale) + "if(CruiseOnThrottle == 1) { SetSCurve(&Throttle, THR_RIGHT, 0, -95, 0, 0); SetSCurve(&Throttle, THR_LEFT, 0, -95, 0, 0); }" // Trims Axis 5% when Supercruise On Throttle Active + "if(VerboseOutput) printf(\"Throttle Profile: FORWARD ONLY [0 -> 100]\\x0a\");" + "SetThrottle();"); + mThrottleFwdNonLinear = EXEC( // Initialising Throttle Forward Only Non-Linear Preset (SRV etc) + "TrimDXAxis(DX_Z_AXIS, SET(-1024));" "TrimDXAxis(DX_ZROT_AXIS, SET(-1024));" // (See User Preferences to Set) + "SetCustomCurve(&Throttle, THR_RIGHT, AxisCurveMod);" "SetCustomCurve(&Throttle, THR_LEFT, AxisCurveMod);" // DX-SLIDER Non-Linear progression Curve + "if(VerboseOutput) printf(\"Throttle Profile: NON-LINEAR FORWARD ONLY [0 ~> 100]\\x0a\");" + "SetThrottle();"); + mThrottleFullScale = EXEC( // Initialising Throttle Full Range & Make Throttle Linear (Default) + "TrimDXAxis(DX_Z_AXIS, SET(0));" "TrimDXAxis(DX_ZROT_AXIS, SET(0));" // Initialising Throttle Full Scale Preset + "if(CruiseOnThrottle == 0) { SetSCurve(&Throttle, THR_RIGHT, 0, TFULL_DEADZONE, 0, 0); SetSCurve(&Throttle, THR_LEFT, 0, TFULL_DEADZONE, 0, 0); }" // ..(Alternative= "SetJCurve(&Throttle, THR_RIGHT, 50, 50);") + "if(CruiseOnThrottle == 1) { SetSCurve(&Throttle, THR_RIGHT, 0, TFULL_DEADZONE, 5, 0); SetSCurve(&Throttle, THR_LEFT, 0, TFULL_DEADZONE, 5, 0); }" // Trims Axis 5% when Supercruise On Throttle Active + "if(VerboseOutput) printf(\"Throttle Profile: FULL SCALE [-100 -> 100]\\x0a\");" + "SetThrottle();"); // *SetJCurve(&device, axis, physical axis value%, DirectX output value%) + mThrottleFullNonLinear = EXEC( // Initialising Throttle Full Range & Make Throttle Non-Linear + "TrimDXAxis(DX_Z_AXIS, SET(0));" "TrimDXAxis(DX_ZROT_AXIS, SET(0));" // (See User Preferences to Set) + "SetCustomCurve(&Throttle, THR_RIGHT, AxisCurveMod);" "SetCustomCurve(&Throttle, THR_LEFT, AxisCurveMod);" // DX-SLIDER Non-Linear progression Curve + "if(VerboseOutput) printf(\"Throttle Profile: NON-LINEAR [-100 ~> 100]\\x0a\");" + "SetThrottle();"); + mThrottleFullScaleCustom = EXEC( // Initialising Throttle Full Range & Max Shorter @ 80% Preset (ALTERNATIVE) + "TrimDXAxis(DX_Z_AXIS, SET(0));" "TrimDXAxis(DX_ZROT_AXIS, SET(0));" // Slightly Shorter Forward travel distance for my RSeat RS1 Cockpit setup. :) + "SetJCurve(&Throttle, THR_RIGHT, 80, 100);" "SetJCurve(&Throttle, THR_LEFT, 80, 100);" // (See User Preferences to Set) + "if(VerboseOutput) printf(\"Throttle Profile: FULL SCALE CUSTOM [-100 -> 80]\\x0a\");" + "SetThrottle();"); + mThrottleTrimmed = EXEC( // Initialising Throttle Trimmed 25% @ Beginning/End Preset (ALTERNATIVE) + "TrimDXAxis(DX_Z_AXIS, SET(0));" "TrimDXAxis(DX_ZROT_AXIS, SET(0));" // (See User Preferences to Set) + "SetSCurve(&Throttle, THR_RIGHT, -25, 0, -25, 0);" "SetSCurve(&Throttle, THR_LEFT, -25, 0, -25, 0);" + "if(VerboseOutput) printf(\"Throttle Profile: TRIMMED [-75 -> 75]\\x0a\");" + "SetThrottle();"); + mThrottlePrecision = EXEC( // Initialising Throttle Precision Preset (Docking etc) + "TrimDXAxis(DX_Z_AXIS, SET(0));" "TrimDXAxis(DX_ZROT_AXIS, SET(0));" // Allows Throttle Movement ONLY to the middle of blue zone + "SetSCurve(&Throttle, THR_RIGHT, 0, 2, 0, 2, -2);" "SetSCurve(&Throttle, THR_LEFT, 0, 2, 0, 2, -2);" + "if(VerboseOutput) printf(\"Throttle Profile: PRECISION [-50 -> 50]\\x0a\");" + "SetThrottle();"); } + + + + int initThrottleAxis() { // Set Default Throttle Axis + if(VerboseOutput) printf("Initialising Throttle Axis..\x0a"); + MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Right Throttle + SetJCurve(&Throttle, THR_RIGHT, 50, 50); + if(VerboseOutput) printf("Setting "); + if(ThrottleOverride == 0) { + if (Throttle[FLAPU]) ActKey(KEYON+PULSE+ThrottlePresetUP); // Configure Throttle FLAP Switch Position on Script Run + else if (Throttle[FLAPM]) ActKey(KEYON+PULSE+ThrottlePresetMID); + else ActKey(KEYON+PULSE+ThrottlePresetDOWN); } + if(ThrottleOverride == 1) ActKey(KEYON+PULSE+ThrottlePresetDEF); // Configure Throttle Axis Default When FLAP Switch is Customised in User Preferences. + if(!DisableLEFTTHRAxis) { + MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Left Throttle + SetSCurve(&Throttle, THR_LEFT, 0, 0, 0, 0, 0); } + MapAxis(&Throttle, SCX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Slew Control X Axis + SetSCurve(&Throttle, SCX, 0, 20, 0, 2, -1); + MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Slew Control Y Axis + SetSCurve(&Throttle, SCY, 0, 20, 0, 2, -1); + MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // Set Friction Control Axis Curve (Sensor Range Zoom Scaling) + if(CustomDXSliderCurve == 0) SetSCurve(&Throttle, THR_FC, 0, 0, 0, 0, 0); // (DEFAULT) + if(CustomDXSliderCurve == 1) SetCustomCurve(&Throttle, THR_FC, AxisCurveMod); // (OPTIONAL OVERRIDE) (Linear Recommended in ED) *LIST(Axis physical position, Axis output Value) + if(VerboseOutput & JoystickOverride) printf("Setting Joystick Profile: Curve=%d, Zoom=%d\x0a", JS_CURVE[JoystickPresetDEF], JS_ZOOM[JoystickPresetDEF]); // NOTE: For print out positioning/order (On Startup), this Joystick Axis Preset output text is in the Throttle Axis Preset function. + if(VerboseOutput) printf("-----------------------------------------------------------------------------------------------------------------------------------------------\x0a"); } + + + + int SetThrottle() { // Prevents Throttle jumping around on mode changes + DXAxis(DX_Z_AXIS, -AxisVal(Throttle[THR_RIGHT], &axdata)); + if(!DisableLEFTTHRAxis) DXAxis(DX_ZROT_AXIS, -AxisVal(Throttle[THR_LEFT], &axdata)); } + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// HARDWARE: RUDDER AXIS MAPPINGS // // Define All Axis Curves/Trim/Deadzones for Device +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + int initTFRPRudder() { // Initialise Thrustmaster TFRP (T.Flight T16000) Toe Pedal Axes (When enabled in AD_EDSettings) + SetSCurve(&TFRPRudder, TRUDDER, 0, TR_DEADZONE, 0, 0, 0); // Rudder Axis + SetSCurve(&TFRPRudder, TRPRIGHT, 0, TOE_DEADZONE, 0, 0, 0); // Right Toe Brake + SetSCurve(&TFRPRudder, TRPLEFT, 0, TOE_DEADZONE, 0, 0, 0); } // Left Toe Brake + + + + int initTFRPHARudder() { // Initialise Thrustmaster TFRPHA (T.Flight TPR) Toe Pedal Axes (When enabled in AD_EDSettings) + SetSCurve(&TFRPHARudder, TFRPHA_RUDDER, 0, TR_DEADZONE, 0, 0, 0); // Rudder Axis + SetSCurve(&TFRPHARudder, TFRPHA_RIGHT, 0, TOE_DEADZONE, 0, 0, 0); // Right Toe Brake + SetSCurve(&TFRPHARudder, TFRPHA_LEFT, 0, TOE_DEADZONE, 0, 0, 0); } // Left Toe Brake + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// diff --git a/Warthog Script/AD_EDKeyMap_v4.2.1.ttm b/Warthog Script/AD_EDKeyMap_v4.2.1.ttm new file mode 100644 index 0000000..4ff49e7 --- /dev/null +++ b/Warthog Script/AD_EDKeyMap_v4.2.1.ttm @@ -0,0 +1,324 @@ +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// KEY BINDINGS (Note: Not all Bindings are used in this script directly (these will be commented out below) Instead, they're mapped directly in ED Config.)// +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + // WEAPON CONTROL // + define PrimaryFire DX1 // JOY 1 (Also mapped to SHIFT+1 in ED Bindings) + define SecondaryFire DX3 // JOY 3 (Also mapped to SHIFT+2 in ED Bindings) + define DeployHardpoints USB[0x18] // U +// define NextFireGroup DX12 // +// define PrevFireGroup DX14 // + + + // TARGET CONTROL // + define SelectTargetAhead USB[0x17] // T + define SelectNextShip USB[0x0A] // G + define SelectPrevShip USB[0x05] // B + define SelectHighestThreat USB[0x1C] // Y + define SelectNextHostileShip USB[0x0B] // H + define SelectPrevHostileShip USB[0x11] // N + define SelectNextSubsystem USB[0x0C] // I + define SelectPrevSubsystem USB[0x0E] // K + define SelectNextSystemInRoute USB[0x10] // M + + + // FLIGHT CONTROL // + define ThrustUp USB[0x15] // R + define ThrustDown USB[0x09] // F + define ThrustLeft USB[0x14] // Q + define ThrustRight USB[0x08] // E +// define ThrustForward USB[0x63] // NUMPAD . +// define ThrustBack USB[0x67] // NUMPAD = + define EngineBoost USB[0x2B] // TAB + define FrameShiftDrive USB[0x0D] // J + define Supercruise USB[0x54] // NUMPAD / +// define Hyperspace DX12 // + define SetSpeedNeg100 USB[0x56] // NUMPAD - + define SetSpeedNeg75 USB[0x61] // NUMPAD 9 + define SetSpeedNeg50 USB[0x60] // NUMPAD 8 + define SetSpeedNeg25 USB[0x5F] // NUMPAD 7 + define SetSpeed0 USB[0x1B] // X + define SetSpeed25 USB[0x59] // NUMPAD 1 + define SetSpeed50 USB[0x5A] // NUMPAD 2 + define SetSpeed75 USB[0x5B] // NUMPAD 3 + define SetSpeed100 USB[0x57] // NUMPAD + + define IncreaseThrottle USB[0x1A] // W + define DecreaseThrottle USB[0x16] // S +// define ReverseThrottle DX10 // + define FlightAssist USB[0x1D] // Z + define RotationalCorrection USB[0x3D] // F4 + define AlternativeFlightMode USB[0x40] // F7 +// define ThrustForwardOnlyReverse L_CTL+USB[0x15] // CTRL+R + + + // SRV CONTROLS // + define SRVHandbrake L_CTL+USB[0x2D] // CTRL+- + define SRVTurret L_SHIFT+USB[0x18] // SHIFT+U + define SRVVerticalThrust USB[0x12] // O +// define SRVRecallDismissShip L_ALT+USB[0x1B] // ALT+X + + + // SHIP SYSTEMS // + define CargoScoop USB[0x4A] // HOME + define JettisonAllCargo L_CTL+USB[0x56] // CTRL+NUMPAD + define LandingGear USB[0x0F] // L + define ShipLights USB[0x49] // INSERT + define NightVision USB[0x38] // / + define PowerEng USB[0x52] // UP Arrow + define PowerWep USB[0x4F] // RIGHT Arrow + define PowerSys USB[0x50] // LEFT Arrow + define BalancePower USB[0x51] // DOWN Arrow + define IncreseSensorZoom USB[0x4B] // PAGE UP + define DecreaseSensorZoom USB[0x4E] // PAGE DOWN + define SwitchHUDMode USB[0x24] // 7 + + + // COOLING & COUNTERMEASURES // + define SilentRunning USB[0x4C] // DELETE + define DeployHeatSink USB[0x19] // V + define FireChaffLauncher USB[0x06] // C + define UseShieldCell L_SHIFT+USB[0x20] // SHIFT+3 + define ChargeECM L_SHIFT+USB[0x18] // SHIFT+U + + + // SCANNERS // (Note: These are mapped in ED Bindings directly) +// define DSSToggleFrontBackView USB[0x05] // B +// define DSSExitMode USB[0x2A] // Backspace +// define FSSDiscoveryScan DX1 // JOY 1 +// define FSSModeON L_ALT+USB[0x09] // ALT+F +// define FSSModeOFF L_SHIFT+USB[0x09] // SHIFT+F +// define FSSCameraPitchIncrease USB[0x1A] // W +// define FSSCameraPitchDecrease USB[0x16] // S +// define FSSCameraYawIncrease USB[0x07] // D +// define FSSCameraYawDecrease USB[0x04] // A +// define FSSZoomInToTarget L_SHIFT+USB[0x18] // SHIFT+U +// define FSSZoomOut USB[0x1B] // X +// define FSSZoomSteppedIn USB[0x15] // R +// define FSSZoomSteppedOut USB[0x09] // F +// define FSSRadioTuningIncrease USB[0x08] // E +// define FSSRadioTuningDecrease USB[0x14] // Q +// define FSSTargetCurrentSignal USB[0x17] // T +// define FSSShowHelp USB[0x06] // C + + + // WINGS // + define SelectWingman1 USB[0x25] // 8 + define SelectWingman2 USB[0x26] // 9 + define SelectWingman3 USB[0x27] // 0 + define WingmanTarget R_CTL // CTRL + define WingmanNavlock R_SHIFT // SHIFT + + + // SHIP LAUNCHED FIGHTERS // + define FighterDock L_ALT+USB[0x05] // ALT+B + define FighterDefensive L_ALT+USB[0x07] // ALT+D + define FighterAggressive L_ALT+USB[0x04] // ALT+A + define FighterFocusAttack L_ALT+USB[0x17] // ALT+T + define FighterHoldFire L_ALT+USB[0x0B] // ALT+H + define FighterHoldPosition L_ALT+USB[0x16] // ALT+S + define FighterFollow L_ALT+USB[0x09] // ALT+F + define FighterOrders L_ALT+USB[0x12] // ALT+O + + + // UI NAVIGATION // + define UISelect USB[0x2C] // Space + define UIBack USB[0x2A] // Backspace + define UIUp USB[0x1A] // W + define UIDown USB[0x16] // S + define UILeft USB[0x04] // A + define UIRight USB[0x07] // D + define UINextPanel USB[0x08] // E + define UIPrevPanel USB[0x14] // Q +// define UINextPage USB[0x06] // C +// define UIPrevPage USB[0x1D] // Z + define TargetPanel USB[0x1E] // 1 + define SystemPanel USB[0x21] // 4 + define CommsPanel USB[0x1F] // 2 + define QuickCommsPanel USB[0x28] // Enter + define RolePanel USB[0x20] // 3 + define UIEscape USB[0x29] // Escape + define SystemMap USB[0x33] // ; + define GalaxyMap L_SHIFT+USB[0x33] // : +// define CodexOpenDiscovery USB[0x23] // 6 +// define FriendsView USB[0x22] // 5 + + + // MULTICREW // (Note: These are mapped in ED Bindings directly) +// define MultiCrewModeToggle +// define MultiCrewPrimaryFire // Also mapped to Mouse 1 in ED Bindings +// define MultiCrewSecondaryFire // Also mapped to Mouse 2 in ED Bindings +// define MultiCrewPrimaryUtilFire L_SHIFT+USB[0x20] // SHIFT+3 +// define MultiCrewSecondaryUtilFire USB[0x19] // V +// define MultiCrewCycleUIForward +// define MultiCrewCycleUIBack + + + // HOLO-ME // (Note: These are mapped in ED Bindings directly) +// define HoloMEUndo USB[0x26] // 9 +// define HoloMERedo R_CTL // CTRL +// define HoloMEMouseRotation // Also mapped to Mouse 3 in ED Bindings + + + // PLAYLIST // + define GalNetAudioPlayPause L_ALT+USB[0x22] // ALT+5 + define GalNetAudioPrev L_ALT+USB[0x23] // ALT+6 + define GalNetAudioNext L_ALT+USB[0x24] // ALT+7 + define GalNetAudioClearQueue L_ALT+USB[0x25] // ALT+8 + + + // GALAXY MAP // (Note: These are mapped in ED Bindings directly) +// define GalaxyMapPitchUp L_CTL+USB[0x17] // CTRL+T +// define GalaxyMapPitchDown L_CTL+USB[0x0A] // CTRL+G +// define GalaxyMapYawLeft L_CTL+USB[0x14] // CTRL+Q +// define GalaxyMapYawRight L_CTL+USB[0x08] // CTRL+E +// define GalaxyMapTranslateForward L_CTL+USB[0x1A] // CTRL+W +// define GalaxyMapTranslateBack L_CTL+USB[0x16] // CTRL+S +// define GalaxyMapTranslateLeft L_CTL+USB[0x04] // CTRL+A +// define GalaxyMapTranslateRight L_CTL+USB[0x07] // CTRL+D +// define GalaxyMapTranslateUp L_CTL+USB[0x1C] // CTRL+Y +// define GalaxyMapTranslateDown L_CTL+USB[0x0B] // CTRL+H +// define GalaxyMapZoomIn L_CTL+USB[0x1D] // CTRL+Z +// define GalaxyMapZoomOut L_CTL+USB[0x1B] // CTRL+X +// define GalaxyCurrentSystem L_CTL+USB[0x06] // CTRL+C (Not currently mapped in bindings - currently C & V) + + + // HEADLOOK // +// define LookUp DXHATUP // +// define LookDown DXHATDOWN // +// define LookLeft DXHATLEFT // +// define LookRight DXHATRIGHT // + define LookToggle USB[0x3E] // F5 + define LookCenter L_CTL+USB[0x4D] // CTRL+END + + + // CAMERA SUITE // (Note: These are mapped in ED Bindings directly) +// define PreviousCamera L_ALT+USB[0x1E] // ALT+1 +// define NextCamera L_ALT+USB[0x1F] // ALT+2 +// define EnterFreeCameraMode USB[0x62] // NUMPAD 0 +// define ExitFreeCameraMode +// define CameraPreset1 L+CTL+USB[0x1E] // CTRL+1 (Cockpit FRONT) +// define CameraPreset2 L+CTL+USB[0x1E] // CTRL+2 (Cockpit BACK) +// define CameraPreset3 L+CTL+USB[0x1E] // CTRL+3 (Commander 1) +// define CameraPreset4 L+CTL+USB[0x1E] // CTRL+4 (Commander 2) +// define CameraPreset5 L+CTL+USB[0x1E] // CTRL+5 (Co-Pilot 1) +// define CameraPreset6 L+CTL+USB[0x1E] // CTRL+6 (Co-Pilot 2) +// define CameraPreset7 L+CTL+USB[0x1E] // CTRL+7 (Ship FRONT) +// define CameraPreset8 L+CTL+USB[0x1E] // CTRL+8 (Ship BACK) +// define CameraPreset9 L+CTL+USB[0x1E] // CTRL+9 (Ship LOW) +// define ToggleCameraHUD L_CTL // CTRL +// define CameraDecreaseSpeed USB[0x1E] // 9 +// define CameraIncreaseSpeed R_CTL // CTRL +// define CameraZoomIn +// define CameraZoomOut +// define CameraMoveForward +// define CameraMoveBack +// define CameraMoveRight +// define CameraMoveLeft +// define CameraMoveUp +// define CameraMoveDown +// define CameraRotationLock +// define CameraVehicleLock USB[0x62] // NUMPAD 0 +// define CameraWorldLock USB[0x2C] // Space +// define CameraZoomDOFToggle +// define CameraIncreaseBlur +// define CameraDecreaseBlur +// define CameraIncreaseFocus +// define CameraDecreaseFocus +// define AttachDetachCamera L+CTL+USB[0x06] // CTRL+C + + + // MISCELLANEOUS // + define InternalVoiceCommsPTT USB[0x31] // \ +// define ClassifiedCamera USB[0x3A] // F1 +// define ClassifiedCameraSRV L_ALT+USB[0x3A] // ALT+F1 + define OrbitalLines USB[0x2E] // = + define HideShipGUI L_CTL+L_ALT+USB[0x0A] // CTRL+ALT+G (Note: This cannot be modified!) + define ShowFramerate L_CTL++USB[0x09] // CTRL+F (Note: This cannot be modified!) + define ShowConnectionStatus L_CTL+USB[0x05] // CTRL+B (Note: This cannot be modified!) + define ShowCQCScoreboard USB[0x3F] // F6 + define PinkyTriggerDefault DX4 // JOY 4 + define HighResScreenshot L_ALT+USB[0x43] // ALT+F10 + define ChangeWeaponColor L_ALT+USB[0x1E] // ALT+1 + define ChangeEngineColor L_ALT+USB[0x1F] // ALT+2 + + + // EXTERNAL BINDINGS // + define ResetHMDOrientation L_CTL+USB[0x4A] // CTRL+HOME + define TrackIRCenter USB[0x4D] // END (Update your Center mapping in TrackIR software to match) + define TrackIRPause USB[0x48] // PAUSE (Update your Pause mapping in TrackIR software to match) + define TakeSteamScreenshot USB[0x45] // F12 (Map this to your Steam Client Take Screenshot hotkey) +// define ShowSteamOverlay L_SHIFT+USB[0x2B] // SHIFT+TAB (Map this to your Steam Client Overlay hotkey - used to open/close Steam Game Overlay interface) +// define ShowDiscordOverlay L_ALT+USB[0x3C] // ALT+F3 (Map this to your Discord Overlay hotkey - used to open/close Discord Overlay interface) +// define ShowDiscordChatViaOverlay L_ALT+USB[0x3D] // ALT+F4 (Map this to your Discord Chat Overlay hotkey - used to open Chat from within the Overlay interface)) + define GPUCaptureVideoAuto L_ALT+USB[0x44] // ALT+F11 (Note: Default NVidia Capture of ALT+F10 conflicts with Hi-Res Screenshots - This NEEDS to be updated in Geforce Experience/Overlay) + define GPUCaptureManual L_ALT+USB[0x42] // ALT+F9 (Map this & above to your NVidia/AMD/Fraps capture software) + define ExternalVoiceCommsPTT USB[0x55] // NUMPAD * (Map this to your Discord/Ventrilo/Mumble/Skype PTT Key) + define ExternalVoiceCommsPTT_ALT USB[0x35] // ~ (Map this to your Twitch/OBS/Youtube -> Secondary External PTT Key used with Modifier, mainly to support Streamers) + define ToggleVoiceAttackGlobal L_ALT+USB[0x3B] // ALT+F2 + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// VA Note: 99% of HCS Voice Attack default keys are already mapped, although manual alignment should no longer be required as VA now reads your bindings file. // +// Old Defaults list can be found here: (http://forum.hcsvoicepacks.com/forum/technical-support/user-guides-and-how-to/2701-default-keybinds) // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// REFERENCE: DEFAULT THRUSTMASTER WARTHOG DX MAPPINGS // // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// // +// JOYSTICK: // // Trim Control: // // TMS Hat: // // DMS Hat: // // CMS Hat: // // +// ------------------------------------------------------------------------------------------------------------------------------------------------------------// +// TG1 = DX1 H1U = DXHATUP H2U = DX7 H3U = DX11 H4U = DX15 // +// TG2 = DX6 H1D = DXHATDOWN H2D = DX9 H3D = DX13 H4D = DX17 // +// S1 = DX5 H1L = DXHATLEFT H2L = DX10 H3L = DX14 H4L = DX18 // +// S2 = DX2 H1R = DXHATRIGHT H2R = DX8 H3R = DX12 H4R = DX16 // +// S3 = DX3 H4P (Hat4 pressed down) = DX19 // +// S4 = DX4 // +// ------------------------------------------------------------------------------------------------------------------------------------------------------------// +// // +// THROTTLE: // // Mic Switch: // // Coolie Hat Switch: // Autopilot Switches: // Engine Fuel Flow: // FLAPS: // // IDLE: // // +// ------------------------------------------------------------------------------------------------------------------------------------------------------------// +// SC (slew pressed in) = DX1 MSP (mic pressed in) = DX2 CSU = DXHATUP APENG = DX26 EFLNORM = DX16 FLAPU = DX22 IDLERON = DX29 // +// LTB = DX15 MSU = DX3 CSR = DXHATRIGHT APPAT = DX27 EOLMOTOR = DX18 FLAPD = DX23 IDLELON = DX30 // +// SPDF = DX7 MSR = DX4 CSD = DXHATDOWN APALT = DX28 EFRNORM = DX17 // +// SPDB = DX8 MSD = DX5 CSL = DXHATLEFT EORMOTOR = DX19 // +// BSF = DX9 MSL = DX6 // +// BSB = DX10 // +// CHF = DX11 // EAC On/Off: // // Engine Oper Ign/Norm: // // APU Start Switch: // RDR/NORM: // // Landing Gear/Warning: // // +// CHB = DX12 ------------------------------------------------------------------------------------------------------------------------------------// +// PSF = DX13 // EACON = DX24 EOLIGN = DX31 APUON = DX20 RDRNRM = DX25 LDGH = DX21 // +// PSB = DX14 // EORIGN = DX32 // +// ------------------------------------------------------------------------------------------------------------------------------------------------------------// +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// REFERENCE: USB KEY DEFINITIONS // // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// // +// A USB[0x04] 1 USB[0x1E] ENTER USB[0x28] PRINT SCREEN USB[0x46] NUMPAD / USB[0x54] F1 USB[0x3A] // +// B USB[0x05] 2 USB[0x1F] ESCAPE USB[0x29] SCROLL LOCK USB[0x47] NUMPAD * USB[0x55] F2 USB[0x3B] // +// C USB[0x06] 3 USB[0x20] BACKSPACE USB[0x2A] PAUSE/BREAK USB[0x48] NUMPAD - USB[0x56] F3 USB[0x3C] // +// D USB[0x07] 4 USB[0x21] TAB USB[0x2B] NUM LOCK USB[0x53] NUMPAD + USB[0x57] F4 USB[0x3D] // +// E USB[0x08] 5 USB[0x22] SPACE USB[0x2C] INSERT USB[0x49] NUMPAD ENT USB[0x58] F5 USB[0x3E] // +// F USB[0x09] 6 USB[0x23] - USB[0x2D] HOME USB[0x4A] NUMPAD 1 USB[0x59] F6 USB[0x3F] // +// G USB[0x0A] 7 USB[0x24] = USB[0x2E] PAGE UP USB[0x4B] NUMPAD 2 USB[0x5A] F7 USB[0x40] // +// H USB[0x0B] 8 USB[0x25] { USB[0x2F] DELETE USB[0x4C] NUMPAD 3 USB[0x5B] F8 USB[0x41] // +// I USB[0x0C] 9 USB[0x26] } USB[0x30] END USB[0x4D] NUMPAD 4 USB[0x5C] F9 USB[0x42] // +// J USB[0x0D] 0 USB[0x27] \ USB[0x31] PAGE DOWN USB[0x4E] NUMPAD 5 USB[0x5D] F10 USB[0x43] // +// K USB[0x0E] EUROPE1** USB[0x32] NUMPAD 6 USB[0x5E] F11 USB[0x44] // +// L USB[0x0F] : USB[0x33] RIGHT ARROW USB[0x4F] NUMPAD 7 USB[0x5F] F12 USB[0x45] // +// M USB[0x10] ' USB[0x34] LEFT ARROW USB[0x50] NUMPAD 8 USB[0x60] F13 USB[0x68] // +// N USB[0x11] ~ USB[0x35] DOWN ARROW USB[0x51] NUMPAD 9 USB[0x61] F14 USB[0x69] // +// O USB[0x12] , USB[0x36] UP ARROW USB[0x52] NUMPAD 0 USB[0x62] F15 USB[0x6A] // +// P USB[0x13] . USB[0x37] NUMPAD . USB[0x63] F16 USB[0x6B] // +// Q USB[0x14] / USB[0x38] MUTE USB[0x7F] NUMPAD = USB[0x67] F17 USB[0x6C] // +// R USB[0x15] CAPS LOCK USB[0x39] VOL UP USB[0x80] F18 USB[0x6D] // +// S USB[0x16] VOL DOWN USB[0x81] F19 USB[0x6E] // +// T USB[0x17] L_CTL USB[0xE0] F20 USB[0x6F] // +// U USB[0x18] L_SHIFT USB[0xE1] EUROPE2** USB[0x64] F21 USB[0x70] // +// V USB[0x19] L_ALT USB[0xE2] APPLICATION USB[0x65] F22 USB[0x71] // +// W USB[0x1A] L_WIN USB[0xE3] POWER USB[0x66] F23 USB[0x72] // +// X USB[0x1B] R_CTL USB[0xE4] F24 USB[0x73] // +// Y USB[0x1C] R_SHIFT USB[0xE5] // +// Z USB[0x1D] R_ALT USB[0xE6] // +// R_WIN USB[0xE7] ** Further Special Keyboard Commands on page 54/60 of Target Script Editor Manual ** // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Warthog Script/AD_EDMacros_v4.2.1.tmh b/Warthog Script/AD_EDMacros_v4.2.1.tmh new file mode 100644 index 0000000..73be387 --- /dev/null +++ b/Warthog Script/AD_EDMacros_v4.2.1.tmh @@ -0,0 +1,213 @@ +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// START-UP: MACRO VARIABLE INITALISATION // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + int mRequestDock, mShowGameStats, mFastModeSwitch, mChatPanelGrab, mSignalLights, mSignalLightsLong, mReportCrimesToggle, mBoostBrake; + int mNAVBeaconWing, mNAVBeaconOff, mNAVBeaconToggle, mJumpMidSubSys, mJumpPrevSubSys, mJumpNextSubSys, mNextTurretModeX1, mNextTurretModeX2; + int mThrottleFwdOnly, mThrottleFullScale, mThrottlePrecision, mThrottleTrimmed, mThrottleFullNonLinear, mThrottleFwdNonLinear, mThrottleFullScaleCustom; // Configured for use in AD_EDHardware.tmh + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// MACROS: SPECIALISED SEQUENCES // // MACROS Include a series of automated key presses to perform a specific task. +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + int initCustomMacroCommands() { + mRequestDock = CHAIN( // MACRO: Auto-Docking Request + LOCK+PULSE+TargetPanel, D(250), + PULSE+UINextPanel, D(), // Limitation: This will only work correctly if Target Panel cursor in + PULSE+UINextPanel, D(), // Default/Orig position (On Galaxy Map), else will be misaligned. + PULSE+UISelect, D(250), + PULSE+UIRight, D(250), + PULSE+UISelect, D(250), + PULSE+UIPrevPanel, D(), + PULSE+UIPrevPanel, D(), + PULSE+UIBack, LOCK); + + mShowGameStats = CHAIN( // MACRO: Display the combined OSD FPS & Bandwidth meters + PULSE+ShowFramerate, D(150), + PULSE+ShowConnectionStatus); + + mFastModeSwitch = CHAIN( // MACRO: Automated Game Mode Switching + LOCK+PULSE+UIEscape, D(700), // From Cockpit, it will navigate the Game Menu to put you back at the Game Mode selection screen automatically! + PULSE+UIUp, D(400), + PULSE+UIUp, D(400), + PULSE+UISelect, D(500), + PULSE+UIRight, D(350), + PULSE+UISelect, D(8333), // ** Depending on the load times of your PC, this value may need to be changed/increased (6000ms is default) + PULSE+UISelect, LOCK); + + mSignalLights = CHAIN( // MACRO: Flash Ship/SRV Lights (Standard) + DOWN+ShipLights, D(800), // Will turn lights on & off 3 times @ short intervals + UP+ShipLights, D(600), + DOWN+ShipLights, D(1000), + UP+ShipLights, D(700), + DOWN+ShipLights, D(1000), + UP+ShipLights); + + mSignalLightsLong = CHAIN( // MACRO: Flash Ship/SRV Lights (Long) + DOWN+ShipLights, D(800), // Will turn lights on & off 6 times @ short intervals + UP+ShipLights, D(600), + DOWN+ShipLights, D(1000), + UP+ShipLights, D(700), + DOWN+ShipLights, D(1000), + UP+ShipLights, D(750), + DOWN+ShipLights, D(1300), + UP+ShipLights, D(800), + DOWN+ShipLights, D(1000), + UP+ShipLights, D(650), + DOWN+ShipLights, D(1000), + UP+ShipLights); + + mJumpMidSubSys = CHAIN( // MACRO: Select Previous Subsystem x2 when centering Pinky Throttle Toggle + PULSE+SelectPrevSubsystem, D(), // Toggle Pinky Throttle MID + CMS Hat Switch to activate + PULSE+SelectPrevSubsystem); + + mJumpPrevSubSys = CHAIN( // MACRO: Select Previous Subsystem x6 (Targets Powerplant, or close to it) + PULSE+SelectPrevSubsystem, D(), // Toggle Pinky Throttle UP + CMS Hat Switch to activate + PULSE+SelectPrevSubsystem, D(), + PULSE+SelectPrevSubsystem, D(), + PULSE+SelectPrevSubsystem, D(), + PULSE+SelectPrevSubsystem, D(), + PULSE+SelectPrevSubsystem); + + mJumpNextSubSys = CHAIN( // MACRO: Select Next Subsystem x5 (Targets ??, or close to it) + PULSE+SelectNextSubsystem, D(), // Toggle Pinky Throttle DOWN + CMS Hat Switch to activate + PULSE+SelectNextSubsystem, D(), + PULSE+SelectNextSubsystem, D(), + PULSE+SelectNextSubsystem, D(), + PULSE+SelectNextSubsystem); + + mReportCrimesToggle = CHAIN( // MACRO: [PVP] Toggles 'Report Crimes Against Me' from the System Panel (if cooldown timer is not active) + LOCK+PULSE+SystemPanel, D(250), // Toggle Pinky Trigger + Engine Fuel Flow Norm/Override Switches LEFT to activate + PULSE+UINextPanel, D(), + PULSE+UINextPanel, D(), // Limitation: This will only work correctly if System Panel cursor in + PULSE+UINextPanel, D(), // default/orig position, else will be misaligned. + PULSE+UIDown, D(250), + PULSE+UIDown, D(250), + PULSE+UIRight, D(250), + PULSE+UIRight, D(500), + PULSE+UISelect, D(150), + PULSE+UILeft, D(250), + PULSE+UILeft, D(250), + PULSE+UIUp, D(250), + PULSE+UIUp, D(250), + PULSE+UIPrevPanel, D(), + PULSE+UIPrevPanel, D(), + PULSE+UIPrevPanel, D(), + PULSE+UIBack, LOCK); + + mNAVBeaconWing = CHAIN( // MACRO: Toggle 'NAV Beacon' ON + LOCK+PULSE+SystemPanel, D(250), + PULSE+UINextPanel, D(), // Limitation: This will only work correctly if System Panel cursor in + PULSE+UINextPanel, D(), // Default/Orig position, else will be misaligned. Need to be in a Wing. + PULSE+UINextPanel, D(), + PULSE+UIRight, D(250), + PULSE+UIDown, D(150), + PULSE+UIDown, D(150), + PULSE+UIDown, D(150), + PULSE+UIDown, D(150), + PULSE+UISelect, D(250), + PULSE+UIDown, D(150), + PULSE+UISelect, D(250), + PULSE+UIUp, D(150), // Send selector back to home position when done + PULSE+UIUp, D(150), + PULSE+UIUp, D(150), + PULSE+UIUp, D(250), + PULSE+UILeft, D(250), + PULSE+UIPrevPanel, D(), + PULSE+UIPrevPanel, D(), + PULSE+UIPrevPanel, D(), + PULSE+UIBack, LOCK); + + mNAVBeaconOff = CHAIN( // MACRO: Toggle 'NAV Beacon' OFF + LOCK+PULSE+SystemPanel, D(250), + PULSE+UINextPanel, D(), // Limitation: This will only work correctly if System Panel cursor in + PULSE+UINextPanel, D(), // Default/Orig position, else will be misaligned. Need to be in a Wing. + PULSE+UINextPanel, D(), + PULSE+UIRight, D(250), + PULSE+UIDown, D(150), + PULSE+UIDown, D(150), + PULSE+UIDown, D(150), + PULSE+UIDown, D(150), + PULSE+UISelect, D(250), + PULSE+UISelect, D(150), + PULSE+UIUp, D(150), // Send selector back to home position when done + PULSE+UIUp, D(150), + PULSE+UIUp, D(150), + PULSE+UIUp, D(150), + PULSE+UILeft, D(250), + PULSE+UIPrevPanel, D(), + PULSE+UIPrevPanel, D(), + PULSE+UIPrevPanel, D(), + PULSE+UIBack, LOCK); + + mNAVBeaconToggle = SEQ( // SEQUENCE: Alternate 'NAV Beacon' ON <-> OFF [Allows both Nav Beacon Macros to be mapped to one button] + PULSE+mNAVBeaconWing, // Alternates between turning On & Off Wing NAV Beacon each press. Need to be in a Wing. + PULSE+mNAVBeaconOff); // (Unmapped by Default) + + mNextTurretModeX1 = CHAIN( // MACRO: Auto-Select Next Turret Mode (Cycle x1) from the System Panel + LOCK+PULSE+SystemPanel, D(250), // (Unmapped by Default) + PULSE+UINextPanel, D(), + PULSE+UINextPanel, D(), // Limitation: This will only work correctly if System Panel cursor in + PULSE+UINextPanel, D(), // default/orig position, else will be misaligned. + PULSE+UIRight, D(250), + PULSE+UIRight, D(250), + PULSE+UIDown, D(150), + PULSE+UISelect, D(300), // Select Turrent Mode 1x times + PULSE+UIUp, D(300), // Send selector back to home position when done + PULSE+UILeft, D(250), + PULSE+UILeft, D(250), + PULSE+UIPrevPanel, D(), + PULSE+UIPrevPanel, D(), + PULSE+UIPrevPanel, D(), + PULSE+UIBack, LOCK); + + mNextTurretModeX2 = CHAIN( // MACRO: Auto-Select Next Turret Mode (Cycle x2) from the System Panel + LOCK+PULSE+SystemPanel, D(250), // (Unmapped by Default) + PULSE+UINextPanel, D(), + PULSE+UINextPanel, D(), // Limitation: This will only work correctly if System Panel cursor in + PULSE+UINextPanel, D(), // default/orig position, else will be misaligned. + PULSE+UIRight, D(250), + PULSE+UIRight, D(250), + PULSE+UIDown, D(150), + PULSE+UISelect, D(300), + PULSE+UISelect, D(500), // Select Turrent Mode 2x times + PULSE+UIUp, D(300), // Send selector back to home position when done + PULSE+UILeft, D(250), + PULSE+UILeft, D(250), + PULSE+UIPrevPanel, D(), + PULSE+UIPrevPanel, D(), + PULSE+UIPrevPanel, D(), + PULSE+UIBack, LOCK); + + mChatPanelGrab = CHAIN( // MACRO: Reset GUI in preparation of Auto-Chat Response Text String (Used in initSendChatString()) + LOCK+PULSE+UIBack, D(50), // Lock and Exit any current GUI windows (x3). + PULSE+UIBack, D(50), // NOTE: If no GUI is selected, these commands will do nothing. + PULSE+UIBack, D(50), + PULSE+CommsPanel, D(250), // Open Full Comms Panel (+GUI Delay - Default: 250ms) (Delay ensures panel is Open and Text Box Active before entering characters) + PULSE+QuickCommsPanel, D(150), // Select/Enter Text Chat Box + LOCK); // Unlock Ready for Text String Input + + mBoostBrake = CHAIN( // MACRO: [PVP] Engine Boost + Auto-Brake + PULSE+EngineBoost, D(666), // Boost for a short period, then.. (shorter time = slower boost speed) + PULSE+LandingGear, D(3600), // Toggle Landing Gear as 'Air-Brake', then.. + PULSE+LandingGear); } // Close Landing Gear + + + int initEscapeVector() { // MACRO: Disengage Defensively + Emergency Escape Vector (Hold Pinky Trigger) + if(!StartupLock) { // *This line is only required to prevent running on startup + if(VerboseOutput) printf("EVASIVE MANEUVERS! Emergency Escape Vector Calculating...\x0a"); + ActKey(KEYON+PULSE+EXEC("initPIPMapper(SYS,ENG);")); // Set PIPs to SYSx4 ENGx2 - Defensive Get-a-way + if(AutoChaffOnEscape) DeferCall(500, &ActKey, KEYON+PULSE+FireChaffLauncher); // Optional: Auto-fire Chaff to cover your escape (See User Preferences to Set) + if(CargoSc) { DeferCall(750, &ActKey, KEYON+PULSE+CargoScoop); // Override: Cargo Scoop (will force close scoop, overriding toggle) + DeferCall(750, &ActKey, KEYON+PULSE+EXEC("CargoSc = 0;")); + DeferCall(750, &ActKey, KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED4)); } // set LED 4 OFF (Override) + if(Gears) { DeferCall(1000, &ActKey, KEYON+PULSE+LandingGear); // Override: Landing Gear (will force retract gears, overriding toggle) + DeferCall(1000, &ActKey, KEYON+PULSE+EXEC("Gears = 0;")); + DeferCall(1000, &ActKey, KEYON+PULSE+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED5)); } // set LED 5 OFF (Override) + if(AutoBoostOnEscape) DeferCall(1250, &ActKey, KEYON+PULSE+EngineBoost); // Optional: Auto-fire Boost to help evade (See User Preferences to Set) + if(HPoints) { DeferCall(1500, &ActKey, KEYON+PULSE+DeployHardpoints); // If Hardpoints are deployed, retract, ready for jump + DeferCall(1500, &ActKey, KEYON+PULSE+EXEC("HPoints = 0;")); } // Update Hardpoint variable value to retracted (0) + DeferCall(1750, &ActKey, KEYON+PULSE+FrameShiftDrive); } } // After Retracting Hardpoints etc, Engage FSD (or High Wake if another System is selected route) + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// diff --git a/Warthog Script/AD_EDUserPrefs_v4.2.1.tmh b/Warthog Script/AD_EDUserPrefs_v4.2.1.tmh new file mode 100644 index 0000000..a4b0de3 --- /dev/null +++ b/Warthog Script/AD_EDUserPrefs_v4.2.1.tmh @@ -0,0 +1,163 @@ +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// USER PREFERENCES // (1 = Yes, 0 = No) // ** CHANGE THESE SETTINGS TO YOUR PERSONAL PREFERENCES ** +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + // User Prefs allow easy modification of some alternative/optional script features without editing the code. + // START-UP // + define StartSoftware 0 // Start ED Launcher (&/or other 3rd Party Apps) when you Run the Script (Software List & Paths can be customised in AD_ED_v4.x.x.tmc) + // [NOTE: Doesn't work under Win10 -> Please use ED-BAT File included in download pack] + + define VerboseOutput 1 // Change Script Messaging Behaviour on Keypress Actions to determine if it will Print Output to the TARGET Window. + // Options: Enable = 1 (default) (On) Disable = 0 (Silent Mode / Off) + + int SetLED = 172 ;// Set LED Backlight Level on Throttle (Value 0-255) (Off = 0, default = 172) [Note: This can be adjusted On-The-Fly by using the Friction Control Axis + Pinky Trigger] + define BlingLEDBling 1 // Enables a Short Flashing LED Sequence when you flip a Toggle & will also enable a short start-up sequence pattern. Bling Bling! + // Options: Enable = 1 (default) Disable = 0 + + // CORE HARDWARE // + define KBLayout KB_ENG // Default Keyboard Layout (Change this to your local keyboard layout (KB_GER for German | KB_FR for French) otherwise some keys may not function correctly!) + + define UseMFD 0 // No MFD = 0 (default) One MFD = 1 (Right MFD) Two MFDs = 2 (Right & Left MFD) **UNMAPPED** **UNTESTED** + + define UseRuddersT16000 1 // TM TFRP/T16000 Rudders (EXCLUDED) = 0, TM TFRP/T16000 Rudders (FILTERED) = 1 (default) [NOTE : If TFRP Rudder pedals are NOT connected, or you run different brand pedals, neither user preference will run (Eventhandler code will never fire)] + define UseRuddersTPR 1 // TM TFRPPHA/TPR Rudders (EXCLUDED) = 0, TM TFRPHA/TPR Rudders (FILTERED) = 1 (default) [NOTE : If TFRP TPR Rudder pedals are NOT connected, or you run different brand pedals, neither user preference will run (Eventhandler code will never fire)] + // EXCLUDED = Doesn't Apply Any Specific Configuration (Standard) + // FILTERED = Applies Differential Toe Brake Configuration (Combines Toe Pedals for correct axis mapping in ED) + define UseRudderAxisCurves 0 // Match axis curve profiles by setting your Rudder axis curve based off your current Joystick axis curve. + // For All TM Rudder Pedals Users. Linear Curve = 0 (default) Use Joystick Curve Toggle = 1 + // [NOTE: Please ensure both UseRuddersT16000 & UseRuddersTPR are NOT = 1. Only enable your device plugged in, and disable the other, or this function will error] + + define HeadtrackPref 0 // Choose your preferred Headtracking hardware preset for mapping of the Center/Reset Orientation to Engine Operate Ign/Norm LEFT UP: + // Options: Mouse Headlook Center = 0 (default) (Choose if you have NO dedicated headtracking hardware) + // TrackIR Center = 1 (Choose if you use TrackIR head tracking system or related hardware like Tobi Eye Tracker) + // Reset HMD Orientation = 2 (Choose if you are a VR User with a Head Mounted Display) + // AXIS DEADZONES // + define TR_DEADZONE 5 // Set the Rudder Main Z-Axis Deadzone % (default = 5) (Use the Device Analyzer to validate) (Note: This value is used for both TFRP & TPR devices) + define TOE_DEADZONE 20 // Set the Rudder Toe Brake X-Axis Deadzone % (default = 20)(Use the Device Analyzer to validate) (Note: This value is used for both TFRP & TPR devices) + define JS_DEADZONE 1 // Set the Joystick X/Y Axis Deadzone % (default = 1) (Use the Device Analyzer to validate) + define TFULL_DEADZONE 5 // Set the Throttle 'Full Range' Deadzone % (default = 5) (Use the Device Analyzer to validate) (Note: Don't set this too high! [Max ~15%] It will intefer with the FSS tuning) + + // THROTTLE AXIS // + define CruiseOnThrottle 1 // Enable Supercruise on Throttle @ 100% and 0% = 1 (default) Disable = 0 [HOLD Pinky Trigger or CMS Hat to activate @ 100%/0%] + + define ThrottlePresetUP mThrottleFwdOnly // 7 Presets: mThrottleFwdOnly [ 0 -> 100] mThrottleFwdNonLinear [ 0 ~> 100] + define ThrottlePresetMID mThrottleFullScale // To mThrottleFullScale [-100 -> 100] mThrottleFullNonLinear[-100 ~> 100] + define ThrottlePresetDOWN mThrottlePrecision // Choose! mThrottleFullScaleCustom [-100 -> 80 ] mThrottlePrecision [ -50 -> 50 ] (This should be in the DOWN position when mapped) + // mThrottleTrimmed [ -75 -> 75 ] + // [Note: Full Range is Trimmed by ~5% when CruiseOnThrottle active] + + define ThrottleOverride 0 // Allows replacement of the Throttle Axis Preset Toggle to custom mappings. (NOTE: This will mean you will NOT be able to change your Throttle Axis Behaviour in-game) + // Options: Use Throttle Presets = 0 (default) Use Custom Toggle Mappings = 1 + define ThrottlePresetDEF mThrottleFullScale // If ThrottleOverride = 1, this setting will determine what Default Throttle Behaviour to be applied on script startup (Choose your preferred Throttle Preset) + define ThrottlePresetUPALT mNextTurretModeX1 // If ThrottleOverride = 1, this will determine what custom 'Pulse' mapping is applied to the UP direction of the Throttle Toggle. (NOTE: To avoid potential 3-way mapping conflicts, the MIDDLE position on the Toggle will remain NULL/Empty.) + define ThrottlePresetDWNALT mNextTurretModeX2 // If ThrottleOverride = 1, this will determine what custom 'Pulse' mapping is applied to the DOWN direction of the Throttle Toggle. (NOTE: To avoid potential 3-way mapping conflicts, the MIDDLE position on the Toggle will remain NULL/Empty.) + + define DisableLEFTTHRAxis 0 // Whenever a Throttle Preset is applied, it is applied to both the Left & Right Throttle Axes. ED only requires one to be mapped. This option allows you to disable the Left Throttle Axis if you require the mappings for another device axis in the virtual device. + // Options: Enable Left Axis = 0 (default) Disable Left Axis = 1 + // JOYSTICK AXIS // + define JoystickOverride 0 // Allows replacement of the Joystick Axis Preset Toggle to custom mappings. (NOTE: This will mean you will NOT be able to change your Joystick Axes Behaviour in-game & will remove any custom axis behaviour found in initSetJoystickCurves()) + // Options: Use Joystick Presets = 0 (default) Use Custom Toggle Mappings = 1 + define JoystickPresetDEF 1 // If JoystickOverride = 1, this setting will determine what Default Joystick Behaviour to be applied on script startup (Choose your preferred Joystick Preset) + // Joystick Curve Preset: Fast = 0 Standard = 1 (default) Slow = 2 + define JoystickPresetUPALT mSignalLights // If JoystickOverride = 1, this will determine what custom 'Pulse' mapping is applied to the UP direction of the Joystick Toggle. (NOTE: To avoid potential 3-way mapping conflicts, the MIDDLE position on the Toggle will remain NULL/Empty.) + define JoystickPresetDWNALT mSignalLightsLong // If JoystickOverride = 1, this will determine what custom 'Pulse' mapping is applied to the DOWN direction of the Joystick Toggle. (NOTE: To avoid potential 3-way mapping conflicts, the MIDDLE position on the Toggle will remain NULL/Empty.) + + // SHIP/SRV PIP CONFIG // + define UserPIPPref 2 // Choose your preferred PIP configuration [0 -> 3]: + // Options: Triple Tier = 3 (Tap/Short Hold/Long Hold) Double Tier = 2 (default) (Tap/Short Hold) + // Single Tier = 1 (ED Standard) (Tap) Double Tier = 0 (Inverted) (Short Hold/Tap) (ie. Hold = One PIP, Tap = Full PIPs) + // SHIP RADAR/VISION // + define CustomDXSliderCurve 1 // Enable an Offset Curve Arc for DX Slider (Radar Zoom) (Smooths the movement a little) + // Options: Compensate for non-linear acceleration = 1 (default). Default ED linear acceleration = 0. + + define NightVisionHUD 0 // Disables the Ship/SRV HUD GUI when Night Vision is Enabled (and Visa-Versa). + // Options: Hide HUD in Night Vision = 1. Show HUD in Night Vision = 0 (default). + + + // PRI-SEC FIRE CONTROL // + int combinePriSecFire = 1 ;// Set the default behaviour for the main Dual Stage Trigger (how full depression of trigger will work) (Note: You can still toggle this behaviour in-game) + // Options: Combine Primary+Secondary Fire on Trigger 2 = 1 (default) No Mapping on Trigger 2 = 0 (ie. main Trigger dedicated to Primary Fire) + + define SecFirePinkyPref 0 // User Defined Override for Secondary Fire (Pinky Button) (S3) (!*Removes Sec. Fire from Pinky Button*!) + // Options: Use Standard Secondary Fire Mapping (OFF) = 0 (default), User Defined Configuration (ON) = 1 (Map via PinkyBtnDefaultShort & PinkyBtnDefaultLong values below) + // [NOTE: Changing this from default '0' will mean you can only access Secondary Fire via the Dual-Stage Trigger, assuming combinePriSecFire = 1 -> Set your firegroups accordingly!] + define PinkyBtnDefaultShort ShipLights // User Defined Override: Set Short Pinky Button Press (if above SecFirePinkyPref = 1) (NOTE: Other commands can be found in the AD_EDKeyMap file, plus a few others listed a few lines above) + define PinkyBtnDefaultLong NightVision // User Defined Override: Set Long Pinky Button Press (if above SecFirePinkyPref = 1) (NOTE: Other commands can be found in the AD_EDKeyMap file, plus a few others listed a few lines above) + + + // UTILITY SLOT CONTROL // + define ShipUtilityPref 0 // Set your preferred Short/Long press for S1/S2 Buttons on Joystick. (Swaps Short & Long Presses based on your play style) + // EXPLORER/TRADER Preset = 0 (default) -> S1 [Short: Chaff, Long: Heat Sink], S2 [Short: ECM/SRV Turret, Long: Shield Cell] + // COMBAT Preset = 1 -> S1 [Short: Heat Sink, Long: Chaff], S2 [Short: Shield Cell, Long: ECM/SRV Turret] + // MICROPHONE BEHAVIOUR // + define ExternalMicCombined 0 // For OPEN Mic Toggle Switch on Throttle Base; combines Two External Voice Channels to One Toggle action: + // Options: Separate Channels = 0 (default), Combined Channels = 1 (Remember: Set your Keyboard PTT/Toggle Mappings in your External Programs) + define ExternalMicInverse 0 // For PUSH-TO-TALK Mic Button on Throttle Arm; changes behavior to inverse the external channels on PTT button between VoiceAttack & Discord (or your preferred external comms). When enabled '1' and button pressed, VoiceAttack will mute and Discord channel will open, ensuring no voice commands are sent while conversing with friends. When button is released, VoiceAttack is activated again & Discord channel is muted. + // Options: Two Independant Ext. Channels = 0 (default) Inverse VA <-> Discord Activation = 1 + // [NOTE 1: To ensure proper alignment, ensure Listening is enabled in VoiceAttack before your first Mic press.] + // [NOTE 2: Set 'MicExternalAction' to 0 and enable PTT in Discord/Comms (map to 'NUMPAD *')] + // [NOTE 3: Enabling this option will also inverse the Internal Comms Channel with VoiceAttack] + + define MicExternalAction 1 // Define Main External Voice Software Behaviour: (If your software is Toggle action (On/Off) = 1 (default), If it's Hold action (PTT) = 0) + define MicExternalActionALT 1 // Define Alternative External Voice Software Behaviour: (If your software is Toggle action (On/Off) = 1 (default), If it's Hold action (PTT) = 0) + + + // CARGO SCOOP TWEAKS // + int CargoPrecisionMode = 0 ;// Enable Automatically Changing to Throttle Mode 'Precision' when you Deploy Cargo Scoop = 1 Disable = 0 (default) + // [NOTE: Holding CMS Hat Switch Modifier + Engaging Cargo Scoop will Toggle Precision Mode ON/OFF On-The-Fly] + define CargoReturnMode 1 // When CargoPrecisionMode is ENABLED & Deployed Cargo Scoop is RETRACTED, Choose your preferred Throttle Mode to Exit/Return to: + // Options: Forward Only = 0 Full Range = 1 (default) Full Range Custom = 2 Trimmed = 3 [Hint: Set this to your usual throttle mode] + + // ESCAPE VECTOR MACRO // + define AutoChaffOnEscape 0 // During Escape Vector Macro, fire a Chaff automatically to cover your escape! = 1 Disable = 0 (default) + define AutoBoostOnEscape 0 // During Escape Vector Macro, fire an Engine Boost automatically to align your escape! = 1 Disable = 0 (default) + + + // PINKY 'DOUBLE TAP' OVERRIDE // // Recommended = SwitchHUDMode (default) (** if you remap to something else, then SwitchHUDMode will need to be mapped elsewhere to use Analysis Mode! **) + define UserDTPinkyKeyBind SwitchHUDMode // Choose a FAV action you want for -> COMBAT - FlightAssist, mJumpPrevSubSys, InternalVoiceCommsPTT, WingmanTarget, UseShieldCell, mReportCrimesToggle + // "Double Tap" on Pinky Trigger. -> SHIP - ShipLights, SetSpeed75, CargoScoop, SilentRunning, QuickCommsPanel, mRequestDock, BalancePower + // Some suggestions -> -> -> OTHER - mTextBasicHello, SelectNextSystemInRoute, FighterOrders, UIEscape, TakeSteamScreenshot, GalNetAudioPlayPause, LookToggle + // [NOTE 1: Most other keys in AD_EDKeyMap file not listed in suggestions should also work. Else see AD_EDMacros file to program some thing different/complex] + // [NOTE 2: If your FAV action requires a Hold action instead of a Pulse, edit the line 216 accordingly in AD_EDFunctions & line 190 in AD_ED_v4.x.x files] + + // User Defined Overrides for the Autopilot Engage Button (APENG): Choose Your Own Short & Long presses/macros + // AUTOPILOT BUTTON OVERRIDES // // [NOTE: Most other keys in AD_EDKeyMap file should also work as well as the Macros!] + define APEngageShort mSignalLights // Standard Short Press (No Mods) = mSignalLights (default) + define APEngageLong mSignalLightsLong // Standard Long Press (No Mods) = mSignalLightsLong (default) + define APEngagePinkyShort mRequestDock // Pinky Modifier + Short Press = mRequestDock (default) + define APEngagePinkyLong mRequestDock // Pinky Modifier + Long Press = mRequestDock (default) + define APEngageCMSShort mNAVBeaconWing // CMS Modifier + Short Press = mNAVBeaconWing (default) + define APEngageCMSLong mNAVBeaconOff // CMS Modifier + Long Press = mNAVBeaconOff (default) + + // NOTE: ONLY Change the text between the "quotes" (in RED) below. (SEE JOYSTICK REFERENCE MAP FOR HATSWITCH & SHIFT KEY LAYOUT) + // AUTO-TEXT CHAT PRESETS // // Define your custom chat variables here: // DO NOT Modify macro names (that means everything starting with "chat_"). + define chat_Basic_UP "o7" // Default: Hello (Non-Modifier Chat Mode) + define chat_Basic_DOWN "Fly safe CMDR" // Default: Farewell (Non-Modifier Chat Mode) + define chat_Basic_LEFT "Thank you for your assistance! o7" // Default: Thank (Non-Modifier Chat Mode) + define chat_Basic_RIGHT "Can I help you with something CMDR?" // Default: Query (Non-Modifier Chat Mode) + + define chat_Modifier_UP "You're a disgrace! Die! Time to see the Rebuy!" // Default: Attack (Modifier Chat Mode) + define chat_Modifier_DOWN "Stay calm, cut your engines and prepare to be scanned. Move and you will be fired upon"// Default: Scan (Modifier Chat Mode) + define chat_Modifier_LEFT "CMDR is coming through the mailslot" // Default: Announce (Modifier Chat Mode) + define chat_Modifier_RIGHT "Easy! Watch where you are going CMDR" // Default: Warn (Modifier Chat Mode) + + define chat_ClearChatBox "/clear" // (DO NOT modify!) // Clears the Comms Panel of all previous text chats. + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// EXPERIMENTAL PREFERENCES // +//-------------------------// + + // PIPs on DMS Hat Switch // + define PUP H3U // *EXPERIMENTAL* Moves the PIP Hat Switch (DMS) to the UI Hat Switch (CMS) for high frequency combat/bounty hunting usage. These values set the correct MapKey key mappings as per user preference. + define PDN H3D // Instructions: Remove the comments '//' for the 4 lines (157-160) below for the H4 Hat Switch (CMS) & then comment out '//' the 4 lines for the H3 Hat Switch (DMS) for lines (151-154). !~Remember to Save~! + define PLT H3L // [NOTE 1: CMS Push Button, including Modifier 2, remains unchanged regardless of option chosen] + define PRT H3R // [NOTE 2: If you decide to swap mappings, you will need to manually re-map ALL commands previously mapped on the UI/CMS Hat Switch via the bindings section in ED; see list below:] + // ( U NEED TO REMAP-> UI Up/Down/Left/Right, ) + // PIPs on CMS Hat Switch // // ( Next/Prev Sub-System, ) +// define PUP H4U // ( Next/Prev Fire Group, ) +// define PDN H4D // ( Headlook Center, ) +// define PLT H4L // ( Camera Zoom Focus -/+, ) +// define PRT H4R // ( Camera Blur -/+ ) + // ( (see reference maps on guide for hat switch layout) ) + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// diff --git a/Warthog Script/AD_ED_v4.2.1.tmc b/Warthog Script/AD_ED_v4.2.1.tmc new file mode 100644 index 0000000..9d1afab --- /dev/null +++ b/Warthog Script/AD_ED_v4.2.1.tmc @@ -0,0 +1,646 @@ +// =============================================================================================================================================================// +// Version 4.2.1 \\ Released Sept 2016 | Updated Oct 2019 // Public Release #24 // +// =============================================================================================================================================================// +// AUSSIEDROID'S ACKNOWLEDGEMENTS // // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// Standing on the Shoulders of Giants! Creation of this TARGET Script would not have been possible without amazing ED Scripts I found online created by: // +// Alexandr Zhevedenko, Michael Lehman (WraithMG11235), CMDR Clicker, DarKcyde & Thomas Duployez (CMDR Touille). Script continues to evolve with all the great // +// feedback, ideas, bug reports & sharing of code... the help & support shown on the forums/guide has been been amazing! !! You ALL Rock! Thank you !! // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// GENERAL INFO & LINKS // // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// Created by Aussiedroid: (http://steamcommunity.com/id/aussiedroid | https://forums.frontier.co.uk/member.php/21601-Aussiedroid) // +// Full Guide: (http://steamcommunity.com/sharedfiles/filedetails/?id=769637037) // +// GitHub Resource: (https://github.com/Aussiedroid/AD-EDWarthogEnhancedScript) // +// Frontier Forums Discussion Thread: (https://forums.frontier.co.uk/showthread.php/293027-Aussiedroid-s-Enhanced-Thrustmaster-Warthog-Script) // +// Some Previous Ver. Reference Maps: (https://aussiedroid.imgur.com/) // +// // +// What's New? Release Notes? -> Scroll to End-of-File OR read Changelog/History <- // +// // +// Need help understanding this script? -> Click the (?) HELP button in top right corner of Target Script Editor OR ask a question in the Forum/Guide <- // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// MINIMUM REQUIREMENTS: THRUSTMASTER TARGET SOFTWARE v3.0.18.328+ \ DRIVERS+FIRMWARE 2018+ ->(https://support.thrustmaster.com/en/product/hotaswarthog-en/)<- // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// ** RECOMMENDED RUNNING SCRIPT IN TARGET GUI & EDITING VIA TARGET SCRIPT EDITOR ** // +// ** REMINDER: CUSTOMISE/SET YOUR USER PREFERENCES IN AD_EDUSERPREFS FILE ** // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// INCLUDED FILES // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + include "Target.tmh" // Default System Import (Thrustmaster TARGET Functions) + include "AD_EDDefaults_v4.2.1.tmh" // Global Variable Settings, States & Timings/Delays + include "AD_EDUserPrefs_v4.2.1.tmh" // User Preferences & Script Customisation Options + include "AD_EDKeyMap_v4.2.1.ttm" // Variable Key Mapping & Reference Tables + include "AD_EDHardware_v4.2.1.tmh" // Joystick, Throttle & Rudder Axes/Curves Configuration + include "AD_EDMacros_v4.2.1.tmh" // Macro Definitions (Custom Sequences) + include "AD_EDFunctions_v4.2.1.tmh" // Function Definitions (Custom Logic for Buttons, Toggles & Ship Controls) + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// START-UP: DEVICE CHECK / MAIN // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + int main() { // Exclude Hardware from Virtual Device & Manage Additional Devices + Configure(&HCougar, MODE_EXCLUDED); + Configure(&T16000, MODE_EXCLUDED); + if(UseMFD == 0) { // No MFDs (Ignore configuring MFDs unless set in User Preferences) + Configure(&LMFD, MODE_EXCLUDED); + Configure(&RMFD, MODE_EXCLUDED); } + if(UseRuddersT16000 == 0) Configure(&TFRPRudder, MODE_EXCLUDED); // Enables Standard T.Flight T16000 Rudders + if(UseRuddersT16000 == 1) Configure(&TFRPRudder, MODE_FILTERED); // Enables Differential Toe Brakes on T.Flight T16000 Rudders (for mapping through Target Script) + if(UseRuddersTPR == 0) Configure(&TFRPHARudder, MODE_EXCLUDED); // Enables Standard T.Flight TPR Pedals + if(UseRuddersTPR == 1) Configure(&TFRPHARudder, MODE_FILTERED); // Enables Differential Toe Brakes on T.Flight TPR Pedals (for mapping through Target Script)Configure(&TFRPHARudder, MODE_FILTERED); + + if(Init(&EventHandle)) return 1; + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// START-UP: SOFTWARE // // *system("spawn -w \"software main folder" \"exe shortcut""); (*May not work on Win 10* - Use EDBAT instead) +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + if(StartSoftware == 1) { // Auto-Load on Script Run (Customise Example Paths below OR Add Your Own) + if(VerboseOutput) printf("Booting external software suite for Elite Dangerous...Done\x0a"); // (Note: All path '\' need to be '\\' for it to work) +// system("spawn -w \"C:\\Program Files (x86)\\NaturalPoint\\TrackIR5\" \"C:\\Program Files (x86)\\NaturalPoint\\TrackIR5\\TrackIR5.exe\""); // TRACKIR (URL= http://www.naturalpoint.com/trackir/) +// system("spawn -w \"C:\\Program Files (x86)\\VoiceAttack\" \"C:\\Program Files (x86)\\VoiceAttack\\VoiceAttack.exe\""); // VOICE ATTACK (URL= https://voiceattack.com/) +// system("spawn -w \"C:\\Program Files (x86)\\VoiceAttack\\Apps\\EDDI\" \"C:\\Program Files (x86)\\VoiceAttack\\Apps\\EDDI\\EDDI.exe""); // EDDI (URL= https://github.com/EDCD/EDDI/wiki) +// system("spawn -w \"C:\\Program Files (x86)\\EDMarketConnector\" \"C:\\Program Files (x86)\\EDMarketConnector\\EDMarketConnector.exe\""); // EDMC (URL= https://github.com/Marginal/EDMarketConnector/wiki) +// system("spawn -w \"C:\\Program Files (x86)\\EDDiscovery\" \"C:\\Program Files (x86)\\EDDiscovery\\EDDiscovery.exe\""); // EDDISCOVERY (URL= https://github.com/EDDiscovery/EDDiscovery/wiki) +// system("spawn -w \"C:\\Program Files\\EDFX\" \"C:\\Program Files\\EDFX\\EDFX64.exe\""); // EDFX (URL= http://edcodex.info/?m=tools&entry=58) +// system("spawn -w \"C:\\Users\\\\AppData\\Local\\Discord\" \"C:\\Users\\\\AppData\\Local\\Discord\\app-0.0.297\\Discord.exe\""); // DISCORD (URL= https://discordapp.com/) +// system("spawn -w \"C:\\Program Files (x86)\\Steam\\steamapps\\common\\Elite Dangerous\" \"C:\\Program Files (x86)\\Steam\\steamapps\\common\\Elite Dangerous\\EDLaunch.exe\""); // ELITE DANGEROUS LAUNCHER + } + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// CORE SETTINGS: INITIALISATION // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + AxisCurveMod = LIST(0,0, 33,25, 66,50, 80,75, 100,100); // Creates a custom axis curve for Throttle & Radar. [Faster->Slower Curve] (See AD_EDHardware.tmh) *LIST(Axis physical position, Axis output Value) + + SetKBRate(PulseTime, DelayTime); // Base Settings (See AD_EDDefaults.tmh) + SetKBLayout(KBLayout); + + + // FUNCTION START // + initCustomMacroCommands(); // Initiate Custom Macros & Functions (See AD_EDMacros.tmh) + initEscapeVector(); // Initiate Advanced Macro to perform a tactical withdraw from combat (Retract Hardpoints, Set Defensive PIPs, Auto Boost/Chaff, Engage Supercruise) (See AD_EDMacros.tmh) + initSetThrottleCurves(); // Initiate Mapping of Custom Throttle Curves (3 Presets configurable in AD_EDUserPrefs.tmh) + initPrintState(); // Initiate Display Script Settings to Output Window in Script/GUI (See AD_EDFunctions.tmh) + initPIPMapper(); // Initiate PIP Configuration Mapper (See AD_EDFunctions.tmh) + initSetCombinedFire(0); // Initiate Mapping Logic to enable/disable the Dual-Stage Primary Trigger with either Primary & Secondary Fire Combined OR Primary Fire Only (Nothing mapped to 2nd stage). (See AD_EDFunctions.tmh) + initToggleRotationCorrection(); // Initiate Toggle Mapping for Rotational Correction (LED Support) (See AD_EDFunctions.tmh) + initToggleSilentRunning(); // Initiate Toggle Mapping for Silent Running (LED Support) (See AD_EDFunctions.tmh) + initEnhancedFAOFF(); // Initiate Toggle Mapping for Flight Assist Off (LED Support, Auto-Joystick Curve adjust) (See AD_EDFunctions.tmh) + initToggleLandingGear(); // Initiate Toggle Mapping for Landing Gear (LED Support) (See AD_EDFunctions.tmh) + initToggleCargoScoop(); // Initiate Toggle Mapping for Cargo Scoop (LED Support) (See AD_EDFunctions.tmh) + initIDLEMaster(); // Initiate Advanced Function to disable Throttle (& Boost) when engaging Throttle IDLE/Afterburner Lock Indent. Will also enable SRV Handbrake. (See AD_EDFunctions.tmh) + initHeadlookModeSelect(); // Initiate Custom mapping preference for Headlook Centering based on your hardware (TrackIR, VR, Mouse) (See AD_EDFunctions.tmh) + initHardpointManagement(); // Initiate Advanced Function integrating all Hardpoint/Other functions related to the Red Left Throttle Button (See AD_EDFunctions.tmh) + initMicCommander(); // Initiate Full control over Internal & External Mic Push-to-Talk functionality for Hold & Toggle configurations (See AD_EDFunctions.tmh) + initUserHotSlotPinkyTrigger(); // Initiate Double Tap Functionality on the Joystick Pinky Trigger (See AD_EDFunctions.tmh) + initLEDController(0); // Initiate Short LED Flashing Sequence on Toggle Flip & a Pattern on Startup. (LED Support) (See AD_EDFunctions.tmh) + initAPEngageEnhancer(); // Initiate Autopilot Engage button customisation (See AD_EDFunctions.tmh) (includes Auto-Dock & Signal Light Macros) + initExplorerScannerDisengage(); // Initiate Repeater Fire Explorer-Scanner Disengage/Off Console Printout + + + + // HARDWARE CONFIG // + initJoystickAxis(); // Initiate HOTAS Axis Mappings + initThrottleAxis(); + + if(UseMFD > 0) initRightMFD(); // Initiate the First MFD Only (Initialise via MAP MFD CONTROLS section below) *UNTESTED* + if(UseMFD > 1) initLeftMFD(); // Initiate the First+Second MFD (Initialise via MAP MFD CONTROLS section below) *UNTESTED* + + if(UseRuddersT16000 == 1) initTFRPRudder(); // Enables T.Flight TFRP T16000 Rudder Intialisation. (Note: T.Flight Rudder Axes are Configured below in EVENT HANDLER) + if(UseRuddersTPR == 1) initTFRPHARudder(); // Enables T.Flight TPR Pedal Intialisation. (Note: T.Flight Rudder Axes are Configured below in EVENT HANDLER) + + // Syntax: KeyAxis(&Device, axis name, layer(s), AXMAP1(number of zones, up event, down event, optional center event); + if(CruiseOnThrottle == 1) KeyAxis(&Throttle, THR_RIGHT, 0, AXMAP1(LIST(0,1,99,100), // Supercruise on Throttle 100% / 0% [Note: Throttle Axis 'Full Range' Curves adjusted -10% when active] (This sets 3 zones on the axis, 0-1%, 1-99%, 99-100% for mapping) + EXEC("if(Joystick[S4]) ActKey(KEYON+PULSE+FrameShiftDrive);" // 99-100% IF Pinky Modifier Held, Activate Hyperspace Jump (Up Event) + "if(Joystick[H4P]) ActKey(KEYON+PULSE+Supercruise);"), // 99-100% IF CMS Modifier Held, Activate Supercruise (Up Event) + EXEC("if(Joystick[S4]) ActKey(KEYON+PULSE+FrameShiftDrive);" // 0-1% IF Pinky Modifier Held, Activate Hyperspace Jump (Down Event) + "if(Joystick[H4P]) ActKey(KEYON+PULSE+Supercruise);"), // 0-1% IF CMS Modifier Held, Activate Supercruise (Down Event) + 0)); // 1-99% ELSE do nothing (Center Event) + + + // AXIS PRESET TOGGLES // // Map Flaps Select Toggle to Throttle Axis Presets & Set Overrides + if(ThrottleOverride == 0) { // Default Throttle Axis Preset Toggle Configuration + MapKey(&Throttle, FLAPU, EXEC("if(!Throttle[IDLELON]) ActKey(KEYON+PULSE+ThrottlePresetUP);")); // Flaps UP (Safety: Only Activate When Throttle IDLE is not Locked ON) + MapKey(&Throttle, FLAPM, EXEC("if(!Throttle[IDLELON]) ActKey(KEYON+PULSE+ThrottlePresetMID);")); // Flaps MIDDLE (Safety: Only Activate When Throttle IDLE is not Locked ON) + MapKey(&Throttle, FLAPD, EXEC("if(!Throttle[IDLELON]) ActKey(KEYON+PULSE+ThrottlePresetDOWN);")); }// Flaps DOWN (Safety: Only Activate When Throttle IDLE is not Locked ON) + if(ThrottleOverride == 1) { // User Configured Throttle Axis Preset Toggle Configuration (set in the User Prefs) + MapKey(&Throttle, FLAPU, EXEC("ActKey(KEYON+PULSE+ThrottlePresetUPALT);")); // Flaps UP (Safety: Only Activate When Throttle IDLE is not Locked ON) + MapKey(&Throttle, FLAPM, 0); // Flaps MIDDLE (Default: Not mapped to avoid conflicts) + MapKey(&Throttle, FLAPD, EXEC("ActKey(KEYON+PULSE+ThrottlePresetDWNALT);")); } // Flaps DOWN (Safety: Only Activate When Throttle IDLE is not Locked ON) + + // Map Throttle Autopilot to Joystick Curve Presets + if(JoystickOverride == 0) { // Default Joystick Axis Preset Toggle Configuration + MapKey(&Throttle, APPAT, EXEC("initSetJoystickCurves();")); // Autopilot PATH UP + MapKey(&Throttle, APAH, EXEC("initSetJoystickCurves();")); // Autopilot ALT/HDG MIDDLE (Default) + MapKey(&Throttle, APALT, EXEC("initSetJoystickCurves();")); } // Autopilot ALT DOWN + if(JoystickOverride == 1) { // User Configured Joystick Axis Preset Toggle Configuration (set in the User Prefs) + if(StartupLock) { // On Startup Only, set the default Joystick Behaviour (set in the User Prefs) + SetSCurve(&Joystick, JOYX, 0, JS_DEADZONE, 0, JS_CURVE[JoystickPresetDEF], JS_ZOOM[JoystickPresetDEF]); // Set Joystick X Axis + SetSCurve(&Joystick, JOYY, 0, JS_DEADZONE, 0, JS_CURVE[JoystickPresetDEF], JS_ZOOM[JoystickPresetDEF]); }// Set Joystick Y Axis + MapKey(&Throttle, APPAT, EXEC("ActKey(KEYON+PULSE+JoystickPresetUPALT);")); // Autopilot PATH UP + MapKey(&Throttle, APAH, 0); // Autopilot ALT/HDG MIDDLE (Default: Not mapped to avoid conflicts) + MapKey(&Throttle, APALT, EXEC("ActKey(KEYON+PULSE+JoystickPresetDWNALT);")); } // Autopilot ALT DOWN + + + StartupLock = 0; // Startup Pre-checks: "Releases" the Startup Lock post initialising the Macros/Functions/Hardware above. + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// MAP JOYSTICK CONTROLS // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + // PRIMARY FIRE // + SetShiftButton(&Joystick, S4, &Throttle, PSF, PSB); // Set Shift Button (Pinky Toggle Switch) for MapKeyIOUMD (With UDTOGGLE = Toggle, Without = Hold -> See Page 22 of manual) + + MapKeyIOUMD(&Joystick, TG1, // Trigger 1 [Primary Trigger] + SEQ( EXEC( "ActKey(KEYON+DOWN+PrimaryFire); EndlessStatePri = 1; if(VerboseOutput) printf(\"Repeater Fire: COMBAT-ENDLESS [ON] (PRIMARY)\\x0a\");"), // IU + EXEC( "ActKey(KEYON+UP+PrimaryFire); EndlessStatePri = 0; if(VerboseOutput) printf(\"Repeater Fire: COMBAT-ENDLESS [OFF] (PRIMARY)\\x0a\");")), + EXEC( "ActKey(KEYON+DOWN+PrimaryFire);"), // OU + EXEC("if(!Joystick[H4P]) ActKey(KEYON+DOWN+PrimaryFire); if(VerboseOutput) printf(\"Repeater Fire: EXPLORER-SCANNER [ON] (PRIMARY)\\x0a\");" // IM + "if(!Joystick[H4P]) DeferCall(ScanTimer, &ActKey, KEYON+UP+PrimaryFire); DeferCall(ScanTimer, &ActKey, initExplorerScannerDisengage());" + "if(Joystick[H4P]) initSetCombinedFire(1);"), + EXEC( "ActKey(KEYON+DOWN+PrimaryFire);"), // OM + SEQ(REXEC(0, MineTimer, "ActKey(KEYON+PULSE+PrimaryFire); if(VerboseOutput) printf(\"Repeater Fire: MINING-AUTO-PULSE [^FIRED^] (PRIMARY)\\x0a\");", RNOSTOP), // ID + EXEC( "StopAutoRepeat(0); if(VerboseOutput) printf(\"Repeater Fire: MINING-AUTO-PULSE [DISABLE] (PRIMARY)\\x0a\");")), + EXEC( "ActKey(KEYON+DOWN+PrimaryFire);")); // OD + MapKeyRIOUMD(&Joystick, TG1, // Release Trigger 1 [Primary Trigger] + 0, EXEC("if(!EndlessStatePri) ActKey(KEYON+UP+PrimaryFire);"), // IU, OU // Only Releases if Combat-Endless Mode is NOT enabled (keeps sequence in sync) + 0, EXEC("if(!EndlessStatePri) ActKey(KEYON+UP+PrimaryFire);"), // IM, OM + 0, EXEC("if(!EndlessStatePri) ActKey(KEYON+UP+PrimaryFire);")); // ID, OD +// MapKey(&Joystick, TG2, SecondaryFire); // Trigger 2 [Second Stage Trigger] (Mapped in initHardpointManagement()) +// MapKeyR(&Joystick, TG2, EXEC("ActKey(KEYON+UP+SecondaryFire);")); // Release Trigger 2 [Second Stage Trigger] (Keeps Primary firing after releasing Secondary Tier) + MapKeyR(&Joystick, TG2, EXEC("if(combinePriSecFire) ActKey(KEYON+UP+SecondaryFire);" // Release Trigger 2 [Second Stage Trigger] + "if(combinePriSecFire) ActKey(KEYON+DOWN+PrimaryFire);")); // (Keeps Primary Fire firing after releasing Secondary Tier Trigger) + + // UTILITY SLOTS // + if(ShipUtilityPref == 0) { + MapKey(&Joystick, S1, TEMPO(PULSE+FireChaffLauncher, PULSE+DeployHeatSink, LongPressDelay)); // Master Mode Control [Short: Chaff, Long: Heat Sink] + MapKey(&Joystick, S2, TEMPO(SRVTurret, PULSE+UseShieldCell, LongPressDelay)); } // Weapon Release [Short: ECM/SRV Turret, Long: Shield Cell] + if(ShipUtilityPref == 1) { + MapKey(&Joystick, S1, TEMPO(PULSE+DeployHeatSink, PULSE+FireChaffLauncher, LongPressDelay)); // Master Mode Control [Short: Heat Sink, Long: Chaff] + MapKey(&Joystick, S2, TEMPO(PULSE+UseShieldCell, SRVTurret, LongPressDelay)); } // Weapon Release [Short: Shield Cell, Long: ECM/SRV Turret] + + + // SECONDARY FIRE // + if(SecFirePinkyPref == 0) { + MapKeyIOUMD(&Joystick, S3, // Pinky Button [Secondary Fire] + SEQ( EXEC( "ActKey(KEYON+DOWN+SecondaryFire); EndlessStateSec = 1; if(VerboseOutput) printf(\"Repeater Fire: COMBAT-ENDLESS [ON] (SECONDARY)\\x0a\");"), // IU + EXEC( "ActKey(KEYON+UP+SecondaryFire); EndlessStateSec = 0; if(VerboseOutput) printf(\"Repeater Fire: COMBAT-ENDLESS [OFF] (SECONDARY)\\x0a\");")), + EXEC( "ActKey(KEYON+DOWN+SecondaryFire);"), // OU + EXEC( "ActKey(KEYON+DOWN+SecondaryFire); if(VerboseOutput) printf(\"Repeater Fire: EXPLORER-SCANNER [ON] (SECONDARY)\\x0a\");" // IM + "DeferCall(ScanTimer, &ActKey, KEYON+UP+SecondaryFire); DeferCall(ScanTimer, &ActKey, initExplorerScannerDisengage());"), + EXEC( "ActKey(KEYON+DOWN+SecondaryFire);"), // OM + SEQ(REXEC(0, MineTimer, "ActKey(KEYON+PULSE+SecondaryFire); if(VerboseOutput) printf(\"Repeater Fire: MINING-AUTO-PULSE [^FIRED^] (SECONDARY)\\x0a\");", RNOSTOP), // ID + EXEC( "StopAutoRepeat(0); if(VerboseOutput) printf(\"Repeater Fire: MINING-AUTO-PULSE [DISABLE] (SECONDARY)\\x0a\");")), + EXEC( "ActKey(KEYON+DOWN+SecondaryFire);")); // OD + MapKeyRIOUMD(&Joystick, S3, // Release Pinky Button [Secondary Fire] + 0, EXEC("if(!EndlessStateSec) ActKey(KEYON+UP+SecondaryFire);"), // IU, OU // Only Releases if Combat-Endless Mode is NOT enabled (keeps sequence in sync) + 0, EXEC("if(!EndlessStateSec) ActKey(KEYON+UP+SecondaryFire);"), // IM, OM + 0, EXEC("if(!EndlessStateSec) ActKey(KEYON+UP+SecondaryFire);")); } // ID, OD + if(SecFirePinkyPref == 1) { + MapKey(&Joystick, S3, TEMPO(PULSE+PinkyBtnDefaultShort, PULSE+PinkyBtnDefaultLong, LongPressDelay)); } // Pinky Button [USER DEFINED] [Short/Long: Set in User Preference] + + + // DOUBLE-TAP PINKY TRIGGER // + MapKey(&Joystick, S4, EXEC("initUserHotSlotPinkyTrigger();")); // Trigger 3 [Pinky Trigger] [Modifier Key] [DO NOT REMAP!] + MapKeyR(&Joystick, S4, UP+PinkyTriggerDefault); // Release Pinky Trigger [Modifier Key] (Disable with // if using the line below) +// MapKeyR(&Joystick, S4, UP+UserDTPinkyKeyBind); // Release ALT (enable by removing the //, if Double Tap Pinky Trigger mapping needs a 'Hold' action) + + + // COMMS CONTROL PANEL HAT SWITCH (NON-VOICE) // + MapKeyIOUMD(&Joystick, H1U, // Trim Switch UP + EXEC("initSendChatString(chat_Modifier_UP);"), // IU + EXEC("initSendChatString(chat_Basic_UP);"), // OU + EXEC("ActKey(KEYON+PULSE+mReportCrimesToggle);"), // IM + EXEC("ActKey(KEYON+PULSE+WingmanTarget);"), // OM + EXEC("ActKey(KEYON+PULSE+FighterFocusAttack);"), // ID + EXEC("ActKey(KEYON+PULSE+FighterAggressive);")); // OD + MapKeyIOUMD(&Joystick, H1D, // Trim Switch DOWN + EXEC("initSendChatString(chat_Modifier_DOWN);"), // IU + EXEC("initSendChatString(chat_Basic_DOWN);"), // OU + EXEC("ActKey(KEYON+PULSE+WingmanNavlock);"), // IM + EXEC("ActKey(KEYON+PULSE+SelectWingman2);"), // OM + EXEC("ActKey(KEYON+PULSE+FighterDock);"), // ID + EXEC("ActKey(KEYON+PULSE+FighterOrders);")); // OD + MapKeyIOUMD(&Joystick, H1L, // Trim Switch LEFT + EXEC("initSendChatString(chat_Modifier_LEFT);"), // IU + EXEC("initSendChatString(chat_Basic_LEFT);"), // OU + EXEC("ActKey(KEYON+PULSE+mNAVBeaconOff);"), // IM + EXEC("ActKey(KEYON+PULSE+SelectWingman1);"), // OM + EXEC("ActKey(KEYON+PULSE+FighterHoldPosition);"), // ID + EXEC("ActKey(KEYON+PULSE+FighterDefensive);")); // OD + MapKeyIOUMD(&Joystick, H1R, // Trim Switch RIGHT + EXEC("initSendChatString(chat_Modifier_RIGHT);"), // IU + EXEC("initSendChatString(chat_Basic_RIGHT);"), // OU + EXEC("ActKey(KEYON+PULSE+mNAVBeaconWing);"), // IM + EXEC("ActKey(KEYON+PULSE+SelectWingman3);"), // OM + EXEC("ActKey(KEYON+PULSE+FighterHoldFire);"), // ID + EXEC("ActKey(KEYON+PULSE+FighterFollow);")); // OD + +// MapKey(&Joystick, H2U, 0); // Target Management Switch (TMS) UP (Mapped in ED Bindings File) +// MapKey(&Joystick, H2D, 0); // Target Management Switch (TMS) DOWN (Mapped in ED Bindings File) +// MapKey(&Joystick, H2L, 0); // Target Management Switch (TMS) LEFT (Mapped in ED Bindings File) +// MapKey(&Joystick, H2R, 0); // Target Management Switch (TMS) RIGHT (Mapped in ED Bindings File) + + // Data Management Switch (DMS): Advanced PIP Selection (4 Configurations) + // PIP CONFIG // // [NOTE: Set UserPIPPref in the AD_EDUserPrefs.tmh file] + if(UserPIPPref == 0) { // DOUBLE-TIER (INVERTED) [Inc. short & long press, no modifier] + MapKey(&Joystick, PUP, TEMPO(EXEC("if(!Joystick[S4]) initPIPMapper(ENG,SYS);" // DMS UP (H3U) [Short: 4xENG 2xSYS] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPlayPause);"), // [Short+Pinky: GalNet Audio Play/Pause] + EXEC("if(!Joystick[S4]) ActKey(KEYON+PULSE+PowerEng);" // [Long: 1xENG] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPlayPause);"), // [Long+Pinky: GalNet Audio Play/Pause] + PIPPressDelay)); + MapKey(&Joystick, PDN, TEMPO(EXEC("if(!Joystick[S4]) initPIPMapper(SYS,WEP,MID);"), // DMS DOWN (H3D) [Short: 3xSYS 3xWEP] + EXEC("if(!Joystick[S4]) ActKey(KEYON+PULSE+BalancePower);" // [Long: Balance] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioClearQueue);"), // [Long+Pinky: GalNet Audio Clear Queue] + PIPPressDelay)); + MapKey(&Joystick, PLT, TEMPO(EXEC("if(!Joystick[S4]) initPIPMapper(SYS,WEP);" // DMS LEFT (H3L) [Short: 4xSYS 2xWEP] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPrev);"), // [Short+Pinky: GalNet Audio Previous Track] + EXEC("if(!Joystick[S4]) ActKey(KEYON+PULSE+PowerSys);" // [Long: 1xSYS] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPrev);"), // [Long+Pinky: GalNet Audio Previous Track] + PIPPressDelay)); + MapKey(&Joystick, PRT, TEMPO(EXEC("if(!Joystick[S4]) initPIPMapper(WEP,ENG);" // DMS RIGHT (H3R) [Short: 4xWEP 2xSYS] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioNext);"), // [Short+Pinky: GalNet Audio Next Track] + EXEC("if(!Joystick[S4]) ActKey(KEYON+PULSE+PowerWep);" // [Long: 1xWEP] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioNext);"), // [Long+Pinky: GalNet Audio Next Track] + PIPPressDelay)); } + if(UserPIPPref == 1) { // STANDARD SINGLE-TIER PIPS [*Elite Dangerous Default Functionality*] + MapKey(&Joystick, PUP, EXEC( "if(!Joystick[S4]) ActKey(KEYON+PULSE+PowerEng);" // DMS UP (H3U) [Power to Engines (1 PIP)] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPlayPause);")); // [Short+Pinky: GalNet Audio Play/Pause] + MapKey(&Joystick, PDN, TEMPO(EXEC("if(!Joystick[S4]) ActKey(KEYON+PULSE+BalancePower);"), // DMS DOWN (H3D)[Balance Power (1 PIP)] + EXEC("if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioClearQueue);"), // [Long+Pinky: GalNet Audio Clear Queue] + PIPPressDelay)); + MapKey(&Joystick, PLT, EXEC( "if(!Joystick[S4]) ActKey(KEYON+PULSE+PowerSys);" // DMS LEFT (H3L) [Power to Systems (1 PIP)] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPrev);")); // [Short+Pinky: GalNet Audio Previous Track] + MapKey(&Joystick, PRT, EXEC( "if(!Joystick[S4]) ActKey(KEYON+PULSE+PowerWep);" // DMS RIGHT (H3R) [Power to Weapons (1 PIP)] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioNext);")); } // [Short+Pinky: GalNet Audio Next Track] + + if(UserPIPPref == 2) { // DOUBLE-TIER PIPS [Inc. short & long press, no modifier] + MapKey(&Joystick, PUP, TEMPO(EXEC("if(!Joystick[S4]) ActKey(KEYON+PULSE+PowerEng);" // DMS UP (H3U) [Short: 1xENG] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPlayPause);"), // [Short+Pinky: GalNet Audio Play/Pause] + EXEC("if(!Joystick[S4]) initPIPMapper(ENG,SYS);" // [Long: 4xENG 2xSYS] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPlayPause);"), // [Long+Pinky: GalNet Audio Play/Pause] + PIPPressDelay)); + MapKey(&Joystick, PDN, TEMPO(EXEC("if(!Joystick[S4]) ActKey(KEYON+PULSE+BalancePower);"), // DMS DOWN (H3D) [Short: Balance] + EXEC("if(!Joystick[S4]) initPIPMapper(SYS,WEP,MID);" // [Long: 3xSYS 3xWEP] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioClearQueue);"), // [Long+Pinky: GalNet Audio Clear Queue] + PIPPressDelay)); + MapKey(&Joystick, PLT, TEMPO(EXEC("if(!Joystick[S4]) ActKey(KEYON+PULSE+PowerSys);" // DMS LEFT (H3L) [Short: 1xSYS] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPrev);"), // [Short+Pinky: GalNet Audio Previous Track] + EXEC("if(!Joystick[S4]) initPIPMapper(SYS,WEP);" // [Long: 4xSYS 2xWEP] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPrev);"), // [Long+Pinky: GalNet Audio Previous Track] + PIPPressDelay)); + MapKey(&Joystick, PRT, TEMPO(EXEC("if(!Joystick[S4]) ActKey(KEYON+PULSE+PowerWep);" // DMS RIGHT (H3R) [Short: 1xWEP] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioNext);"), // [Short+Pinky: GalNet Audio Next Track] + EXEC("if(!Joystick[S4]) initPIPMapper(WEP,ENG);" // [Long: 4xWEP 2xENG] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioNext);"), // [Long+Pinky: GalNet Audio Next Track] + PIPPressDelay)); } + if(UserPIPPref == 3) { // TRIPLE-TIER PIPS [Inc. short/medium/long presses, no modifier] + MapKey(&Joystick, PUP, TEMPO(EXEC("if(!Joystick[S4]) ActKey(KEYON+PULSE+PowerEng);" // DMS UP (H3U) [Short: 1xENG] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPlayPause);"), // [Short+Pinky: GalNet Audio Play/Pause] + TEMPO(EXEC("if(!Joystick[S4]) initPIPMapper(ENG,SYS);" // [Med: 4xENG 2xSYS] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPlayPause);"), // [Med+Pinky: GalNet Audio Play/Pause] + EXEC("if(!Joystick[S4]) initPIPMapper(ENG,WEP);" // [Long: 4xENG 2xWEP] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPlayPause);"), // [Long+Pinky: GalNet Audio Play/Pause] + PIPPressDelay), PIPPressDelay)); + MapKey(&Joystick, PDN, TEMPO(EXEC("if(!Joystick[S4]) ActKey(KEYON+PULSE+BalancePower);"), // DMS DOWN (H3D) [Short: Balance] + TEMPO(EXEC("if(!Joystick[S4]) initPIPMapper(SYS,WEP,MID);"), // [Med: 3xSYS 3xWEP] + EXEC("if(!Joystick[S4]) initPIPMapper(ENG,WEP,MID);" // [Long: 3xENG, 3xWEP] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioClearQueue);"), // [Long+Pinky: GalNet Audio Clear Queue] + PIPPressDelay), PIPPressDelay)); + MapKey(&Joystick, PLT, TEMPO(EXEC("if(!Joystick[S4]) ActKey(KEYON+PULSE+PowerSys);" // DMS LEFT (H3L) [Short: 1xSYS] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPrev);"), // [Short+Pinky: GalNet Audio Previous Track] + TEMPO(EXEC("if(!Joystick[S4]) initPIPMapper(SYS,ENG);" // [Med: 4xSYS 2xENG] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPrev);"), // [Med+Pinky: GalNet Audio Previous Track] + EXEC("if(!Joystick[S4]) initPIPMapper(SYS,WEP);" // [Long: 4xSYS 2xWEP] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioPrev);"), // [Long+Pinky: GalNet Audio Previous Track] + PIPPressDelay), PIPPressDelay)); + MapKey(&Joystick, PRT, TEMPO(EXEC("if(!Joystick[S4]) ActKey(KEYON+PULSE+PowerWep);" // DMS RIGHT (H3R) [Short: 1xWEP] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioNext);"), // [Short+Pinky: GalNet Audio Next Track] + TEMPO(EXEC("if(!Joystick[S4]) initPIPMapper(WEP,ENG);" // [Med: 4xWEP 2xENG] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioNext);"), // [Med+Pinky: GalNet Audio Next Track] + EXEC("if(!Joystick[S4]) initPIPMapper(WEP,SYS);" // [Long: 4xWEP 2xSYS] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GalNetAudioNext);"), // [Long+Pinky: GalNet Audio Next Track] + PIPPressDelay), PIPPressDelay)); } + +// MapKey(&Joystick, H4U, 0); // Countermeasures Management Switch (CMS) UP (Mapped in ED Bindings File) +// MapKey(&Joystick, H4D, 0); // Countermeasures Management Switch (CMS) DOWN (Mapped in ED Bindings File) +// MapKey(&Joystick, H4L, 0); // Countermeasures Management Switch (CMS) LEFT (Mapped in ED Bindings File) +// MapKey(&Joystick, H4R, 0); // Countermeasures Management Switch (CMS) RIGHT (Mapped in ED Bindings File) +// MapKey(&Joystick, H4P, 0); // Countermeasures Management Switch (CMS) PUSH (Mapped in ED Bindings File) + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// MAP THROTTLE ARM CONTROLS +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + // BOOST & HARDPOINT BUTTONS // + MapKey(&Throttle, SC, TEMPO(0, EXEC( // Slew Control Button + "if(!Joystick[S4] & !Throttle[FLAPD] & !Throttle[IDLELON]) ActKey(KEYON+DOWN+SRVVerticalThrust);" // [Hold] + "if(!Joystick[S4] & !Throttle[FLAPD] & !Throttle[IDLELON]) ActKey(KEYON+PULSE+EngineBoost);" // [Press] + "if(Joystick[S4] & !Throttle[FLAPD] & !Throttle[IDLELON]) ActKey(KEYON+PULSE+mBoostBrake);"), // [Modifier] + MiniPressDelay)); // Safety: Won't Boost when in Precise Throttle or IDLE! Plus 150ms Delay :) + MapKeyR(&Throttle, SC, EXEC( "ActKey(KEYON+UP+SRVVerticalThrust);")); // Release the SRV Vertical Thrust + + + MapKey(&Throttle, LTB, TEMPO(EXEC( "initHardpointManagement();"), // Left Throttle Button (RED) + EXEC( + "if(!Joystick[H4P] & !Joystick[S4]) ActKey(KEYON+DOWN+ShowCQCScoreboard);" // If in CQC: Show Scoreboard (Hold) | If NOT in CQC: Reset Hardpoint Flag (fix alignment issues with Escape Vector Macro) + "if(!Joystick[H4P] & !Joystick[S4]) HPoints=!HPoints;"), // Hardpoint Flag Override IF Escape Vector gets out of alignment. + LongPressDelay)); // [Have System selected prior to High Wake] + MapKeyR(&Throttle, LTB, EXEC( "ActKey(KEYON+UP+ShowCQCScoreboard);")); // Release CQC Scoreboard display + +// MapKey(&Throttle, MSU, 0); // Mic Switch UP (Mapped in ED Bindings File) +// MapKey(&Throttle, MSD, 0); // Mic Switch DOWN (Mapped in ED Bindings File) +// MapKey(&Throttle, MSL, 0); // Mic Switch LEFT (Mapped in ED Bindings File) +// MapKey(&Throttle, MSR, 0); // Mic Switch RIGHT (Mapped in ED Bindings File) + MapKey(&Throttle, MSP, EXEC("initMicCommander();")); // Mic Switch PUSH + MapKeyR(&Throttle, MSP, EXEC("initMicCommander();")); // Mic Switch PUSH RELEASE + +// MapKey(&Throttle, CSU, 0); // Coolie Hat Switch UP (Mapped in ED Bindings File) +// MapKey(&Throttle, CSD, 0); // Coolie Hat Switch DOWN (Mapped in ED Bindings File) +// MapKey(&Throttle, CSL, 0); // Coolie Hat Switch LEFT (Mapped in ED Bindings File) +// MapKey(&Throttle, CSR, 0); // Coolie Hat Switch RIGHT (Mapped in ED Bindings File) + + + // FLIGHT ASSIST MODE // + MapKey(&Throttle, SPDF, EXEC("initEnhancedFAOFF();")); // Speedbrake Forward TOGGLE ON + MapKeyR(&Throttle, SPDF, EXEC("initEnhancedFAOFF();")); // Speedbrake Forward TOGGLE RELEASE + MapKey(&Throttle, SPDB, EXEC("initEnhancedFAOFF();")); // Speedbrake Back HOLD + MapKeyR(&Throttle, SPDB, EXEC("initEnhancedFAOFF();")); // Speedbrake Back RELEASE + + + // NAVIGATION BOAT SWITCH // + MapKey(&Throttle, BSF, PULSE+GalaxyMap); // Boat Switch Throttle FORWARD + MapKey(&Throttle, BSM, PULSE+UIBack); // Boat Switch Throttle MIDDLE [Centering Switch will Exit Maps] + MapKey(&Throttle, BSB, PULSE+SystemMap); // Boat Switch Throttle BACK + + + // CRUISE ON THROTTLE CONFIG // + if(CruiseOnThrottle == 0) { // Sets China Hat to add Frame Shift Drive when Cruise on Throttle is disabled. + MapKey(&Throttle, CHF, TEMPO(FrameShiftDrive, Supercruise, LongPressDelay)); // China Hat FORWARD [When Route Blocked HOLD for Supercruise] + MapKey(&Throttle, CHB, TEMPO(EXEC( // China Hat BACK [Short: Night Vision or Orbital Lines(+Pinky), Very Long: Next Sys Route] + "if(Joystick[S4]) ActKey(KEYON+PULSE+OrbitalLines);" + "if(!Joystick[S4]) initNightVisionEnhancer(1);"), + EXEC( + "if(!Joystick[S4]) ActKey(KEYON+PULSE+SelectNextSystemInRoute);"), LongPressDelay)); } + if(CruiseOnThrottle == 1) { // Sets China Hat to remove Frame Shift Drive when Cruise on Throttle is enabled. + MapKey(&Throttle, CHF, EXEC( // China Hat FORWARD + "if(Joystick[S4]) ActKey(KEYON+PULSE+OrbitalLines);" + "else initNightVisionEnhancer(1);")); + MapKey(&Throttle, CHB, PULSE+SelectNextSystemInRoute); } // China Hat BACK + + + // SHIFT KEY ADDITIONAL MAPPINGS // + MapKey(&Throttle, PSF, EXEC( // Pinky Throttle Switch FORWARD + "if(Joystick[H4P]) ActKey(KEYON+PULSE+mJumpNextSubSys);" + "if(Joystick[S4]) initSendChatString(chat_ClearChatBox);" + "if(!Joystick[S4] & !Joystick[H4P] & VerboseOutput) { printf(\"SHIFT KEY FORWARD >>> [Comms Channel: AUTO-TEXT]\\x0a\"); printf(\"SHIFT KEY FORWARD >>> [Repeater Mode: COMBAT-ENDLESS]\\x0a\"); }")); + MapKey(&Throttle, PSM, EXEC( // Pinky Throttle Switch MIDDLE + "if(Joystick[H4P]) ActKey(KEYON+PULSE+mJumpMidSubSys);" + "if(!Joystick[S4] & !Joystick[H4P] & VerboseOutput) { printf(\"SHIFT KEY MIDDLE ---- [Comms Channel: WINGS]\\x0a\"); printf(\"SHIFT KEY MIDDLE ---- [Repeater Mode: EXPLORER-SCANNER]\\x0a\"); }")); + MapKey(&Throttle, PSB, EXEC( // Pinky Throttle Switch BACK + "if(Joystick[H4P]) ActKey(KEYON+PULSE+mJumpPrevSubSys);" + "if(Joystick[S4]) ActKey(KEYON+PULSE+HideShipGUI);" + "if(!Joystick[S4] & !Joystick[H4P] & VerboseOutput) { printf(\"SHIFT KEY BACKWARD <<< [Comms Channel: FIGHTER]\\x0a\"); printf(\"SHIFT KEY BACKWARD <<< [Repeater Mode: MINING-AUTO-PULSE]\\x0a\"); }")); + MapKeyR(&Throttle, PSB, EXEC( // Pinky Throttle Switch BACK RELEASE + "if(Joystick[S4]) ActKey(KEYON+PULSE+HideShipGUI);")); + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// MAP THROTTLE BASE CONTROLS +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + // AUX. OSD & REPORT CRIMES GAME CONTROLS // + MapKey(&Throttle, EFLNORM, EXEC( // Engine Fuel Flow Norm/Override Switches LEFT + "if(!Joystick[S4] & !ShowGameStatState) ActKey(KEYON+PULSE+mShowGameStats);" + "if(!Joystick[S4] & !ShowGameStatState) ShowGameStatState = 1;" + "if(Joystick[S4] & !ReportCrimeState) ActKey(KEYON+PULSE+mReportCrimesToggle);" + "if(Joystick[S4] & !ReportCrimeState) ReportCrimeState = 1;")); + MapKeyR(&Throttle, EFLNORM, EXEC( // Engine Fuel Flow Norm/Override Switches LEFT RELEASE + "if(!Joystick[S4] & ShowGameStatState) ActKey(KEYON+PULSE+mShowGameStats);" + "if(!Joystick[S4] & ShowGameStatState) ShowGameStatState = 0;" + "if(Joystick[S4] & ReportCrimeState) ActKey(KEYON+PULSE+mReportCrimesToggle);" + "if(Joystick[S4] & ReportCrimeState) ReportCrimeState = 0;")); + MapKey(&Throttle, EFLOVER, 0); // Engine Fuel Flow Norm/Override Switches LEFT OFF + + + // VOICE COMMS CHANNEL SELECTION // + MapKey(&Throttle, EFRNORM, EXEC("if(VerboseOutput) printf(\"Voice Comms: !! EXTERNAL CHANNELS SELECTED !!\\x0a\");")); // Engine Fuel Flow Norm/Override Switches RIGHT [Mic Toggle ON (External/3rd Party)] +// MapKeyR(&Throttle, EFRNORM, 0); // Engine Fuel Flow Norm/Override Switches RIGHT RELEASE + MapKey(&Throttle, EFROVER, EXEC("if(VerboseOutput) printf(\"Voice Comms: !! E:D INTERNAL CHANNEL SELECTED !!\\x0a\");")); // Engine Fuel Flow Norm/Override Switches RIGHT OFF [Mic Toggle OFF (Internal/Default)] + + + // AUX. HEADLOOK & OPEN MIC GAME CONTROLS // + MapKey(&Throttle, EOLIGN, TEMPO(EXEC("initHeadlookModeSelect();"), PULSE+TrackIRPause, LongPressDelay)); // Engine Operate Ign/Norm LEFT UP [Short: TIR/VR Center] [Long: TIR Pause] + MapKey(&Throttle, EOLNORM, 0); // Engine Operate Ign/Norm LEFT OFF + MapKey(&Throttle, EOLMOTOR, EXEC("initMicCommander();")); // Engine Operate Ign/Norm LEFT DOWN [Toggle between Push-To-Talk & Open Comms] + MapKeyR(&Throttle, EOLMOTOR, EXEC("initMicCommander();")); // Engine Operate Ign/Norm LEFT RELEASE + + + // SHIP FEATURE FUNCTIONS // + MapKey(&Throttle, EORIGN, TEMPO(EXEC( // Engine Operate Ign/Norm RIGHT UP + "if(!Joystick[S4] & !Joystick[H4P]) initToggleShipLights(1);" // If no Modifier held, default Ship Lights + "if(Joystick[S4]) ActKey(KEYON+PULSE+ChangeWeaponColor);" // If Modifier 1 held, Change Weapon Color + "if(Joystick[H4P]) ActKey(KEYON+PULSE+ChangeEngineColor);"), // If Modifier 2 held, Change Engine Color + PULSE+ShipLights, LongPressDelay)); // [Long: Reset Ship Lights (when out of sync)] + MapKey(&Throttle, EORNORM, 0); // Engine Operate Ign/Norm RIGHT OFF + MapKey(&Throttle, EORMOTOR, EXEC("initToggleRotationCorrection();")); // Engine Operate Ign/Norm RIGHT DOWN + MapKeyR(&Throttle, EORMOTOR, EXEC("initToggleRotationCorrection();")); // Engine Operate Ign/Norm RIGHT RELEASE + + MapKey(&Throttle, APUON, EXEC("initToggleSilentRunning();")); // APU START UP + MapKeyR(&Throttle, APUON, EXEC("initToggleSilentRunning();")); // APU START RELEASE + MapKey(&Throttle, APUOFF, 0); // APU OFF DOWN + + + // EXTERNAL HOTKEY CONTROLS // + MapKey(&Throttle, LDGH, TEMPO(EXEC( // Landing Gear/Warning Silence Button + "if(!Joystick[S4]) ActKey(KEYON+PULSE+TakeSteamScreenshot);" // [Short: Steam Screenshot] + "if(Joystick[S4]) ActKey(KEYON+PULSE+HighResScreenshot);"), // [Short+Pinky: Hi-Res Screenshot (Solo/Private Modes only)] + EXEC( + "if(!Joystick[S4]) ActKey(KEYON+PULSE+GPUCaptureVideoAuto);" // [Long: Save Last xx mins Video Capture] + "if(Joystick[S4]) ActKey(KEYON+PULSE+GPUCaptureManual);"), // [Long+Pinky: Manual Start/Stop Video Capture] + ExtraPressDelay)); + + + // LANDING GEAR & CARGO SCOOP // + MapKey(&Throttle, EACON, EXEC("initToggleLandingGear();")); // EAC ARM UP + MapKeyR(&Throttle, EACON, EXEC("initToggleLandingGear();")); // EAC ARM UP RELEASE + MapKey(&Throttle, EACOFF, 0); // EAC OFF DOWN + + MapKey(&Throttle, RDRNRM, EXEC("initToggleCargoScoop();")); // RDR ALTM NRM UP [Deploy Cargo Scoop] + MapKeyR(&Throttle, RDRNRM, EXEC("initToggleCargoScoop();")); // RDR ALTM NRM UP REVERSE + MapKey(&Throttle, RDRDIS, 0); + + + // AUTOPILOT BUTTON CUSTOM CONFIGURATOR // + MapKey(&Throttle, APENG, TEMPO(EXEC("APSeqShort = 1;" "initAPEngageEnhancer();"), // Autopilot Engage Button + EXEC("APSeqLong = 1;" "initAPEngageEnhancer();"), + LongPressDelay)); +// MapKey(&Throttle, APDIS, 0); // Autopilot Disengage Button + + + // IDLE LOCK CONFIG // + MapKey(&Throttle, IDLELON, EXEC("initIDLEMaster();" "if(VerboseOutput) printf(\"THROTTLE IDLE LOCK: ^^ACTIVE^^\\x0a\");")); // Throttle Idle Detents LEFT ON [Locking (Down): Stationary] + MapKeyR(&Throttle, IDLELON, EXEC("initIDLEMaster();" "if(VerboseOutput) printf(\"THROTTLE IDLE LOCK: *DISABLED*\\x0a\");")); // Throttle Idle Detents LEFT ON RELEASE +// MapKey(&Throttle, IDLELOFF, 0); // Throttle Idle Detents LEFT OFF +// MapKey(&Throttle, IDLERON, 0); // Throttle Idle Detents RIGHT ON (Not used) +// MapKeyR(&Throttle, IDLERON, 0); // Throttle Idle Detents RIGHT ON RELEASE (Not used) +// MapKey(&Throttle, IDLEROFF, 0); // Throttle Idle Detents RIGHT OFF (Not used) + + printf("Done... Enhanced ED Script Engineered by Aussiedroid is now running... Fly Safe CMDR! <|>\x0a"); + printf("-----------------------------------------------------------------------------------------------------------------------------------------------"); +} // end main() + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// MAP MFD CONTROLS +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + // ** CURRENTLY UNMAPPED ** + int initRightMFD() { // Set Right MFD +// MapKey(&RMFD, OSB01, 0); +// MapKey(&RMFD, OSB02, 0); +// MapKey(&RMFD, OSB03, 0); +// MapKey(&RMFD, OSB04, 0); +// MapKey(&RMFD, OSB05, 0); +// MapKey(&RMFD, OSB06, 0); +// MapKey(&RMFD, OSB07, 0); +// MapKey(&RMFD, OSB08, 0); +// MapKey(&RMFD, OSB09, 0); +// MapKey(&RMFD, OSB10, 0); +// MapKey(&RMFD, OSB11, 0); +// MapKey(&RMFD, OSB12, 0); +// MapKey(&RMFD, OSB13, 0); +// MapKey(&RMFD, OSB14, 0); +// MapKey(&RMFD, OSB15, 0); +// MapKey(&RMFD, OSB16, 0); +// MapKey(&RMFD, OSB17, 0); +// MapKey(&RMFD, OSB18, 0); +// MapKey(&RMFD, OSB19, 0); +// MapKey(&RMFD, OSB20, 0); +// MapKey(&RMFD, BRTU, 0); +// MapKey(&RMFD, BRTD, 0); +// MapKey(&RMFD, CONU, 0); +// MapKey(&RMFD, COND, 0); +// MapKey(&RMFD, GAINU, 0); +// MapKey(&RMFD, GAIND, 0); +// MapKey(&RMFD, SYMU, 0); +// MapKey(&RMFD, SYMD, 0); + if(VerboseOutput) printf("Right MFD Configured\x0a"); } + + + int initLeftMFD() { // Set Left MFD +// MapKey(&LMFD, OSB01, 0); +// MapKey(&LMFD, OSB02, 0); +// MapKey(&LMFD, OSB03, 0); +// MapKey(&LMFD, OSB04, 0); +// MapKey(&LMFD, OSB05, 0); +// MapKey(&LMFD, OSB06, 0); +// MapKey(&LMFD, OSB07, 0); +// MapKey(&LMFD, OSB08, 0); +// MapKey(&LMFD, OSB09, 0); +// MapKey(&LMFD, OSB10, 0); +// MapKey(&LMFD, OSB11, 0); +// MapKey(&LMFD, OSB12, 0); +// MapKey(&LMFD, OSB13, 0); +// MapKey(&LMFD, OSB14, 0); +// MapKey(&LMFD, OSB15, 0); +// MapKey(&LMFD, OSB16, 0); +// MapKey(&LMFD, OSB17, 0); +// MapKey(&LMFD, OSB18, 0); +// MapKey(&LMFD, OSB19, 0); +// MapKey(&LMFD, OSB20, 0); +// MapKey(&LMFD, BRTU, 0); +// MapKey(&LMFD, BRTD, 0); +// MapKey(&LMFD, CONU, 0); +// MapKey(&LMFD, COND, 0); +// MapKey(&LMFD, GAINU, 0); +// MapKey(&LMFD, GAIND, 0); +// MapKey(&LMFD, SYMU, 0); +// MapKey(&LMFD, SYMD, 0); + if(VerboseOutput) printf("Left MFD Configured\x0a"); } + + +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// +// EVENT HANDLER // +//--------------------------------------------------------------------------------------------------------------------------------------------------------------// + + int EventHandle(int type, alias o, int x) { + int LED_BRT, TRPCOMBO, Differential_Toe; + + if (&o == &Throttle & x == THR_FC & Joystick[S4]) { // Throttle: LED On-The-Fly Backlight Control + LED_BRT = (AxisVal(Throttle[THR_FC], &axdata) - 32766) / 256 * -1; // HOLD S4 (Pinky Trigger) on Joystick & Move Friction Control Axis + ActKey(PULSE+KEYON+LED (&Throttle, LED_INTENSITY, LED_BRT)); } + DefaultMapping(&o, x); + + if(UseRuddersT16000 == 1) { // TFRP Rudder: Maps the MODE_FILTERED through Target + if (&o == &TFRPRudder) { // (We can Trim, set Deadzones, J/Scurves, etc.) + GetAxisData(&o, x); // X Axis = Differential combined Toe Brakes, rest at center + if(x == TRPLEFT | x == TRPRIGHT) { // Y Axis = Both Toe Brakes pressed at same time, rest at 0 + axdata.locked = 1; // Z Axis = Rudder (as default) + Differential_Toe = -TFRPRudder[TRPRIGHT]/2 + TFRPRudder[TRPLEFT]/2; + GameOutput(&o, TRPRIGHT, AxisVal(Differential_Toe, &axdata)); + if (TFRPRudder[TRPLEFT] < TFRPRudder[TRPRIGHT]) TRPCOMBO = TFRPRudder[TRPRIGHT]; + else TRPCOMBO = TFRPRudder[TRPLEFT]; + GameOutput (&o, TRPLEFT, AxisVal(-TRPCOMBO, &axdata)); } + if(!axdata.locked & !axdata.relative) GameOutput(&o, x, AxisVal(o[x], &axdata)); } } + + if(UseRuddersTPR == 1) { // TFRPHA Rudder: Maps the MODE_FILTERED through Target + if (&o == &TFRPHARudder) { // (We can Trim, set Deadzones, J/Scurves, etc.) + GetAxisData(&o, x); // X Axis = Differential combined Toe Brakes, rest at center + if(x == TFRPHA_LEFT | x == TFRPHA_RIGHT) { // Y Axis = Both Toe Brakes pressed at same time, rest at 0 + axdata.locked = 1; // Z Axis = Rudder (as default) + Differential_Toe = -TFRPHARudder[TFRPHA_RIGHT]/2 + TFRPHARudder[TFRPHA_LEFT]/2; + GameOutput(&o, TFRPHA_RIGHT, AxisVal(Differential_Toe, &axdata)); + if (TFRPHARudder[TFRPHA_LEFT] < TFRPHARudder[TFRPHA_RIGHT]) TRPCOMBO = TFRPHARudder[TFRPHA_RIGHT]; + else TRPCOMBO = TFRPHARudder[TFRPHA_LEFT]; + GameOutput (&o, TFRPHA_LEFT, AxisVal(-TRPCOMBO, &axdata)); } + if(!axdata.locked & !axdata.relative) GameOutput(&o, x, AxisVal(o[x], &axdata)); } } } + + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// =============================================================================================================================================================// +// VERSION HISTORY // Version 4.2.1 \\ Released Sept 2016 | Updated Oct 2019 // \\ Public Release #24 // +// =============================================================================================================================================================// +// v4.2.1-IMPROVED: CruiseOnThrottle now works @ 0% position. FIX: VA Keymappings for Reset HMD Orientation, SRV Throttle Reverse, Exit FSS & Pri/Sec. Fire. // +// v4.2.0-NEW: Throttle/Joystick Axis Preset Toggles can now be user defined. NEW: Boost Brake & Turret Mode Cycle Macros. NEW: Disable Left Throttle Axis pref.// +// v4.2.0-FIXED: Throttle Modes enforced on both axes, Combined Fire mode now utilises 2-Stage Trigger properly & Mic Push-To-Talk invert fix. // +// v4.1.0-APRIL UPDATE NEW: Axis Deadzone Customisation + Disable Message Text Output in TARGET Window via User Prefs. FIXED: UseRudderAxisCurves axis configs. // +// v4.1.0-NEW: Galaxy Map Keybind for returning to Current System added. FIXED: FastModeSwitch, NAV Beacon & Report Crimes macro timings 4 new Main Menu layout.// +// v4.0 - NEW: Pulse Repeater Fire! Customisable Auto-Chat Presets, 2 Non-Linear Throttle Presets, SHIFT Key & Hide HUD on NightVision. FIX: LEDs on Launch Seq.// +// v4.0 - IMPROVED: New File Structure, Categorised User Prefs, Table of Contents, Toggle Seq. for Nav Beacon. REMOVED: ChatPresetMode+RepeaterFireMode Presets.// +// v3.3.3-IMPROVED: ED-BAT now opens picture files. FIX: FAOff Printout (UseRudderAxisCurves), VA: 4 Conflict+3 Missing binds. Conflict Discord keymap resolved.// +// v3.3 - BEYOND CH.4: ALL New Keys mapped! NEW: ED-BAT App Launcher, TM TPR Rudder Support, Swap PIP Hat, Report Crimes Macro & LED 'Blinking' Controller. // +// v3.3 - NEW: User Override on Sec. Fire Pinky. IMPROVED: initPrintState formatting & Merged Ship/SRV Cam. FIX: Autodock Macro, C.Scoop LED & ECM duration. // +// v3.2 - IMPROVED: PIP MGT now works first press & FAOFF HOLD Toggle now returns to Previously Active Joystick Curve. FIXED: Multiple Minor Keybind Conflicts. // +// v3.1 - FIXED: Galnet Audio & Escape Vector Sequence conflict. IMPROVED: Combined Fire Trigger behaviour, & Dual Tier PIPs 4xWEP now (2xSYS->2xENG). // +// v3.0.2-BEYOND CH.1: Added User def. Double Tap to Pinky Trigger, NEW Inverted Dual PIP scheme (short=full PIPs), Fighter Follow replaced with Attack. // +// v3.0.1-BEYOND BETA UPDATE: Added the new Galnet Audio keybindings mapped in ED .binds file which are now updated to (v3.0). // +// v3.0 - NEW: Ship Take Off Sequence! UPDATED: Mic Switch Function, Def. VA Toggle Mapping ADD: EDFX/EDDI to SW List FIX: Throttle Prec. Mode preventing Boost.// +// v2.4.3-NEW: Precision C.Scoop Override FIXED: Throttle Toggle @Start, 100% Working TFRP Rudder code! REMOVED: Old Target.tmh (New Ver. Create @ Run/Compile) // +// v2.4.2-NEW: Start Software on Run, LG/CS Toggle Overrides, Jump to Subsystem. IMPROVED: PIP Mapping Code, TFRP Rudder Code & Script Print. FIX: HP Override. // +// v2.4.1-NEW: Clear Chatbox Macro, Precision Cargo Scoop Deploy. IMPROVED: Toggle mechanics FIXED: Mappings HoloMe Rotate, Camera Roll & Digital Ship/SRV Roll.// +// v2.4 - NEW: Auto Timer for Repeater Fire, Fast Menu Switch Macro, VR/TIR Headlook Swap U.Pref SWAP: S.Running/R.Correction Toggles. IMPROVED: Error Handling.// +// v2.3.3-COMBINED FAOFF+ALT FLT (SpeedBrake w/ Pinky Mod) NEW: Escape Macro now has Gear/Scoop Check + new timings. FIX: Chat Macros when Comms Panel is Open. // +// v2.3.2-SWAPPED: Repeater Fire & Combo Fire Modifier buttons. ADD: CruiseOnThrottle check for China Hat, removes FSD as req. FIX: IDLEMaster Function error. // +// v2.3.1-FIXED: 75% Trim T.Preset, + General Comments Cleanup NEW: Macros 2-Tier PIPs (Hold), Swap Joy/Throt Preset Toggles ADD: Chat Macro print layout map. // +// v2.3 - COMMANDERS UPDATE: ADD New Multicrew, HoloME & Camera Suite Keybinds. NEW: Text Chat Macros (PIP Hatswitch+Pinky Trigger). NEW: ShowGameStats Macro. // +// v2.3 - NEW: SC 100% Throttle/Repeater Fire/Signal Light Macros. ADD: 1&2-Tier PIP Alts,User Prefs,MFDs. MOVED: Hardpoints to T.Arm. FIXED: SRV Boost on Slew.// +// v2.2.7-NEW: Heatsink+SilentRunning Mod! FIXED: Dead Throttle on Run/Looping running in Script Editor/Improved FPS/Bandwidth Toggle/Galaxy Map chat conflict. // +// v2.2.6-Changed SRV Digital Steering Hat Switch, Swapped Weapon Fire Group. ADD: Auto-Dock Short/Long press+Pinky. No Shadowplay ref. ADD Fighter Orders. // +// v2.2.5-ADD: Charge ECM button & Fixed Incorrect ED Bindings file in download. // +// v2.2.4-FIXED: Changed Combo Fire Modifier from Pinky to CMS Hat Switch (avoid conflict). Improved PIP timings/refined layout. Removed SRV Handbrake conflict.// +// v2.2 - GUARDIANS UPDATE: ADD Fighters Hotkeys to Trim Hat, Mapped Weapon/Engine Color change. Improved IDLE saftey features. NEW Macros. Public Release! // +// v2.1 - ADD External Keymappings for TrackIR, VoiceAttack & ShadowPlay. SWAP Landing Gear & Silent Running. Changed some delay times. // +// v2.0 - Full script cleanup & formatting update. ADD alt. Macros 4 PIPs & Curves. ADD Reference table for DX Mappings & USB Key Defs. Update .binds to (v2.0).// +// v1.8 - ADD SetThrottle function & Handbrake to Throttle IDLE lock. Ship Lights now dim Throttle LED backlight :) Steam added & Hidden FPS/Ping keys mapped. // +// v1.6 - Improved Toggle switch usage. ADD LED output & expanded script print output in Script Editor. // +// v1.3 - ADD Auto-dock, PIPs Macros & also Joystick & Throttle Curve presets. Plus Subsystem Prev Jump to Powerplant shortcut when holding Prev Subsystem. // +// v1.0 - ADD All Standard KeyMaps, Default Axis settings & Core script structure/defaults. ADD Trigger Combo code. Debug testing. // +// =============================================================================================================================================================// +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//------------------------------// +// "I am a leaf on the wind!" // +//------------------------------// \ No newline at end of file diff --git a/Warthog Script/Readme.md b/Warthog Script/Readme.md index 3643df3..ada940a 100644 --- a/Warthog Script/Readme.md +++ b/Warthog Script/Readme.md @@ -10,13 +10,13 @@ DX Mapping & Conversion table also included in the Key Mapping file to help with Filename | Function ------------ | ------------- -AD_ED_v4.2.0.tmc | Main Script File, Maps Combined Device & Includes Files Below -AD_EDDefaults_v4.2.0.tmh | Global Variable Settings, States & Timings/Delays -AD_EDUserPrefs_v4.2.0.tmh | User Preferences & Script Customisation Options -AD_EDKeyMap_v4.2.0.ttm | Variable Key Mapping & Reference Tables -AD_EDHardware_v4.2.0.tmh | Joystick, Throttle & Rudder Axes/Curves Configuration -AD_EDMacros_v4.2.0.tmh | Macro Definitions _(Custom Sequences)_ -AD_EDFunctions_v4.2.0.tmh | Function Definitions _(Custom Logic for Buttons, Toggles & Ship Controls)_ +AD_ED_v4.2.1.tmc | Main Script File, Maps Combined Device & Includes Files Below +AD_EDDefaults_v4.2.1.tmh | Global Variable Settings, States & Timings/Delays +AD_EDUserPrefs_v4.2.1.tmh | User Preferences & Script Customisation Options +AD_EDKeyMap_v4.2.1.ttm | Variable Key Mapping & Reference Tables +AD_EDHardware_v4.2.1.tmh | Joystick, Throttle & Rudder Axes/Curves Configuration +AD_EDMacros_v4.2.1.tmh | Macro Definitions _(Custom Sequences)_ +AD_EDFunctions_v4.2.1.tmh | Function Definitions _(Custom Logic for Buttons, Toggles & Ship Controls)_ ` ` @@ -34,7 +34,7 @@ AD_EDFunctions_v4.2.0.tmh | Function Definitions _(Custom Logic for Buttons, Tog [Pinky 'Double Tap' Override](https://github.com/Aussiedroid/AD-EDWarthogEnhancedScript/tree/master/Warthog%20Script#--pinky-double-tap-override "Pinky 'Double Tap' Override Customisation") | [Autopilot Button Override](https://github.com/Aussiedroid/AD-EDWarthogEnhancedScript/tree/master/Warthog%20Script#--autopilot-button-overrides "Autopilot Button Override Customisation") | [Auto-Text Chat Presets](https://github.com/Aussiedroid/AD-EDWarthogEnhancedScript/tree/master/Warthog%20Script#--auto-text-chat-presets "Auto-Text Chat Presets Customisation") | [Acknowledgements](https://github.com/Aussiedroid/AD-EDWarthogEnhancedScript/tree/master/Warthog%20Script#script-acknowledgements "Acknowledgements") ## ## -## User Preferences : AD_EDUserPrefs_v.4.2.0.tmh ## +## User Preferences : AD_EDUserPrefs_v.4.2.1.tmh ## Although it is not practical to have everything as a user preference, for key features & play styles I have tried to cover as many as possible in a simple to use User Preference section with the goal to make the script accessible to as many players as possible. This will help those who do not know the scripting programming language make quick changes to suite their needs. @@ -342,7 +342,7 @@ Setting value to 0 will simplify this to a single tier of responses (4 in total) >> >>I was supremely strugging to get my head around the coding, and seeing practical script examples really helped unravel it all. Sections of all their scripts have been incorporated into my design along with some other odds and ends I learned searching online _(so if I missed calling out your name, sorry!)_. >> ->>Special mentions to CMDR Clicker for all his help squashing those bugs & code improvements in general across on the Frontier Forums & also to Tekadept for his Fantastic [Custom Warthog Plates](https://www.tekcreations.space/product/custom-elite-dangerous-plates-warthog/?currency=USD "www.tekcreations.space") he created for this script! +>>Special mentions to CMDR Clicker for all his help squashing those bugs & code improvements in general across on the Frontier Forums. Also a special mention to Tekadept for his Exceptional [Custom Warthog Plates](https://www.tekcreations.space/product/custom-elite-dangerous-plates-warthog/?currency=USD "www.tekcreations.space") he created for this script! >> >>The script continues to evolve with the fantastic community feedback, ideas, bug reports & sharing of code... the help & support shown on the forums/guide has been been amazing! >>