MV SDJB_MouseControlEx

PluginName: SDJB_MouseControlEx
Author: ShadowDragon

SDJB_MouseOver.gif


SDJB_MouseHover became SDJB_MouseControlEx and had new cool feature.

In case of Draggable map and SDJB_DrawLinesBetween, you can make
a full skill tree map!

Only a draggable map for a bigger map, to transfer player on longer distance,
no small window or small map, use a big map instead!

There may be other ways for a draggable map, what will you do with it?

Spoiler: How it works
Code:
 Introduction
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 This plugin extends the following mouse features:

 > Mouse Hover
 > Click Events
 > Drag Map


 Mouse Hover
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 Mouse Hover allows you to select commands instantly by hovering
 over them, instead of clicking first to select.

 Hovering over a command will select it, and clicking will activate it.


 Click Events
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 Events can be clicked if they contain either a comment tag
 or a notetag.

 Notetag: <<Clickable>>
 Allows you to click the event as long as the event is active,
 regardless of the current page.

 Comment tag: <<Clickable>>
 Allows you to click the event if the tag exists on the
 currently active event page.

 NOTE: Notetags takes priority over comment tags.

 Aside from <<Clickable>>, the default click range is 250 tiles.
 You can override this by specifying a value:

 <<Clickable: 5>>

 This allows the event to be clicked only within 5 tiles.
 The event cannot be activated if the player is too far away.


 Drag Map
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 Dragging the map allows you to create features such as
 skill trees or interfaces directly on the map.

 You can click and drag the map to move the camera.

 To make a map draggable, add the following map notetag:

 <dragMapCamera>

 While on a draggable map:
   The player and followers can be hidden
   The main menu can be disabled

 Player transfer positions do not matter, the map will start
 at the top-left corner.

 After dragging the map, the camera position is saved per map ID
 and restored the next time you return to that map.


 Script Call
 ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞
 Use the following script call to control access:

 setMapAccess(key, value)

 key   => mainMenu | player | follower
 value => true / false

 Example:
   setMapAccess("mainMenu", false)

 Default values:
   mainMenu: true
   player: true
   follower: false

 mainMenu:
   true  => Menu access will be restored correctly
            after leaving a draggable map.

   false => Menu state will remain unchanged when
            leaving a draggable map.

 The same logic applies to player and follower access.


=== TERMS OF USE ===
Free for Non-Commercial and Commercial use when credit is given.
credit one of the following:
ShadowDragon
ShadowDragonJB


=== WARNING ===
YOU ARE NOT ALLOWED TO:
* MODIFY without permission
* EXTEND without permission
* TAKE CODE without permission
* CLAIM AS YOU MADE IT
* REDISTRIBUTE but link back to the forum or itch.io
* SELL this product as standalone.
* DO NOT REMOVE THE HEADER.

Download from itch.io. (require my base plugin (SDJB_Base or SDJB_BaseMZ (minified version))
Can you develope or add on the same plugin an option for instant touch? It would be meant for phones, you can use Spacedesk for example to connect your smartphone to PC, so you don't need to deploy the game for the testing.
I dont get your question or what Spacedesk has to do with it.
I dont know that software or has any use for it.

instant touch is something I dont use, if you mean "auto click" when mouse
over the command?

which isn't really helpfull when using item to use instantly as well.

I need more info for what kind of use because digging into it, as I made
it very simple as it isn't MV default like MZ is.

if you want to use it in MZ, I cannot help you as I dont own MZ.
I dont get your question or what Spacedesk has to do with it.
I dont know that software or has any use for it.

instant touch is something I dont use, if you mean "auto click" when mouse
over the command?

which isn't really helpfull when using item to use instantly as well.

I need more info for what kind of use because digging into it, as I made
it very simple as it isn't MV default like MZ is.

if you want to use it in MZ, I cannot help you as I dont own MZ.

Basically what I'm requesting is to make that in mobile devices you don't need to "hover".

In mobile devices what you do is touch directly the screen, there's no mouse, so when you touch a command, you have to double-tap the command because the first tap hovers the command, and the second tap executes the command. So, to allow "instant-input", a script function must be done to disable the hover effect and allow instant execution of commands with a single tap, so in this way, the command is executed instantly either if you touch the screen by tapping the command, or with a single click of a mouse cursor.

Spacedesk is a program to share the screen of your computer to any device including mobile phones, is 100% free and is really helpful to test the game on smartphones without having to deploy it, because you control the computer from the mobile by touch input.

Link for PC: https://www.spacedesk.net/
Link for Android: https://play.google.com/store/apps/details?id=ph.spacedesk.beta&hl=es&gl=US
single click to open stuff, I dont know if there is anything on the web like that,
as it might be same behaviour like MZ that might have that touch input.

while there is no touchinput is added, I can look into it, as touchinput is default
on MV, it just need to trigger directly over the commands when clicking on it.

so I assume over the item as well for direct use?

I see what I can do about it.

@Rex Tenebris I cannot really check mobile devices though, but you can
test it out if you open the plugin and add a line there:
JavaScript:
    Window_Selectable.prototype.MoveMouseCursor = function() {
        if (this.isOpenAndActive() && TouchInput.isMoved() && this.MouseInsideWindow()) {
            this.onTouch(false);
        }
        if (Utils.isMobileDevice()) this.onTouch(true); //<== add this line here
    };

I cannot tell if it will work or but when true on PC, it does activate directly,
so I hope this can solve your issue if you add that one.

otherwise I need to dig into it how they exactly move, or someone that has
experience using mobile devices, or able to test on them.

as it is a bit hard to target mobile devices when I cannot really test it there.
so I hope it does work for you, otherwise I cannot really help you further.
Thank you for the work 😂

I tried using your plugin today but it crashes on startup with this error using MV:
8bfVOCP.png

I also tried putting at the top and bottom of the plugin list, but same result.
@raffle I cannot replicate the issue though, or why it throws that error.
as I need to change my plugin setup a tiny bit differently, it doesn't had
any parameters for now, and there might come 1 or 2 for it.

as it also have the mini code above for mobile part (what I cannot test),
you shouldn't have any issues, so I made some tiny adjustment to it,
so re-download it, and hopefully it works out, otherwise I need a bit more
info how it happen.

as it is an utility plugin, you can put it at the bottom (which I have in my test project),
and it works, if the issue persist, what version of MV do you use? maybe NW.JS version?
@ShadowDragon That seems to have fixed the issue, no longer have any crashes and it works perfectly 😂Thank you so much!! This plugin makes navigation feel much smoother
While updating and its ability to click events on comments or notetags,
I never released this version!

however, I did add some new stuff among it and refractor the code,
and will be released later this week:

what's new:

+ add range on clicking with default range set in the parameter.
if player is 4 tiles away while event need 2 tiles, it cannot be activated.

+ map drag, this allows you to drag the map to create your own skill tree
on the map, so you can click on the map events where you can add the logic.

Require my SDJB_DrawLinesBetween (not yet approved!)
so you can color the lines when activated between the 2 nodes.

you could use a parallax map otherwise, but the possibility on dragging the
map can be nice, as you can drag up to the max size a map can be.

it also save the map coordinates, transfer player to x0, y0 or where ever you
set it doesn't matter, the coords are safed that is going to be used.

I update a preview later.
Plugin is updated, along with a new name: SDJB_MouseControlEx.
as it is no longer a just mouse hover plugin.

it extend the following features:

- Mouse Hover
- Click Events on distance (specify a range if not default range!)
- Draggable Map (use you brain for cool ideas)

have feedback? Leave it behind as any suggestion, feedback are welcome.

Original thread: https://forums.rpgmakerweb.com/threads/sdjb_mousecontrolex.154906/