Animated busts and picture based animations.

Discussion in 'JS Plugin Releases (RMMV)' started by Astfgl66, Jun 9, 2017.

  1. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    588
    Likes Received:
    447
    First Language:
    French
    Fixing that bug gave me some inspiration:
    I've added a few new functions for those of you using it to manage busts:

    - dim picture, sets the picture to grey
    - light picture, sets the picture to full color
    These two commands should allow you to act as if busts are selected or unselected depending on who's speaking, directly from the message window.

    - move picture home, moves the picture back to its original coordinates
    - fadeout picture, moves the picture a bit to a chosen side, set it to grey, set it to transparent over the course of a few frames before erasing it
    This should allow you to end conversations with a bit more style.

    These four new commands are available via script call and text codes.
    You can download the update in the OP, I've updated the pastebin.

    Further instructions on the commands below:
    Code:
    * ===================================================================
     * VN Commands
     * ===================================================================
     * As of V13, several VN like commands have been added to facilitate your life.
     *
     * -------------------------------------------------------------------
     * Light picture:
     * This will set the picture tone to (0,0,0,0), basically fully bright, over
     * the course of 30frames, acting like if the bust was selected.
     *
     * Script call:
     * $gameScreen.picture(id).light(duration)
     * duration is optionnal, if unspecified, will do it over 30 frames.
     *
     * Text code:
     * \LP[pictureId]
     * You can't specifiy a duration if doing it via textcode.
     * -------------------------------------------------------------------
     * Dim picture:
     * This will set the picture tone to (0,0,0,255), basically fully grey, over
     * the course of 30frames, acting like if the bust was unselected.
     *
     * Script call:
     * $gameScreen.picture(id).dim(duration)
     * duration is optionnal, if unspecified, will do it over 30 frames.
     *
     * Text code:
     * \DP[pictureId]
     * You can't specifiy a duration if doing it via textcode.
     * -------------------------------------------------------------------
     * Move picture home:
     * This will set  move the picture to its original coordinates over the
     * course of 30 frames.
     *
     * Script call:
     * $gameScreen.picture(id).moveHome(duration)
     * duration is optionnal, if unspecified, will do it over 30 frames.
     *
     * Text code:
     * \MPH[pictureId]
     * You can't specifiy a duration if doing it via textcode.
     * -------------------------------------------------------------------
     * Fadeout picture:
     * This will set  move the picture back 20 pixels in either direction,
     * set its tone to grey, and change its opacity to 0 over the course of
     * 30 frames before deleting it, erasing the bust from the screen.
     *
     * Script call:
     * $gameScreen.picture(id).fadeout(duration,direction)
     * duration is optionnal, if unspecified, will do it over 30 frames.
     * direction is optionnal as well, 1 will move th epicture left, -1 right.
     * If you want to specifiy a direction, you must specify a duration.
     * You can only specify a duration if you want to.
     *
     * Text code:
     * \CPR[pictureId] this will fadeout the picture to the right
     * \CPL[pictureId] this will fadeout the picture to the left
     * You can't specifiy a duration if doing it via textcode.
    
    I think this will be it for a while, barring any bugs appearing.
    Have a nice day!
     
    #81
    Ronove and cedr777 like this.
  2. cedr777

    cedr777 Lead developer of "Charao Life" Veteran

    Messages:
    215
    Likes Received:
    50
    First Language:
    Not English
    Primarily Uses:
    RMMV
    The fade out script call is very neat. before I was only able to do it the traditional way by several lengthy commands. Now it is streamlined to only 1 line of command.
     
    Last edited: Apr 20, 2019
    #82
  3. kako05

    kako05 Veteran Veteran

    Messages:
    53
    Likes Received:
    2
    First Language:
    Australian
    Primarily Uses:
    RMMV
    Nice work as always :)
     
    #83
  4. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    588
    Likes Received:
    447
    First Language:
    French
    Thanks!

    I figured that if I had a fadeout command, I might as well have a fadein command.
    I've added a fadein command that moves the picture a bit, sets opacity to max and tone to bright over a few frames.
    To use it optimally when setting up your pictures, set them up 20 pixels back, with an opacity of 0 and a grey tone, then start your message with the fadein.
    I've also added a command to move a picture relatively to its current position.
    Both of these have text codes too, so you can add a bit of life to your busts directly from the message window.

    Code:
    * -------------------------------------------------------------------
     * Fadein picture:
     * This will move the picture forward 20 pixels in either direction,
     * set its tone to bright, and change its opacity to 255 over the course of
     * 30 frames, acting as if the picture appeared.
     *
     * Script call:
     * $gameScreen.picture(id).fadein(duration,direction,distance)
     * duration is optionnal, if unspecified, will do it over 30 frames.
     * direction is optionnal as well, 1 will move the picture left, -1 right.
     * distance is optionnal and is to be given in pixels
     * If you want to specify a distance you must specify both other parameters.
     * If you want to specifiy a direction, you must specify a duration.
     * You can only specify a duration if you want to.
     *
     * Text code:
     * \FPR[pictureId] this will fadein the picture to the right
     * \FPL[pictureId] this will fadein the picture to the left
     * You can't specifiy a duration if doing it via textcode.
     * -------------------------------------------------------------------
     * Move picture:
     * This will move the picture relatively to its current position.
     *
     * Script call:
     * $gameScreen.picture(id).movePictureRel(x,y,t)
     * x and y are the amount of pixels you want the picture to move
     * t is the duration in frames
     * y and t are optionnal, if omitted the picture won't move on the y
     * axis and the x movement will be done over 30 frames.
     *
     * Text code:
     * \MPR[pictureId,x,y,t]
    
    Hopefully these should make your life easier too.
    Have a nice day!
     
    #84
  5. cedr777

    cedr777 Lead developer of "Charao Life" Veteran

    Messages:
    215
    Likes Received:
    50
    First Language:
    Not English
    Primarily Uses:
    RMMV
    Hello, not sure if it's a bug but I found an issue with AnimatedBusts(20042019 V14)
    It doesn't happen always but when it does, whenever you change the next show picture#1 with a different xy coordinate after an animated picture, in the case below, from a blinking animation. The show picture#1 you're supposed to change into will not appear and instead show a misaligned picture of the previous animated show picture#1 which adopts the xy coordinate of that picture#1 that it's supposed to change into.

    This does not seem to happen with AnimatedBusts(02102018 V12) so I have decided to roll back to that version for now. I just want to report my findings as I was testing out the features today. thanks!

    [​IMG] [​IMG]

    Here's a rerun of that scene using AnimatedBusts(02102018 V12). This one proceeds smoothly to the next show picture #1 with no issues.
     
    Last edited: Apr 21, 2019
    #85
  6. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    588
    Likes Received:
    447
    First Language:
    French
    Alright, the sprite bitmap wasn't updating properly when showing a picture that was already on screen.
    It should be fixed as of V15.
     
    #86
    cedr777 likes this.
  7. cedr777

    cedr777 Lead developer of "Charao Life" Veteran

    Messages:
    215
    Likes Received:
    50
    First Language:
    Not English
    Primarily Uses:
    RMMV
    Cool, tested and it works, thanks a lot!
     
    #87

Share This Page