Jump to content
The Dark Mod Forums

Gamepad bindings


Fiver

Recommended Posts

In the file DarkmodPadbinds.cfg (https://wiki.thedarkmod.com/index.php?title=Bindings_and_User_Settings):

1)
bindPadButton LONG_PRESS PAD_B "_mantle" is listed and does what it says.
bindPadButton LONG_PRESS PAD_A appears to do "jump-mantle". Standing in front of a box and doing jump will differ from doing "jump-mantle".
Why is "jump-mantle" not listed in the file? (And how come it works without being listed in the file?)

2)
bindPadButton MODIFIER PAD_L2 appears to bind a modifier functionality to the "button name" PAD_L2. If a user wants to find out the "button name" of other buttons on their gamepad (e.g. buttons which are not currently listed in the file), what would be a good way to do that?

3)
Will TDM be able to recognize unusual "button names" (i.e. be able to capture any "button name" or will button names have to be implemented in the code before it works)?

  • Like 1
Link to comment
Share on other sites

On 1/19/2024 at 12:47 AM, Fiver said:

bindPadButton LONG_PRESS PAD_B "_mantle" is listed and does what it says.
bindPadButton LONG_PRESS PAD_A appears to do "jump-mantle". Standing in front of a box and doing jump will differ from doing "jump-mantle".
Why is "jump-mantle" not listed in the file? (And how come it works without being listed in the file?)

Because internally these two actions are called _jump and _mantle, and you are looking at .cfg file where internal names are used. If someone makes a submenu for configuring controllers, I guess it can be named as jump/mantle there.

Quote

bindPadButton MODIFIER PAD_L2 appears to bind a modifier functionality to the "button name" PAD_L2. If a user wants to find out the "button name" of other buttons on their gamepad (e.g. buttons which are not currently listed in the file), what would be a good way to do that?

You probably find answer here: https://github.com/fholger/thedarkmodvr/wiki/Gamepad-support

Quote

Will TDM be able to recognize unusual "button names" (i.e. be able to capture any "button name" or will button names have to be implemented in the code before it works)?

No idea what you mean exactly, so I suppose it will not.


In general, experimental controller support was initially done by @cabalistic and there was no user-friendly configuration. Nothing changed since then.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Thanks!

1)
Doing LONG_PRESS PAD_A (what I, for lack of knowledge, call "jump-mantle" or "_jumpmantle") differs from doing PRESS PAD_A ("_jump").

"_jumpmantle" differs from "_mantle", so they must be mapped to different button-calls.
"_jumpmantle" differs from "_jump", so they must also be mapped to different button-calls.

This appears to be the case, but it is not evident (or changeable) in DarkmodPadbinds.cfg.

"_jumpmantle" seems to be hard coded to always connect to the same button as "_jump" but with a long press. It is as if bindPadButton PRESS PAD_A "_jump" is not actually just binding PRESS PAD_A to "_jump", but rather interpreted as "link PAD_A (regardless of button press time) to behave exactly like keyboard SPACE for short and long presses".

I would have expected the default DarkmodPadbinds.cfg to explicitly read:
bindPadButton PRESS PAD_A "_jump"
bindPadButton LONG_PRESS PAD_A "_jumpmantle"
bindPadButton PRESS PAD_B "_crouch"
bindPadButton LONG_PRESS PAD_B "_mantle"
... but neither LONG_PRESS PAD_A or "_jumpmantle" is listed in the file.

If there are actions "_jump" and "_mantle", I suppose there must also be an action "_jumpmantle" since it is possible for the player to do all those movements:
* "_mantle" does the movements "crouch on the high surface, then stand up"
* "_jumpmantle" idoes the movements "jump slightly forward, then land standing on the high surface"
* "_jump" idoes the movements "jump up, then land exactly where you started"

If the actions "_jump" and "_moveup" are not synonymous, then perhaps the action "_moveup" is what i call "_jumpmantle"?

2)
Thanks for the link! It was useful in more than one way. I'll link to that page from https://wiki.thedarkmod.com/index.php?title=Bindings_and_User_Settings#Gamepad_Default_Bindings if I can get an account on the wiki, which proved more difficult than i thought 🙂 (https://forums.thedarkmod.com/index.php?/topic/22327-how-can-i-create-an-account-on-the-tdm-wiki/).

However, it does not answer my question how to find out the name ("<button>") used for a button on my gamepad. Basically, I would need to press the button on my gamepad and some program could tell me "That button is called 'PAD_A'". In my case, I have a gamepad "Logitech F310" (https://commons.wikimedia.org/wiki/File:Logitech_F310_Gamepad.jpg) which has a "Logitech button" (see image) that I want to use. I was hoping to find out the "button name" for that button and then edit DarkmodPadbinds.cfg to map it to a function.

3)
... but if that button has an "unusual name" that TDM does not recognize, then it may perhaps not work. E.g. if that button is called "PAD_LOGITECH" and TDM cannot recognize that name, then I cannot map anything to it via DarkmodPadbinds.cfg. Using QJoyPad I can map any keyboard key to it instead, as a workaround, but I cannot map MODIFIER to it (since MODIFIER cannot be set to a keyboard key).

If current implementation is still called "experimental", then I must say it works very well; @cabalistic: kudos for that! I may not have continued playing TDM had it not worked with a gamepad.

Edited by Fiver
link url
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...