JonathanHelianthicusDoe / toonmux

Linux multi-toon controller for Toontown-based MMORPGs
GNU General Public License v3.0
12 stars 2 forks source link

Enhancement: Walking/sprinting keybindings? #2

Closed tt-cclear closed 3 years ago

tt-cclear commented 3 years ago

Hey, good work on toonmux! I find it much more feature-rich than the older multicontroller I used.

I feel that it would be a good if another keybinding for the Shift key could be added. It's the default keybinding for walking in TTR and sprinting in Corporate Clash.

While walking in TTR is admittedly usually useless, I've noticed it also slows down the speed of turning (right and left arrow keys). I'm wondering how it'll help solo pivot stunning in the CJ, but unfortunately to try that I would need to have both low power throw and the walk keybinding working.

Sprinting is a much-used feature in Corporate Clash (handy for tasking and such). While there's no official Linux launcher for the game yet, I found it possible to run it on Linux under Wine, and I feel that there won't be any harm in adding the functionality here.

JonathanHelianthicusDoe commented 3 years ago

That sounds reasonable to me, I’ll try implementing that in a bit.


While there's no official Linux launcher for the game yet, I found it possible to run it on Linux under Wine […]

On a somewhat unrelated note, I’m interested in this… I’ve tried (admittedly, not very hard, as I am far from being a Wine expert!) running TT:CC through Wine to no avail, and I’d be interested in how you managed to do it.

JonathanHelianthicusDoe commented 3 years ago

A basic/straightforward implementation is now on the shift-bindings branch. There’s nothing much interesting about it, with one exception: I changed the default “toggle mirroring” key from Shift to Alt, for obvious reasons. This shouldn’t be too big of an issue, since you can rebind them all freely anyways.

Youngsie1997 commented 3 years ago

Hi there, I just wanted to offer assistance on getting toontown corperate clash working under Linux as it has became quite complicated with the new launcher. I tried to get toonmux working with it and unfortunately had no luck.

The new launcher has an issue with their version pylauncher and wine so you will need a custom build of Wine to get the new launcher to work otherwise use their less feature rich launcher. If you would like further help feel free to contact me

tt-cclear commented 3 years ago

Sorry for the late response

A basic/straightforward implementation is now on the shift-bindings branch. There’s nothing much interesting about it, with one exception: I changed the default “toggle mirroring” key from Shift to Alt, for obvious reasons. This shouldn’t be too big of an issue, since you can rebind them all freely anyways.

@JonathanHelianthicusDoe Thanks a ton for the help! I haven't got access to my Linux PC right now, but I'd try it out ASAP when I'm back. May be a for a while, though, unfortunately.

I tried to modify the code before to include sprint control, but cannot get it to work so can't submit a pull request. Probably the default key was what tripped me up... or the fact I have absolutely zero experience coding with Rust before that ;)

On a somewhat unrelated note, I’m interested in this… I’ve tried (admittedly, not very hard, as I am far from being a Wine expert!) running TT:CC through Wine to no avail, and I’d be interested in how you managed to do it.

I did it the simple, stupid, dangerous, quick and dirty way by running the launcher .exe file (after installation) with sudo i.e. sudo wine new_launcher.exe. Emphasis on 'dangerous', see this https://wiki.winehq.org/FAQ#Should_I_run_Wine_as_root.3F

Try at your own risk (if you still want to after reading that article, that is.) May be safer to do that on a Linux VM.. or @Youngsie1997 's way

The new launcher has an issue with their version pylauncher and wine so you will need a custom build of Wine to get the new launcher to work otherwise use their less feature rich launcher. If you would like further help feel free to contact me

That sounds like a way safer option. I'd contact you as soon as I get that PC reassembled...

I tried to get toonmux working with it and unfortunately had no luck.

Me neither, I'm afraid. The controller seem to successfully set the window but the window does not respond appear to respond to keystrokes.

I tried the older controller I had, but it has the same issue. As a note, I have also noticed that Wine apps often have problems interacting with Linux apps regarding input (e.g. clipboard not syncing) So I'm guessing it isn't a toonmux-specific issue, but rather perhaps the way Wine interacts with native Linux applications. It's compatibility software and not a native Windows installation, after all.

I have tried installing Dan Fresneda's Windows multicontroller on Wine and using that on clash, but it input lags way too badly to be usable :/.

tt-cclear commented 3 years ago

Oh yeah, I may not be able to access my PC for quite a while due to complicated IRL reasons, so feel free to close the issue if I took too long. I promise to still confirm back after I get back on the PC again.

Edit: Fixed typo

tt-cclear commented 3 years ago

Hey. I'm very sorry for the late reply!

I've built toonmux from the shift-bindings branch and tried it out yesterday. I can now confirm everything works as expected in TTR.

I've also done some browsing and apparently, so far it's quite impossible for a Linux native app to send key-events to another application running on Wine, and this applies to all Linux native apps and not only toonmux - thus the problem isn't something that needs to be fixed in this end. Reff: https://askubuntu.com/questions/1060169/does-xdotool-not-work-with-any-windows-program, and https://forum.winehq.org/viewtopic.php?t=31026. Thanks to this, supporting Clash running under Wine is impossible - and this will stay the case until they make a native Linux version or someone comes up with a workaround.

I think the issue is pretty much resolved now, and I'll close it now. Again, a BIG HUGE sorry for the late reply, and thanks for all your help!