KC_MoveRouteTF - Rotate, Translate, and Scale Characters During Move Routes [MV / MZ]

● ARCHIVED · READ-ONLY
Started by Kelly-inactive 14 posts View original ↗
  1. KC_MoveRouteTF 1.0.2
    by Kelly Chavez

    Introduction
    I felt my cutscenes were a bit bland, so I wrote a few functions to let me add a little flair to my move routes.

    Features
    This script is fairly minimal in terms of parameters. All they do is allow individual portions of the plugin to be disabled for compatibility. The real meat of this plugin is in the methods added to the character objects that can be easily accessed through move route commands.

    Screenshots
    optimgif.gif

    How to Use
    Using the script is as simple as adding it via the plugin manager and using the script calls in your move route commands.

    Script Calls
    All of these functions are accessed via the move route commands and prefixed with 'this.'. So, for example, to rotate a character 90 degrees clockwise, you would write 'this.rotate(90)' in the move route command. All arguments have default values used if they are not explicitly defined by the developer. See plugin help for more details.

    • Getter Functions:
      • scaleX(), scaleY(), translationX(), translationY(), rotation()
      • Each of these functions returns the CURRENT value of their respective transformations
    • Setter Functions:
      • rescaleXTo(scale, duration, wait), rescaleYTo(scale, duration, wait), rescaleTo(x, y, duration, wait), translateXTo(x, duration, wait), translateYTo(y, duration, wait), translateTo(x, y, duration, wait), rotateTo(angle, duration, wait)
      • rescaleX(scale, duration, wait), rescaleY(scale, duration, wait), rescale(x, y, duration, wait), translateX(x, duration, wait), translateY(y, duration, wait), translate(x, y, duration, wait), rotate(angle, duration, wait)
      • Each of these functions transforms the character's sprite. Functions suffixed with 'To' transform the character until they reach the value(s) passed into the function.
      • Functions not suffixed with 'To' offset the current transformation by that amount.
      • To demonstrate the difference between these functions, consider the function calls this.rescaleY(1) and this.rescaleYTo(1) on a character whose vertical scale is 1. this.rescaleY(1) would leave the character with a y scale of 2 (current scale + value = 1 + 1 = 2) whereas this.rescaleYTo(1) would leave the scale at 1.


    Demo (MZ)
    Current Version (1.0.2) - GitHub
    Old Version (1.0.1) - GitHub
    Old Version (1.0.0) - GitHub

    Demo (MV)
    Current Version (1.0.2) - Github
    Old Version (1.0.1) - Github
    Old Version (1.0.0) - N/A

    Download
    GitHub (Download 'KC_MoveRouteTF.js')

    Compatibility Notes
    • Plugin (MZ): VisuMZ_1_EventsMoveCore
      • This plugin's rotation functionality is incompatible with the "Dash tilt?" option of the listed plugin.

    Changelog
    Changelog
    • 2024/04/09 -v1.0.2
      • Fix 'Play Animation' sprite incorrect positioning bug in MV
        • Character would be incorrectly positioned while animations played if rotations were enabled
      • Fix crash upon load game in certain condition
        • Game would crash when loading a save file that was created without this plugin present
      • General internal code restructure
    • 2022/07/20 - v1.0.1
      • Fixed aliasing on Game_CharacterBase.prototype.update
      • Changed how rotations are handled internally to support MV
    • 2022/07/19 - v1.0.0
      • Initial Release

    Terms and Credits
    I've released this plugin under the MIT license. So, you can include this plugin in any project as long as you include the license with your distribution. For most projects, this requirement is fulfilled as long as you keep the license text that is at the top of the plugin's js file intact.

    Also, though not strictly required, I would appreciate being credited as K. Chavez or Kelly Chavez in your games' credits.
  2. yikes! nice!... mz only?
  3. Raggon said:
    yikes! nice!... mz only?
    Originally, yes. Looking at MZ and MV now though, I believe they are similar enough that it is worthwhile for this plugin to be developed with both engines in mind. I have released a small update addressing the one incompatibility I could find. I will work on an MV demo project when I have the time to. Please let me know if you find any issues.
  4. I downloaded the MV version to check out later.

    I got to say, there are some really nice things from the give, specailly
    the one at the bed :p

    good job on making both version.
  5. hey hey i downloaded the Mv version and its stil MZ?
  6. Raggon said:
    hey hey i downloaded the Mv version and its stil MZ?
    My bad! I'd copied the wrong link when updating the thread :eswt:

    Should be pointing to the correct demo now!
  7. KelIy said:
    My bad! I'd copied the wrong link when updating the thread :eswt:

    Should be pointing to the correct demo now!
    Lol that's ok thanks!
  8. I noticed that too, but copy the MV "game.exe" to it to make it work.
    but while it has "translation" to move actors by pixel movement on
    events alone and can be used by "offset x/y", it's pretty neat.

    I still need to understand how exactly everything works in it's place.
    but I love the effect on the salto and rescaling option with move routes.
  9. Thank you for creating this! Now i can make my pinwheel on the tile sheet spin without creating an animation sheet! Saves Time and Space!
  10. KelIy said:
    Please let me know if you find any issues.

    This is a wonderful little plugin! It sure does look good to rotate events for some puzzles. Unfortunately, I seem to have discovered a bug, at least in MV.

    If I have "Enable Rotations" set to 'true' in the plugin parameters, and play some animation on any map sprite (be it an event or the player character) that makes a "flash" on the objective (it doesn't happen when the flash is set to the entire screen), then, the event shifts upwards a few pixels for the duration of the flashes. Here's a short video demonstrating the effect, on a project without any plugins active (besides yours), trying the Revive 1 animation: Link to imgur

    I suspect it has to do with the pivot height? I'm not well-versed in JS. If you'd be so kind to take a look at this, it would be much appreciated :kaoswt:
  11. Ultra_K said:
    This is a wonderful little plugin! It sure does look good to rotate events for some puzzles. Unfortunately, I seem to have discovered a bug, at least in MV.

    If I have "Enable Rotations" set to 'true' in the plugin parameters, and play some animation on any map sprite (be it an event or the player character) that makes a "flash" on the objective (it doesn't happen when the flash is set to the entire screen), then, the event shifts upwards a few pixels for the duration of the flashes. Here's a short video demonstrating the effect, on a project without any plugins active (besides yours), trying the Revive 1 animation: Link to imgur

    I suspect it has to do with the pivot height? I'm not well-versed in JS. If you'd be so kind to take a look at this, it would be much appreciated :kaoswt:
    Looking into this. Thanks for letting me know!
  12. Pivot bug has been fixed! Was a little more involved than I initially anticipated, but it should work now. Guess I should've stayed in school and not let my math knowledge decay hahaha.

    Without further ado, here's the fix in action:
    Spoiler
    pivot_fix_example.gif

    Ultra_K said:
    This is a wonderful little plugin! It sure does look good to rotate events for some puzzles. Unfortunately, I seem to have discovered a bug, at least in MV.

    --snip--
    Thanks again for telling me about this! I would've never caught it since I primarily use MZ :eswt:
  13. Only thing that stops me from using this plugin is that when you use Galv's cam control and lock it to an event, the camera won't keep following the event if you then use the translation commands this plugin uses.
  14. Hi, Kelly! Although I disabled dash tilt in the VisuStella movement script, I still can't get rotation to work correctly. It works fine unless the VisuStella script is enabled so I think there may be a new incompatibility since they've updated. I wonder if there's a workaround? I'd really like to use your script - thanks!

    Edit - it seems even scaling has stopped working for this script when used with VisuStellas. Such a bummer - I wish they had better compatibility. At this point it may not be easily fixable. Thanks for the hardwork, though!