ページ 1 / 1
【解決】要望:スキルコマンド拡張
Posted: 2020年4月29日(水) 06:17
by EsiR
戦闘時のコマンドで、「スキル」というコマンドを選択した 後 でスキルタイプ別のコマンドを選択できるようなプラグインを探しています。
イメージ的には既存のゲームで例えると、FF11や東方自然癒のようか感じです。
MPを消費する技を魔法、TPを消費する技をスキルと分け、
魔法を選ぶと魔法カテゴリが出る
ーーーーーーーーーーーーーーーーーーーーーーー
攻撃 →攻撃魔法
→魔法▶ 回復魔法
スキル▶ → 補助魔法
アイテム 妨害魔法
にげる
スキルを選ぶとスキルカテゴリが出る
ーーーーーーーーーーーーーーーーーーーーーーー
攻撃 →クラススキル
魔法▶ ウェポンスキル
→スキル▶ → 必殺技
アイテム パッシブスキル確認
にげる
みたいな感じのものをお願いしたいです。自力で半年くらい探してましたが結局見つからず、リクエストさせていただきました。
よろしくお願いします。
Re: 要望:スキルコマンド拡張
Posted: 2020年4月29日(水) 12:30
by ムノクラ
EsiR さんが書きました:戦闘時のコマンドで、「スキル」というコマンドを選択した 後 でスキルタイプ別のコマンドを選択できるようなプラグインを探しています。
イメージ的には既存のゲームで例えると、FF11や東方自然癒のようか感じです。
MPを消費する技を魔法、TPを消費する技をスキルと分け、
魔法を選ぶと魔法カテゴリが出る
ーーーーーーーーーーーーーーーーーーーーーーー
攻撃 →攻撃魔法
→魔法▶ 回復魔法
スキル▶ → 補助魔法
アイテム 妨害魔法
にげる
スキルを選ぶとスキルカテゴリが出る
ーーーーーーーーーーーーーーーーーーーーーーー
攻撃 →クラススキル
魔法▶ ウェポンスキル
→スキル▶ → 必殺技
アイテム パッシブスキル確認
にげる
みたいな感じのものをお願いしたいです。自力で半年くらい探してましたが結局見つからず、リクエストさせていただきました。
よろしくお願いします。
下記で実現できると思います。
日本語版 SRD Skill Extender プラグイン Ver1.04
https://fungamemake.com/archives/9363
Re: 要望:スキルコマンド拡張
Posted: 2020年4月30日(木) 07:30
by EsiR
ムノクラ 様
返信ありがとうございます。
早速実装して設定組んで動かしてみたところ、拡張ヘルプウィンドウが画面のど真ん中に表示されました。
この拡張スキルウィンドウをヘルプウィンドウの真下に動かしたいのですが、プラグイン管理のパラメータからは設定できなかったので、jsファイルを開いてみました。
434行~493行内、Window_SkillExtend のどこかだとは思うのですが、どこをどう書き換えればいいかがわかりませんでした。
可能であればどこをどんな感じに書き換えれば良いか教えていただけると助かります。
お手数をおかけして申し訳ありませんが、宜しくお願い致します。
コード: 全て選択
//-----------------------------------------------------------------------------
// Window_SkillExtend
//-----------------------------------------------------------------------------
Window_SkillExtend.prototype = Object.create(Window_SkillList.prototype);
Window_SkillExtend.prototype.constructor = Window_SkillExtend;
Window_SkillExtend.prototype.initialize = function () {
this._skillList = [];
this._displayType = _.defaultStyle;
this._displayAlign = _.defaultAlign;
this._displayLearned = false;
Window_SkillList.prototype.initialize.call(this, 0, 0, _.defaultWidth, 1);
this.updatePlacement();
this.openness = 0;
this._actor = null;
this.deactivate();
};
Window_SkillExtend.prototype.maxCols = function () {
return 1;
};
Window_SkillExtend.prototype.updatePlacement = function () {
this.makeItemList();
this.height = this.fittingHeight(this._data.length.clamp(1, _.maxRows));
this.x = (Graphics.boxWidth - this.width) / 2;
this.y = (Graphics.boxHeight - this.height) / 2;
};
Window_SkillExtend.prototype.setup = function (skill) {
this._skillList = skill._se_extendSkills;
this.width = skill._se_extendSkillsWidth || _.defaultWidth;
this._displayType = (skill._se_extendSkillsStyle === undefined) ? _.defaultStyle : skill._se_extendSkillsStyle;
this._displayAlign = skill._se_extendSkillsAlign || _.defaultAlign;
this._displayLearned = !!skill._se_extendSkillsLearned;
this.updatePlacement();
this.refresh();
};
Window_SkillExtend.prototype.drawItem = function (index) {
if (this._displayType) {
const rect = this.itemRectForText(index);
const skill = this._data[index];
this.resetTextColor();
this.changePaintOpacity(this._actor.canUse(skill));
this.drawText(skill.name, rect.x, rect.y, rect.width, this._displayAlign);
} else {
Window_SkillList.prototype.drawItem.apply(this, arguments);
}
};
Window_SkillExtend.prototype.makeItemList = function () {
this._data = [];
this._skillList.forEach(function (id) {
if (!this._displayLearned || this._actor.hasSkill(id)) {
this._data.push($dataSkills[id]);
}
}, this);
};
Re: 要望:スキルコマンド拡張
Posted: 2020年4月30日(木) 09:02
by Plasma Dark
コード: 全て選択
if (SRD && SRD.SkillExtender) {
(function (_) {
'use strict';
Window_SkillExtend.prototype.updatePlacement = function () {
this.makeItemList();
this.height = this.fittingHeight(this._data.length.clamp(1, _.maxRows));
this.x = (Graphics.boxWidth - this.width) / 2;
this.y = this._helpWindow ? this._helpWindow.height : (Graphics.boxHeight - this.height) / 2;
};
})(SRD.SkillExtender);
}
こんな感じのプラグインを作って SRD_SkillExtender.js よりも下に追加してみてください。
Re: 要望:スキルコマンド拡張
Posted: 2020年4月30日(木) 20:28
by EsiR
Plasma Dark 様
イメージ通りに良い感じのができました。ありがとうございました。