/* Setups the list of statuses that can have their status bars drawn
* Each status must be represented by the name of its battler getter
*/
STATUSES: [
'hp',
'mp',
'tp'
],
/*------------------------------------------------------------------------
* Status Bar Functions
* - Setups SBX used by <status bar: SBX>
*------------------------------------------------------------------------*/
/* SBX are used by Window_Status_Bar at this._cfg = SB[this._cfgName](); in
* _updateCfg
* SBX are Javascript functions which must return an Object having at least
* the following:
* {
* visible: function(battler), // Hotspot
* opacity: function(battler), // Hotspot
* backColor: function(battler), // Hotspot
* color1: function(battler), // Hotspot
* color2: function(battler), // Hotspot
* x: function(battler), // Hotspot
* y: function(battler), // Hotspot
* w: function(battler), // Hotspot
* h, function(battler), // Hotspot
* text, function(battler), // Hotspot
* textX: function(battler), // Hotspot
* textY: function(battler), // Hotspot
* textSize: function(battler), // Hotspot
* textColor: function(battler), // Hotspot
* min: function(battler), // Hotspot
* max: function(battler), // Hotspot
* (v1.01a+)showProc: function(battler), // Hotspot
* (v1.01a+)procUpdateRate: function(battler) // Hotspot
* }
* All functions will be bound to the Window_Status_Bar upon its creation
* and must take the battler and database item using the SBX as their
* arguments
*
* Status bar configuration functions:
* The function result of visible, which is the status bar visibility, will
* be interpreted as truthy or falsy only
* The function of opacity, which is the status bar opacity, must return a
* Number between 0 and 255
* The functions of backColor, color1 and color2, which are the status bar
* back, 1st and 2nd colors respectively, must return a Number between
* #00000000 and #FFFFFFFF
* The functions of x and y, which are the status bar x and y offsets from
* the battler sprites respectively, must return a Number
* The functions of w and h, which are the status bar width and height
* respectively, must return a positive Number
* The function of text, which is the status bar description text, must
* return a String
* The functions of textX, textY and textSize, which are the status bar
* description text x and y offset from the status bar, and size
* respectively, must return a positive Number
* The functions of min and max, which are the minimum and maximum value of
* the status respiectively, must return a Number that must be not greater
* than and not less than all the possible values of the current value
* respectively
* (v1.01a+)The functions of showProc, which is whether the stat change
* processes will be shown on the status bars, will be interpreted as truthy
* or falsy only
* (v1.01a+)The functions of procUpdateRate, which is the rate relative to
* the max length of the stat bar per second, must return a Number between 0
* and 1
* (v1.01a+)The functions of procColor1 and procColor2, which are the status
* bar 1st and 2nd stat change colors respectively, must return a Number
* between #00000000 and #FFFFFFFF
*
* SBX names can only use alphanumeric characters
* The below SBX are examples added to help you set your SBX
* You can freely use, rewrite and/or delete these examples
*
* Advanced:
* The status bar prototype's inherited from Window_Base.prototype
* All status bar configuration functions are used by Window_Status_Bar
* visible and opacity are used in _updateBarVisibility
* backColor, color1, color2, textColor, text, textX and textY are used in
* _updateSetting
* x, y, w and h are used in initialize
* x is also used in _updateX
* y is also used in _updateY
* w is also used in _updateW
* h is also used in _updateH
* min and max are used in _updateFillW
* (v1.01a+)showProc
*/
// Sets the status bar to display the battler's hp statuses
HP: function() { // v1.00a - v1.01a; Potential Hotspot
return {
// Sets the hp bar to be always visible only for alive battlers
visible: function(battler) { return battler.isAlive(); }, // Hotspot
// Sets the hp bar opacity to be always 255
opacity: function(battler) { return 255; }, // Hotspot
// Sets the hp bar color 1 to be always text color 15
backColor: function(battler) { // Hotspot
return this.textColor(15);
},
// Sets the hp bar color 1 to be always text color 20
color1: function(battler) { return this.textColor(20); }, // Hotspot
// Sets the hp bar color 2 to be always text color 21
color2: function(battler) { return this.textColor(21); }, // Hotspot
// Sets the hp bar x offset from battler sprite to be always 0
x: function(battler) { return 0; }, // Hotspot
// Sets the hp bar y offset from battler sprite to be always 16
y: function(battler) { return 16; }, // Hotspot
// Sets the hp bar width to be always 87
w: function(battler) { return 87; }, // Hotspot
// Sets the hp bar height to be always 16
h: function(battler) { return 16; }, // Hotspot
// Sets the hp bar description text to be always hp/mhp
text: function(battler) { // Hotspot
return battler.hp.toString() + '/' + battler.mhp.toString();
},
// Sets the hp bar description text size to be always 0
textX: function(battler) { return 0; }, // Hotspot
// Sets the hp bar description text size to be always 0
textY: function(battler) { return 0; }, // Hotspot
// Sets the hp bar description text size to be always 13
textSize: function(battler) { return 13; }, // Hotspot
// Sets hp bar description text color to be always text color 0
textColor: function(battler) { // Hotspot
return this.textColor(0);
},
// Sets the minimum hp to be shown on the hp bar to be always 0
min: function(battler) { return 0; }, // Hotspot
// Sets the maximum hp to be shown on the hp bar to be always mhp
max: function(battler) { return battler.mhp; }, // Hotspot
// (v1.01a+)Sets the hp change processes to be always shown
showProc: function(battler) { return true; }, // Hotspot
// (v1.01a+)Sets the hp change processes rate to be 100% of the
// max length of the hp bar per second
procUpdateRate: function(battler) { return 0.2; }, // Hotspot
// Sets the hp change process color 1 to be always text color 6
procColor1: function(battler) { return this.textColor(6); },
// Hotspot
// Sets the hp change process color 2 to be always text color 17
procColor2: function(battler) { return this.textColor(17); }
// Hotspot
};
},
// Sets the status bar to display the battler's mp statuses
MP: function() { // v1.00a - v1.01a; Potential Hotspot
return {
// Sets the mp bar to be always visible only for alive battlers
visible: function(battler) { return battler.isAlive(); }, // Hotspot
// Sets the mp bar opacity to be always 255
opacity: function(battler) { return 255; }, // Hotspot
// Sets the mp bar color 1 to be always text color 15
backColor: function(battler) { // Hotspot
return this.textColor(15);
},
// Sets the mp bar color 1 to be always text color 22
color1: function(battler) { return this.textColor(22); }, // Hotspot
// Sets the mp bar color 2 to be always text color 23
color2: function(battler) { return this.textColor(23); }, // Hotspot
// Sets the mp bar x offset from battler sprite to be always 0
x: function(battler) { return 0; }, // Hotspot
// Sets the mp bar y offset from battler sprite to be always 32
y: function(battler) { return 32; }, // Hotspot
// Sets the mp bar width to be always 87
w: function(battler) { return 87; }, // Hotspot
// Sets the mp bar height to be always 16
h: function(battler) { return 16; }, // Hotspot
// Sets the mp bar description text to be always mp/mmp
text: function(battler) { // Hotspot
return battler.mp.toString() + '/' + battler.mmp.toString();
},
// Sets the mp bar description text size to be always 0
textX: function(battler) { return 0; }, // Hotspot
// Sets the mp bar description text size to be always 0
textY: function(battler) { return 0; }, // Hotspot
// Sets the mp bar description text size to be always 13
textSize: function(battler) { return 13; }, // Hotspot
// Sets mp bar description text color to be always text color 0
textColor: function(battler) { // Hotspot
return this.textColor(0);
},
// Sets the minimum mp to be shown on the hp bar to be always 0
min: function(battler) { return 0; }, // Hotspot
// Sets the maximum mp to be shown on the hp bar to be always mmp
max: function(battler) { return battler.mmp; }, // Hotspot
// (v1.01a+)Sets the mp change processes to be always shown
showProc: function(battler) { return true; }, // Hotspot
// (v1.01a+)Sets the mp change processes rate to be 100% of the
// max length of the mp bar per second
procUpdateRate: function(battler) { return 0.2; }, // Hotspot
// Sets the mp change process color 1 to be always text color 1
procColor1: function(battler) { return this.textColor(1); },
// Hotspot
// Sets the mp change process color 2 to be always text color 4
procColor2: function(battler) { return this.textColor(4); }
// Hotspot
};
},
// Sets the status bar to display the battler's tp statuses
TP: function() { // v1.00a - v1.01a; Potential Hotspot
return {
// Sets the tp bar to be always visible
visible: function(battler) { return battler.isAlive(); }, // Hotspot
// Sets the tp bar opacity to be always 255
opacity: function(battler) { return 255; }, // Hotspot
// Sets the tp bar color 1 to be always text color 15
backColor: function(battler) { // Hotspot
return this.textColor(15);
},
// Sets the tp bar color 1 to be always text color 28
color1: function(battler) { return this.textColor(28); }, // Hotspot
// Sets the tp bar color 2 to be always text color 29
color2: function(battler) { return this.textColor(29); }, // Hotspot
// Sets the tp bar x offset from battler sprite to be always 0
x: function(battler) { return 0; }, // Hotspot
// Sets the tp bar y offset from battler sprite to be always 48
y: function(battler) { return 48; }, // Hotspot
// Sets the tp bar width to be always 87
w: function(battler) { return 87; }, // Hotspot
// Sets the tp bar height to be always 16
h: function(battler) { return 16; }, // Hotspot
// Sets the tp bar description text to be always tp/maxTp()
text: function(battler) { // Hotspot
return battler.tp.toString() + '/' + battler.maxTp().toString();
},
// Sets the tp bar description text size to be always 0
textX: function(battler) { return 0; }, // Hotspot
// Sets the tp bar description text size to be always 0
textY: function(battler) { return 0; }, // Hotspot
// Sets the tp bar description text size to be always 13
textSize: function(battler) { return 13; }, // Hotspot
// Sets tp bar description text color to be always text color 0
textColor: function(battler) { // Hotspot
return this.textColor(0);
},
// Sets the minimum tp to be shown on the hp bar to be always 0
min: function(battler) { return 0; }, // Hotspot
// Sets maximum tp to be shown on the hp bar to be always maxTp()
max: function(battler) { return battler.maxTp(); }, // Hotspot
// (v1.01a+)Sets the tp change processes to be always shown
showProc: function(battler) { return true; }, // Hotspot
// (v1.01a+)Sets the mp change processes rate to be 100% of the
// max length of the mp bar per second
procUpdateRate: function(battler) { return 0.2; }, // Hotspot
// Sets the tp change process color 1 to be always text color 3
procColor1: function(battler) { return this.textColor(3); },
// Hotspot
// Sets the tp change process color 2 to be always text color 24
procColor2: function(battler) { return this.textColor(24); }
// Hotspot
};
},
// Adds new SBX here