Scroll picture using mouse wheel.

Discussion in 'JS Plugin Requests' started by cedr777, Apr 15, 2019 at 2:07 PM.

  1. cedr777

    cedr777 Lead developer of "Charao Life" Veteran

    Messages:
    207
    Likes Received:
    50
    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: Apr 15, 2019 at 5:38 PM
    #1
  2. Hyouryuu-Na

    Hyouryuu-Na Too lazy Veteran

    Messages:
    155
    Likes Received:
    57
    Location:
    Bangladesh
    First Language:
    Bangla
    Primarily Uses:
    RMMV
    #2
  3. cedr777

    cedr777 Lead developer of "Charao Life" Veteran

    Messages:
    207
    Likes Received:
    50
    First Language:
    Not English
    Primarily Uses:
    RMMV
    Hello, and thanks. I will try it now.
    EDIT: I've tried it, unfortunately you can't scroll a picture using that plugin, it seems to only work for the map and not during an event.
     
    Last edited: Apr 15, 2019 at 3:58 PM
    #3
  4. Hyouryuu-Na

    Hyouryuu-Na Too lazy Veteran

    Messages:
    155
    Likes Received:
    57
    Location:
    Bangladesh
    First Language:
    Bangla
    Primarily Uses:
    RMMV
    Ohh I didn't know that. :( Sorry
     
    #4
  5. cedr777

    cedr777 Lead developer of "Charao Life" Veteran

    Messages:
    207
    Likes Received:
    50
    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: Apr 15, 2019 at 5:32 PM
    #5
  6. Hyouryuu-Na

    Hyouryuu-Na Too lazy Veteran

    Messages:
    155
    Likes Received:
    57
    Location:
    Bangladesh
    First Language:
    Bangla
    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.
     
    #6
  7. Poryg

    Poryg Pixie of the Emvee kingdom, Ham of a Hamster Veteran

    Messages:
    3,424
    Likes Received:
    8,377
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Alnost finished, just have an unexpected errand I need to do before I can finish it.
     
    #7
    Hyouryuu-Na, megumi014 and cedr777 like this.
  8. cedr777

    cedr777 Lead developer of "Charao Life" Veteran

    Messages:
    207
    Likes Received:
    50
    First Language:
    Not English
    Primarily Uses:
    RMMV
    Woah, thanks bud! I'm looking forward to it.
     
    #8
  9. Poryg

    Poryg Pixie of the Emvee kingdom, Ham of a Hamster Veteran

    Messages:
    3,424
    Likes Received:
    8,377
    Location:
    Czech Republic
    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.
     
    #9
    cedr777 and Hyouryuu-Na like this.
  10. cedr777

    cedr777 Lead developer of "Charao Life" Veteran

    Messages:
    207
    Likes Received:
    50
    First Language:
    Not English
    Primarily Uses:
    RMMV
    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.
     

    Attached Files:

    Last edited: Apr 16, 2019 at 2:56 AM
    #10
  11. Poryg

    Poryg Pixie of the Emvee kingdom, Ham of a Hamster Veteran

    Messages:
    3,424
    Likes Received:
    8,377
    Location:
    Czech Republic
    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.
     
    #11
    cedr777 likes this.
  12. cedr777

    cedr777 Lead developer of "Charao Life" Veteran

    Messages:
    207
    Likes Received:
    50
    First Language:
    Not English
    Primarily Uses:
    RMMV
    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.
     
    #12
  13. cedr777

    cedr777 Lead developer of "Charao Life" Veteran

    Messages:
    207
    Likes Received:
    50
    First Language:
    Not English
    Primarily Uses:
    RMMV
    Hello, any update on the compatibility request? :)
     
    #13
  14. Poryg

    Poryg Pixie of the Emvee kingdom, Ham of a Hamster Veteran

    Messages:
    3,424
    Likes Received:
    8,377
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    None. Spent whole yesterday awake after a night shift, so I'm resting.
     
    #14
    cedr777 likes this.

Share This Page