[MOD?] custom inputmap.xml - mapping keyboard commands to buttons

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Nebogloee
Posts: 69
Joined: Sat, 18. Aug 07, 00:15
x3tc

[MOD?] custom inputmap.xml - mapping keyboard commands to buttons

Post by Nebogloee » Sat, 16. Nov 13, 19:15

I made a post in one of the gamepad threads before the great merge, but I feel it probably should in this sub forum instead.
http://forum.egosoft.com/viewtopic.php? ... t=#4195403

inputmap.xml contains all your key binds and button maps. By editing this file you can workaround the in game control menu limitations. Any keyboard command can be mapped to any input source *button*, but analog controls (triggers/sticks/throttle/etc) can only be used for axis. (so no mapping your left trigger to accelerate, sorry!)

The file in question is:

Documents\Egosoft\X Rebirth\<numbers>\inputmap.xml

I suggest using notepad++, because syntax colors.

Some things I have discovered playing with the inputmap:

Analog triggers are treated as analog input, so you can only map them to axis controls.
It looks like you can map 2 buttons to the same command/action.

I decided to give the gamepad a try as I have been using my ps3 controller with x3ap on my linux laptop and found it rather fun. My big issues with the default gamepad mapping was the lack of roll and incremental acceleration/deceleration. Holding left trigger is bad on your hands and can lead to RSS, if you are already injured, it is a show stopper.

I got around it by making the dpad up and down accelerate and decelerate. Dpad left for next missile and dpad right for next primary. Who needs a previous command for either when the buttons are already in short supply?

I kept left trigger with its default behavior as it can be treated as a brake in conjunction with the dpad changes. I also changed the shoulder buttons to roll left/right because what is an X game, or any other space game, without the ability to always orient yourself downward? The change of perspective is neat, you can navigate through stationwork easier, and is frankly required for the gamepad to be a serious controller

In doing so, I got rid of full reverse and just use the combination of tap left trigger and then dpad down. I remapped missiles to right stick click.

You can see the contents of my inputmap.xml in the paste below. Save a copy of your inputmap.xml before overwriting.
http://pastebin.com/xakQphfv

It is curious that the keyboard commands work fine with the controller and yet you cannot map buttons to those commands in the ui. This should be fixed. If anything, it should be done for accessibility. Those triggers can be really hard on someone with RSS or Carpal tunnel, not to mention those with worse handicaps. The controller should have access to map any command. Additionally, a modifier button is sorely needed and would make the controller as good as it could be.

These are just small edits, but they make a big different in my opinion. Post your inputmap.xml here!

MutantDwarf
Posts: 711
Joined: Tue, 20. Jun 06, 02:29
x4

Post by MutantDwarf » Sat, 16. Nov 13, 20:24

Note that you still can't, for example, map left and right d-pad to rolling left and right, even by editing that file. No idea why; other things work fine.

Nebogloee
Posts: 69
Joined: Sat, 18. Aug 07, 00:15
x3tc

Post by Nebogloee » Sat, 16. Nov 13, 20:33

Really? It would be strange if the dpad was treated differently than the shoulder buttons. Roll is working fine on the shoulder buttons in my paste above. If I get a moment, I will test it.

baylock
Posts: 31
Joined: Fri, 11. Apr 08, 09:57
x4

Post by baylock » Sat, 16. Nov 13, 20:41

Just found this file myself, knew it had to be somewhere.
2 Questions:
1. Any documentation available on what commands refer to what actions / triggers??
2. Any luck being able to assign strafe to a joystick button with this??

Thanx in advance.

Nebogloee
Posts: 69
Joined: Sat, 18. Aug 07, 00:15
x3tc

Post by Nebogloee » Sat, 16. Nov 13, 21:25

1. Nothing other than the file itself as far as I can tell.
2. No idea. The JOYBUTTONS code looks *very* xbox specific. When you map your joystick buttons in the ui, does the file still reference the xbox specific stuff for those states you re-mapped?

I get the impression that the ui does not accurately reflect the robustness of any of the config xml.

CyanB
Posts: 10
Joined: Fri, 23. Nov 12, 18:43
x3tc

Post by CyanB » Tue, 19. Nov 13, 21:06

This is exactly what I was looking for! Thanks Nebogloee!

Nebogloee
Posts: 69
Joined: Sat, 18. Aug 07, 00:15
x3tc

Post by Nebogloee » Wed, 20. Nov 13, 01:06

Glad I could help. Now go check out all the other, better mods on this forum!

CyanB
Posts: 10
Joined: Fri, 23. Nov 12, 18:43
x3tc

Post by CyanB » Wed, 20. Nov 13, 01:21

Ok... I may be too tired at the moment to think straight... It's just one big tangled mess in front of my eyes...

What's the difference between "action", "state", and "range"? Are these values that I can change?

"Action" seems to be a one-shot press. You keep pressing: nothing else happens until you release it and press it again.

"State" seems to be active-while-pressed.

"Range" seemed obvious until I saw it associated with "fire primary weapon". How is that a range? It's an on-off switch isn't it? You shoot or you don't. You don't just kinda shoot a little bit! Should be a "state" to me... Can you explain that one please?

Nebogloee
Posts: 69
Joined: Sat, 18. Aug 07, 00:15
x3tc

Post by Nebogloee » Wed, 20. Nov 13, 03:31

Maybe because they wanted it on a trigger? (triggers are axis devices . . ) The input file is a funny thing.

Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Post by Vim Razz » Wed, 20. Nov 13, 04:25

If you experiment with trigger pressure on default key bindings, you'll find that holding it about halfway down only accelerates the ship halfway to max and so forth.

That is: the triggers on standard 360-compatible controllers are analog buttons that send different signal values depending on how far you push or hold them down, so they have a "range" just like an analog stick.
"Range" seemed obvious until I saw it associated with "fire primary weapon". How is that a range? It's an on-off switch isn't it? You shoot or you don't. You don't just kinda shoot a little bit! Should be a "state" to me... Can you explain that one please?
This is a great point. Looking at how this is handled might provide some clues to possibly setting up the other trigger for direct acceleration. Time to play around. :p



EDIT: Interesting -- the hotkeys in the "Weapons" category are configured to accept analog inputs and they work just fine as if they were digital inputs. You can even assign the sticks to them. (using in-game configuration)

The hotkeys in the "Weapons II" category, on the other hand, only accept digital inputs. You can't assign the triggers to them -- even for the very same 2 commands that you can assign the triggers to in the "weapons" category.

I've got other stuff I'm in the middle of at the moment, but it certainly seems like something worth coming back to play with later.

CyanB
Posts: 10
Joined: Fri, 23. Nov 12, 18:43
x3tc

Post by CyanB » Wed, 20. Nov 13, 13:25

Vim Razz wrote:I've got other stuff I'm in the middle of at the moment, but it certainly seems like something worth coming back to play with later.
PM me if you find something?

For now, I think I'll have to be satisfied with my new layout (much easier on the hands than the default one anyway!):
-Accelerate and decelerate to Dpad up and down;
-Cycle next primary and secondary weapons to Dpad right and left;
-Boost to left shoulder.

LT is still throttle and I use it now as an instant cut-off.

CyanB
Posts: 10
Joined: Fri, 23. Nov 12, 18:43
x3tc

Post by CyanB » Wed, 20. Nov 13, 13:47

Nebogloee wrote:Maybe because they wanted it on a trigger? (triggers are axis devices . . ) The input file is a funny thing.
But then you should be able to duplicate the behavior. I wasn't able to...

It's obvious that no one at ES suffers from tendinitis... The default layout would never have been approved!

Nebogloee
Posts: 69
Joined: Sat, 18. Aug 07, 00:15
x3tc

Post by Nebogloee » Thu, 21. Nov 13, 01:25

Time and again, games are released with control schemes that are scientifically *unhealthy*. Controls are always the first thing I change. I swear controller manufactures are in league with holistic hippie healers, powerband snake oil salesmen, and surgeons.

Spring based triggers are evil. And requiring us to hold them down near indefinitely kills kittens. Cute, tiny, mewing kittens. How could you <every game company ever>?

Harag
Posts: 223
Joined: Wed, 22. Sep 04, 11:00
x4

Post by Harag » Thu, 21. Nov 13, 16:14

WOW thanks for this... Loving it... One thing I found myself doing while playing with the 360 controller is reaching for the keyboard and opening up the ZONE map... I now have this on the right push stick... :)

I have the following

LT - Acc
LB - reverse

D Left - Next Missile
D Right - Next Primary
D Up - Speed up (X)
D Down - speed down (Z)

LS Push - Boost
RS Push - Zone Map

Now all I need is a button for Trade window, but not got any spare :(

Thanks again!

Post Reply

Return to “X Rebirth - Scripts and Modding”