Extend Battle Commands Window?

Status
Not open for further replies.

ShinyRedUmbreon

Wannabe-Animator + Gamer
Veteran
Joined
Sep 3, 2017
Messages
61
Reaction score
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.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
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.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
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
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,660
Reaction score
563
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
 

ShinyRedUmbreon

Wannabe-Animator + Gamer
Veteran
Joined
Sep 3, 2017
Messages
61
Reaction score
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.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
See, that is exactly what I'm saying.
What's best to do next? I don't really know how to edit the y-axis of the viewport.
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.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,660
Reaction score
563
First Language
English
Primarily Uses
RMVXA
be like roninator2's second pic
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:

ShinyRedUmbreon

Wannabe-Animator + Gamer
Veteran
Joined
Sep 3, 2017
Messages
61
Reaction score
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!
 

hiddenone

Lurker Extraordinaire
Global Mod
Joined
Feb 19, 2014
Messages
2,497
Reaction score
5,334
First Language
english
Primarily Uses
RMMZ

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.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,567
Latest member
sashalag
Top