- 累计送礼:
- 0 个
- 累计收礼:
- 1 个
TA的每日心情 | 开心 2026-7-12 04:10 |
|---|
签到天数: 209 天 连续签到: 2 天 [LV.7]常住居民III

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


|
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: - //=============================================================================
- // SkipSkillType.js
- //=============================================================================
- /*:
- * @plugindesc Skips the "Type" part of the skill selection.
- * @author Titan_Ungovernable
- *
- * @help
- *
- * When you select a skill from the field or in battle, by default you have to
- * select the skill type first. This plugin skips this step.
- *
- * The space that is usually occupied by the "Type" is used for info on MP / TP.
- * This leaves room for improvement in edits of this plugin.
- *
- * No restrictions on the use of this plugin other than mentioning:
- * SkipSkillType plugin by forums.rpgmakerweb.com user Titan_Ungovernable.
- */
- "use strict";
- if (!("globalThis" in this))
- // make globalThis work in e.g. the RMMV engine
- this.globalThis = this;
- globalThis.Scene_Skill = class extends Scene_Skill {
- start () {
- super.start();
- this._itemWindow.activate();
- this._itemWindow.selectLast();
- }
- create () {
- super.create();
- this.createSkillExtWindow();
- this._statusWindow.width -= this._skillExtWindow.width;
- this.refreshActor();
- }
- createSkillExtWindow () {
- const w = Window_SkillType.prototype.windowWidth();
- const x = Graphics.boxWidth - w;
- const y = this._statusWindow.y, h = this._statusWindow.height;
- this._skillExtWindow = new Window_SkillExt(x, y, w, h);
- this.addWindow(this._skillExtWindow);
- }
- createSkillTypeWindow () {
- this._skillTypeWindow = {
- // dummy object that keeps the rest of the scene functioning
- width: 0,
- height: Window_SkillType.prototype.windowHeight(),
- setSkillWindow: w => {},
- setActor: a => {},
- };
- }
- onItemCancel () {
- this.popScene();
- }
- };
- globalThis.Window_SkillList = class extends Window_SkillList {
- includes (item) {
- // normally, this would filter by skill type
- return !!item;
- }
- updateHelp () {
- super.updateHelp();
- // when the usual info box is updated, we can refresh the Ext window, too
- // TODO: cleaner way for this
- SceneManager._scene._skillExtWindow.refresh();
- }
- };
- globalThis.Window_SkillExt = class Window_SkillExt extends Window_Base {
- refresh () {
- this.contents.clear();
- const item = SceneManager._scene.item();
- if (!item) return;
- let line = 0;
- const lineH = this.lineHeight();
- if (item.mpCost !== 0) {
- this.drawText(`- ${item.mpCost}${TextManager.mpA}`, 0, 0, 9999);
- line++;
- }
- if (item.tpCost !== 0) {
- this.drawText(`- ${item.tpCost}${TextManager.tpA}`, 0, line * lineH, 9999);
- line++;
- }
- if (item.tpGain !== 0) {
- this.drawText(`+ ${item.tpGain}${TextManager.tpA}`, 0, line * lineH, 9999);
- line++;
- }
- }
- };
复制代码
Tested in the field and in battle with no problems found.
本贴来自国际rpgmaker官方论坛作者:Taiten89处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址: https://forums.rpgmakerweb.com/threads/skip-skill-type.160965/ |
|