Camera Control Plugin by Tyruswoo

Discussion in 'JS Plugin Releases (RMMV)' started by Tyruswoo, Nov 24, 2015.

  1. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    76
    Likes Received:
    55
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV

    Camera Control
    Plugin by Tyruswoo
    For RPG Maker MV

    Download Link (DropBox):
    TYR_CameraControl.js

    Be sure to keep the filename as shown above, in order for it to work.

    Save it in your project's js/plugins folder. Then, open your project and load the plugin with the Plugin Manager.
    Description:
    Camera Control provides the ability to center the camera on locations other than the player, such as events or map coordinates. It controls the outside-of-battle camera, and is great for cutscenes and other times when the player is moving on the map.
    This can be used in combination with the "Scroll Map..." event command to accomplish very cool camera control. Some recommended usage techniques include:
    • For your cutscene, create an event (perhaps an event titled "Camera"), and use the CamFollow plugin command to center on that event. Then, simply use the "SetMoveRoute" command to have the event move wherever you want, and the camera will follow that event! The advantage of this over the "Scroll Map" command is that it allows the player's position to change without upsetting the camera's center point, and it also allows easier control of the camera and easier identification of the camera's current position.
    • Another technique for a cutscene: Use the CamFollow plugin command to center the camera on the map itself. Then, you can use the "Scroll Map" commands to move the camera, without the player's movement affecting the camera! This is another great way to have cutscenes in which the camera can be moving independently of the player, while the player can also move as they wish.
    • Use the CamSet plugin command to create "lookout points" where the player can look into a device in order to see a far-away location on the map.
    • At any time, you can use the "CamFollow player" plugin command to return camera functioning to normal, following the player's position.
    Please let me know if you have any suggestions to improve the plugin!

    Your Adventuring Companion,

    Tyruswoo

    Plugin Help:
    The plugin's help content describes how to use the plugin commands, and is as follows:

    Camera Control
    by Tyruswoo
    Last Update: 19 Nov. 2015
    ===========================================================================

    Terms of Use:
    This plugin is free to use in both commercial and non-commercial games.
    However, in your credits, include "Tyruswoo", and please also send me
    a free copy of your game! :)
    ~Tyruswoo
    ===========================================================================

    Follow me for more RPG Maker MV content and tutorials!
    Tyruswoo RPG Maker on YouTube:
    https://www.youtube.com/channel/UCEJBC5FIHEe2a81yk6KEA1g
    ===========================================================================

    This Camera Control plugin allows greater control of the camera.

    Plugin Commands:
    CamSet
    CamFollow

    A Few Notes:
    - CamSet simply places the camera at a certain position, but the camera
    will still be attempting to follow its current target (usually the
    player, by default).
    - CamFollow allows changing the camera's target. This can be used to
    make the camera follow a certain event's perspective. Or, the
    camera can be set to follow the map (i.e. a fixed perspective).
    - These plugin commands can be used in combination with the "Scroll Map..."
    event command, found on Event Commands tab 2, under the Movement section.
    ============================================================================

    Plugin Command Usage:
    (Replace x and y with coordinates, and replace ID with an event's ID number.)

    CamSet x y
    Sets the camera's position to x and y,
    where x and y are integers.

    CamSet player
    Sets the camera's position to the player's
    current position.

    CamSet event ID
    Sets the camera's position to the current location
    of the event of the given ID.

    CamFollow x y
    Makes the camera follow (lock on) the given coordinates.
    - This sets the camera to "follow" the map; i.e., to not
    move unless the "Scroll Map..." event command is used.
    - This is useful is conjunction with the event command
    "Scroll Map..." (found on Event Commands tab 2, under
    the Movement section). This allows for cutscenes
    where the camera is set to follow a certain path, but
    the player can still move as they please.
    - Note that the "Scroll Map..." event command can be
    used in two directions at once, allowing for diagonal
    panning of the camera.

    CamFollow map
    Makes the camera follow (lock on) the map, at the
    camera's current position, without defining coordinates.

    CamFollow player
    Makes the camera follow the player. This is the same
    as the default behavior of the RPG Maker MV camera.

    CamFollow event ID
    Makes the camera follow the position of the given event.
    This can be useful in making cutscenes that follow a
    certain event. If the event is invisible, then it can
    look like the camera is simply panning across a scene.
    - This can also be used to allow for cutscenes where
    the camera is set to follow a certain path, while the
    player can move as they please.
    - Can also be used in combination with the "Scroll
    Map..." event command, allowing for diagonal panning
    of the camera.
     
    Last edited: Nov 29, 2017
    #1
    Kyuukon, Linard, Cadmus and 9 others like this.
  2. Killuki Zaoldyeck

    Killuki Zaoldyeck キルアの双子の兄 Veteran

    Messages:
    212
    Likes Received:
    18
    First Language:
    Spanish
    Can you add those two functions please?:

    • Zoom_in and zoom_out, lock_map_zoom and unlock_map_zoom plugin commands. This will be good for cutscenes and for increase/decrease the display size of small maps like hidden treasure rooms or map worlds or anything.
    • Zoom in and out by mouse scrolling & key+and- & two fingers(mobile game) within a set limit of zoom in and out. The plugin commands can bypass this limit. If the plugin command "lock_map_zoom" was used, the player is unable to use the zoom feature until it's enabled again by unlock_map_zoom command.
    Thank you in advance! I will test the script as soon I can.
     
    #2
    Tyruswoo likes this.
  3. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    76
    Likes Received:
    55
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Hey Killuki!

    I'll add this to my list of features to try adding to this plugin in the future.  This sounds too complex for me to add soon, but I'll hope to get to it sometime.  In the meantime, anybody who wishes to expand on my plugin may do so, as long as I am credited for the original plugin.

    In the meantime, I hope this comes in handy!  Thank you for the suggestion, which gives me a good direction I could take this plugin the future.

    Sincerely,

    Tyruswoo
     
    #3
    Killuki Zaoldyeck likes this.
  4. nightdragon

    nightdragon Veteran Veteran

    Messages:
    92
    Likes Received:
    6
    Location:
    USA
    First Language:
    English
    I would like zoom as well.
     
    #4
    Tyruswoo likes this.
  5. Cephalophane

    Cephalophane Villager Member

    Messages:
    25
    Likes Received:
    6
    Very nice! This does everything I want and more. Thanks for finding my request and letting me know about it!
     
    #5
    Tyruswoo likes this.
  6. Ste

    Ste Veteran Veteran

    Messages:
    38
    Likes Received:
    17
    Location:
    Parma, Italy
    First Language:
    Italian
    Primarily Uses:
    RMMV
    I wanted so much this plugin!!!

    Thank you Tyruswoo! :)
     
    #6
    Tyruswoo likes this.
  7. Roguedeus

    Roguedeus Veteran Veteran

    Messages:
    469
    Likes Received:
    83
    First Language:
    English
    Tyruswoo, could I request a compatibility update with Masked's Smooth Scroll plugin?

    I am using Smooth Scroll to remove that occasional FPS gitter that occurs when the map scrolls.
     
    #7
  8. Ringtale Games

    Ringtale Games Veteran Veteran

    Messages:
    81
    Likes Received:
    18
    First Language:
    english
    Definitely gonna be using this, though a zoom feature would definitely be pretty sweet!
     
    #8
    Tyruswoo likes this.
  9. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    76
    Likes Received:
    55
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV




    Hi all,


    Zooming would be a great feature!  Please see SumRndmDde's tutorial of how to use script calls to get zooming working, with no need for plugins!










    Let me know if this works for you!


    Your Adventuring Companion,


    Tyruswoo
     
    #9
    Killuki Zaoldyeck likes this.
  10. Ringtale Games

    Ringtale Games Veteran Veteran

    Messages:
    81
    Likes Received:
    18
    First Language:
    english


    AWESOME! Thank you for being so quick to help solve the zooming riddle! I'll be checking it out as soon as i can and letting you know how it goes!
     
    #10
    Tyruswoo likes this.
  11. nightdragon

    nightdragon Veteran Veteran

    Messages:
    92
    Likes Received:
    6
    Location:
    USA
    First Language:
    English
    Cool, didn't know that. Thanks for the tutorial. I'll check it out.
     
    #11
    Tyruswoo likes this.
  12. DanTango

    DanTango Warper Member

    Messages:
    3
    Likes Received:
    1
    First Language:
    English
    Hey there Ty!


    I've tried to use your plugin, and it works just perfect for a scene I'm making, but there's one problem.


    The plugin seems to make all future events (after the script has been called) to move far faster than otherwise stated.


    This, as you can understand, gets annoying to work with.


    I'm not sure if it's the latest RPG Maker MV version that's bugging the plugin out or what, but can you look into the issue?


    I would hate to not use this plugin :(
     
    #12
  13. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    76
    Likes Received:
    55
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV


    A few clarifying questions:  What plugin command did you use that caused events to move faster?  Also, what do you mean by "future events"?  Do you mean events that are given a new Move Route, or events generated during the game using a plugin?
     
    #13
    Hatake-hime likes this.
  14. DanTango

    DanTango Warper Member

    Messages:
    3
    Likes Received:
    1
    First Language:
    English
    Thanks for the speedy reply!


    I use "CamFollow event ID" on, say, a particular event/NPC as they are the center of attention for that scene.


    And I have this problem where, even if I've called the script just once before, future events (event's in map's later on in the game) have an altered move route speed/frequency, regardless of their own settings.


    It is odd because it only seems to affect one event that requires movement, any proceeding moving events aren't affected. I had a feeling it might be only affecting the event that moves first/has the earlier event id (i.e. id 1 bugged, id 2 fine).
     
    #14
  15. DanTango

    DanTango Warper Member

    Messages:
    3
    Likes Received:
    1
    First Language:
    English
    I have a demo showing the problem in question.


    Both move events there share the same move routes, but one of them moves far faster than necessary.


    I'm not sure why it does this but I've removed your plugin and it doesn't resort to this odd alteration.


    I'd like to continue using as I have some great scenes that utilise it very well :)


    Demo:


    View attachment MVTest.rar
     
    Last edited by a moderator: Jun 1, 2016
    #15
    Tyruswoo likes this.
  16. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    76
    Likes Received:
    55
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks for the demo.  That really helps me verify that my plugin is causing it and which part of the plugin I should look at first.  I'll see what I can do to fix it.
     
    #16
  17. Hatake-hime

    Hatake-hime Squishy Cat Summoner Veteran

    Messages:
    48
    Likes Received:
    15
    Location:
    Scotland
    First Language:
    English
    Heya, I'd like to be able to have the camera follow my player so I set an event to autorun that says ' CamSet player ' and erased it, however it doesn't follow? o: am I doing it wrong?
     
    #17
  18. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    76
    Likes Received:
    55
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Hey Hatake-hime!


    Use CamFollow player and it will follow the player again.  CamFollow permanently changes the camera's target.  CamSet just sets it temporarily to a new position.  CamSet may be useful for some cutscenes if you want the camera to follow the player again after the cutscene, but CamFollow is more useful in most situations.
     
    #18
  19. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    76
    Likes Received:
    55
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Hey DanTango,


    I haven't been able to fix the bug, yet, but I noticed that using the SetMovementRoute command to change the speed of the event, you can make it go the correct speed again.  You can also put the speed in the custom move route to make it correct.  I'll continue to look for a solution to the bug, however.
     
    #19
    SEIFERA and Linard like this.
  20. niltsor

    niltsor Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    French, English
    Hi there!


    I've downloaded the plugin and have tried using the command CamFollow to move it to an event but whenever I input the command and start my playtest, my screen is pitch black with only the text bubbles appearing. Any idea what could cause this as Im sure it must be on a mistake on my end. Whenever I delete the plugin command from my even, playest runs fine again. I am fairly new to rpg maker so I might be missing something here.


    Thanks for helping!!
     
    #20

Share This Page