戴面具的乐子人 2 years ago
commit 4fa0986f28

@ -32,6 +32,7 @@ var $plugins =
{"name":"YEP_StatusMenuCore","status":true,"description":"v1.01a 身份状态菜单核心☁️","parameters":{"---设置---":"","Command Order":"General Parameters Elements States Attributes Custom Cancel","Command Window Width":"240","Command Window Rows":"4","Command Alignment":"center","---全局---":"","General Command":"角色状态","Parameters Text":"状态窗口","Experience Text":"经验窗口","Total Format":"需要 %1 到下一 %2","EXP Gauge Color 1":"30","EXP Gauge Color 2":"31","---参数---":"","Parameters Command":"角色属性","Graph Text":"属性图","ATK Color":"#ed1c24 #f26c4f","DEF Color":"#f7941d #fdc689","MAT Color":"#605ca8 #bd8cbf","MDF Color":"#448ccb #a6caf4","AGI Color":"#39b54a #82ca9c","LUK Color":"#fff568 #fffac3","---抵制颜色---":"","Above 300%":"10","200% to 300%":"20","150% to 200%":"14","120% to 150%":"6","100% to 120%":"0","80% to 100%":"24","50% to 80%":"29","1% to 50%":"23","Exactly 0%":"31","Below 0%":"27","---元素---":"","Elements Command":"元素抗性","Elements Decimal":"2","Element Column 1":"1","Element Column 2":"2 3 4 5 6 7 8 9","Element Column 3":"","Element Column 4":"","---状态---":"","States Command":"异常状态","States Decimal":"2","States Column 1":"1 4 5 6","States Column 2":"7 8 9 10","States Column 3":"","States Column 4":"","---属性---":"","Attributes Command":"特殊属性","Attribute Font Size":"20","Attribute Decimal":"0","Attributes Column 1":"exr hit eva cri cev mev mrf cnt","Attributes Column 2":"mcr tcr pdr mdr fdr grd rec pha","Attributes Column 3":"hrg mrg trg tgr","Attributes Column 4":"","hit Name":"命中率","eva Name":"闪避率","cri Name":"暴击率","cev Name":"暴击闪避率","mev Name":"魔法闪避率","mrf Name":"魔法反击率","cnt Name":"反击率","hrg Name":"HP回复率","mrg Name":"MP回复率","trg Name":"TP回复率","tgr Name":"被敌人攻击率","grd Name":"防御率","rec Name":"恢复率","pha Name":"药水恢复率","mcr Name":"MP消耗率","tcr Name":"TP消耗率","pdr Name":"承受物理伤害率","mdr Name":"承受魔法伤害率","fdr Name":"承受地面伤害率","exr Name":"经验获取率"}},
{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}},
{"name":"YEP_X_BattleSysATB","status":true,"description":"v1.25 时间槽战斗系统☁️","parameters":{"---ATB 设置---":"","Per Tick":"user.agi","Initial Speed":"0","Full Gauge":"Math.max(5000, BattleManager.highestBaseAgi() * 100)","Charge Gauge":"0","Pre-Emptive Bonuses":"0.8","Surprise Bonuses":"0.8","---逃跑---":"","Escape Ratio":"0.125 * $gameParty.agility() / $gameTroop.agility()","Fail Escape Boost":"0.025","---Turn---":"","Full Turn":"Math.min(200, BattleManager.lowestBaseAgi() * 8)","Flash Enemy":"true","---Rubberband---":"","Enable Rubberband":"false","Minimum Speed":"0.5 * BattleManager.highestBaseAgi()","Maximum Speed":"1.5 * BattleManager.highestBaseAgi()","---准备音乐---":"","Ready Sound":"Decision1","Ready Volume":"90","Ready Pitch":"120","Ready Pan":"0","---选项---":"","ATB Speed Text":"ATB速度","Default ATB Speed":"10","---窗口---":"","Lock Status Window":"true","Gauge Style":"1","Gauge Text":"Turn","Gauge Text Align":"center","ATB Gauge Color 1":"13","ATB Gauge Color 2":"5","Slow Gauge Color 1":"12","Slow Gauge Color 2":"4","Fast Gauge Color 1":"26","Fast Gauge Color 2":"27","Stop Gauge Color 1":"7","Stop Gauge Color 2":"8","Full Gauge Color 1":"14","Full Gauge Color 2":"6","Charge Gauge Color 1":"2","Charge Gauge Color 2":"10"}},
{"name":"YEP_BattleStatusWindow","status":true,"description":"v1.09 A simple battle status window that shows the\nfaces of your party members in horizontal format.","parameters":{"---Visual---":"","No Action Icon":"16","Name Font Size":"20","Param Font Size":"20","Param Y Buffer":"7","Param Current Max":"true","Adjust Columns":"false","State Icons Row":"1","---Actor Switching---":"","Left / Right":"true","PageUp / PageDown":"true","Allow Turn Skip":"true","---Front View---":"","Show Animations":"true","Show Sprites":"true","Align Animations":"true","X Offset":"24","Y Offset":"-16"}},
{"name":"YEP_X_VisualATBGauge","status":true,"description":"v1.03 时间槽外观☁️","parameters":{"Show Gauges":"true","Minimum Gauge Width":"144","Always Show":"true","Gauge Position":"false","Y Buffer":"-32","Use Thick Gauges":"true"}},
{"name":"YEP_X_VisualHpGauge","status":true,"description":"v1.07 (Requires YEP_BattleEngineCore.js) Reveal HP Gauges\r\nwhen a battler is selected or takes damage in battle.","parameters":{"---General---":"","Display Actor":"false","Defeat First":"false","Always Visible":"true","---Appearance---":"","Minimum Gauge Width":"144","Gauge Height":"18","Back Color":"19","HP Color 1":"20","HP Color 2":"21","Gauge Duration":"30","Gauge Position":"false","Y Buffer":"-16","Use Thick Gauges":"false","---Text Display---":"","Show HP":"true","Show Value":"true","Show Max":"true"}},
{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}},

@ -0,0 +1,763 @@
//=============================================================================
// Yanfly Engine Plugins - Battle Status Window
// YEP_BattleStatusWindow.js
//=============================================================================
var Imported = Imported || {};
Imported.YEP_BattleStatusWindow = true;
var Yanfly = Yanfly || {};
Yanfly.BSW = Yanfly.BSW || {};
Yanfly.BSW.version = 1.09;
//=============================================================================
/*:
* @plugindesc v1.09 A simple battle status window that shows the
* faces of your party members in horizontal format.
* @author Yanfly Engine Plugins
*
* @param ---Visual---
* @default
*
* @param No Action Icon
* @parent ---Visual---
* @type number
* @min 0
* @desc This is the icon used when no action is selected.
* @default 16
*
* @param Name Font Size
* @parent ---Visual---
* @type number
* @min 1
* @desc This is the font size used to draw the actor's name.
* Default: 28
* @default 20
*
* @param Param Font Size
* @parent ---Visual---
* @type number
* @min 1
* @desc This is the font size used to draw the actor's params.
* Default: 28
* @default 20
*
* @param Param Y Buffer
* @parent ---Visual---
* @type number
* @min 0
* @desc This is how much further the text drawn for params is
* lowered by.
* @default 7
*
* @param Param Current Max
* @parent ---Visual---
* @type boolean
* @on Current/Max
* @off Current Only
* @desc Draw current / max format?
* NO - false YES - true
* @default false
*
* @param Adjust Columns
* @parent ---Visual---
* @type boolean
* @on YES
* @off NO
* @desc Adjust column amount to party size?
* NO - false YES - true
* @default false
*
* @param State Icons Row
* @parent ---Visual---
* @type number
* @min 0
* @max 3
* @desc Which row do you wish to display the state icons?
* Default: 1
* @default 1
*
* @param ---Actor Switching---
* @default
*
* @param Left / Right
* @parent ---Actor Switching---
* @type boolean
* @on Enable
* @off Disable
* @desc Use 'left' and 'right' for switching actors?
* NO - false YES - true
* @default true
*
* @param PageUp / PageDown
* @parent ---Actor Switching---
* @type boolean
* @on Enable
* @off Disable
* @desc Use 'page up' and 'page down' for switching actors?
* NO - false YES - true
* @default true
*
* @param Allow Turn Skip
* @parent ---Actor Switching---
* @type boolean
* @on Enable
* @off Disable
* @desc Allow turn skipping for Tick-Based battle systems?
* NO - false YES - true
* @default true
*
* @param ---Front View---
* @default
*
* @param Show Animations
* @parent ---Front View---
* @type boolean
* @on Show
* @off Hide
* @desc Reveal actors and show their animations in front view?
* NO - false YES - true
* @default true
*
* @param Show Sprites
* @parent ---Front View---
* @type boolean
* @on Show
* @off Hide
* @desc Show the sprites of the actors in front view?
* NO - false YES - true
* @default false
*
* @param Align Animations
* @parent ---Front View---
* @type boolean
* @on Align
* @off Don't Align
* @desc If using front view, align battle animations to window?
* NO - false YES - true
* @default true
*
* @param X Offset
* @parent ---Front View---
* @type number
* @desc How much do you wish to offset the actor X position by?
* @default 24
*
* @param Y Offset
* @parent ---Front View---
* @type number
* @desc How much do you wish to offset the actor Y position by?
* @default -16
*
* @help
* ============================================================================
* Introduction
* ============================================================================
*
* This plugin replaces the default battle status window, which was shown in a
* row format, to a column-based format that also displays the party's faces.
*
* For frontview users, this plugin also allows you to enable battle animations
* to be played on top of the actor's portraits (and showing any damage popups)
* to give the player a better view of what's going on in battle.
*
* ============================================================================
* Changelog
* ============================================================================
*
* Version 1.09:
* - Updated for RPG Maker MV version 1.5.0.
*
* Version 1.08:
* - Added 'State Icons Row' plugin parameter. This plugin parameter allows you
* to adjust what 'row' you want the state icons to appear in.
*
* Version 1.07:
* - Optimization update.
*
* Version 1.06:
* - Fixed a bug that prevented animations from using flashes on the actor
* sprite if they were visible from front view.
*
* Version 1.05:
* - Optimized face drawing effect to work more efficiently.
*
* Version 1.04:
* - Added 'Allow Turn Skip' plugin parameter to let you decide if you can let
* the player skip turns for tick-based battle systems.
*
* Version 1.03:
* - Added a failsafe check to make frontview animations work regardless of
* having RPG Maker MV 1.0.1 update.
*
* Version 1.02a:
* - Added 'Adjust Columns' parameter.
* - Updated functionality for 'Adjust Columns' to alter where the animations
* are played.
* - Added a timed refresh for the face loading to show at faster intervals.
*
* Version 1.01a:
* - Added refresh modifiers to update an actor's face whenever an event to
* change the actor's face graphic.
* - Made an override for ATB style to automatically default on style 1.
*
* Version 1.00:
* - Finished Plugin!
*/
//=============================================================================
//=============================================================================
// Parameter Variables
//=============================================================================
Yanfly.Parameters = PluginManager.parameters('YEP_BattleStatusWindow');
Yanfly.Param = Yanfly.Param || {};
Yanfly.Icon = Yanfly.Icon || {};
Yanfly.Icon.NoAction = Number(Yanfly.Parameters['No Action Icon']);
Yanfly.Param.BSWNameFontSize = Number(Yanfly.Parameters['Name Font Size']);
Yanfly.Param.BSWParamFontSize = Number(Yanfly.Parameters['Param Font Size']);
Yanfly.Param.BSWParamYBuffer = Number(Yanfly.Parameters['Param Y Buffer']);
Yanfly.Param.BSWCurrentMax = String(Yanfly.Parameters['Param Current Max']);
Yanfly.Param.BSWCurrentMax = eval(Yanfly.Param.BSWCurrentMax);
Yanfly.Param.BSWAdjustCol = eval(String(Yanfly.Parameters['Adjust Columns']));
Yanfly.Param.BSWStateIconRow = Number(Yanfly.Parameters['State Icons Row']);
Yanfly.Param.BSWLfRt = eval(String(Yanfly.Parameters['Left / Right']));
Yanfly.Param.BSWPageUpDn = eval(String(Yanfly.Parameters['PageUp / PageDown']));
Yanfly.Param.BSWTurnSkip = eval(String(Yanfly.Parameters['Allow Turn Skip']));
Yanfly.Param.BSWShowAni = eval(String(Yanfly.Parameters['Show Animations']));
Yanfly.Param.BSWShowSprite = eval(String(Yanfly.Parameters['Show Sprites']));
Yanfly.Param.BSWAlignAni = eval(String(Yanfly.Parameters['Align Animations']));
Yanfly.Param.BSWXOffset = Number(Yanfly.Parameters['X Offset']);
Yanfly.Param.BSWYOffset = Number(Yanfly.Parameters['Y Offset']);
Yanfly.Param.ATBGaugeStyle = 1;
//=============================================================================
// BattleManager
//=============================================================================
Yanfly.BSW.BattleManager_startInput = BattleManager.startInput;
BattleManager.startInput = function() {
Yanfly.BSW.BattleManager_startInput.call(this);
this.refreshStatus();
};
//=============================================================================
// Game_Battler
//=============================================================================
Yanfly.BSW.Game_Action_clear = Game_Action.prototype.clear;
Game_Action.prototype.clear = function() {
Yanfly.BSW.Game_Action_clear.call(this);
this.subject().refresh();
};
Yanfly.BSW.Game_Action_setSkill = Game_Action.prototype.setSkill;
Game_Action.prototype.setSkill = function(skillId) {
Yanfly.BSW.Game_Action_setSkill.call(this, skillId);
this.subject().refresh();
};
Yanfly.BSW.Game_Action_setItem = Game_Action.prototype.setItem;
Game_Action.prototype.setItem = function(itemId) {
Yanfly.BSW.Game_Action_setItem.call(this, itemId);
this.subject().refresh();
};
Yanfly.BSW.Game_Action_setItemObject = Game_Action.prototype.setItemObject;
Game_Action.prototype.setItemObject = function(object) {
Yanfly.BSW.Game_Action_setItemObject.call(this, object);
this.subject().refresh();
};
//=============================================================================
// Game_Actor
//=============================================================================
Yanfly.BSW.Game_Actor_isSpriteVisible = Game_Actor.prototype.isSpriteVisible;
Game_Actor.prototype.isSpriteVisible = function() {
if (Yanfly.Param.BSWShowAni && !$gameSystem.isSideView()) {
return true;
}
return Yanfly.BSW.Game_Actor_isSpriteVisible.call(this);
};
Yanfly.BSW.Game_Actor_changeClass = Game_Actor.prototype.changeClass;
Game_Actor.prototype.changeClass = function(classId, keepExp) {
Yanfly.BSW.Game_Actor_changeClass.call(this, classId, keepExp);
this.battleStatusWindowRefresh();
};
Yanfly.BSW.Game_Actor_setCharacterImage =
Game_Actor.prototype.setCharacterImage;
Game_Actor.prototype.setCharacterImage = function(name, index) {
Yanfly.BSW.Game_Actor_setCharacterImage.call(this, name, index);
this.battleStatusWindowRefresh();
};
Yanfly.BSW.Game_Actor_setFaceImage =
Game_Actor.prototype.setFaceImage;
Game_Actor.prototype.setFaceImage = function(faceName, faceIndex) {
Yanfly.BSW.Game_Actor_setFaceImage.call(this, faceName, faceIndex);
this.battleStatusWindowRefresh();
};
Yanfly.BSW.Game_Actor_setBattlerImage =
Game_Actor.prototype.setBattlerImage;
Game_Actor.prototype.setBattlerImage = function(battlerName) {
Yanfly.BSW.Game_Actor_setBattlerImage.call(this, battlerName);
this.battleStatusWindowRefresh();
};
Game_Actor.prototype.battleStatusWindowRefresh = function() {
if (!$gameParty.inBattle()) return;
if (!$gameParty.battleMembers().contains(this)) return;
BattleManager.refreshStatus();
};
//=============================================================================
// Sprite_Actor
//=============================================================================
Yanfly.BSW.Sprite_Actor_createMainSprite =
Sprite_Actor.prototype.createMainSprite;
Sprite_Actor.prototype.createMainSprite = function() {
Yanfly.BSW.Sprite_Actor_createMainSprite.call(this);
if ($gameSystem.isSideView()) return;
if (Yanfly.Param.BSWShowSprite) {
this._effectTarget = this._mainSprite || this;
} else {
this._effectTarget = this;
}
};
Yanfly.BSW.Sprite_Actor_setActorHome = Sprite_Actor.prototype.setActorHome;
Sprite_Actor.prototype.setActorHome = function(index) {
if (Yanfly.Param.BSWAlignAni && !$gameSystem.isSideView()) {
this.setActorHomeFrontView(index);
} else {
Yanfly.BSW.Sprite_Actor_setActorHome.call(this, index);
}
};
Sprite_Actor.prototype.setActorHomeFrontView = function(index) {
if (Imported.YEP_BattleEngineCore) {
var statusHeight = Yanfly.Param.BECCommandRows;
} else {
var statusHeight = 4;
}
statusHeight *= Window_Base.prototype.lineHeight.call(this);
statusHeight += Window_Base.prototype.standardPadding.call(this) * 2;
var screenW = Graphics.boxWidth;
var windowW = Window_PartyCommand.prototype.windowWidth.call(this);
screenW -= windowW;
windowW /= 2;
if (Yanfly.Param.BSWAdjustCol) {
var size = $gameParty.battleMembers().length;
} else {
var size = $gameParty.maxBattleMembers();
}
var homeX = screenW / size * index + windowW + screenW / (size * 2);
homeX += Yanfly.Param.BSWXOffset;
var homeY = Graphics.boxHeight - statusHeight;
homeY += Yanfly.Param.BSWYOffset;
this.setHome(homeX, homeY);
this.moveToStartPosition();
};
Yanfly.BSW.Sprite_Actor_update = Sprite_Actor.prototype.update;
Sprite_Actor.prototype.update = function() {
Yanfly.BSW.Sprite_Actor_update.call(this);
if (!this._actor) return;
if ($gameSystem.isSideView()) return;
if (Yanfly.Param.BSWShowSprite) return;
this.hideAllSideviewSprites();
};
Sprite_Actor.prototype.hideAllSideviewSprites = function() {
this._mainSprite.visible = false;
this._shadowSprite.visible = false;
this._weaponSprite.visible = false;
this._stateSprite.visible = false;
};
//=============================================================================
// Window_Base
//=============================================================================
Window_Base.prototype.drawActorActionIcon = function(actor, wx, wy) {
var icon = Yanfly.Icon.NoAction;
if (actor.currentAction() && actor.currentAction().item()) {
icon = actor.currentAction().item().iconIndex || Yanfly.Icon.NoAction;
}
this.drawIcon(icon, wx + 2, wy + 2);
};
//=============================================================================
// Window_PartyCommand
//=============================================================================
Window_PartyCommand.prototype.processHandling = function() {
if (this.isOpenAndActive() && Yanfly.Param.BSWPageUpDn) {
if (this.isHandled('pagedown') && Input.isRepeated('pagedown')) {
return this.processPagedown();
}
}
Window_Selectable.prototype.processHandling.call(this);
if (this.isOpenAndActive() && Yanfly.Param.BSWLfRt) {
if (this.isHandled('right') && Input.isRepeated('right')) {
this.processRight();
}
}
};
Window_PartyCommand.prototype.processRight = function() {
SoundManager.playCursor();
this.updateInputData();
this.deactivate();
this.callHandler('right');
};
//=============================================================================
// Window_ActorCommand
//=============================================================================
Window_ActorCommand.prototype.processHandling = function() {
if (this.isOpenAndActive() && Yanfly.Param.BSWPageUpDn) {
if (this.isHandled('pageup') && Input.isRepeated('pageup')) {
return this.processPageup();
} else if (this.isHandled('pagedown') && Input.isRepeated('pagedown')) {
return this.processPagedown();
}
}
Window_Selectable.prototype.processHandling.call(this);
if (this.isOpenAndActive() && Yanfly.Param.BSWLfRt) {
if (this.isHandled('left') && Input.isRepeated('left')) {
this.processLeft();
} else if (this.isHandled('right') && Input.isRepeated('right')) {
this.processRight();
}
}
};
Window_ActorCommand.prototype.processLeft = function() {
SoundManager.playCursor();
this.updateInputData();
this.deactivate();
this.callHandler('left');
};
Window_ActorCommand.prototype.processRight = function() {
if (SceneManager._scene.isAllowRightCommand()) {
SoundManager.playCursor();
}
this.updateInputData();
this.deactivate();
this.callHandler('right');
};
Window_ActorCommand.prototype.processCancel = function() {
var action = BattleManager.inputtingAction();
if (action) action.clear();
Window_Command.prototype.processCancel.call(this);
};
//=============================================================================
// Window_BattleStatus
//=============================================================================
Window_BattleStatus.prototype.createContents = function() {
this.createFaceContents();
this._currentMax = Yanfly.Param.BSWCurrentMax;
Window_Selectable.prototype.createContents.call(this);
};
Window_BattleStatus.prototype.createFaceContents = function() {
this._faceContents = new Sprite();
var ww = this.contentsWidth();
var wy = this.contentsHeight();
this._faceContents.bitmap = new Bitmap(ww, wy);
this.addChildAt(this._faceContents, 2);
this._faceContents.move(this.standardPadding(), this.standardPadding());
};
Window_BattleStatus.prototype.drawAllItems = function() {
Window_Selectable.prototype.drawAllItems.call(this);
this.drawAllFaces();
};
Window_BattleStatus.prototype.drawAllFaces = function() {
for (var i = 0; i < $gameParty.battleMembers().length; ++i) {
var member = $gameParty.battleMembers()[i];
var bitmap = ImageManager.loadFace(member.faceName());
if (bitmap.width <= 0) return setTimeout(this.drawAllFaces.bind(this), 5);
}
this._faceContents.bitmap.clear();
for (var i = 0; i < this.maxItems(); ++i) {
this.drawStatusFace(i);
}
};
Window_BattleStatus.prototype.maxRows = function() {
var rows = 1;
return rows;
};
Window_BattleStatus.prototype.maxCols = function() {
if (Yanfly.Param.BSWAdjustCol) {
return this.maxItems();
} else {
return $gameParty.maxBattleMembers();
}
return cols;
};
Window_BattleStatus.prototype.itemWidth = function() {
return this.contents.width / this.maxCols();
};
Window_BattleStatus.prototype.spacing = function() {
return 0;
};
Window_BattleStatus.prototype.itemHeight = function() {
return this.lineHeight() * this.numVisibleRows();
};
Window_BattleStatus.prototype.drawItem = function(index) {
var actor = $gameParty.battleMembers()[index];
this.drawBasicArea(this.basicAreaRect(index), actor);
this.drawGaugeArea(this.gaugeAreaRect(index), actor);
this.drawStateArea(this.basicAreaRect(index), actor);
};
Window_BattleStatus.prototype.drawBasicArea = function(rect, actor) {
if (Imported.YEP_X_BattleSysATB && Yanfly.Param.ATBGaugeStyle) {
if (BattleManager.isATB()) {
var atb_rect = this.gaugeAreaRect(0);
this.drawActorAtbGauge(actor, rect.x, atb_rect.y + atb_rect.height - this.lineHeight(), rect.width);
}
}
var iw = Window_Base._iconWidth;
this.drawActorActionIcon(actor, rect.x, rect.y);
this.resetFontSettings();
this.contents.fontSize = Yanfly.Param.BSWNameFontSize;
this.drawActorName(actor, rect.x + iw + 4, rect.y, rect.width);
};
Window_BattleStatus.prototype.basicAreaRect = function(index) {
var rect = this.itemRectForText(index);
rect.height = this.lineHeight() * 2;
return rect;
};
Window_BattleStatus.prototype.drawGaugeArea = function(rect, actor) {
this.contents.fontSize = Yanfly.Param.BSWParamFontSize;
this._enableYBuffer = true;
var wy = rect.y + rect.height - this.lineHeight();
var wymod = (Imported.YEP_CoreEngine) ? Yanfly.Param.GaugeHeight : 6;
var wymod = Math.max(16, wymod);
this.drawActorHp(actor, rect.x, wy - wymod * 2, rect.width);
if (this.getGaugesDrawn(actor) <= 2) {
this.drawActorMp(actor, rect.x, wy, rect.width);
} else {
var ww = Math.floor(rect.width / 2);
var pad = rect.width - ww * 2;
this.drawActorMp(actor, rect.x, wy - wymod, ww);
this.drawActorTp(actor, rect.x + ww + pad, wy - wymod, ww);
}
this._enableYBuffer = false;
};
Window_BattleStatus.prototype.drawStateArea = function(rect, actor) {
var row = Yanfly.Param.BSWStateIconRow;
if (row === undefined) row = 1;
var wy = rect.y + (this.lineHeight() * row);
this.drawActorIcons(actor, rect.x + 2, wy, rect.width);
};
Window_BattleStatus.prototype.getGaugesDrawn = function(actor) {
var value = 2;
if ($dataSystem.optDisplayTp) value += 1;
return value;
};
Window_BattleStatus.prototype.gaugeAreaRect = function(index) {
var rect = this.itemRectForText(index);
rect.height = this.contents.height - this.lineHeight() * 3;
rect.y = this.contents.height - rect.height;
return rect;
};
Window_BattleStatus.prototype.drawStatusFace = function(index) {
var actor = $gameParty.battleMembers()[index];
var rect = this.itemRect(index);
var ww = Math.min(rect.width - 8, Window_Base._faceWidth);
var wh = Math.min(rect.height - 8, Window_Base._faceHeight);
var wx = rect.x + rect.width - ww - 6;
var wy = rect.y + 4;
this.drawActorFace(actor, wx, wy, ww, wh);
};
Window_BattleStatus.prototype.drawFace = function(fn, fi, x, y, width, height) {
width = width || Window_Base._faceWidth;
height = height || Window_Base._faceHeight;
var bitmap = ImageManager.loadFace(fn);
var pw = Window_Base._faceWidth;
var ph = Window_Base._faceHeight;
var sw = Math.min(width, pw);
var sh = Math.min(height, ph);
var dx = Math.floor(x + Math.max(width - pw, 0) / 2);
var dy = Math.floor(y + Math.max(height - ph, 0) / 2);
var sx = fi % 4 * pw + (pw - sw) / 2;
var sy = Math.floor(fi / 4) * ph + (ph - sh) / 2;
this._faceContents.bitmap.blt(bitmap, sx, sy, sw, sh, dx, dy);
};
Window_BattleStatus.prototype.updateTransform = function() {
Window_Selectable.prototype.updateTransform.call(this);
this.updateFaceContents();
};
Window_BattleStatus.prototype.updateFaceContents = function() {
var w = this._width - this._padding * 2;
var h = this._height - this._padding * 2;
if (w > 0 && h > 0) {
this._faceContents.setFrame(this.origin.x, this.origin.y, w, h);
this._faceContents.visible = this.isOpen();
} else {
this._faceContents.visible = false;
}
};
Window_BattleStatus.prototype.drawText = function(text, wx, wy, ww, align) {
if (this._enableYBuffer) {
wy += Yanfly.Param.BSWParamYBuffer;
wx += 2;
ww -= 4;
}
Window_Selectable.prototype.drawText.call(this, text, wx, wy, ww, align);
};
Window_BattleStatus.prototype.drawCurrentAndMax = function(current, max, x, y,
width, color1, color2) {
if (this._currentMax) {
Window_Selectable.prototype.drawCurrentAndMax.call(this, current, max,
x, y, width, color1, color2);
} else {
this.changeTextColor(color1);
var value = Yanfly.Util.toGroup(current);
this.drawText(value, x, y, width, 'right');
}
};
Window_BattleStatus.prototype.drawItemGaugeIcon = function(iconIndex, wx, wy) {
var bitmap = ImageManager.loadSystem('IconSet');
var pw = Window_Base._iconWidth;
var ph = Window_Base._iconHeight;
var sx = iconIndex % 16 * pw;
var sy = Math.floor(iconIndex / 16) * ph;
var iconWidth = (Imported.YEP_CoreEngine) ? Yanfly.Param.GaugeHeight : 32;
var iconHeight = (Imported.YEP_CoreEngine) ? Yanfly.Param.GaugeHeight : 32;
wy += Window_Base._iconHeight - iconHeight;
this.contents.blt(bitmap, sx, sy, pw, ph, wx, wy, iconWidth, iconHeight);
return iconWidth;
};
//=============================================================================
// Scene_Battle
//=============================================================================
Yanfly.BSW.Scene_Battle_createPartyCommandWindow =
Scene_Battle.prototype.createPartyCommandWindow;
Scene_Battle.prototype.createPartyCommandWindow = function() {
Yanfly.BSW.Scene_Battle_createPartyCommandWindow.call(this);
var win = this._partyCommandWindow;
if (Yanfly.Param.BSWLfRt) {
win.setHandler('right', this.commandFight.bind(this));
}
if (Yanfly.Param.BSWPageUpDn) {
win.setHandler('pagedown', this.commandFight.bind(this));
};
};
Yanfly.BSW.Scene_Battle_createActorCommandWindow =
Scene_Battle.prototype.createActorCommandWindow;
Scene_Battle.prototype.createActorCommandWindow = function() {
Yanfly.BSW.Scene_Battle_createActorCommandWindow.call(this);
var win = this._actorCommandWindow;
if (Yanfly.Param.BSWLfRt) {
win.setHandler('left', this.selectPreviousCommand.bind(this));
win.setHandler('right', this.selectRightCommand.bind(this));
}
if (Yanfly.Param.BSWPageUpDn) {
win.setHandler('pageup', this.selectPreviousCommand.bind(this));
win.setHandler('pagedown', this.selectRightCommand.bind(this));
};
};
Scene_Battle.prototype.clearInputtingAction = function() {
var action = BattleManager.inputtingAction();
if (action) action.clear();
};
Yanfly.BSW.Scene_Battle_onActorCancel = Scene_Battle.prototype.onActorCancel;
Scene_Battle.prototype.onActorCancel = function() {
Yanfly.BSW.Scene_Battle_onActorCancel.call(this);
this.clearInputtingAction();
};
Yanfly.BSW.Scene_Battle_onEnemyCancel = Scene_Battle.prototype.onEnemyCancel;
Scene_Battle.prototype.onEnemyCancel = function() {
Yanfly.BSW.Scene_Battle_onEnemyCancel.call(this);
this.clearInputtingAction();
};
Yanfly.BSW.Scene_Battle_onSkillCancel = Scene_Battle.prototype.onSkillCancel;
Scene_Battle.prototype.onSkillCancel = function() {
Yanfly.BSW.Scene_Battle_onSkillCancel.call(this);
this.clearInputtingAction();
};
Yanfly.BSW.Scene_Battle_onItemCancel = Scene_Battle.prototype.onItemCancel;
Scene_Battle.prototype.onItemCancel = function() {
Yanfly.BSW.Scene_Battle_onItemCancel.call(this);
this.clearInputtingAction();
};
Scene_Battle.prototype.selectRightCommand = function() {
if (!this.isAllowRightCommand()) {
return this._actorCommandWindow.activate();
}
if (Imported.YEP_BattleEngineCore && BattleManager.isTickBased()) {
if (BattleManager.actor()) BattleManager.actor().onTurnStart();
}
this.selectNextCommand();
};
Scene_Battle.prototype.isAllowRightCommand = function() {
if (Yanfly.Param.BSWTurnSkip) return true;
if (Imported.YEP_BattleEngineCore && BattleManager.isTickBased()) {
return false;
}
return true;
};
//=============================================================================
// Utilities
//=============================================================================
Yanfly.Util = Yanfly.Util || {};
if (!Yanfly.Util.toGroup) {
Yanfly.Util.toGroup = function(inVal) {
return inVal;
}
};
//=============================================================================
// End of File
//=============================================================================

@ -369,7 +369,7 @@ Yanfly.Autosave.DataManager_setupNewGame = DataManager.setupNewGame;
DataManager.setupNewGame = function() {
Yanfly.Autosave.DataManager_setupNewGame.call(this);
StorageManager.setCurrentAutosaveSlot(this._lastAccessedId);
$gameTemp._autosaveNewGame = true;
$gameTemp._autosaveNewGame = false;
$gameTemp._autosaveLoading = false;
};
@ -400,7 +400,7 @@ StorageManager.getCurrentAutosaveSlot = function() {
};
StorageManager.setCurrentAutosaveSlot = function(savefileId) {
this._currentAutosaveSlot = savefileId;
this._currentAutosaveSlot = 1;
};
StorageManager.performAutosave = function() {
@ -594,6 +594,37 @@ Scene_Map.prototype.performAutosave = function() {
if (this._autosaveMsgWindow) this._autosaveMsgWindow.reveal();
};
//=============================================================================
// Window_SavefileList
//=============================================================================
Yanfly.Autosave.Window_SavefileList_drawItem = Window_SavefileList.prototype.drawItem;
Window_SavefileList.prototype.drawItem = function(index) {
var id = index + 1;
var valid = DataManager.isThisGameFile(id);
var rect = this.itemRect(index);
this.resetTextColor();
//if (this._mode === 'load') this.changePaintOpacity(valid);
this.changePaintOpacity(valid);
var icon = valid ? Yanfly.Param.SaveIconSaved : Yanfly.Param.SaveIconEmpty;
this.drawIcon(icon, rect.x + 2, rect.y + 2);
if(id === 1){ //First is AutoSaved
this.drawText("自动存档",rect.x + Window_Base._iconWidth + 4, rect.y, 180);
} else {
this.drawFileId(id-1, rect.x + Window_Base._iconWidth + 4, rect.y);
}
};
//=============================================================================
// Window_SaveAction
//=============================================================================
Yanfly.Autosave.Window_SaveAction_isSaveEnabled = Window_SaveAction.prototype.isSaveEnabled;
Window_SaveAction.prototype.isSaveEnabled = function() {
if (this._mode !== 'save') return false;
if (this._currentFile === 1)return false;
return $gameSystem.isSaveEnabled();
};
//=============================================================================
// Save Core Check
//=============================================================================

@ -1,4 +1,4 @@
//=============================================================================
//=============================================================================
// Yanfly Engine Plugins - Visual ATB Gauge
// YEP_X_VisualATBGauge.js
//=============================================================================
@ -8,42 +8,54 @@ Imported.YEP_X_VisualATBGauge = true;
var Yanfly = Yanfly || {};
Yanfly.VATB = Yanfly.VATB || {};
Yanfly.VATB.version = 1.04
//=============================================================================
/*:
* @plugindesc v1.03 时间槽外观
* @plugindesc v1.04 (Requires YEP_BattleSysATB.js) Provides a visible ATB
* gauge for your enemies!
* @author Yanfly Engine Plugins
*
* @param Show Gauges
* @text 显示槽
* @type boolean
* @on Show
* @off Hide
* @desc Show individual gauges?
* NO - false YES - true
* @default true
*
* @param Minimum Gauge Width
* @text 最小槽宽度
* @type number
* @min 1
* @desc This is the minimum width in pixels for ATB Gauges.
* @default 144
*
* @param Always Show
* @text 一直显示
* @type boolean
* @on YES
* @off NO
* @desc Always show ATB Gauge or hide them during actions?
* HIDE - false SHOW - true
* @default true
*
* @param Gauge Position
* @text 槽位置
* @type boolean
* @on Above
* @off Below
* @desc Where do you wish to show the ATB gauge?
* BELOW - false ABOVE - true
* @default false
*
* @param Y Buffer
* @text Y缓冲器
* @type number
* @min 0
* @desc How much do you wish to shift the gauge Y position?
* @default -32
*
* @param Use Thick Gauges
* @text 使用厚量规
* @type boolean
* @on Thick
* @off Normal
* @desc Use the thick gauges provided by this plugin?
* Default - false Thick - true
* @default true
@ -53,36 +65,37 @@ Yanfly.VATB = Yanfly.VATB || {};
* Introduction
* ============================================================================
*
* 对于Yanfly的ATB战斗系统插件你现在可以让你的敌人也有行动槽啦
* 这个拓展插件需要ATB插件支持行动槽可以显示在敌人下方
* 本插件需要YEP_BattleEngineCore和YEP_X_BattleSysATB两个前置插件请
* 确保启用该插件时将其放置于上述两个插件下边
* This plugin requires YEP_BattleEngineCore and YEP_X_BattleSysATB.
* Make sure this plugin is located under YEP_BattleEngineCore and
* YEP_X_BattleSysATB in the plugin list.
*
* 本插件将会在ATB战斗模式下在你敌人的上方或下方显示ATB行动槽
* This plugin will show the ATB Gauge for enemies if the current battle system
* is ATB. The gauges can be shown either below or above the enemies.
*
* ============================================================================
* Notetags
* ============================================================================
*
* The following are some notetags you can use to adjust the appearance of
* the enemy's ATB Gauge.下面的注释命令会帮助你进一步定制本插件的功能
* the enemy's ATB Gauge.
*
* Enemy Notetags:
* <Show ATB Gauge>
* <Hide ATB Gauge>
* 这个命令将开启或关闭敌人的ATB行动槽显示让你可以自己控制
* This will cause the ATB Gauge to be shown or hidden ignoring the default
* settings found in the parameters.
*
* <ATB Gauge Width: x>
* This allows you to set the enemy's ATB Gauge width to x instead of having
* it match the enemy's battler graphic width.
* 你可以自定义该敌人行动槽的宽度这通常用于你的敌人绘图不规则
* 而行动槽规格统一导致的显示奇葩问题比如你可以给史莱姆等小型单位
* 设定更小的行动槽使其看起来更美观一点
*
* ============================================================================
* Changelog
* ============================================================================
*
* Version 1.04:
* - Updated for RPG Maker MV version 1.5.0.
*
* Version 1.03:
* - Updated for RPG Maker MV version 1.1.0.
*

Loading…
Cancel
Save