goatcorp / suggestions

Plugin suggestions for Dalamud
43 stars 6 forks source link

User-configurable bindings/remapping for the XHB & WXHB (controller hotbars) #783

Open safisynai opened 2 years ago

safisynai commented 2 years ago

Description

A plugin to allow alternate key (and controller button) binds for accessing additional XHB/WXHB sets. E.g. Accessing the WXHB via holding a controller paddle rather than controller trigger double-tap & hold.

More info

When playing the game in controller input mode, the standard hotbars are replaced with the "cross hotbar", which allows for access to up to 48 actions via the following input combinations (Using Xbox controller button labels, but analogous for PlayStation style controllers):

In the vanilla game, there is no way to customise these bindings. In recent times, controllers with additional (typically four) rear paddles have become available (at least two examples are the Xbox Elite Series 2 and the Razer Wolverine V2 Chroma).

It would be a usability improvement for controller players to be able to access the additional sets of actions (those that are normally behind a trigger double tap & hold, or both triggers together) via these additional paddles instead.

Currently, there is no way to do this in game. It can be accomplished with external controller remapping software such as reWASD, but this incurs additional latency and I despite extensive experimentation, I have not found a way for these inputs to be handled with complete consistency; when CPU load is high (as tends to be the case during content), external software that maps a controller button press to a trigger double-tap & hold tends to result in missed inputs unless the delay between inputs is set to high values (100ms in my case resulted in minimal dropped inputs, but it was still not completely consistent).

If it is possible, a plugin providing a way for us to bind additional controller buttons to accessing the same additional XHB layers that the base game provides (i.e. this is not providing an unfair advantage nor enabling access to more actions than you'd have access to with a standard controller) would be far more reliable and negate the need for external controller remapping software.

I suspect this may also be an accessibility benefit: I know of a few people who cannot use a keyboard & mouse due to disabilities, and being able to access the additional hotbars via a simple button press instead of a combination of inputs requiring moderately precise timing would likely be easier.

Given there exist a variety of adaptive input devices for such users, it would make more sense for such a plugin to allow the user to set their own bindings, as best works for them, rather than simply being a static remapping.

I should note that #516 overlaps with this issue, but is not identical; #516 is about allowing keyboard and mouse bindings for the XHB & WXHB; this issue is about allowing alternate bindings (either controller or keyboard & mouse) for accessing different WXHB layers. Both use cases could likely be addressed in a single plugin.


kidheracles commented 2 years ago

Getting the game to natively support additional buttons will not work: these buttons do not exist in X-input. Consider the cludges SQEX have done to support the Playstation controllers: I do not want to look under that hood.

Steam Input is really your answer here: all input from your controller to the game is mediated by Steam Input anyway. A SQEX-purchased version of the game can be added to Steam as an external game, and thus have Steam Input available. I am not a high-level player, but I have not noticed any latency introduced by Steam Input.

I've got a Steam Controller so I've gotten through iterations of this problem over the last six months. The Steam Controller has left and right paddles. The Xbox Series Elite 2 controller now has support in the beta version of Steam, and if my Steam Controller ever breaks, I'll probably switch across to that.

Dalamud plugin suggestion

The ideal way to solve this with Dalamud would be to change the layout of two hotbars to be crossbar left and crossbar right. This would be ideal: the remaining four buttons from the crossbar could be used as additional button combos (eg. paddle+trigger, paddle+bumper). In your steam config, you'd then assign chorded combinations with the paddles for each button, eg. left paddle+dpad left presses 1, left paddle+dpad down presses 2, etc. etc.

Ideally, while the paddle is held, the corresponding hotbar would be "focused" like when holding triggers with the current hotbars.

This is relatively simple to understand and hotbar 1 and 2 have keyboard bindings by default. I have no clue how hard it would be to change hotbar layouts, but I haven't seen a Dalamud plugin yet that modifies hotbar layouts so I am not sure if the API supports it.

Chorded buttons for hotbar presses (12 to 17 more actions)

Besides a regular press, you can assign in steam input a chorded press. I've assigned in my Steam Input controller config:

LP+LT or LT+LP: 1 (ie. on Left Trigger, have a chorded activator with Left Paddle to press 0, and on Left Paddle, have a chorded activator with Left Trigger to press 0) LP+RT or LT+RP: 2 RP+LT or RT+LP: 3 RP+RT or RT+RP: 4 LP+LB or LT+LB: 5 LP+RB or LT+RB: 6 RP+LB: or RT+LB: 7 RP+RB or RT+RB: 8 LP+L3 or LT+L3: 9 (L3 is X-input's Left Joystick Press) LP+R3 or LT+R3: 0 RP+L3 or RT+L3: - RP+R3 or RT+R3: =

I have Hotbar 1 as a 4 by 3 layout. This makes the corresponding chorded presses quite intuitive:

This is extremely useful for oGCDs, as they are always available regardless if you're holding down Paddle or Trigger, and their cooldowns are always visible. I've never had a better weaving experience.

In my config, left mouse pad is move, so that's also L3, ie. X-input's left joystick click.

I've assigned the Steam Controller's Joystick Click to Ctrl-0, ie. Hotbar 2 slot 1. You could then use Hotbar 2 slot 2, 3, 4 & 5 for chorded actions with the triggers and paddles. Or, as FFXIV has some trigger + bumper/joystick press buttons, you could assign those combinations to the Joystick Click. I never found those useful anyway.

Action layers workarounds (don't use action layers in Steam Input)

There are three ways to do this that doesn't need Dalamud. In all of these, the WXHB is always visible, positioned separately, and positioned directly underneath the crossbar.

The first two have left and right paddle action layers:

  1. Via XHB, ie. LT->RT and vice versa: Set the corresponding trigger as always active when the layer is applied. Assign two regular actions to each button: the opposite trigger, then as a short delay, the actual button press. This is surprisingly reliable. I had the delay as low as "0.05"

  2. Via WXHB, ie. double-tap (untested): Assign three actions to each button: the trigger twice, then the button press. Again, this comes down to identifying the smallest delay to ensure it being reliable. I expect this would work fine.

In general I have found action layers frustrating to work with, as frequently one needs to swap from left paddle to right paddle and the action layers get confused when you do that. So I have changed to a way that doesn't use action layers:

Copying crossbars workaround (recommended, simplifies WXHB)

The idea here is that you 'swap in' the WXHB over the regular crossbar when you press the paddle, then 'swap out' the WXHB when you release.

You first assign the paddles as a regular press for triggers, then add the following activators: When you press a paddle, press a button that executes this macro assigned to a hotbar: /crosshotbar copy current 4 current 1

When you release a paddle, press a button that executes this macro: /crosshotbar copy current 4 current 2 /crosshotbar copy current 3 current 1

You would first need to "save" all your crossbars to 3 and 4. See this gist for macros: https://gist.github.com/kidheracles/5725a6ca40b34690e06cbf7e0fd268a2

Going forward, you need to make changes to crossbar 3 and 4, instead of 1 and 2.

To the player, visually, this just shifts the WXHB up to the regular crossbar when the paddle is pressed, and shifts it back down when released. I found the hotbar macro key needs to be a simple key press. I've bound ` and \ for this purpose, but just make sure the hotbar that has these macros is a static hotbar.

I've found this as extremely reliable as it doesn't depend on action layers. I'm happy with this setup now.

Submenus for XHB (replaces the 16 actions of the XHB to up to 128 actions)

If you want even more actions, you can use submenus in XHB. There are guides for submenus for hotbars that work by using soulstone-less ARR classes as hotbar storage, and are copied in by a macro.

I've assigned both LT->RT and RT->LT to the left side of static crossbar 8. When you press a button, it calls a macro that copies in the corresponding soulstone-less crossbar to static crossbar 8. This would give you 64 more actions, so this is where I put the gearsets and non-combat actions like greetings, food and emotes.

eg. on my current config:

I hope this has been helpful. I plan to soon add a Steam guide and put up a Reddit post about this. A Dalamud plugin would still be helpful, but with a bit of effort, you can get hundreds of actions with just Steam Input and some macros.

kalilistic commented 2 years ago

Looks like same idea requested again: I have an Xbox elite controller. It has 4 back buttons, and through steam I can map those back buttons to anything I want. Having a dedicated button for the WXHB would be nice. https://discord.com/channels/581875019861328007/685275026156683280/937996284361572382

ItsBexy commented 2 years ago

I'd like to echo the desire for such a plugin. Being able to remap inputs for the Extended and WXHB bars would make my UI a lot less awkward.

I strongly prefer the input method of the Extended Hold Controls (R2->L2 and L2->R2), as it's ideal for comfortable rapid switching between four bars, BUT-- unlike the WXHB, the game does not allow you to customize or reposition the Extended bars. When inactive, they're not visible, and when active, they replace/conceal the main bar.

I've settled on a partial workaround wherein I: -Set the Extended Hold bars and WXHB to the same thing -Display the WXHB continuously -Turn the WXHB input off

This allows me to use the WXHB as a proxy-display for my Extended bar setup, which helps. However, the results still look really awkward; whenever I'm using my extra bars, they still hide the main bar, in order to show a duplicate version of the WXHB bar that's already onscreen. So not ideal.

I'd love a plugin that could remap these inputs. For example, if I could map the R2->L2 combination to activate the Right WXHB, and vice versa, that'd solve my issue perfectly.

EDIT: Who likes mockups? I like mockups! I think this would be more or less the ideal solution here. The ability to either remap which input activates which bar, or add custom bindings that could then be mapped to inputs on the player's controller/device. mockup