Jump to content

Keybind commands


Drakous79

Recommended Posts

Hello,

 

my first two questions are about the hunker down key:

.Bindings=(Name="B", Command="K_Key_Press | onrelease K_Key_Release", bPrimaryBinding=True)

So K_Key_Press is an actual command that is interpeted by the game engine as hunker down?

This K_Key_Press is nowhere to be found in the defaultinput.ini, just in the xcominput.ini, does this mean not all keys have to be listed in the defaultinput.ini?

 

Now about adding a feature:

 

Is SlowMotion/NormalMotion for use with EW only or can I add it to EU, too?

 

I would like to bind it to the F12 key as shown at your wiki page.

This key is listed in the defaultinput.ini as non-bindable, but I can't find an F12 key being used ingame.

Will there be issues, if I change it in the defaultinput.ini and use it for slowmotion in EU?

 

Should new key bindings be applied to the defaultinput.ini, the xcominput.ini or both?

 

Thanks

Link to comment
Share on other sites

  • Replies 194
  • Created
  • Last Reply

Top Posters In This Topic

Actually, I believe "K_Key_Press" is a keybind "alias". Seems to be a Firaxis internally defined alias.

  Quote

 

Key binds are aliased when the Name doesn't match any mapped keys. Aliased key binds can then be used as a command.

That comes from the UDN "Keybinds" document, which linked in the wiki article "Keybind Commands". That article also covers which files need to have the binds in them, depending upon patch level. Be sure to check the "References" for related articles.

 

The same UDN document lists the bindable keys recognized by the Unreal Engine and includes F12. Which is not to say Firaxis didn't reserve it's use to their own internal purposes. Give it a whirl and see what happens.

 

All the keybinds, such as SlowMotion/NormalMotion, are "Console Commands" and as such are valid in both EU and EW, whether or not the Developer's Console is active. The Console is one method of inputting the commands. Keybinding is another method. Same commands.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

  • 1 month later...

Hi Drakous,

How do I get the commands you posted to work exactly? Do I put it in my strategy.txt or another text file specifically for the tactical layer?

 

Here are commands for missions that go to [XComGame.XComTacticalInput] section.

// Select a soldier and use GiveXP value. Switch to other soldier and back to see Level Up + sign.
GiveXP 100

// For PSI, select a soldier and use GivePSIXP value.
GivePsiXP 100

// Place a cursor close to a unit you want set HP of (can be alien) and use SetHP value.
// Unit's HP will be set to specified value, but up to unit's maximum health. Negative values and zero drop unit's HP to 1.
SetHP 50

Link to comment
Share on other sites

Hi gingy888,

 

it is all in the article Dubious linked.

 

You can put those commands directly into DefaultInput.ini or to text file (name of the file is up to you). Commands you posted are for tactical layer, so an entry in the ini should look like:

[XComGame.XComTacticalInput]
.Bindings=(Name="F9", Command="GiveXP 100 | GivePsiXP 100")

where commands are chained. Alternatively, every command can be bound to different key or all of them can go into text file:

[XComGame.XComTacticalInput]
.Bindings=(Name="F8", Command="exec MyBatchofCommands.txt")

where MyBatchofCommands.txt contains:

GiveXP 100
GivePsiXP 100

---

Check out Multiple commands with onrelease - tactical layer and Exec command - tactical layer.

 

---

Dubious, thank you for adding the tutorial and improving the article :smile:

Link to comment
Share on other sites

Ah, thank you! =) I had posted that question before finally getting everything to work. =) Now for the pesky part about making sure the defaultgamecore.ini run off from the .ini instead of the app. Have you had much success with the Mac version of things?

Link to comment
Share on other sites

  • 1 month later...

I am having the oddest problem with this.. I followed the tutorial to the letter to get my Strategy.txt up and running, but instead of executing like it should, it instead executes the last command I had binded to my F9 key.

 

My strategy.txt, which is inside of: E:\Program Files (x86)\Steam\steamapps\common\XCom-Enemy-Unknown\XEW\Binaries reads as follows:

 

GiveResource Money 1000
GiveResource Elerium 100
GiveResource Alloys 100
GiveResource Engineers 10
GiveResource Scientists 10
GiveItem WeaponFragment 100

 

My defaultinput, which is inside of: E:\Program Files (x86)\Steam\steamapps\common\XCom-Enemy-Unknown\XEW\XComGame\Config has this at the very bottom:

 

[Engine.PlayerInput]
.Bindings=(Name="F9",Command="exec Strategy.txt")

 

But, whenever I press F9? I just get 10 engineers instead, which is what I had bound previously. What am I doing wrong?

 

I am playing Enemy Within with the Long War mod. Thank you for any assistance.

Link to comment
Share on other sites

Hello, everything seems to be ok.

 

I'd recommend to edit Strategy.txt and change GiveResource Engineers 10 to GiveResource Engineers 11 so we can tell for sure, if Strategy.txt is executed upon pressing F9. If yes, that it may be just screen update issue and you should see new resources after changing screen.

 

If it doesn't work, please post your DefaultInput.ini in spoiler tags.

[spoiler]Some text[/spoiler]
Link to comment
Share on other sites

Well now it's gone and changed again. Now it doesn't do anything at all! Well, that's some progress I guess. At least it's not repeating the old code anymore.

 

Let's hope I do this right..

 

  Reveal hidden contents

 

 

Edit: Yay! I did it right! I'll come back and check in the morning.

Edited by TheRealGhostwish
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...