Hi!
I want my character sprites to have a still-stepping animation in the save slots files instead of a fixed standing direction. Does anyone have a plugin for that??
Thanks a lot!
I only tested this quickly, but here (save in notepad as .js file in your plugin folder and add in plugin manager). This assumes you have normal size sprites:
Window_SavefileList.prototype.initialize = function(x, y, width, height) {
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
this.activate();
this._mode = null;
this._stepAnimationCount = 0;
this._stepIndex = 1;
};
Window_SavefileList.prototype.update = function() {
Window_Selectable.prototype.update.call(this);
this._stepAnimationCount += 1;
if (this._stepAnimationCount >= 20) {
if (this._stepIndex < 3) {
this._stepIndex += 1;
} else {
this._stepIndex = 0;
}
this.refresh();
this._stepAnimationCount = 0;
}
};
Window_SavefileList.prototype.drawCharacter = function(characterName, characterIndex, x, y) {
var bitmap = ImageManager.loadCharacter(characterName);
var big = ImageManager.isBigCharacter(characterName);
var pw = bitmap.width / (big ? 3 : 12);
var ph = bitmap.height / (big ? 4 : 8);
var n = characterIndex;
var sx = (n % 4 * 3 + 1) * pw;
var sy = (Math.floor(n / 4) * 4) * ph;
var frameIndex = this._stepIndex;
if (frameIndex === 0) sx -= 48;
if (frameIndex === 2) sx += 48;
this.contents.blt(bitmap, sx, sy, pw, ph, x - pw / 2, y - ph);
};
EDIT: Actually I think it works for any size sprites, if you just replace the 48s close to the bottom with pw (didn't check that draw method properly when I posted earlier)