Show Picture During Message

Discussion in 'JS Plugin Requests' started by Rhino, Jun 20, 2017.

Thread Status:
Not open for further replies.
  1. Rhino

    Rhino ~Inactive~ Veteran

    Messages:
    482
    Likes Received:
    781
    First Language:
    English
    Primarily Uses:
    RMMV
    Hiya,
    Hopefully this isn't too complicated of a request. What I'm hoping for is a plugin that allows me to use an escape/message code during a show text command to show a picture.

    The code should look something like \pic<Picture ID, Filename, X, Y>
    It should work as a normal show picture command, so if a picture with the same ID already exists, the message code will overwrite it.

    Basically, I'd like to use this for character portraits, so they can change expression midway through dialogue since I think it adds a new layer and makes the character seem more dynamic and alive :D

    Disclaimer; I know this effect can somewhat be achieved by using a timer and setting it to change picture after a certain length of time, however this involves a lot of set up and testing and isn't ideal for me to use every time I'd like to change an image.

    I'm also aware that Galv's Message Busts allow you to change image midway, however there are limitations and other features I'd like to use which makes it preferable for me to create busts using show picture commands instead.

    I think having a message code to erase a picture would come in handy too :3c

    Extra features could also include options from the other picture commands, such as movement and changing opacity, however this isn't necessary for what I need, so it's up to the plugin writer if they'd like to just answer my request (I'd be very grateful!) or to develop it further to make a full picture control during show texts.

    If you'd like, I can make you a custom overworld (walk) MV styled sprite. I don't have years of experience with pixel art, but I've been practicing. :D
    walk.gif
    (Another disclaimer- jeans on the last sprite were made by Hiddenone.)
    Thanks for reading!
     
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm pretty sure my More Escape Codes plugin that came with the MV launch will let you do this - if you're using faces.
     
    #2
    Rhino likes this.
  3. Rhino

    Rhino ~Inactive~ Veteran

    Messages:
    482
    Likes Received:
    781
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm not using faces unfortunately, so I don't think I can use it :kaocry: I'm using the show picture command since I want to show half bodies and have more than one on screen at once (it's basically visual novel style dialogue.) But thanks anyway ^^

    EDIT: Oh wait, I noticed you set params for busts! Might it be possible to create an edit to this to allow for multiple busts with parameters for each location? Or is it better just to ask for the original question of a generic picture changer (as I designed my request on the presumption that with different picture ids and co-ordinates it would be easy to use multiple pictures. I've kind of set my busts up to use like 4 layers of images anyway :guffaw:)
     
    Last edited: Jun 20, 2017
    #3
  4. Rhino

    Rhino ~Inactive~ Veteran

    Messages:
    482
    Likes Received:
    781
    First Language:
    English
    Primarily Uses:
    RMMV
    So I had a poke around the js to see what I could find.

    I think this is the basis of how you'd create an escape code to use in a show text command.
    Code:
    Window_Base.prototype.processEscapeCharacter = function(??) {
        switch (code) {
        case 'pic':
            this.textchangepicture(???);
            break;
        }
    };
    
    Window_Base.prototype.textchangepicture = function() { ???
        };
    
    And it looks like the way to set up a picture is in rpg_objects.js under Game_Picture. Though what it actually means or how to convert it to work as an escape code is beyond me. :guffaw: I'm not even sure if I've found the right section, I just made an educated guess given that javascript uses English words. :rswt
     
    #4
  5. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    639
    Likes Received:
    487
    First Language:
    French
    This doesn't look difficult, but I don't have acess to my computer right now.
    You should however be able to do it with the animated busts plugin.

    Show the picture before the message, at the right position using a transparent empty bitmap.
    Then you'll use the /ca text code.
    Setup an animation with a single frame containing the proper picture in a variable, and then use the corresponding number in the /ca text code.

    Similarily setup an animation with a single frame containing an empty transparent bitmap in a variable and call the /ca text code when you want to 'delete' it.
     
    #5
    Rhino likes this.
  6. Rhino

    Rhino ~Inactive~ Veteran

    Messages:
    482
    Likes Received:
    781
    First Language:
    English
    Primarily Uses:
    RMMV
    Ahh man I was thinking the animated busts could do something like that since it has text codes, but I couldn't figure it out. Use a transparent picture to set the position... the solution was so simple, I feel like such an idiot. :guffaw:

    I was worried the animation might flicker or something as just a single picture looping but it works fine in my test so yeah, thanks a lot! :kaoluv:
     
    #6
  7. mlogan

    mlogan Global Moderators Global Mod

    Messages:
    13,600
    Likes Received:
    7,519
    Location:
    Texas
    First Language:
    English
    Primarily Uses:
    RMMV

    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.

     
    #7
Thread Status:
Not open for further replies.

Share This Page