I want to add stats like the lockpick skill to my actor via script. Here is what I have already:
Here, you input the number for lockpick and this code adds the text and the value to the Status Window and redraws the line below it. I have even called it via script in the conditional where if you have a high enough lockpick value you can open the chest and it says your success, and tells you you have failed if not.
I want it to be an official "stat" like a skill in the menu.
Oh! Maybe I can add it to the InitMembers function here: Game_Actor.prototype.initMembers ? Oh, and then how would you increase this skill? How about each level it increases? Or you can give out stat points?
Please let me know guys!!
JavaScript:
/*:
@param lockpick
@type number
*/
var params = PluginManager.parameters("Custom_Skill");
var lockPickSkill = params.lockpick;
Window_Status.prototype.drawParameters = function(x, y) {
drawParams.call(this, x, y);
var lineHeight = this.lineHeight();
for (var i = 6; i < 7; i++) {
var paramId = i + 2;
var y2 = y + lineHeight * i;
this.changeTextColor(this.systemColor());
this.drawText("Lockpick", x, y2, 160);
this.resetTextColor();
this.drawText(lockPickSkill, x + 160, y2, 60, 'right');}
};
Window_Status.prototype.refresh = function() {
this.contents.clear();
if (this._actor) {
var lineHeight = this.lineHeight();
this.drawBlock1(lineHeight * 0);
this.drawHorzLine(lineHeight * 1);
this.drawBlock2(lineHeight * 2);
this.drawHorzLine(lineHeight * 6);
this.drawBlock3(lineHeight * 7);
this.drawHorzLine(lineHeight * 15);
this.drawBlock4(lineHeight * 14);
}
};
Here, you input the number for lockpick and this code adds the text and the value to the Status Window and redraws the line below it. I have even called it via script in the conditional where if you have a high enough lockpick value you can open the chest and it says your success, and tells you you have failed if not.
I want it to be an official "stat" like a skill in the menu.
Oh! Maybe I can add it to the InitMembers function here: Game_Actor.prototype.initMembers ? Oh, and then how would you increase this skill? How about each level it increases? Or you can give out stat points?
Please let me know guys!!