R-Stick Mouse MV + MZ
A downloadable RPG Maker Plugin
This plugin is available for free because it was commissioned by Phanicom. Thank you!
This plugin simulates mouse input (movement and left mouse button) using input from the right control-stick and a configurable button on gamepads.
By default, the player can adjust the speed of the virtual cursor and R-stick deadzone in the Options menu, in addition to the defaults set in this plugin's Parameters.
Drag-and-drop-style interactions are fully supported!
Before deploying for Linux on Windows, you must update MV's NW.js runtime.
Hints
If the controller pressing the "mouse button" is disconnected, the "click" effectively continues until changed. It can be released by reconnecting a controller without the button held into the same player slot, clicking the button on another controller, or simply by clicking the mouse.
This matches RPG Maker's default controller input behaviour.
Load Order
This plugin must be loaded after the following plugins, if present:
- Alpha_ABSZ
- DK_Mouse_System
- EliMZ_Book
- Mimosa_MouseCursor / Mimosa_MouseCursorPlus
- MRP_CameraMouseMove
- YEP_BattleEngineCore
This plugin must be loaded before the following plugins, if present:
- TS_Live_Menu_and_Pause
There appears to be a partial incompatibility between Mimosa_MouseCursor and DK_Mouse_System that can make the native mouse cursor appear erroneously. If this happens, please disable either of these two plugins or look for a compatibility patch.
Plugin Commands
PointAt (MV) / Point at (MZ)
Enables and moves the virtual cursor to the specified coordinates, potentially activating hover controls at the destination.
The PointAt command expects two integers for the x- and y-coordinate in canvas space, respectively, as offsets from the top-left canvas corner.
(Normally, these are game pixels.)
Save Contents
This plugin creates an additional top-level key TSC_RStick_Mouse
in the configuration save file.
Compatibility Notes
This plugin should generally be loaded after any other plugins that receive mouse input. Additionally, as it hides/shows the native mouse cursor and a virtual cursor and there is no standard interface for this in RPG Maker, other cursor plugins likely won't be compatible unless specifically supported here.
(Check "Load Order" to see if a specific cursor plugin is compatible. If it's not listed there, or if there's another compatibility issue, you can message me and I'll see if it's an easy fix.)
This plugin was tested in RPG Maker MV 1.6.3 and RPG Maker MZ 1.8.0, uses only the public RPG Maker API as far as possible, and does not use any platform-specific APIs.
This plugin should be compatible with any deployment target available for RPG Maker MV and MZ, including web and most custom ones.
This plugin is compatible with VisuMZ_0_CoreEngine and VisuMZ_1_BattleCore.
License
This plugin is available under the MIT License. Please see the plugin file for details.
Updated | 3 days ago |
Status | Released |
Category | Assets |
Author | Tamschi |
Made with | RPG Maker |
Tags | Controller, cursor, gamepad, input, mouse, rmmz, RPG Maker, RPG Maker MZ |
Code license | MIT License |
Average session | A few seconds |
Languages | English |
Inputs | Gamepad (any) |
Accessibility | Configurable controls, One button |
Links | Imprint / Impressum, Support |
Download
Click download now to get access to the following files:
Development log
- Ver. 1.1.3: MV-compatibility, Fixes and RevisionsMay 20, 2024
- Ver. 1.0.2: Don't stop or hide in menusMay 17, 2024
- Ver. 1.0.1: VisuMZ-compatibilityMay 17, 2024
- Ver. 1.0.0May 16, 2024
Comments
Log in with itch.io to leave a comment.
Unfortunately I get the following error message when I press the right mouse button or the menu key:
"Unexpected token u in JSON at position 0"
I use RPG Maker MZ.
What I noticed is that the parameters say: "Virtual Cursor" and then "RStick_Cursor" - but I don't have this image file. But I think that has nothing to do with the error...
What do I wrong?
Ah, I forgot to include it in the latest version. There seems to be a delay with build processing in itch.io, so here’s the correct file (which you should save as img/pictures/RStick_Cursor.png):
That doesn’t explain the error you’re seeing, though. Do you have a stack trace? Maybe there’s an incompatibility with another plugin.
Thanks for the quick answer and the .png! I have now found out that the “VisuStella Picture Common Events” plugin is responsible (as can be seen in the details in the screenshot). At least when I run it with your plugin. I've added the error message from the DevTool for you:
"FOSSIL.js:7898 FOSSIL is now running as main.
VM143:12 Static PreFixes are here
VM870:803 finalFixes Here
DevTools failed to load SourceMap: Could not load content for chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/js/libs/pixi.js.map: System error: net::ERR_FILE_NOT_FOUND
rmmz_managers.js:2036 SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
at Function.JsonEx.parse (rmmz_core.js:6445)
at Function.JsonEx.makeDeepCopy (rmmz_core.js:6455)
at Game_System.<computed> [as createPictureCommonEventData] (VisuMZ_4_PictureCmnEvts.js:1368)
at Game_System.<computed>.<computed> [as pictureCommonEventData] (VisuMZ_4_PictureCmnEvts.js:1368)
at Game_System.<computed> [as pictureCommonEvent] (VisuMZ_4_PictureCmnEvts.js:1368)
at Sprite_Cursor.Sprite_Picture.<computed>.<computed> [as isClickEnabled] (VisuMZ_4_PictureCmnEvts.js:1368)
at Sprite_Cursor.Sprite_Clickable.processTouch (rmmz_sprites.js:29)
at Sprite_Cursor.Sprite_Clickable.update (rmmz_sprites.js:25)
at Sprite_Cursor.Sprite_Picture.update (rmmz_sprites.js:2906)
SceneManager.catchNormalError @ rmmz_managers.js:2036
SceneManager.<computed> @ VisuMZ_0_CoreEngine.js:9423
SceneManager.update @ rmmz_managers.js:1945
Graphics._onTick @ rmmz_core.js:811
TickerListener.emit @ pixi.js:9093
Ticker.update @ pixi.js:9548
Ticker._tick @ pixi.js:9298
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9301"
Can you please take a look at it, maybe you can find something out?
Thanks. I know roughly why this happens:
Sprite_Cursor
is aSprite_Picture
so that Dynamic Pictures can be used to make it dynamic. It seems that VisuStella Picture Common Events assumesSprite_Picture
appears only under specific circumstances and/or never has apictureId
of0
. (I chose that ID specifically to avoid interference with other plugins, since for example in this case any other would risk turning the cursor into a button.)Normally this would be easy to figure out and patch, but there are two reasons I don’t provide further support in this case:
The plugin is not publicly available. I can’t efficiently debug something I don’t have access to.
Their Terms of Use also explicitly forbid you from sharing it with me, as it has to be repurchased for each developer who works with it separately.
(It’s fine to (privately) share my plugins within your team freely. I only care about how many entities publish games with them.)
Second, as you can tell by the
<computed>
in the stack trace, VisuMZ plugins are obfuscated. That makes it, mildly put, difficult and/or cumbersome for other plugin creators to ensure compatibility.(I guess I care too much about providing a good product to do that. The obfuscation also hurts performance of the finished game.)
You’ll have to ask Team VisuStella about it. For what it’s worth, fixing it (assuming it’s the only incompatibility) shouldn’t take them more than ten minutes or so and would improve compatibility of their plugin in general, not just with R-Stick Mouse.
Hey Tamschi,
thank you for your detailed answer and that you took the time to explain the problem more precisely. I really appreciate that!
I have now contacted the VisuStella team and hope that they can do something to solve the problem.
Thanks again for your effort!
Best regards!
For what it’s worth, the build with the PNG included is also live now, since about an hour ago. It says “0.1.3” as version because I mistakenly left the “0” in place from another command yesterday.
I was able to push it with the correct version number just now, so that should update eventually. Edit: Quicker than expected.
I called this one “1.1.3+cursor-image” to distinguish it, but I’ll most likely use plain version numbers for future versions again.
Amazing, I've been looking for R stick compatibility for MV forever thank you
This plugin hasn’t been tested with MV yet, but aside from the plugin command, there’s a good chance it is compatible already.
I’ll likely get around to backporting it soon-ish.
There ended up being a decent amount of necessary adjustments 😅
It should be working perfectly now, though.
Let me know what you think!