[SOLVED] Scroll picture using mouse wheel.

Status
Not open for further replies.

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
Hi, would anyone be interested in making a plugin that can scroll a picture that was shown using Show Picture command using the mouse wheel?

lets say my games resolution is set at 1280x720. I have a picture that is 1280x2500 resolution and I show it using the Show Picture command. If you keep the Show Picture command settings by default it will show the origin on upper left, designation x and y to 0. Since the picture is too big for the screen it will be clipped, yes?

Now in MV the only way to let the players get the full view of an image of that size is to use the Move Picture command to scroll through the entire picture.

However I would like it if the player can scroll through the picture up and down freely using the mouse wheel if possible.

EDIT: The plugin should work during an event with dialogues and be able to detect what type of scrolling to be used according to the size of the picture that is shown.
Vertical scrolling will be enabled for pictures that is greater than a default game resolution of say 1280x720. in the above case when the picture height is greater than 720 which is 2500. Horizontal scrolling, when the picture length is greater than 1280.

EDIT: The default scroll rate can be adjusted in the plugin parameters.
EDIT: request to include a plugin command that
-disables/enables the plugin.
-adjusts the scroll rate.

TLDR; Basically I want a large image that is scrollable.

sorry if my wording is off guys.
 
Last edited:

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
Last edited:

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
960
Reaction score
2,247
First Language
Not English
Primarily Uses
RMMV
Ohh I didn't know that. :( Sorry
 

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
It's ok bro.

BTW, The Idea came from this: I played this visual novel in the past where in the game resolution was around 720p. There was a scene where the CG shown was a large portrait that couldn't fit the screen. Fortunately, the player was allowed to see the entirety of the picture by first hiding the message box then using the mouse scroll to move downwards or upwards.

A nice feature for players who want to take time to admire the entirety of the artwork.
Coincidentally, our game HAS a lot of these hi-resolution pictures that I want players to scroll freely without the developer being limited having to manually use the Move Picture command each time.
 
Last edited:

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
960
Reaction score
2,247
First Language
Not English
Primarily Uses
RMMV
That's a cool idea. If someone makes a scrolling plugin, I could make a VN like Corpse Party Book of Shadows (where the player can explore the environment by scrolling and interacting with the objects... sort of like point and click games.) I've had this idea for a while but didn't try to make a game like that cos I already have too much to worry about.
 

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
Woah, thanks bud! I'm looking forward to it.
Alnost finished, just have an unexpected errand I need to do before I can finish it.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,640
First Language
Czech
Primarily Uses
RMMV
Finished. You can scroll images as long as their width or height is greater than the screen dimensions. The plugin will prioritize width in case both dimensions are greater.
You can find the plugin here:
https://github.com/Poryg1/RPG-maker-MV-small-plugins

It's shared under MIT license. I did not test it for compatibility issues with other plugins, since in all honesty I'm not here to do that :p But as long as there are no plugins that deal with Game_Picture class, there shouldn't be problems.
 

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
Finished. You can scroll images as long as their width or height is greater than the screen dimensions. The plugin will prioritize width in case both dimensions are greater.
You can find the plugin here:
https://github.com/Poryg1/RPG-maker-MV-small-plugins

It's shared under MIT license. I did not test it for compatibility issues with other plugins, since in all honesty I'm not here to do that :p But as long as there are no plugins that deal with Game_Picture class, there shouldn't be problems.
Hello, I've tried it and it's awesome. exactly what I wanted, thank you very much for taking interest in making this plugin!
If I may, can I please request a compatibility with a few existing visual novel plugins that I'm using? I'm sure they would work well with your plugin as well once they become in sync with each other.

MRP_ScrollOnMessage.js This is a plugin that allows you to advance the text on the message box using the mouse wheel down or access the message blacklog (YEP_X_MessageBacklog.js together with the Message Core) using mouse wheel up. Right now POR_ScrollablePictures.js is conflicting with it since they are both using the mouse wheel up and down function.

MRP_MessageHideOnRightClick.js This is a plugin that allows you to hide the message box when you press right click. Once hidden, Unless you press right click again, the message box won't reappear. If possible, can you make it so that the plugin is able to detect if MRP_MessageHideOnRightClick.js ON and will only allow the player is to scroll WHEN the message window is hidden.

If it helps, I can make a small sample project containing the plugins if you want.

EDIT: also requesting the option to invert/swap the direction of scrolling(in the plugin parameter). Right now when you scroll the mouse wheel down, the picture seems to scroll up. and vice versa.

EDIT: so far that's the only issue I found, no other conflict with other plugins. As a bonus, the plugin is even compatible with Astfgl66's Animated busts and picture based animations. Which is just freaking awesome btw.

EDIT: Done, here is the sample project that will hopefully give more light on my request.
 

Attachments

Last edited:

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,640
First Language
Czech
Primarily Uses
RMMV
I can invert the controls or show you how to invert them once I get home. I will not add an option on which direction would it scroll though as that would have made two relatively simple if statements unnecessary complex. As for the compatibility patch, it should be doable and quite easy to make the image scroll only when the message window is hidden, but probably no sooner than at Wednesday.
 

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
I can invert the controls or show you how to invert them once I get home. I will not add an option on which direction would it scroll though as that would have made two relatively simple if statements unnecessary complex. As for the compatibility patch, it should be doable and quite easy to make the image scroll only when the message window is hidden, but probably no sooner than at Wednesday.
Sure sure, no rush and thank you again for taking interest in making the plugin. :D
btw I've updated the post above and included the sample project with all the active plugins there.
 

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
Hello, any update on the compatibility request? :)
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,640
First Language
Czech
Primarily Uses
RMMV
None. Spent whole yesterday awake after a night shift, so I'm resting.
 

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
Yess, thank you very much! I have tested it together with POR_ScrollablePicturesCP.js which now only allows you to scroll whenever the message box is hidden, (it requires jatopian's message hide.) also, the scrolling direction is now what I want it to be. mhm

but there's just one question, I'm trying to make the scrolling speed faster and duration instant so tried to set the scrollPixels to 100 and scrollDuration to 1in the plugin parameters, but I can't seem to notice the effect or it's not getting any faster.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,640
First Language
Czech
Primarily Uses
RMMV
It's set to take the lower of these two numbers: Scroll speed in pixels or remaining pixels. Either way, there comes a time when the change in speed becomes hardly noticeable to human eye due to how small pixel size is unless you use way bigger images.
 

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
265
Reaction score
60
First Language
Not English
Primarily Uses
RMMV
It's set to take the lower of these two numbers: Scroll speed in pixels or remaining pixels. Either way, there comes a time when the change in speed becomes hardly noticeable to human eye due to how small pixel size is unless you use way bigger images.
Blimey, I figured it out, thanks a lot! the scrolling speed is now faster, I just had to start a new game or do the plugin commands.
EDIT: everything is working perfectly now, You are a saint!
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,867
Reaction score
5,240
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,836
Latest member
T62352536256t362
Top