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

[转载发布] Display All Status Icons

[复制链接]
累计送礼:
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

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    Display All State Icons


    v1.0 by Wavelength


    for RPG Maker MV


            Just a humble script I wrote for a friend, and figured I'd share with everyone since I was surprised I couldn't find anything that did it already.


            By default the player can only see a few state icons in battle or the status menu, leaving them with incomplete information when an actor has several different statuses applied.  This script will automatically shrink the state icons when an actor has too many state icons to display at full size, so that the player can see far more icons for each actor.


            This plugin does not use standard "plugin parameters", but you can open the script in a text editor to easily change the amount that you want the icons to scale.


            Download the script here or just open the code below. 

    Spoiler                Code:       
    1. ////////////////////////////////////////
    2. //        ICON SCALING SCRIPT         //
    3. //         for RPG Maker MV           //
    4. //           Version 1.0              //
    5. //  by Jason "Wavelength" Commander   //
    6. ////////////////////////////////////////
    7. // By default, only a few state icons can be shown at once.  This script will scale down the icons'
    8. // display size by a factor of your choice if there are too many to display at full size, so that
    9. // players can be aware of all of the states that are currently affecting their actors.
    10. // TERMS OF USE
    11. // You may use this script for your commercial or noncommercial RPG Maker games.
    12. // You must credit me in your game or documentation (as Jason Commander or as Wavelength).
    13. // For any other use of this script besides inclusion in an RPG Maker game, contact me.
    14. // Thanks!
    15. // This value can be changed to determine how much to scale down the icons when there are too many to
    16. // display at full size.  For example, a value of 2 will reduce width and height by half.
    17. Game_Party.ICON_SCALE = 2;
    18. /*:
    19. *
    20. * @plugindesc This script sizes status icons down when there are too many to display at full size.
    21. * @author Jason "Wavelength" Commander
    22. * @help By opening the script in a text editor,
    23. you can change the amount that icons will scale.
    24. *
    25. * By default, they will scale to half size when
    26. * there are too many icons to display at full size.
    27. *
    28. */
    29. Window_Base.prototype.drawSmallIcon = function(iconIndex, x, y) {
    30.         var scaler = Game_Party.ICON_SCALE;
    31.     var bitmap = ImageManager.loadSystem('IconSet');
    32.     var pw = Window_Base._iconWidth / scaler;
    33.     var ph = Window_Base._iconHeight / scaler;
    34.     var sx = iconIndex % 16 * (pw * scaler);
    35.     var sy = Math.floor(iconIndex / 16) * (ph * scaler);
    36.     this.contents.blt(bitmap, sx, sy, pw * scaler, ph * scaler, x, y,
    37.                     Window_Base._iconWidth / scaler, Window_Base._iconHeight / scaler);
    38. };
    39. Window_Base.prototype.drawActorIcons = function(actor, x, y, width) {
    40.     width = width || 144;
    41.     too_big = false;
    42.     if (actor.allIcons().length > Math.floor(width / Window_Base._iconWidth)) {
    43.             too_big = true;
    44.     }
    45.     if (too_big === false) {
    46.             var icons = actor.allIcons().slice(0, Math.floor(width / Window_Base._iconWidth));
    47.             for (var i = 0; i < icons.length; i++) {
    48.                 this.drawIcon(icons[i], x + Window_Base._iconWidth * i, y + 2);
    49.             }
    50.         } else {
    51.                 var scaler = Game_Party.ICON_SCALE;
    52.                 row_size = (Math.floor(width / (Window_Base._iconWidth / scaler)));
    53.                 rows_needed = Math.floor((actor.allIcons().length - 1) / row_size) + 1;
    54.                 for (j = 0; j < rows_needed; j++) {
    55.                         var icons = actor.allIcons().slice(0,
    56.                                         Math.floor(width / (Window_Base._iconWidth / (scaler * scaler))));
    57.                     for (var i = 0; i < row_size; i++) {
    58.                         this.drawSmallIcon(icons[(j * row_size + i)],
    59.                                         x + ((Window_Base._iconWidth / scaler) * (i % row_size)),
    60.                                         y + (j * (Window_Base._iconHeight / scaler)) + 2);
    61.                         if (((j * row_size) + i + 1) >= actor.allIcons().length) {
    62.                                 break;
    63.                         }
    64.                         }
    65.                 }
    66.         }
    67. };
    复制代码







    Screenshots:

    Spoiler









    Terms of Use:


            You may use this script for your commercial or noncommercial RPG Maker games.
            You must credit me in your game or documentation (as Jason Commander or as Wavelength).
            For any other use of this script besides inclusion in an RPG Maker game, contact me.


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-1 02:34 , Processed in 0.139403 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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