设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 69|回复: 0

[转载发布] Simple Battle Status Faces

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    7959

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    29925
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    38778

    灌水之王

    发表于 4 天前 | 显示全部楼层 |阅读模式
    Simple Battle Status Faces
    By lolaccount

     
    Introduction
    This is my 2nd plugin release. I'm a beginner. I plan on updating the plugin with parameters and some other adjustments later on. I am happy to receive any constructive feedback.

    Patch Notes

    v.1.02 - Added support for Yanfly's ATB

    v1.01 - Added some support for Ellye's Simple ATB (check parameters). The bar needs improving for the default resolution, but looks good fullscreen. Will improve default resolution ATB bar in an update. Added some support for default resolution and 3 party members. Still won't look very good with more than 3 party members with default resolution.

    Features
    Draws the actor's faces in the Battle Status window, the goal of not blocking the actor's faces too much.
    It's designed for full screen games, but I might make an update(s) to accommodate smaller resolutions.
    As such, it will probably look bad if you're not using full screen. I did my tests in 1280 x 720 full screen.
     
    You can hide the TP Bar for an actor by putting <HideBattleStatusTp: 1> in their notetags and/or hide their
    MP bar by putting <HideBattleStatusMp: 1> in their notetags.

    Screenshots

    Spoiler



    How to Use
    Create a .js file (you can do so with a text editor by saving the file with .js at the end) and paste the script into it, then put it in the js\plugins folder for your project. The filename should be something descriptive to what it is in my opinion, but it's up to you. Turn the plugin on and you are good to go.

    Script
    Spoiler//=============================================================================// Simple Battle Status Faces// by lolaccount// Last Updated: 2015.11.26//=============================================================================/*: * @plugindesc v1.02 Draws the actor's face in battle status, with the   * goal of not blocking the actor's faces too much. * <lolaccount Simple Battle Status Faces> * * @author lolaccount * * @param ---Compatibility--- * @default * * @param Show ATB Bar * @desc Show ATB bar for ATB plugins? * Yes - true        No - false        Default: true     * @default true * * @param ATB Bar Position * @desc Options: bottomleft, bottomright Default: bottomleft * @default bottomleft * * @help This plugin does not provide plugin commands. * You can hide the tp bar for an actor by using <HideBattleStatusTp: 1> and/or * hide the mp bar for an actor by using <HideBattleStatusMp: 1> * ============================================================================ * Patch Notes * ============================================================================ * v1.02 - Added some support for Yanfly's ATB. * v1.01 - Added some support for Ellye's Simple ATB. The bar needs improving * for the default resolution, but looks good fullscreen. Will improve * default resolution ATB bar in an update. * Added some support for default resolution and 3 party members. * Still won't look very good with more than 3 party members with default * resolution. * ============================================================================ * How To Use * ============================================================================ * Plug and play. * ============================================================================ * Terms Of Use * ============================================================================ * Free to use and modify for commercial and noncommercial games, with or * without credit, as long as you do not claim the script as your own. * Credit is appreciated though. */var Imported = Imported || {};// Get parameters(function () {    var parameters = $plugins.filter(function (p) {        return p.description.contains('<lolaccount Simple Battle Status Faces>');    })[0].parameters; //Thanks to Iavra    // whether to show ATB bar if that is the battle system    var showATBbar = String(parameters['Show ATB Bar'] || 'true');    // where to draw atb bar    var atbBarPos = String(parameters['ATB Bar Position'] || 'bottomleft');    showATBbar = eval(showATBbar);    if (Imported.YEP_X_BattleSysAT
    {        Window_BattleStatus.prototype.redrawATB = function () {            if (showATBbar) {                if (this.isATBGaugeStyle(0))                    return;                for (var i = 0; i < $gameParty.battleMembers().length; ++i) {                    var actor = $gameParty.battleMembers();                    var otherRect = this.itemRect(i);                    var textRect = this.itemRectForText(i);                    if (atbBarPos == 'bottomleft') {                        this.drawActorAtbGauge(actor, otherRect.x + 4, textRect.y + this.lineHeight() * 3, Window_Base._faceWidth - 6);                    }                    else if (atbBarPos == 'bottomright') {                        this.drawActorAtbGauge(actor, otherRect.x + Window_Base._faceWidth + 4, textRect.y + this.lineHeight() * 3, otherRect.width - Window_Base._faceWidth - 11);                    }                }            }        };    }// override the difficult itemRect for a window    Window_BattleStatus.prototype.itemRect = function (index) {        var rect = new Rectangle();        var maxCols = this.maxCols();        rect.width = this.itemWidth();        rect.height = this.itemHeight();        rect.x = rect.width * index;        rect.y = 0;        return rect;    };    Window_BattleStatus.prototype.itemWidth = function () {// decide the width of each "item," or the space each actor occupies in battle status, by the size of the party        return Math.floor(((this.width - this.padding * 2 +                this.spacing()) / 1 - this.spacing()) / $gameParty.battleMembers().length);    };    Window_BattleStatus.prototype.maxCols = function () {// the maximum amount of columns is the number of members in the party        return $gameParty.battleMembers().length;    };    Window_BattleStatus.prototype.itemHeight = function () {// the height of each item is the height of the battle status window minus from padding so it looks nicer        return Math.floor((this.height - this.padding * 2 +                this.spacing()) / 1 - this.spacing());    };    Window_BattleStatus.prototype.drawItem = function (index) {        // we can get the actor from the index passed to this function        var actor = $gameParty.battleMembers()[index];        // the rectangle w/dimensions from another method designed for text        var textRect = this.itemRectForText(index);        // a general rectangle from another method            var otherRect = this.itemRect(index);        // variable for deciding where to place state/buff icons, x axis            var iconPos;        // variable for deciding iconWidth        var iconWidth;        // variable for deciding where to place tp bar, y axis        // we're setting the default here        var tpBarY = otherRect.y + (this.lineHeight() * 2);        var gaugeWidth;        var gaugeX;        // decide gauge width and x        if ((SceneManager._screenWidth <= 816 && $gameParty.battleMembers().length == 3)) {            gaugeWidth = otherRect.width - (Window_Base._faceWidth * .8) - 11;            gaugeX = otherRect.x + (Window_Base._faceWidth * .8) + 4;        }        else {            gaugeWidth = otherRect.width - Window_Base._faceWidth - 11;            gaugeX = otherRect.x + Window_Base._faceWidth + 4;        }        // draw the actor's face on the bottom most "layer"        this.drawActorFace(actor, otherRect.x, otherRect.y);        // draw Mellye's Simple ATB atb bar if imported        if (Imported.Ellye_ATB == true && showATBbar) {            if (atbBarPos == 'bottomleft') {                this.drawActorATB(actor, otherRect.x + 4, textRect.y + this.lineHeight() * 3, Window_Base._faceWidth - 6);            }            else if (atbBarPos == 'bottomright') {                this.drawActorATB(actor, otherRect.x + Window_Base._faceWidth + 4, textRect.y + this.lineHeight() * 3, otherRect.width - Window_Base._faceWidth - 11);            }        }        // draw the actor's name        this.drawActorName(actor, textRect.x, textRect.y, 150);        // draw actor hp bar        this.drawActorHp(actor, gaugeX, otherRect.y + (this.lineHeight() * 0), gaugeWidth);        // draw the actor's mp if it is not set to be hidden for the actor        if ($dataActors[actor._actorId].meta.HideBattleStatusMp != 1) {            this.drawActorMp(actor, gaugeX, otherRect.y + (this.lineHeight() * 1), gaugeWidth);        }        else {            // if it was set to be hidden, we should adjust the tp bar y position            tpBarY = otherRect.y + (this.lineHeight() * 1);        }        // if tp is on, draw the actor's tp        if ($dataSystem.optDisplayTp) {            // draw the tp bar if it was not set to be hidden for the actor            if ($dataActors[actor._actorId].meta.HideBattleStatusTp != 1) {                this.drawActorTp(actor, gaugeX, tpBarY, gaugeWidth);            }        }        if (Imported.Ellye_ATB != true) {            iconWidth = otherRect.width;            // if there are many icons taking up the actor's space in the status, shove the icons to the right            if ((actor.allIcons().length * Window_Base._iconWidth - 3) > otherRect.width - Window_Base._faceWidth) {                iconPos = otherRect.x + 1 + (otherRect.width - (actor.allIcons().length * Window_Base._iconWidth) - 3);            }            // if there's not too many icons taking up the actor's space in the status, don't shove the icons all the way to the right            else {                iconPos = otherRect.x + Window_Base._faceWidth + 4;            }        }        else if (showATBbar) {            if (atbBarPos == 'bottomleft') {                iconWidth = otherRect.width - Window_Base._faceWidth - 4;                iconPos = otherRect.x + Window_Base._faceWidth + 4;            }            else if (atbBarPos == 'bottomright') {                iconWidth = Window_Base._faceWidth;                iconPos = otherRect.x + 4;            }            // the default - bottom left            else {                iconWidth = Window_Base._faceWidth + -4;            }        }        // draw the icons        this.drawActorIcons(actor, iconPos, otherRect.y + (this.lineHeight() * 3), iconWidth);    };})();




     
    Credit and Thanks
    - lolaccount

    Author's Notes
    Free to use and modify for commercial and noncommercial games, with or without credit, as long as you do not claim the script as your own. Credit is appreciated though.[url=https://forums.rpgmakerweb.com/attachments/screen-jpg.25768/][/url]



    本贴来自国际rpgmaker官方论坛作者:DreamX处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/simple-battle-status-faces.49806/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 05:48 , Processed in 0.086974 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表