Now days you're lucky to get a small insert with key bindings and a readme file. Xcom EU was basically an steam installation on the disk and you downloaded most if not the entire game from Steam. I've heard that it's pretty much the same thing here. Most of the game is still downloaded from steam. EW patch 2 has a bug: it doesn't save any in-game key bindings. They actually added functions for implementing the Hunker Down hotkey (KKeyPress, KKeyRelease) and it can be assigned in-game, but it gets discarded after you exit the game. Direct DefaultGame.ini editing.
- 6Examples
Overview
Keybind command is a command mapped to a key. It is done by editing <Steam install path>XCom-Enemy-Unknown[XEW]XComGameConfigDefaultInput.ini. Commands bound to keys are working even with disabled Developer Shell and Console.
Also bear in mind that if you have any DLCs installed, copies of various 'default' INI files are made in the My Games folder tree, but begin with 'XCom' instead of 'Default' (as in XComInput.ini instead of DefaultInput.ini). While they normally are updated automatically when you change the 'Default' versions, you may need to update these files manually as well if your key bindings don't seem to 'take'.
For a list of valid keys and gamepad buttons that can be bound, see UDN Three - Key Binds article. This also include descriptions and other examples of features such as key bind aliasing, chaining, the onrelease modifier, use of variables, toggles, and binding functions.
DefaultInput.ini sections
It is necessary to put the command into correct section of DefaultInput.ini, because some commands work only in specific layer of the game - strategy or tactical. General commands may be in both sections, but should be in the section regarding the layer of execution.
- Bindings for strategy are in [Engine.PlayerInput] section (lines 18-200 in XCOM EU).
- Bindings for tactical are in [XComGame.XComTacticalInput] section (lines 201-330 in XCOM EU).
- It is absolutely possible to add new lines at the end of the file, but always precede them with correct section name in brackets. In case a key has multiple bindings, the game executes only the last valid entry, so there's no need to edit old bindings.
DefaultInput.ini entries
An entry in DefaultInput.ini looks like:
.Bindings=(Name='[Name]', Command='[Command]', Alt=True, bPrimaryBinding=True)
- [Name] -- String, mapped key's name, can be alias like MyName (MyName is then used as command)
- [Command] -- String, command(s):
- Alt -- Boolean, modifier key (other modifiers are Control and Shift), can be omitted if not required
- bPrimaryBinding/bSecondaryBinding -- Boolean, if the key is primary/secondary key, can be omitted
Commands and their syntax
There can be one or more commands written between quotes of Command=' entry. See Console Commands - XCOM:EU 2012 and Unreal Engine 3 Console Commands articles for available commands.
Square brackets in the following syntax descriptions indicate [optional component] and should be omitted whether the component is present or not.
- Single command with or without parameters.
- Syntax: command [parameters]
- Multiple commands with or without parameters, known as chaining
- Multiple commands are divided by | vertical bar character.
- Syntax: command [parameters] | command [parameters] | command [parameters]
- Exec command
- Exec command executes all commands inside specified text file located in <Steam install path>XCom-Enemy-Unknown(XEW)XComGameBinaries folder. MAC users may place the file into <Steam install path>/XCom-Enemy-Unknown/XCOMData/Binaries (needs verification).
- Syntax: exec Filename.txt
- The best is the file can be edited on the fly!
- It is possible to use // for commenting.
- Put each command on new line to be safe (one command - one line).
- Any command can use onrelease key event.
- Syntax: onrelease command [parameters]
Good to know
When Keybinds don't seem to be working, check for the wrong (angled / curly) double-quotation mark characters like [“] (i.e. HTML “ or Unicode U+201C) and [”] (i.e. HTML ” or Unicode U+201D) in use, instead of the correct (vertical) ['] (i.e. HTML " or ASCII 0x22). Make sure to use the correct one, when enclosing the key's name and command(s). Don't go just by how it looks on screen; check the character code. [This proved to be the problem preventing Mac users from getting Keybinds to work correctly.]
Best proven practice is putting new commands at the end of the file, so previous bind commands are overwritten. (No need to remove or disable them, as the last one overrides any earlier ones.) Don't forget to precede them with the correct section name in brackets.
In order to place functional aliens on maps that don't have them, you have to: 1) place the aliens, 2) save the game, and 3) reload that save file before they will function correctly.
Examples
Single command - tactical layer
- HunkerDown action assigned to the 'B' key.
Single command with parameters - strategy layer
- Gives one Skeleton Key after pressing F9.
- Sell anything to see the key in gray market.
Multiple commands with parameters - strategy layer
- Gives one Skeleton Key and creates alien base after pressing Alt + F9.
- Revisit Mission Control to see the alert.
Multiple commands with onrelease - tactical layer
- Removes fog of war and shows AIDebugAI info after pressing and holding down F9. Reverts to default view upon releasing the key.
Exec command - tactical layer
- Executes MyBatchofCommands.txt after pressing F8.
- The file can contain more commands and comments:
In this case only AIDebugAI is executed.
Key bind toggle trick - strategy layer
- The 1st F12 key press executes commands defined in SlowMotion alias and sets F12 to NormalMotion.
- The 2nd F12 key press executes commands defined in NormalMotion alias and sets F12 to SlowMotion.
- Its purpose is to slow/normalize the time when scanning for UFO contacts.
Tutorial
(This section is taken from the Keybind commands thread on the Nexus XCOM Mod Talk Forum.)
Short example tutorial about increasing resources like money, elerium, alloys and weapon fragments to ease testing of strategic layer of the game.
- Decide, if you want to mod EU or EW. Correct paths for PC are:
- XCOM Enemy Unknown (EU)
- XCom-Enemy-UnknownXComGameConfigDefaultInput.ini
- XCom-Enemy-UnknownBinariesStrategy.txt
- XCOM Enemy Within (EW)
- XCom-Enemy-UnknownXEWXComGameConfigDefaultInput.ini
- XCom-Enemy-UnknownXEWBinariesStrategy.txt
- XCOM Enemy Unknown (EU)
- Open DefaultInput.ini in your favorite text editor and add lines below at the end of the file.
- Save the file.
- (Make sure correct quotation marks are used. Must be straight ('). Curly/angled double quotes (” “) don't work.)
- Save the file.
- Create a new file in the Binaries folder and name it Strategy.txt.
- Add any resource you would like to increase. Syntax is 'GIVE RESOURCE <Amount>'. Available resources and items are listed inside classes XGStrategyActor and XGGameData.
- Strategy.txt can be edited while the game is running, so it's easy to change the amount of resources or comment lines to exclude resources not needed. The amount can even be negative (use minus sign).
- (A sample Strategy.txt file is available in the Keybind commands Mod Talk thread article. Delete '//' comment sign in front of commands you wish to use. The file is not 100% updated for EW.)
- Run the game and press F12 while being at the 'Base Overview' screen. To see updated numbers, navigate somewhere else, like 'Engineering' or 'Situation Room' / 'Visit Gray Market'. You may need to do it more times.
[Image credit to Drakous79]
References
Referred to by this article:
That refer to this article:
- 6Examples
Overview[edit]
Keybind command is a command mapped to a key. It is done by editing <Steam install path>XCom-Enemy-Unknown[XEW]XComGameConfigDefaultInput.ini. Commands bound to keys are working even with disabled Developer Shell and Console.
Also bear in mind that if you have any DLCs installed, copies of various 'default' INI files are made in the My Games folder tree, but begin with 'XCom' instead of 'Default' (as in XComInput.ini instead of DefaultInput.ini). While they normally are updated automatically when you change the 'Default' versions, you may need to update these files manually as well if your key bindings don't seem to 'take'.
For a list of valid keys and gamepad buttons that can be bound, see UDN Three - Key Binds article. This also include descriptions and other examples of features such as key bind aliasing, chaining, the onrelease modifier, use of variables, toggles, and binding functions.
DefaultInput.ini sections[edit]
It is necessary to put the command into correct section of DefaultInput.ini, because some commands work only in specific layer of the game - strategy or tactical. General commands may be in both sections, but should be in the section regarding the layer of execution.
- Bindings for strategy are in [Engine.PlayerInput] section (lines 18-200 in XCOM EU).
- Bindings for tactical are in [XComGame.XComTacticalInput] section (lines 201-330 in XCOM EU).
- It is absolutely possible to add new lines at the end of the file, but always precede them with correct section name in brackets. In case a key has multiple bindings, the game executes only the last valid entry, so there's no need to edit old bindings.
Xcom 2 Key Bindings Commands
DefaultInput.ini entries[edit]
An entry in DefaultInput.ini looks like:
.Bindings=(Name='[Name]', Command='[Command]', Alt=True, bPrimaryBinding=True)
- [Name] -- String, mapped key's name, can be alias like MyName (MyName is then used as command)
- [Command] -- String, command(s):
- Alt -- Boolean, modifier key (other modifiers are Control and Shift), can be omitted if not required
- bPrimaryBinding/bSecondaryBinding -- Boolean, if the key is primary/secondary key, can be omitted
Commands and their syntax[edit]
There can be one or more commands written between quotes of Command=' entry. See Console Commands - XCOM:EU 2012 and Unreal Engine 3 Console Commands articles for available commands.
Square brackets in the following syntax descriptions indicate [optional component] and should be omitted whether the component is present or not.
- Single command with or without parameters.
- Syntax: command [parameters]
- Multiple commands with or without parameters, known as chaining
- Multiple commands are divided by | vertical bar character.
- Syntax: command [parameters] | command [parameters] | command [parameters]
- Exec command
- Exec command executes all commands inside specified text file located in <Steam install path>XCom-Enemy-Unknown(XEW)XComGameBinaries folder. MAC users may place the file into <Steam install path>/XCom-Enemy-Unknown/XCOMData/Binaries (needs verification).
- Syntax: exec Filename.txt
- The best is the file can be edited on the fly!
- It is possible to use // for commenting.
- Put each command on new line to be safe (one command - one line).
- Any command can use onrelease key event.
- Syntax: onrelease command [parameters]
Good to know[edit]
When Keybinds don't seem to be working, check for the wrong (angled) double-quotation mark characters like “ and ” in use, instead of the correct (vertical) '. Make sure to use the correct one, when enclosing the key's name and command(s). [This proved to be the problem preventing Mac users from getting Keybinds to work correctly.]
Best proven practice is putting new commands at the end of the file, so previous bind commands are overwritten. (No need to remove or disable them, as the last one overrides any earlier ones.) Don't forget to precede them with the correct section name in brackets.
Examples[edit]
Single command - tactical layer[edit]
- HunkerDown action assigned to the 'B' key.
Single command with parameters - strategy layer[edit]
- Gives one Skeleton Key after pressing F9.
- Sell anything to see the key in gray market.
Multiple commands with parameters - strategy layer[edit]
- Gives one Skeleton Key and creates alien base after pressing Alt + F9.
- Revisit Mission Control to see the alert.
Xcom 2 Key Bindings Commands
Multiple commands with onrelease - tactical layer[edit]
- Removes fog of war and shows AIDebugAI info after pressing and holding down F9. Reverts to default view upon releasing the key.
Exec command - tactical layer[edit]
- Executes MyBatchofCommands.txt after pressing F8.
- The file can contain more commands and comments:
In this case only AIDebugAI is executed.
Key bind toggle trick - strategy layer[edit]
- The 1st F12 key press executes commands defined in SlowMotion alias and sets F12 to NormalMotion.
- The 2nd F12 key press executes commands defined in NormalMotion alias and sets F12 to SlowMotion.
- Its purpose is to slow/normalize the time when scanning for UFO contacts.
Tutorial[edit]
(This section is taken from the Keybind commands thread on the Nexus XCOM Mod Talk Forum.)
Short example tutorial about increasing resources like money, elerium, alloys and weapon fragments to ease testing of strategic layer of the game.
- Decide, if you want to mod EU or EW. Correct paths for PC are:
- XCOM Enemy Unknown (EU)
- XCom-Enemy-UnknownXComGameConfigDefaultInput.ini
- XCom-Enemy-UnknownBinariesStrategy.txt
- XCOM Enemy Within (EW)
- XCom-Enemy-UnknownXEWXComGameConfigDefaultInput.ini
- XCom-Enemy-UnknownXEWBinariesStrategy.txt
- XCOM Enemy Unknown (EU)
- Open DefaultInput.ini in your favorite text editor and add lines below at the end of the file.
- Save the file.
- (Make sure correct quotation marks are used. Must be straight ('). Curly/angled double quotes (” “) don't work.)
- Save the file.
- Create a new file in the Binaries folder and name it Strategy.txt.
- Add any resource you would like to increase. Syntax is 'GIVE RESOURCE <Amount>'. Available resources and items are listed inside classes XGStrategyActor and XGGameData.
- Strategy.txt can be edited while the game is running, so it's easy to change the amount of resources or comment lines to exclude resources not needed. The amount can even be negative (use minus sign).
- (A sample Strategy.txt file is available in the Keybind commands Mod Talk thread article. Delete '//' comment sign in front of commands you wish to use. The file is not 100% updated for EW.)
- Run the game and press F12 while being at the 'Base Overview' screen. To see updated numbers, navigate somewhere else, like 'Engineering' or 'Situation Room' / 'Visit Gray Market'. You may need to do it more times.
[Image credit to Drakous79]
Xcom 2 Key Bindings Usb
References[edit]
Xcom 2 Key Bindings Key
Referred to by this article:
Xcom 2 Key Bindings Not Saving
That refer to this article: