Jory4001

Veteran
Veteran
Joined
Feb 16, 2014
Messages
80
Reaction score
20
First Language
English
I am editing rpg_windows.js

Around line 2550 there is the Window Status drawBlock1

this is my code:

Window_Status.prototype.drawBlock1 = function(y) {
    var lineHeight = this.lineHeight();
    this.contents.fontSize = 30;
    this.drawActorName(this._actor, 172, 48, 300);
    this.contents.fontSize = 24;
    this.drawActorLevel(this._actor, 172, 48 + lineHeight * 1);
    this.drawActorClass(this._actor, 172, 48 + lineHeight * 2, 300);
    if (this._actor.nickname()) {
    } else {
    
var color1 = this.tpGaugeColor1();
    var color2 = this.tpGaugeColor2();
    this.drawGauge(172, 48 + lineHeight * 3, 150, this._actor.tpRate(), color1, color2);
    this.drawActorNickname(this._actor, 172, 48 + lineHeight * 3, 300);
    }
    this.resetFontSettings();
    
};

I am having trouble checking if the Actor's Nickname is blank or not.

I have tried:

this._actor.nickname === ""

this.actor.nickname === ""

actor.nickname === ""

this._nickname === ""

this._actor.nickname()

I have even tried matching a string:

this._actor.nickname === "None" (I set the nickname to "None")

I am basically trying to hide the TP Gauge if the actor doesn't have a nickname.

Any help is appreciated, I tried java script help sites but no luck, I am assuming I am referencing the variable wrong.
 
Last edited by a moderator:

Jory4001

Veteran
Veteran
Joined
Feb 16, 2014
Messages
80
Reaction score
20
First Language
English
You Sir, have made my day!

Worked like a charm. Thank you!
 

Latest Threads

Latest Profile Posts

Just laid down a sick nasty new post in the MagiCats! Infinite Sadness thread! Lemme give ya a big ol' hug for it.

bg6.jpg
Wheel of Attacks.png

MORE GAMBLING THEMED ATTACKS!

I AM UNABLE TO STOP!
Is it ok to repost stuff that i've posted to threads in the status feed?
If so, here's art of Shiloh, the main protagonist of the game i'm making:20220807_181702.jpg
They are meant to be ambiguous in gender, like Frisk from Undertale or Gogo from FFVI. I haven't decided what their age will be yet. Any ideas?
Please comment what you think about the art and design!
ScreenShot_8_10_2022_7_15_21.png
Looks like Mike's got a new party member in Robbi...

Calf survival story with a happy ending.

Forum statistics

Threads
124,461
Messages
1,163,831
Members
163,279
Latest member
ussifif
Top