Hello all! Recently I have been digging through the core js files of my project to see what makes everything tick and to try and learn something about javascript in the process, basically I'm using bigger character sprites so I wanted to edit the Sprite_Weapon bit found here:
[ISPOILER]Sprite_Weapon.prototype.updateFrame = function() {
if (this._weaponImageId > 0) {
var index = (this._weaponImageId - 1) % 12;
var w = 96;
var h = 64;
var sx = (Math.floor(index / 6) * 3 + this._pattern) * w;
var sy = Math.floor(index % 6) * h;
this.setFrame(sx, sy, w, h);
} else {
this.setFrame(0, 0, 0, 0);
}
};[/ISPOILER]
along with this:
[ISPOILER]Sprite_Weapon.prototype.initMembers = function() {
this._weaponImageId = 0;
this._animationCount = 0;
this._pattern = 0;
this.anchor.x = 0.5;
this.anchor.y = 1;
this.x = -16;
};[/ISPOILER]
Now this looks great when I bring all those numbers up to match my actors, thing is, for certain fights I want the actors to be default size, which I can do by simply using the change actor image command before the battle, but then I have huge weapons!
So I guess what I'm looking for, either plugin or scriptwise, is a way to change those parts of the script in bold. Any help would be appreciated, I've learned so much here over the past few weeks its crazy!
[ISPOILER]Sprite_Weapon.prototype.updateFrame = function() {
if (this._weaponImageId > 0) {
var index = (this._weaponImageId - 1) % 12;
var w = 96;
var h = 64;
var sx = (Math.floor(index / 6) * 3 + this._pattern) * w;
var sy = Math.floor(index % 6) * h;
this.setFrame(sx, sy, w, h);
} else {
this.setFrame(0, 0, 0, 0);
}
};[/ISPOILER]
along with this:
[ISPOILER]Sprite_Weapon.prototype.initMembers = function() {
this._weaponImageId = 0;
this._animationCount = 0;
this._pattern = 0;
this.anchor.x = 0.5;
this.anchor.y = 1;
this.x = -16;
};[/ISPOILER]
Now this looks great when I bring all those numbers up to match my actors, thing is, for certain fights I want the actors to be default size, which I can do by simply using the change actor image command before the battle, but then I have huge weapons!
So I guess what I'm looking for, either plugin or scriptwise, is a way to change those parts of the script in bold. Any help would be appreciated, I've learned so much here over the past few weeks its crazy!