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

[转载发布] Skip Skill Type

[复制链接]
累计送礼:
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 天前 | 显示全部楼层 |阅读模式
    When you don't want the player to select a type first, but instead go directly to the full list of skills, feel free to use and edit this here:

                    JavaScript:       
    1. //=============================================================================
    2. // SkipSkillType.js
    3. //=============================================================================
    4. /*:
    5. * @plugindesc Skips the "Type" part of the skill selection.
    6. * @author Titan_Ungovernable
    7. *
    8. * @help
    9. *
    10. * When you select a skill from the field or in battle, by default you have to
    11. * select the skill type first. This plugin skips this step.
    12. *
    13. * The space that is usually occupied by the "Type" is used for info on MP / TP.
    14. * This leaves room for improvement in edits of this plugin.
    15. *
    16. * No restrictions on the use of this plugin other than mentioning:
    17. * SkipSkillType plugin by forums.rpgmakerweb.com user Titan_Ungovernable.
    18. */
    19. "use strict";
    20. if (!("globalThis" in this))
    21.     // make globalThis work in e.g. the RMMV engine
    22.     this.globalThis = this;
    23. globalThis.Scene_Skill = class extends Scene_Skill {
    24.     start () {
    25.         super.start();
    26.         this._itemWindow.activate();
    27.         this._itemWindow.selectLast();
    28.     }
    29.     create () {
    30.         super.create();
    31.         this.createSkillExtWindow();
    32.         this._statusWindow.width -= this._skillExtWindow.width;
    33.         this.refreshActor();
    34.     }
    35.     createSkillExtWindow () {
    36.         const w = Window_SkillType.prototype.windowWidth();
    37.         const x = Graphics.boxWidth - w;
    38.         const y = this._statusWindow.y, h = this._statusWindow.height;
    39.         this._skillExtWindow = new Window_SkillExt(x, y, w, h);
    40.         this.addWindow(this._skillExtWindow);
    41.     }
    42.     createSkillTypeWindow () {
    43.         this._skillTypeWindow = {
    44.             // dummy object that keeps the rest of the scene functioning
    45.             width: 0,
    46.             height: Window_SkillType.prototype.windowHeight(),
    47.             setSkillWindow: w => {},
    48.             setActor: a => {},
    49.         };
    50.     }
    51.     onItemCancel () {
    52.         this.popScene();
    53.     }
    54. };
    55. globalThis.Window_SkillList = class extends Window_SkillList {
    56.     includes (item) {
    57.         // normally, this would filter by skill type
    58.         return !!item;
    59.     }
    60.     updateHelp () {
    61.         super.updateHelp();
    62.         // when the usual info box is updated, we can refresh the Ext window, too
    63.         // TODO: cleaner way for this
    64.         SceneManager._scene._skillExtWindow.refresh();
    65.     }
    66. };
    67. globalThis.Window_SkillExt = class Window_SkillExt extends Window_Base {
    68.     refresh () {
    69.         this.contents.clear();
    70.         const item = SceneManager._scene.item();
    71.         if (!item)  return;
    72.         let line = 0;
    73.         const lineH = this.lineHeight();
    74.         if (item.mpCost !== 0) {
    75.             this.drawText(`- ${item.mpCost}${TextManager.mpA}`, 0, 0, 9999);
    76.             line++;
    77.         }
    78.         if (item.tpCost !== 0) {
    79.             this.drawText(`- ${item.tpCost}${TextManager.tpA}`, 0, line * lineH, 9999);
    80.             line++;
    81.         }
    82.         if (item.tpGain !== 0) {
    83.             this.drawText(`+ ${item.tpGain}${TextManager.tpA}`, 0, line * lineH, 9999);
    84.             line++;
    85.         }
    86.     }
    87. };
    复制代码


    Tested in the field and in battle with no problems found.


    本贴来自国际rpgmaker官方论坛作者:Taiten89处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/skip-skill-type.160965/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-1 04:49 , Processed in 0.114450 second(s), 54 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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