How do you vibrate your controller using a script in dolphin? (Tldr: Tested a bunch of things that didn't work, and I need help.)
Skyward Sword is and has been one of my favorite games to own and play on the Wii, and getting it to work via dolphin has been a really fun experience. I've got it working just fine on my Switch Pro Controller. I've customized almost all the settings available, including motion controls, moving, swinging the sword, playing the harp, everything works great. That's because I created a toggled variable with the controller profile, allowing me to switch between different modes to fine tune settings. The 3 modes I have currently for the controller are FlightMode, HarpMode, and Standard. Switching between the modes works fine, but I was starting to run into a problem. Sometimes I would toggle a mode to change my control scheme, not realize I had that mode active, and then get hurt by some random enemy because my movements were affected.
The idea I had in mind to mitigate this was to set up the vibration to where if I pressed certain button on the controller while a certain mode was active, I would have my controller vibrate. Here is when I ran into issues:
The idea behind this was that since this was in the Rumble section, if $tFlight > 0 and `Thumb R` was pressed, the 'or' operation between `Motor L`, `Motor R`, and my if statement could return True, my controller would rumble if the conditions were correct. It was vibrating on rolling into an object - the game could trigger vibration just fine. At first I thought it was an issue with my $tFlight variable, so I did another test. This time I just tried to activate rumble with a button like so:
That didn't work either. Pressing 'B' on my controller would not activate the vibration, even if the 'or' operation should return True. Then, I thought that since valid controller 'inputs' were listed in a menu and only Motor L and Motor R were in the list, I would have better luck simply setting a variable somewhere else to True, and putting that in the or statement. After all, 'Functions' is not a selection menu so I realized an if statement probably would not be supported, but 'User Variables' did show up as a valid option. So I finally tried this:
I had the controller menu up while playing the game and found that the game did in-fact detect the 'A' press and '$motorFlightActive' should be set to true, yet it was not causing my controller to vibrate. Does dolphin support user-controlled vibration? Is there a better way to conveniently toggle and un-toggle different controller profiles? Any help would be much appreciated.
A txt document listing my current controls: [attachment=20906]
The ini file (attached as text): [attachment=20907]
Not sure if this is relevant, but since they're required by the rules, here are the operating specs of my computer below:
CPU- Intel i7-13700KF 3.40 GHz
GPU- Nvidia Rtx 4070
Ram- 32 gigs
OS- Windows 11, x64
Dolphin Version: 5.0-21088
Skyward Sword is and has been one of my favorite games to own and play on the Wii, and getting it to work via dolphin has been a really fun experience. I've got it working just fine on my Switch Pro Controller. I've customized almost all the settings available, including motion controls, moving, swinging the sword, playing the harp, everything works great. That's because I created a toggled variable with the controller profile, allowing me to switch between different modes to fine tune settings. The 3 modes I have currently for the controller are FlightMode, HarpMode, and Standard. Switching between the modes works fine, but I was starting to run into a problem. Sometimes I would toggle a mode to change my control scheme, not realize I had that mode active, and then get hurt by some random enemy because my movements were affected.
The idea I had in mind to mitigate this was to set up the vibration to where if I pressed certain button on the controller while a certain mode was active, I would have my controller vibrate. Here is when I ran into issues:
Code:
`Motor L`| `Motor R`| if($tFlight,`Thumb R`,0)
The idea behind this was that since this was in the Rumble section, if $tFlight > 0 and `Thumb R` was pressed, the 'or' operation between `Motor L`, `Motor R`, and my if statement could return True, my controller would rumble if the conditions were correct. It was vibrating on rolling into an object - the game could trigger vibration just fine. At first I thought it was an issue with my $tFlight variable, so I did another test. This time I just tried to activate rumble with a button like so:
Code:
`Motor L`| `Motor R`| `Button B`
That didn't work either. Pressing 'B' on my controller would not activate the vibration, even if the 'or' operation should return True. Then, I thought that since valid controller 'inputs' were listed in a menu and only Motor L and Motor R were in the list, I would have better luck simply setting a variable somewhere else to True, and putting that in the or statement. After all, 'Functions' is not a selection menu so I realized an if statement probably would not be supported, but 'User Variables' did show up as a valid option. So I finally tried this:
Code:
`Motor L`| `Motor R`| $motorFlightActive -------> (Under A button) $motorFlightActive=`Button A`| `Button A`
I had the controller menu up while playing the game and found that the game did in-fact detect the 'A' press and '$motorFlightActive' should be set to true, yet it was not causing my controller to vibrate. Does dolphin support user-controlled vibration? Is there a better way to conveniently toggle and un-toggle different controller profiles? Any help would be much appreciated.
A txt document listing my current controls: [attachment=20906]
The ini file (attached as text): [attachment=20907]
Not sure if this is relevant, but since they're required by the rules, here are the operating specs of my computer below:
CPU- Intel i7-13700KF 3.40 GHz
GPU- Nvidia Rtx 4070
Ram- 32 gigs
OS- Windows 11, x64
Dolphin Version: 5.0-21088