Hilly

Warper
Member
Joined
Nov 23, 2019
Messages
4
Reaction score
0
First Language
Chinese
Primarily Uses
RMMV
You'd just call it in a common event with a script command.
SceneManager.push(Scene_Status);
I mean to call the polygon only,without the face,level to next exp,equipment etc etc.

Edit: I am trying to make Persona traits status,which just show the polygon and actor image.
 
Last edited:

jdoggokussj2

High-Tier
Member
Joined
Aug 7, 2016
Messages
11
Reaction score
4
First Language
Usa
Primarily Uses
RMMV
Is there anyway to get this to work with moghunters Monogatari plugin? I tried enabling both but your plugin never shows up
 

maliyana

Veteran
Veteran
Joined
Jun 6, 2017
Messages
78
Reaction score
13
First Language
English
Primarily Uses
RMMV
Is it possible to replace the bars in Yanfly's Status Core with the basic boxes in the general status section? I'd like to put the graph side by side with those so that it doesn't look too redundant. Here's a rough edit of what I want(perhaps without Lvl, hp and mp):
stat.jpg

EDIT: I've figured it out. I modified the code at line 240 and changed it from:
Code:
if (Imported.YEP_StatusMenuCore) {
Window_StatusInfo.prototype.drawParameters = function() {
    var dx = indent;
    var dy = this.lineHeight() / 2;
    var dw = this.contents.width - indent;
    var dh = this.lineHeight();
    var dw2;
    var text;
    this.changeTextColor(this.systemColor());
    this.drawText(Yanfly.Param.StatusGraphText, dx, dy, dw, 'center');
    dy = this.lineHeight();
    dx = indent;
    dw -= this.standardPadding() * 2;
    for (var i = 2; i < 8; ++i) {
        dy += this.lineHeight();
        var rate = this.drawParamGauge(dx, dy, dw, i);
        this.changeTextColor(this.systemColor());
        this.drawText(TextManager.param(i), dx + 4, dy, dw - 4);
        text = Yanfly.Util.toGroup(this._actor.param(i))
        this.changeTextColor(this.normalColor());
        dw2 = dw * rate;
        this.drawText(text, dx, dy, dw2 - 4, 'right');
    }

    this.contents.SPolyDrawStatPolygon(this._actor);

    //draw text
    if (useText) {
        this.changeTextColor(textColor);
        this.contents.fontSize = this.standardFontSize() - fontDecrement;
        for (var i = 0; i < stats.length; i++) {
            this.drawText(TextManager.param(stats[i]), centerX + textOffset.x + (radius + textOffset.radial) * Math.cos(Math.PI/2 + i * 2 * Math.PI / sides), centerY + textOffset.y - (radius + textOffset.radial) * Math.sin(Math.PI/2 + i * 2 * Math.PI / sides), 160);
        }
        this.resetFontSettings();
    }

    //draw icon
    if (useIcon) {
        for (var i = 0; i < stats.length; i++) {
            this.drawIcon(iconIndexes[i], centerX + iconOffset.x + (radius + iconOffset.radial) * Math.cos(Math.PI/2 + i * 2 * Math.PI / sides), centerY + iconOffset.y - (radius + iconOffset.radial) * Math.sin(Math.PI/2 + i * 2 * Math.PI / sides));
        }
    }
};
}

to this:
Code:
if (Imported.YEP_StatusMenuCore) {
Window_StatusInfo.prototype.drawParameters = function() {
    var dx = indent;
    var dy = this.lineHeight() / 2;
    var dw = this.contents.width - indent;
    var dh = this.lineHeight();
    var dw2;
    var text;
    var rect = new Rectangle();
    rect.width = (this.contents.width - this.standardPadding()) / 2;
    rect.y = this.lineHeight() * 2;
    rect.height = this.lineHeight();
    var dx = rect.x + this.textPadding();
    var dw = rect.width - this.textPadding() * 2;
    this.drawDarkRect(rect.x, rect.y, rect.width, rect.height);
    this.changeTextColor(this.systemColor());
    this.drawText(TextManager.level, dx, rect.y, dw, 'left');
    this.changeTextColor(this.normalColor());
    text = Yanfly.Util.toGroup(this._actor.level);
    this.drawText(text, dx, rect.y, dw, 'right');
    this.drawText(Yanfly.Param.StatusParamText, dx + 9, dy, dw, 'center');
    for (var i = 0; i < 8; ++i) {
      if (i < 2) {
        rect.y += this.lineHeight();
      } else if (i === 2) {
        rect.y += this.lineHeight();
        rect.width /= 2;
        dw = rect.width - this.textPadding() * 2;
      } else if (i % 2 === 0) {
        rect.x = 0;
        dx = rect.x + this.textPadding();
        rect.y += this.lineHeight();
      } else {
        rect.x += rect.width;
        dx += rect.width;
      }
      this.drawDarkRect(rect.x, rect.y, rect.width, rect.height);
      this.changeTextColor(this.systemColor());
          this.drawText(TextManager.param(i), dx, rect.y, dw, 'left');
          this.changeTextColor(this.normalColor());
          text = Yanfly.Util.toGroup(this._actor.param(i));
          this.drawText(text, dx, rect.y, dw, 'right');
    }

    this.contents.SPolyDrawStatPolygon(this._actor);

    //draw text
    if (useText) {
        this.changeTextColor(textColor);
        this.contents.fontSize = this.standardFontSize() - fontDecrement;
        for (var i = 0; i < stats.length; i++) {
            this.drawText(TextManager.param(stats[i]), centerX + textOffset.x + (radius + textOffset.radial) * Math.cos(Math.PI/2 + i * 2 * Math.PI / sides), centerY + textOffset.y - (radius + textOffset.radial) * Math.sin(Math.PI/2 + i * 2 * Math.PI / sides), 160);
        }
        this.resetFontSettings();
    }

    //draw icon
    if (useIcon) {
        for (var i = 0; i < stats.length; i++) {
            this.drawIcon(iconIndexes[i], centerX + iconOffset.x + (radius + iconOffset.radial) * Math.cos(Math.PI/2 + i * 2 * Math.PI / sides), centerY + iconOffset.y - (radius + iconOffset.radial) * Math.sin(Math.PI/2 + i * 2 * Math.PI / sides));
        }
    }
};
}

Basically, I took the code from Yanfly's Status Core that places this table in the General tab and replaced the bar graph.
stat2.jpg
 
Last edited:

NateThe8

Villager
Member
Joined
Apr 22, 2021
Messages
8
Reaction score
0
First Language
English
Primarily Uses
RMMV
So i know I'm an idiot for asking but its been awhile since I have done intermediate javascript: how do u replace the stats with custom stats or variables? I want to use this polygon but with my own custom stats or at the least some variable switches I have. sorry for being dumb and thx if this gets a response.

EDIT: I found a solution that just uses the $gameVariables.value() and replaced the text with an array (if u do this just make sure to not replace all of it as some of the code rewrites the actual stats) however now I want to know if there is a way to only make it appear on a single actors status page (main actor obviously)

EDIT2: I have tried "if (this._actor.actorId() == $gameActors.actor(1).actorId())" but it just removed it from all actors including the one I want it on
 
Last edited:

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
995
Reaction score
846
First Language
English
Primarily Uses
N/A
So i know I'm an idiot for asking but its been awhile since I have done intermediate javascript: how do u replace the stats with custom stats or variables? I want to use this polygon but with my own custom stats or at the least some variable switches I have. sorry for being dumb and thx if this gets a response.

EDIT: I found a solution that just uses the $gameVariables.value() and replaced the text with an array (if u do this just make sure to not replace all of it as some of the code rewrites the actual stats) however now I want to know if there is a way to only make it appear on a single actors status page (main actor obviously)

EDIT2: I have tried "if (this._actor.actorId() == $gameActors.actor(1).actorId())" but it just removed it from all actors including the one I want it on

In response to your last edit, try:
if (this._actor.actorId() == ACTOR_ID)
and replace ACTOR_ID with the ID of the actor you want it to display on.
 

crow28

Villager
Member
Joined
Sep 30, 2020
Messages
7
Reaction score
0
First Language
russian
Primarily Uses
RMMV
Hello. I can't download it. Can I upload it somewhere else?
 

Zakarijah

I love making maps!
Veteran
Joined
Aug 18, 2019
Messages
183
Reaction score
23
First Language
English
Primarily Uses
RMMV
Is it possible to replace the bars in Yanfly's Status Core with the basic boxes in the general status section? I'd like to put the graph side by side with those so that it doesn't look too redundant. Here's a rough edit of what I want(perhaps without Lvl, hp and mp):
View attachment 153735

EDIT: I've figured it out. I modified the code at line 240 and changed it from:
Code:
if (Imported.YEP_StatusMenuCore) {
Window_StatusInfo.prototype.drawParameters = function() {
    var dx = indent;
    var dy = this.lineHeight() / 2;
    var dw = this.contents.width - indent;
    var dh = this.lineHeight();
    var dw2;
    var text;
    this.changeTextColor(this.systemColor());
    this.drawText(Yanfly.Param.StatusGraphText, dx, dy, dw, 'center');
    dy = this.lineHeight();
    dx = indent;
    dw -= this.standardPadding() * 2;
    for (var i = 2; i < 8; ++i) {
        dy += this.lineHeight();
        var rate = this.drawParamGauge(dx, dy, dw, i);
        this.changeTextColor(this.systemColor());
        this.drawText(TextManager.param(i), dx + 4, dy, dw - 4);
        text = Yanfly.Util.toGroup(this._actor.param(i))
        this.changeTextColor(this.normalColor());
        dw2 = dw * rate;
        this.drawText(text, dx, dy, dw2 - 4, 'right');
    }

    this.contents.SPolyDrawStatPolygon(this._actor);

    //draw text
    if (useText) {
        this.changeTextColor(textColor);
        this.contents.fontSize = this.standardFontSize() - fontDecrement;
        for (var i = 0; i < stats.length; i++) {
            this.drawText(TextManager.param(stats[i]), centerX + textOffset.x + (radius + textOffset.radial) * Math.cos(Math.PI/2 + i * 2 * Math.PI / sides), centerY + textOffset.y - (radius + textOffset.radial) * Math.sin(Math.PI/2 + i * 2 * Math.PI / sides), 160);
        }
        this.resetFontSettings();
    }

    //draw icon
    if (useIcon) {
        for (var i = 0; i < stats.length; i++) {
            this.drawIcon(iconIndexes[i], centerX + iconOffset.x + (radius + iconOffset.radial) * Math.cos(Math.PI/2 + i * 2 * Math.PI / sides), centerY + iconOffset.y - (radius + iconOffset.radial) * Math.sin(Math.PI/2 + i * 2 * Math.PI / sides));
        }
    }
};
}

to this:
Code:
if (Imported.YEP_StatusMenuCore) {
Window_StatusInfo.prototype.drawParameters = function() {
    var dx = indent;
    var dy = this.lineHeight() / 2;
    var dw = this.contents.width - indent;
    var dh = this.lineHeight();
    var dw2;
    var text;
    var rect = new Rectangle();
    rect.width = (this.contents.width - this.standardPadding()) / 2;
    rect.y = this.lineHeight() * 2;
    rect.height = this.lineHeight();
    var dx = rect.x + this.textPadding();
    var dw = rect.width - this.textPadding() * 2;
    this.drawDarkRect(rect.x, rect.y, rect.width, rect.height);
    this.changeTextColor(this.systemColor());
    this.drawText(TextManager.level, dx, rect.y, dw, 'left');
    this.changeTextColor(this.normalColor());
    text = Yanfly.Util.toGroup(this._actor.level);
    this.drawText(text, dx, rect.y, dw, 'right');
    this.drawText(Yanfly.Param.StatusParamText, dx + 9, dy, dw, 'center');
    for (var i = 0; i < 8; ++i) {
      if (i < 2) {
        rect.y += this.lineHeight();
      } else if (i === 2) {
        rect.y += this.lineHeight();
        rect.width /= 2;
        dw = rect.width - this.textPadding() * 2;
      } else if (i % 2 === 0) {
        rect.x = 0;
        dx = rect.x + this.textPadding();
        rect.y += this.lineHeight();
      } else {
        rect.x += rect.width;
        dx += rect.width;
      }
      this.drawDarkRect(rect.x, rect.y, rect.width, rect.height);
      this.changeTextColor(this.systemColor());
          this.drawText(TextManager.param(i), dx, rect.y, dw, 'left');
          this.changeTextColor(this.normalColor());
          text = Yanfly.Util.toGroup(this._actor.param(i));
          this.drawText(text, dx, rect.y, dw, 'right');
    }

    this.contents.SPolyDrawStatPolygon(this._actor);

    //draw text
    if (useText) {
        this.changeTextColor(textColor);
        this.contents.fontSize = this.standardFontSize() - fontDecrement;
        for (var i = 0; i < stats.length; i++) {
            this.drawText(TextManager.param(stats[i]), centerX + textOffset.x + (radius + textOffset.radial) * Math.cos(Math.PI/2 + i * 2 * Math.PI / sides), centerY + textOffset.y - (radius + textOffset.radial) * Math.sin(Math.PI/2 + i * 2 * Math.PI / sides), 160);
        }
        this.resetFontSettings();
    }

    //draw icon
    if (useIcon) {
        for (var i = 0; i < stats.length; i++) {
            this.drawIcon(iconIndexes[i], centerX + iconOffset.x + (radius + iconOffset.radial) * Math.cos(Math.PI/2 + i * 2 * Math.PI / sides), centerY + iconOffset.y - (radius + iconOffset.radial) * Math.sin(Math.PI/2 + i * 2 * Math.PI / sides));
        }
    }
};
}

Basically, I took the code from Yanfly's Status Core that places this table in the General tab and replaced the bar graph.
View attachment 153803
I tried this and got it to work but how did you get the graph to line up perfectly side-by-side?

No matter what I do, the graph always starts at the bottom of the text section, even when adjusting the X/Y values...
 

maliyana

Veteran
Veteran
Joined
Jun 6, 2017
Messages
78
Reaction score
13
First Language
English
Primarily Uses
RMMV
I tried this and got it to work but how did you get the graph to line up perfectly side-by-side?

No matter what I do, the graph always starts at the bottom of the text section, even when adjusting the X/Y values...
Can you post a screenshot?
 

Zakarijah

I love making maps!
Veteran
Joined
Aug 18, 2019
Messages
183
Reaction score
23
First Language
English
Primarily Uses
RMMV
Can you post a screenshot?
I actually figured it out last week. I thought I had to do its placement from my screen resolution or something but yea... I got it :)
 

ThreeSixNine

Veteran
Veteran
Joined
Jan 22, 2019
Messages
357
Reaction score
289
First Language
English
Primarily Uses
RMMV
@mjshi I just wanted to say thanks for this plugin! I'm a big fan of visual information and this supplements Yanfly's stat graph perfectly!
1626892167782.png

So I am trying to figure out how to implement the setup referenced in this message:
@Harken_W No problem! Also, if you want to make that polygon anywhere else but also have the icons/text etc just copy/paste the relevant portions later on labelled "//draw icon" and "//draw text", respectively.
I have tried pasting and copying the code in a few different locations but I have not been able to see the icons. I successfully added the stat polygon to Mr. Trivel's Party Manager Scene, but I'm not sure where to add the code to show the icons in the scene.

-EDIT-
I figured it out. I simply had to redefine all the variables being used in the drawIcon function. I did this by first importing the draw Icon function into the Party Manager plugin. Next, I imported all the variables set to the plugin parameters at the top of the StatPolygon plugin. Visual Studio Code showed me which variables were being used and which were not, so it was easy to figure out which ones needed to be redefined.

I actually left most of them as they were but changed them to something like this:
JavaScript:
var stats = PluginManager.parameters("StatPolygon")["Stats to Draw"].split(", ").map(Number);
to reference the parameter set in the StatPolygon plugin.

Lastly, it was just a matter of changing the Center X and Center Y variables to match the polygon.
 
Last edited:

Latest Threads

Latest Profile Posts

It's a shame that Selection Control will not be ported to MZ. I found a neat way of using it to enable ways for tanks to protect squishies. lol
Lately I have been taking a break from game and resource making so I won't get burnt out. But I am also interested in the Game Jams this site periodically holds. It'd be great if I knew when the next one, if any, is planned.
elexy 1.2.pngSome bust art to be cropped and cleaned. May use in special decision moments. Depending on how it looks in game I may cut it.
Tiamat-86 wrote on ATT_Turan's profile.
apparently since its turning 15 years old this year the ps3 is considered "retro". now how old do you feel?
guess that means im an "antique" gamer since ill still play games as old as i am.
"you know your getting old when your childhood console changes ethnicity" lol it turned yellow
I'm making Toilet in Wonderland 2. and tell vinny about it lol

Forum statistics

Threads
115,347
Messages
1,089,185
Members
150,026
Latest member
Ven_0
Top