Extend Battle Commands Window?

Discussion in 'Learning Ruby and RGSSx' started by ShinyRedUmbreon, Sep 8, 2019.

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

    ShinyRedUmbreon Wannabe-Animator + Gamer Veteran

    Messages:
    61
    Likes Received:
    12
    First Language:
    English
    Primarily Uses:
    RMVXA
    If you happen to have more than 4 commands at a time, then this will happen:


    However, I was wondering if I could extend the window, to be able to show all the commands at once. Like, make the window taller. How could I achieve this? I'm guessing it has something to do with Scene_Battle or Window_BattleActor.
     
    #1
  2. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,391
    Likes Received:
    3,665
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    "RGSS3 Scripts" is for completed scripts that you have made. This belongs in either Script Requests or Learning RGSS.

    I'm making the call and moving it to Learning RGSS for now, since I believe members will easily be able to show you how to resize these command windows yourself.

    If you want it moved to Script Requests instead, just report your own post and let us know.
     
    #2
  3. ShinyRedUmbreon

    ShinyRedUmbreon Wannabe-Animator + Gamer Veteran

    Messages:
    61
    Likes Received:
    12
    First Language:
    English
    Primarily Uses:
    RMVXA
    Bump.
     
    #3
  4. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,394
    Likes Received:
    4,970
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Battle Windows are tied in info_viewport inside Scene_Battle
    The info_viewport is hardcoded to be placed below using this following code
    Code:
      def create_info_viewport
        @info_viewport = Viewport.new
        @info_viewport.rect.y = Graphics.height - @status_window.height
        @info_viewport.rect.height = @status_window.height
        @info_viewport.z = 100
        @info_viewport.ox = 64
        @status_window.viewport = @info_viewport
      end
    
    The Y-axis is equal as your game window's height minus status window height
    Which mean, if you shift the Y-axis of the Battle Windows (party command, actor command, status window), it will get cut
    To solve this problem, you have to manually override how it works, such as editing the Y-axis of the viewport to prevent the cut.
    Oh, don't forget to change the height as well.

    Now to solve the actor command window height
    Just go to Window_ActorCommand, and change "visible_line_number" into something else
     
    #4
  5. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,710
    Likes Received:
    376
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    I'm pretty sure the op wants something like this.
    actor commands 3.png
    and have it adjust if there are more commands.

    Unfortunately without a script to make this adjustment, I'm pretty sure all you can get is this..
    actor commands 1.PNG
     
    #5
  6. ShinyRedUmbreon

    ShinyRedUmbreon Wannabe-Animator + Gamer Veteran

    Messages:
    61
    Likes Received:
    12
    First Language:
    English
    Primarily Uses:
    RMVXA
    Uhh, the horrible scripter that I am, got this:

    What's best to do next? I don't really know how to edit the y-axis of the viewport.
     
    #6
  7. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,394
    Likes Received:
    4,970
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    See, that is exactly what I'm saying.
    You just need to change these lines
    Code:
       @info_viewport.rect.y = Graphics.height - @status_window.height # <-- This is Y
       @info_viewport.rect.height = @status_window.height # <-- This is the viewport height
    
    Into something like
    Code:
       @info_viewport.rect.y = Graphics.height - @status_window.height + 24 # <-- This is Y
       @info_viewport.rect.height = @status_window.height + 24 # <-- This is the viewport height
    
    However, the result is going to be like roninator2's second pic.
    You just need to readjust the Y position of the battle status and the party command, so that it will look like roninator2's first pic.
     
    #7
    ShinyRedUmbreon likes this.
  8. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,710
    Likes Received:
    376
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    I actually didn't do it, that was a photoshop.

    But I did get it to work. Took a fair bit of playtesting.
    Basically your adjusting the viewport to be up higher, making it bigger and then moving down all the windows that need to be lower.

    I adjusted the lines line Theo said (almost (minus not plus for the first one)) and added in 3 other lines.
    An extra line in create status window -> .y += 24
    An extra line in create party command window -> .y += 24
    An extra line in create enemy window -> .y += 24
     
    Last edited: Sep 14, 2019
    #8
    ShinyRedUmbreon likes this.
  9. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,394
    Likes Received:
    4,970
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Doesn't matter, it represents the result.
     
    #9
  10. ShinyRedUmbreon

    ShinyRedUmbreon Wannabe-Animator + Gamer Veteran

    Messages:
    61
    Likes Received:
    12
    First Language:
    English
    Primarily Uses:
    RMVXA
    Okay, I did what you two did, and it took a bit of trial and error, but soon I found this:

    I removed my party command, so I didn't have to worry about that. The enemy target window also worked well!
    Thank you guys for helping me fix this problem!
     
    #10
  11. hiddenone

    hiddenone Lurker Extraordinaire Moderator

    Messages:
    1,944
    Likes Received:
    4,629
    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.

     
    #11
Thread Status:
Not open for further replies.

Share This Page