Preventing the battle status window from centering at turn start and changing fill direction for gra

Porcelain

Regular
Regular
Joined
Oct 12, 2015
Messages
38
Reaction score
2
First Language
English
Primarily Uses
I'm assuming both of these are simple script edits, but I just can't figure them out.

For the first one, I want the battle status window to stay on the right when the player is done entering commands. By default, it centers itself when the command window closes. I've looked over the functions for the battle status window, the battle manager, and the window base, but I can't find where the moving or centering code is.

For the second one, I want my gradient bars to be filled from bottom to top, rather than left to right. I've found the function for drawing gradient bars, but I can't figure out how to change the direction the gradient draws in and none of my edits seem to be working.
 

Victor Sant

Regular
Regular
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,481
First Language
Portuguese
Primarily Uses
1. The position of the status window is set on the Scene_Battle, search for 'Scene_Battle.prototype.updateWindowPositions'

2.

Window_Base.prototype.drawGauge = function(x, y, width, rate, color1, color2) {    var fillW = Math.floor(width * rate);    var gaugeY = y + this.lineHeight() - 8;    this.contents.fillRect(x, gaugeY, width, 6, this.gaugeBackColor());    this.contents.gradientFillRect(x, gaugeY, fillW, 6, color1, color2);};the direction is set by this code:

this.contents.fillRect(x, gaugeY, width, 6, this.gaugeBackColor());this.contents.gradientFillRect(x, gaugeY, fillW, 6, color1, color2)swap the values of 'width, 6' on the fillRect, and 'fillW, 6' on the fillGradientRect to make the bar vertical,

and add a true, after the color2 to make the filling color also vertical.

this.contents.fillRect(x, gaugeY, 6, width, this.gaugeBackColor());this.contents.gradientFillRect(x, gaugeY, 6, fillW, color1, color2, true)Remember to adjust their positions and height accordinally.
 

Porcelain

Regular
Regular
Joined
Oct 12, 2015
Messages
38
Reaction score
2
First Language
English
Primarily Uses
Thanks! Now I have everything I need for my project!
 

Latest Threads

Latest Posts

Latest Profile Posts

Playing arounnd with NUUN's Battle Result as a VS Victory Aftermath alternative. Loving it so far despite the learning curve (there are a LOT of parameters)

1701665328725.png

Just have to figure out how to addin sub class progress.
Partitito's story is supposed to be about defeating poverty while thinking he is a capitalist with socialist ideas. But it's really about stories of redemption and perseverance.
Who would have thought an idea like "I wanna put the character bio in the equip screen" would turn into a bunch of work and fun collaboration @Puppet Knight . Now my Equip/Character screen is the way I want it.
Screenshot 2023-12-03 194313.png
Just one more week of grinding through semester finals and I'll be able to actually work on some games and stuff. Hopefully I'll be able to work on my game document to actually have my ideas somewhere outside of my cranium of madness.
With Day 4 of my advent calendar posted, it's time for y'all to choose what Day 5 will be!

We've seen Strength with our adventurers, so which DnD stat would you like to see in the next NPC: Charisma, Constitution, or Wisdom?

Forum statistics

Threads
136,729
Messages
1,269,249
Members
180,446
Latest member
lathifkediri
Top