personalizing menus

Hi, after trial and error i got a conclusion regarding the use of variables as param, I discarded this opinion.
Now I'm using the basic param, using "Strength" as attack, applying an algorithm that inrease the strength as final attack value.

If an actor have 20 strength he gets 69 attack, with 30 strength 198 instead.
now I must write the atk info in the yanfly status menu core under general infos, where hp, mp and attrib are shown(the first tab), how to add this?(I simply must add strength**etc etc(algorithm formula)
If someone understood this requests and knows this yanfly addon please suggest me the way i can script this ,thanks.


this is the code from yanfly script that writes character player on screen:

Window_StatusInfo.prototype.drawGeneralParam = function() {
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');
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');
}

i must add ""attack: "strength algorithm" ""

I remember that " attack" does not exist since the original attack value is the strength.
Don't really understand how you manage your actor parameters, how you use them and why do this...

perhaps the following edition will help you to understand yanfly script and edit it in consequence.

JavaScript:
Window_StatusInfo.prototype.drawGeneralParam = function() {
    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');
    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());

      // ADDED SECTION //
      if (i != 2) {
          var text = TextManager.param(i);
      } else if (i === 2){
          var text = "HELLO";
      }
      this.drawText(text, dx, rect.y, dw, 'left');
      // END //

      //this.drawText(TextManager.param(i), dx, rect.y, dw, 'left'); EDIT : added "//"
      this.changeTextColor(this.normalColor());

      // ADDED SECTION //
      if (i != 2) {
          text = Yanfly.Util.toGroup(this._actor.param(i));
      } else if (i === 2){
          text = "WORLD"
      }
      // END //
[ATTACH]142143[/ATTACH]
Instead of replacement for strength i just need 2 additional texts under agility and luck, that's all.

thanks anyway ^_^
You mean like this ?

it requires the edition of two functions.

JavaScript:
Window_StatusInfo.prototype.drawGeneral = function() {
        var dx = this.standardPadding() / 2;
        var dy = this.lineHeight() / 2;
        var dw = (this.contents.width - this.standardPadding()) / 2;
        var dh = this.lineHeight();
        var text;

                dy -= this.lineHeight()/2 // ADDED LINE

        this.changeTextColor(this.systemColor());
        this.drawText(Yanfly.Param.StatusParamText, dx, dy, dw, 'center');
        dx += this.contents.width / 2;

                

        this.drawText(Yanfly.Param.StatusExpText, dx, dy, dw, 'center');
        this.drawGeneralParam(dx, dy, dw, dh);
        this.drawGeneralExp(dx, dy, dw, dh);
};

Window_StatusInfo.prototype.drawGeneralParam = function() {
    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;

    rect.y -= this.lineHeight() /// ADDED LINE

    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');

    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());
        var text = TextManager.param(i);
        this.drawText(text, 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');
    };

    // ADDED SECTION //
    var AdditionalParamValues = [999,777] // enter here the values of each parameter.
    var AdditionalParamNames = ["name1","name2"] // enter here the name of each parameter.

    for (var i = 0; i < AdditionalParamValues.length; ++i){

        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());
        var text = AdditionalParamNames[i];
        this.drawText(text, dx, rect.y, dw, 'left');
        this.changeTextColor(this.normalColor());
        var text = AdditionalParamValues[i];
        this.drawText(text, dx, rect.y, dw, 'right');
    }
    // END SECTION //
};

StatusWindowCustomParam.png
Exactly! i'll study this to understand better, thanks again!
in Window_StatusInfo.prototype.drawGeneral = function() {

dy -= this.lineHeight()/2 // ADDED LINE
This is to shift "Parameters" closer to the top of the window in order to make room for additional parameters.

in Window_StatusInfo.prototype.drawGeneralParam = function() {

rect.y -= this.lineHeight() /// ADDED LINE
This is to shift the parameters table closer to the top of the window in order to make room for additional parameters.

var AdditionalParamValues = [999,777]
you enter here the values you want to pack in the table. This could be integers or eval. Per exemple if you use the following line instead :
var AdditionalParamValues = [Yanfly.Util.toGroup(this._actor.param(2))*10,777].
then the first param will be 10 times the atk of the actor. The second param will be 777.

var AdditionalParamNames = ["name1","name2"] // enter here the name of each parameter.
you enter here the name that might be display in front of the param.

Those two variables are arrays and work together. the param value at index 1 work with param name at index 1 and so on...


To conclude, you may know that I'm not a good scripter since I've started learning javascript 1-2 weeks ago.
There probably is a better and cleaner way to do it. At least, this method do not denaturate the original function too much, allowing a return to default quite easy.
thanks, this is the result:
Untitled.jpg


and now i must work on this section(I'll study your code piece in order to achieve this ^_^:
Untitled2.jpg
thanks again for tips!
Next time you ask for everything related to interfaces customization, I will really appreciate that you specify the screen resolution you're using. Otherwise, I consider you use the default setting, what's obviously not the case according to your screenshots.
Thanks to it, you have enought room below the param table and you can remove all lines that I've used to shift the content closer to the top of the window. See my previous answer to retrieve them.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/personalizing-menus.121060/