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?

(+1)

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):

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?

(5 edits) (+1)

Thanks. I know roughly why this happens: Sprite_Cursor is a Sprite_Picture so that Dynamic Pictures can be used to make it dynamic. It seems that VisuStella Picture Common Events assumes Sprite_Picture appears only under specific circumstances and/or never has a pictureId of 0. (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.

(+1)

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!

(1 edit) (+1)

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.

(1 edit)

There ended up being a decent amount of necessary adjustments 😅

It should be working perfectly now, though.
Let me know what you think!