How to mimic Star Citizen Advanced Controls in X4

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

GrogMon88
Posts: 4
Joined: Wed, 21. Aug 13, 21:43
x4

How to mimic Star Citizen Advanced Controls in X4

Post by GrogMon88 »

I'm not a huge fan of the control scheme in X4 Foundations and wanted to get something similar to the Star Citizen Advanced Flight Controls (https://i.redd.it/wq51bck7d3e11.jpg) (thanks [FourSide3264](https://www.reddit.com/user/FourSide3264) for the image). The main problem with X4 and their XML keybind setup, is they made it so LCTRL and LSHIFT must have a modifier applied to the keybind, and ALT cannot have any sort of modifier value applied. For example, LCTRL in Star Citizen is strafe/thrust down and ALT acts as a modifier for a number of different keys, which is impossible in X4.


I tried to edit the XML, however, the file located under your C:\Users\Documents\Egosoft\X4\33051955 section still does not allow those desired keybinds. With the help of steam users **Huillam** and **Koschei_D**, I was able to use a program called AutoHotkey to help address these items. *


The goal is these changes was to make it so LCTRL could be used a down strafe, LALT could be used as a modifier key for thrusters to make docking easier and have LALT+F have me get out of my chair, change LSHIFT to boost, and ultimately remap the F1-F12 keys to more closely mimic Mobiglass type keybinds. If anyone tries this out and has any suggestions, I'd be happy to include those here and make sure credit is provided :)

________________________________________________________________________________________________

Below I have listed out the steps I took to mimic the SC Advanced Controls. I posted the resources available under a Google Drive and listed necessary links below:

1) Download Autohotkey - https://www.autohotkey.com/download/
  • I went ahead and pinned to my taskbar so scripts would be easier to access
2) Download the X4Frontiers_v2.ahkAutoHotkey Script - https://drive.google.com/open?id=12Gk0m ... My-m7h5QDB
  • Place this file wherever you can easily locate on your PC. I went ahead and placed it in C:\Users\Documents\Egosoft\X4\33051955 to keep all these items in one place.
3) Download the inputmap_1.xml X4 XML Keybinds - https://drive.google.com/open?id=12Gk0m ... My-m7h5QDB
  • You MUST place this in your C:\Users\Documents\Egosoft\X4\33051955 folder. Please be sure to make a copy of your custom control scheme if you've created one. Or rename then end part of the inputmap_1.xml file to inputmap_2.xml or inputmap_3.xml
4) Let's try it out!
  • Step 1: Launch the X4Frontiers_v2.ahk file
  • Step 2: Launch X4: Frontiers on Steam
  • Step 3: Under your Settings -> Controls section, load the profile titled 'Star Citizen' (Complete Once)
  • Step 4: Under Game Settings turn off Aim Assist and Auto Roll (Optional, but super annoying)
  • Step 5: Load your game and enjoy :)
________________________________________________________________________________________________

The main issue I have is that after LCTRL-TAB to desktop (originall ALT-TAB), no keys work due to a sticky key situation and I must press EACH key at least once that have been remapped (LALT, LCTRL, RALT, SHIFT). If anyone knows how to adjust AutoHotkey to avoid this, I'd love to fix this and make it easier for people looking to get a better Star Citizen control experience in other space games.
________________________________________________________________________________________________

Script Details:

IfWinActive ahk_exe X4.exe

LAlt::LCtrl

LCtrl::LAlt

RALT::SHIFT

SHIFT::RALT

________________________________________________________________________________________________

*Disclaimer: This may not work well for everyone. Also, because keys like LCTRL, LSHIFT, LALT, and RALT have been remapped, it can be a little confusing to use at first if you're doing more than just playing X4. When you do ALT-TAB, go ahead and press all buttons or else the first line of the script won't disable the script on your normal desktop. Once you do, all keys should restore to normal functionality until you re-open the game. Again, if anyone knows some scripting tricks to restore some normal control after ALT-TAB, please let me know!
________________________________________________________________________________________________

TL:DR; I got X4 to have a similar control-scheme as Star Citizen Advanced Flight Controls.
Awilcox11
Posts: 3
Joined: Sun, 2. Dec 18, 07:58

Re: How to mimic Star Citizen Advanced Controls in X4

Post by Awilcox11 »

I almost refunded this game because of the controls. I only have a few hours every week to play games and this made foundations actually playable. I'm glad you pointed out some of the issues, because they immediately became apparent. If you can figure out how to make shift for caps work again and normal alt tab work vs control tab, I think you have some gold here.

** EDIT: I created an account just to comment on this. By the way, thanks for posting the details of your script. your google drive doesn't post a preview of the text, which made me worried.

*** Additional edit: I've played all X games, except for Rebirth, to the fullest. I've always had issues with the controls in these games, and even while this uses an outside program, this works amazing! Thanks for putting in the work. I truly appreciate not having to figure this out on my own.
Last edited by Awilcox11 on Sun, 2. Dec 18, 08:09, edited 1 time in total.
User avatar
StoneLegionYT
Posts: 1478
Joined: Fri, 4. Nov 05, 01:18
x4

Re: How to mimic Star Citizen Advanced Controls in X4

Post by StoneLegionYT »

I should look at the key file. I really hate the restrictions / issues I have on keybinds.
Awilcox11
Posts: 3
Joined: Sun, 2. Dec 18, 07:58

Re: How to mimic Star Citizen Advanced Controls in X4

Post by Awilcox11 »

Kane Hart wrote: Sun, 2. Dec 18, 08:08 I should look at the key file. I really hate the restrictions / issues I have on keybinds.
It looks like a really simple remap, but it made a massive difference. I feel like I'm playing a more complete starcitizen =D
Awilcox11
Posts: 3
Joined: Sun, 2. Dec 18, 07:58

Re: How to mimic Star Citizen Advanced Controls in X4

Post by Awilcox11 »

Awilcox11 wrote: Sun, 2. Dec 18, 08:12
Kane Hart wrote: Sun, 2. Dec 18, 08:08 I should look at the key file. I really hate the restrictions / issues I have on keybinds.
It looks like a really simple remap, but it made a massive difference. I feel like I'm playing a more complete starcitizen =D
Definitely make sure to read GrogMans disclaimer. Hitting all those keys after tabbing out helps with the transition. Do this to avoid opening some weird tabs because of the programs keys continuing to run after exit!! Otherwise. Brilliant my brother!!!!!! I'll see you in the verse.

**Edit: If you find out how to correct this. Please repost your Autoscript. Thanks again.
GrogMon88
Posts: 4
Joined: Wed, 21. Aug 13, 21:43
x4

Re: How to mimic Star Citizen Advanced Controls in X4

Post by GrogMon88 »

Awilcox11 wrote: Sun, 2. Dec 18, 08:03 I almost refunded this game because of the controls. I only have a few hours every week to play games and this made foundations actually playable. I'm glad you pointed out some of the issues, because they immediately became apparent. If you can figure out how to make shift for caps work again and normal alt tab work vs control tab, I think you have some gold here.

** EDIT: I created an account just to comment on this. By the way, thanks for posting the details of your script. your google drive doesn't post a preview of the text, which made me worried.

*** Additional edit: I've played all X games, except for Rebirth, to the fullest. I've always had issues with the controls in these games, and even while this uses an outside program, this works amazing! Thanks for putting in the work. I truly appreciate not having to figure this out on my own.
Glad to hear this is working out for you. I'll definitely be sure to repost those files if someone is able to provide some suggestions on improvements. Enjoy :)

Return to “X4: Foundations”