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

[转载发布] States icons display change

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

    连续签到: 2 天

    [LV.7]常住居民III

    8101

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 5 天前 | 显示全部楼层 |阅读模式
    Hi all,

    So I made this little plugin for my game and decided to share it with you. I don't consider it as "official" or anything, since it will probably have some compatibility issues, and I only made it for my game anyway. However, you may edit it to work for yours too.

    So in this case I will not upload it to my GitHub, instead I will just upload it here.

    WHAT IT DOES:

    By default, state icons are displayed in a single line below the character's name and level. In my case i'm not using a face for my actor, so I wanted them to be displayed there.

    Also, instead of using the 1 line, I wanted them to be displayed in 2 (if it's below the name) or 4 (if it's at the space where the face would be). So, basically, if you use the "face"'s space, you can have up to 16 states' icons displayed at the same time!

    HOW TO USE:

    1. Copy the raw code and paste it in a JS file
    2. Name the file "Makai_States_Display.js"
    3. Put that file in your plugin folder.
    4. Turn it on from your plugins manager (duh)

    EDIT: Discussing it with people with far more JS experience than me, I was informed that not everything is saved in the game files. This means that my initial script calls to alter the game windows would (probably) have to be re-run each time. So I removed them. Now the plugin takes effect immediately, while the original version of the game window is stored in maka.states.default



    There may be bugs since i'm still learning, but, again, feel free to edit and use and, of course, correct me


    Here it is:

    Spoiler: Raw code
                    Code:       
    1. /*:
    2. *@plugindesc Change how many states' icons are displayed and where v1
    3. *@author Makai Rosi
    4. *
    5. *@param States Position Face
    6. *@type boolean
    7. *@on YES
    8. *@off NO
    9. *@desc If you aren't using a face for your actors, we can make use of that space.
    10. *YES - true     NO - false
    11. *@default true
    12. *
    13. *@param Lines
    14. *@desc The max lines of the states
    15. *@default 4
    16. *
    17. *@help
    18. *This humble little plugin REPLACES how state icons are drawn on the status page.
    19. *If you have no face for your actor, you can use that space.
    20. *Also, put how many lines you want to be displayed at once.
    21. *Note that there is space for 4 lines where the face is, and space for 2 lines
    22. *if you use the default space.
    23. *
    24. *
    25. *I have no idea what other plugins this is compatible with. I made it for my
    26. *game, but share it in case it helps you too.
    27. *
    28. *
    29. *As always, feel free to edit it, just credit me in your plugin's help file.
    30. *
    31. */
    32. //plugin starts here
    33. var maka = maka || {};
    34. maka.states = maka.states || {};
    35. (function(){
    36.   maka.parameters = PluginManager.parameters('Makai_States_Display');
    37.   maka.param = maka.param || {};
    38.   maka.param.statesFacePos = eval(String(maka.parameters['States Position Face']));
    39.   maka.param.lines = maka.parameters['Lines'];
    40. //======================================FUNCTIONS=====================================================//
    41. maka.states.default = Window_Base.prototype.drawActorIcons;
    42.     Window_Base.prototype.drawActorIcons = function(actor, x, y, width) {
    43.       width = width || 144*maka.param.lines;
    44.       var icons = actor.allIcons().slice(0, Math.floor(width / Window_Base._iconWidth));
    45.       var new_i = 0;
    46.       var new_posy = 0;
    47.       var new_posx = 0;
    48.       var iconLine = 0;
    49.       if(maka.param.statesFacePos==true){
    50.       new_posy = 70;
    51.       new_posx = 150;
    52.     };
    53.       for (var i = 0; i < icons.length; i++) {
    54.           if(new_i==4){
    55.               iconLine++;
    56.               new_i=0;
    57.           };
    58.           this.drawIcon(icons[i], x - new_posx + Window_Base._iconWidth * new_i, y + 2 + iconLine*34 - new_posy);
    59.       new_i++;
    60.       };
    61.   };
    62. })(maka.states);
    复制代码
    I hope you find some use for it!

    EDIT: The changed state of the plugin might not be saved when you save your game. I will edit it soon so that it works immediately, rather than with a script call. <-DONE!

    License:
    Use freely as commercial, non-commercial, whatever. Edit it as you wish but if you do i'd like to be credited as the original author inside the plugin description. If you want to be extra nice, you can include this page's link as well.


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-1 12:55 , Processed in 0.064187 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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