Hello , fellow RM-user !
right now , i'm learning Js basic and more specifically , creating plugin
I wanted to create plugin that disable drawing level , HP and MP on MenuStatus, and it works by aliasing the drawActorSimpleStatus and make the level HP and MP draw function disabled
now, I wanted to use Param as a conditional for if ( ), so if the value is true , then the level HP and MP will still drawn and while false , the condition wont met and level HP and MP wont be drawed.
I have tried changing Naqua.Param into boolean ,string , number etc. but no luck. its like the if( ) there is ignored and param value seems didnt taken correctly.
also, is there a way to take param value to be shown in console / game ? just to make sure the value is right
right now , i'm learning Js basic and more specifically , creating plugin
I wanted to create plugin that disable drawing level , HP and MP on MenuStatus, and it works by aliasing the drawActorSimpleStatus and make the level HP and MP draw function disabled
now, I wanted to use Param as a conditional for if ( ), so if the value is true , then the level HP and MP will still drawn and while false , the condition wont met and level HP and MP wont be drawed.
Code:
var Imported = Imported || {};
Imported.Naqua_HideStatus = true;
var Naqua = Naqua || {};
/*:
* @plugindesc v 1.0 Hide Status from status bar
* @author nickqua
* @version 1.0
* @param levelstatus
* @desc
* Show or hide level on MenuStatus
* true will show the level
* @default true
*
* @param hpbar
* @desc
* Show or hide hp bar on MenuStatus
* true will show the hp bar
* @default true
*
* @param mpbar
* @desc
* Show or hide mp bar on MenuStatus
* true will show the mp bar
* @default true
*/
Naqua.Param = Naqua.Param || {};
(function() {
Naqua.Parameters = PluginManager.parameters('Naqua_HideStatus');
Naqua.Param.level_status = string(Naqua.Parameters['levelstatus']; //Boolean(Naqua.Parameters["level status"]);
Naqua.Param.hp_bar = string(Naqua.Parameters['hpbar'])
Naqua.Param.mp_bar = string(Naqua.Parameters['mpbar']);
Naqua.drawStatus = Window_Base.prototype.drawActorSimpleStatus; //aliasing
Window_Base.prototype.drawActorSimpleStatus = function(actor, x, y, width) {
var lineHeight = this.lineHeight();
var x2 = x +180;
var width2 = Math.min(200, width - 180 - this.textPadding());
this.drawActorName(actor, x, y);
this.drawActorIcons(actor, x, y + lineHeight * 2);
this.drawActorClass(actor, x2, y);
if(Naqua.Param.hp_bar == true){
this.drawActorHp(actor, x2, y + lineHeight * 1, width2);
}
if(Naqua.Param.mp_bar == true){
this.drawActorMp(actor, x2, y + lineHeight * 2, width2);
}
if(Naqua.Param.level_status == true){
this.drawActorLevel(actor, x, y + lineHeight * 1);
}
}
}) ();
also, is there a way to take param value to be shown in console / game ? just to make sure the value is right