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

Porcelain

Veteran
Veteran
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

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,468
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

Veteran
Veteran
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


I'm trying to port L10nMV.js into XP, may probably (because this is my toy project in hobby) coming to XP, VX, VXA.

Learn more about L10nMV.js : https://github.com/Creta5164/L10nMV.js
L10nMV.js forum post : https://forums.rpgmakerweb.com/inde...r-game-without-modifying-your-project.120813/
Here's a gif of the reflection. Ace has some pretty cool sprite effects.
cYtUgp8.gif
Not RM related but I've been working on this for the past 2 months as a student project. Now that it's done I can finally go back to do some mapping lol. Here's a clip of it.
So I finally played Persona 4 to see what it's all about. I'm like wait...what the...this is JOJO!

Forum statistics

Threads
123,169
Messages
1,154,567
Members
161,532
Latest member
mat123
Top