Jump to content
Crashicoot

Change the order of Parameters?

Recommended Posts

Is there any way I can change the order of which the stats appear in the menus? For example, if I wanted to change the order of parameters from atk, def, m.atk, m.def, agi, luk to lets say atk, m.atk agi, def, m.def, luk how would I go about doing that?

 

I am using Yanfly plugins currently.

Thanks!

Share this post


Link to post
Share on other sites

Hey! If you still need help, this code should work!

 

The order of the parameter is determined by the line "var paramOrder = ["atk", "matk", "agi", "def", "mdef", "luk"];". If you want to change the display order, you can just move the text around (ex. ["luk", "atk", "matk", "agi", "def", "mdef"] will make luck appear at the top, ["atk", "matk", "def", "mdef"] will make it only show these 4 stats, etc).

Window_Status.prototype.drawParameters = function(x, y) {
    //Parameters in the "stats window" will be drawn in the order listed in the array "paramOrder"
    var paramOrder = ["atk", "matk", "agi", "def", "mdef", "luk"];
    var lineHeight = this.lineHeight();
    for (var i = 0; i < paramOrder.length; i++) {
        switch (paramOrder[i]) {
            case "atk": var paramId=2; break;
            case "def": var paramId=3; break;
            case "matk": var paramId=4; break;
            case "mdef": var paramId=5; break;
            case "agi": var paramId=6; break;
            case "luk": var paramId=7; break;
            default: var paramId=1;
        }
        var y2 = y + lineHeight * i;
        this.changeTextColor(this.systemColor());
        this.drawText(TextManager.param(paramId), x, y2, 160);
        this.resetTextColor();
        this.drawText(this._actor.param(paramId), x + 160, y2, 60, 'right');
    }
};

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted